Infrastructure
Several GAOS instances
GAOS runs as more than one production instance: each has its own domain, its own VM, its own database and its own back office. They may call the same outside services, but they must never depend on each other. This page says what keeps them apart, and what happened the one time something did not.
The invariant
Two instances share no state and no namespace. Each one can be deployed, restarted, reseeded or removed without another one noticing (D-122). An outside service that two instances both call is shared only through a namespace that is unique per instance and set explicitly — never through a default, because the defaults are the same everywhere.
Product ids are not unique
Every instance's database numbers its products from p-1. Two instances will both have
a p-6, so anything an outside service keys by the product id alone collides.
Every shared surface
| System | Shared? | What keeps the instances apart |
|---|---|---|
| ArcadeDB | no | Each instance has its own database (GAOS_ARCADE_DB). The tenant name may repeat only across different databases. |
| ai-manager | yes | A unique GAOS_AIM_TENANT per instance. It names every workspace (gaos-<tenant>-<product> and its -review copy) and every turn (gaos.<tenant>.<run>). Unset, it falls back to GAOS_ARCADE_TENANT, which is loop-eng in every prod. |
| Brain Town | yes | One consumer per instance, with owner and repository scopes that never overlap. |
| GitHub, GitLab | a token may be | Never two instances on the same repository: both would review, fix and label the same pull request. |
| QA tool | no | Its own instance and port. |
| WhatsApp gateway | yes | Its own pinned group and GAOS_WA_PRODUCTS. |
| Back office | no | Its own GAOS_BO_LABEL, users file and session key. |
| Edge vhost, certificate, tunnel port | no | One each (Living beside other products). |
| Secret and instance files | no | deploy/stacks/prod.* and deploy/local/instances/*.env live on their VM and are never copied to another. |
Before you add an instance, or a product to one
- Name its ai-manager tenant. Put
GAOS_AIM_TENANT=<name>in the instance’sprod.dashboard.env, with a name no other instance uses, before the first Blueprint sync. The sync provisions the workspace; a name another instance already holds overwrites that instance’s workspace. - Look before the first sync of a new product. On the ai-manager host, check that no folder
gaos-<tenant>-<product>exists yet. - Give it its own Brain Town consumer and compare its scope with every other consumer’s.
- Never rename a tenant that has run work. ai-claude-cli keys its transcripts by the workspace id, and the folder holds the product’s repository checkout.
The guards
Since v0.83.2 three checks stop a collision at each point it could start (D-122):
| Where | What it refuses | What you see |
|---|---|---|
| Deploy pre-flight | A prod deploy whose prod.dashboard.env has no usable GAOS_AIM_TENANT. It stops before the running stack is touched. | FAIL GAOS_AIM_TENANT is not set … refusing to deploy (D-122) and the command that adds it |
| Dashboard boot | Starting in ai-manager mode without an explicit, usable tenant (lower-case letters, digits and dashes, at most 32). | The container exits with the reason; the pre-flight above means a deploy never gets this far without it |
| Blueprint sync, reviewer reset | Writing into a workspace that already exists on ai-manager and that this instance never provisioned — even when two instances chose the same name. Nothing is written. | A refused sync with rule foreign-workspace. If the folder really is this instance’s own (a lost provisioning reply, a restored database), list it in GAOS_AIM_ADOPT_WORKSPACES and restart, then sync again. A product with no published Blueprint has no sync, so its turns rely on the first two guards — which is why the app flags such a product on every tab and on its card, asking for a Blueprint as soon as possible. |
What happened on 2026-12-04
p-6gaos-loop-eng-p-6Both production instances called one ai-manager and both used tenant loop-eng. When the
original prod created a product p-6, the second prod already had one. The original
prod’s first Blueprint sync therefore wrote into the second prod’s live workspace, beside that
product’s repository checkout. For an hour each side’s agents ran under the other product’s rules,
and the second prod’s drift gate (BR-39) refused every dispatch of its
product — which is how it was found: the cards sat Ready with “sync it before dispatching”.
The repair: the original prod got GAOS_AIM_TENANT=office and was redeployed; the second prod
re-synced its Blueprint, which released the hold; the original prod synced its own Blueprint into its
new workspace gaos-office-p-6. The repository checkout was unchanged. The second prod keeps
loop-eng, because renaming it would orphan its workspace. Renaming the original prod was the
one safe exception to the checklist: its only product had run two turns, both inside the collided
workspace, so nothing was left behind; and its run ids differed from the second prod’s, so no turn
result was handed to the wrong instance.
How to check two instances
- Compare
GAOS_AIM_TENANT(or, where unset,GAOS_ARCADE_TENANT) of every instance that sharesGAOS_AIM_URL: they must differ. - List the Brain Town consumers: no two may share an owner and a repository.
- A product whose cards all wait with “sync it before dispatching (BR-39)” right after another
instance created a product is the symptom: read the workspace’s
CLAUDE.mdheading on the ai-manager host before you sync.
For one instance’s tiers and settings, see Development and production.