Stargate Bridge Registry Surface
Product boundary
- Stargate chain and path-baseline APIs, registry services, and operator seed/completeness tools are Pro capabilities.
The entire Stargate surface is Pro (commercial license, excluded from the OSS build), including the
exec.stargate.send and exec.stargate.dst_observe executors. None of this ships in the AGPL-3.0-or-later OSS repo. OSS code reaches the Stargate registry only through the sanctioned pro_loader boundary. If you are reading this from the OSS distribution, these modules will not be present.Operator flow: configure, approve, execute, observe, recover, stop
- Configure the commercial deployment, Pro package/loader gate,
MG_STARGATE_ENABLED, required EVM RPC endpoints, and registry records. - Approve the route under the normal QTG approval and allowlist controls.
- Execute a path only after registry, quote, and signer checks succeed.
- Observe source and destination evidence through the configured path.
- Recover from durable execution evidence rather than guessing an ambiguous outcome.
- Stop and escalate when recovery evidence is incomplete or contradictory.
1. Registry Pattern Overview
Stargate lane execution is split across three operator-managed registry layers:
From an operator perspective, this is the usual way to read it:
stargate_poolsis the raw registry inventory produced by discovery/refresh.stargate_chain_registryis the operator-owned registry that condenses pool rows into chain-level control-plane facts.stargate_path_baselineis the allow/deny + SLO layer that declares actual template-path readiness.
chain_registry is the anchor for chain metadata, and path_baseline decides whether that path is allowed for operation.
2. Stargate Registry Admin
2.1 Auth boundary
This write surface reuses the existing HMACadmin purpose throughout.
No new purpose was added.
- route module guard:
require_admin_hmac() - accepted purposes:
admin,all - canonical route-purpose mapping source:
interfaces/api/middleware/auth/hmac.py
GET /v3/stargate/chains, GET /v3/stargate/path-baselines, and single-item lookups) use the read purpose, and the table below covers only the write/admin surface.
2.2 Admin route table
2.3 Field and schema notes
ChainRegistryRow response fields:
chainendpoint_identityfinality_age_secondssnapshot_versionsnapshot_stalestale_detected_atoperator_labelsnapshot_atcreated_atupdated_at
PathBaselineRow response fields:
src_chaindst_chainassetexpected_latency_secondsdetection_latency_budget_secondsfee_native_budgetenableddisabled_reasonlast_drill_pass_atlast_drill_evidence_pathbaseline_sourceoperator_labelcreated_atupdated_at
asdict(row) payloads, so the JSON shape is the service dataclass shape directly.
2.4 Typical operator workflow
The most common operator sequence is below.- Seed chain registry from discovered pools.
python -m qtg.pro.tools.seed_stargate_chain_registry --operator-label ops.seed - Seed path baselines from a reviewed JSON payload.
python -m qtg.pro.tools.seed_stargate_path_baseline path-baselines.json --operator-label ops.seed - Check completeness against template coverage.
python -m qtg.pro.tools.stargate_path_baseline_completeness - Backfill or fix missing paths, then call
POST /v3/stargate/path-baselines/{src}/{dst}/{asset}/drill-passafter a successful drill and evidence upload. - When a chain/path is retired, remove it through the corresponding
DELETEadmin route so the audit table records the removal operator.
seed_stargate_chain_registrybackfillsstargate_chain_registryfrom distinct(chain, eid)pairs instargate_poolsseed_stargate_path_baselineapplies reviewed baseline JSON intostargate_path_baselinestargate_path_baseline_completenessreports missing or disabled template paths and exits non-zero when gaps remain
2.5 Idempotency and audit semantics
Admin writes are intentionally audit-heavy, but they do not emit pointless new versions when nothing changed.chain_registry and path_baseline share the same mutation semantics:
POSTcreate: inserts row, writescreateauditPUTwith material field change: mutates row, increments version where applicable, writesupdateauditPUTwith no material field change and same operator label: no-op, no new audit rowPUTwith no material field change but different operator label: writestouchaudit so operator custody change is visibleDELETE: writesdeleteaudit first, then removes the live row
- audit row captures the last live snapshot before removal
before_jsonandafter_jsonboth contain that snapshot- row deletion happens after the audit insert so Postgres foreign-key enforcement is satisfied
2.6 Failure semantics
Common route outcomes:404: unknown chain or missing baseline (StargateChainRegistryNotFound,BaselineMissingError)409: EID collision on chain registry upsert (StargateChainEidConflict)403: HMAC purpose is notadminorall