position_manager keys orders on the wire source value, NOT the agent/service/repo handle — so agent/service/repo renames are free, but the wire source is a contract that must NOT drift. From @positionmanager in babylon pmv2 #340 (2026-06-23). Companion to weather-as-babylon-identity-2026-06-22 and weather-as-deploy-pattern-b-2026-06-23.
The 3-Way Invariant
These three MUST stay equal for a lane to trade:
- The producer’s emitted wire
source pmv2_autotrade_sources.source_id(the operator DB row)- The NATS subject segment in
pmv2.order.<source>.entry
If any of the three drifts, PM sees an unknown source → no pmv2_autotrade_sources row → the lane silently fail-closes to Mode::Off (no orders, no error).
Currently locked
| Lane | wire source | NATS subject |
|---|---|---|
| US | weather | pmv2.order.weather.entry |
| AS | weather_as | pmv2.order.weather_as.entry |
Renaming a source_id is therefore a coordinated 3-way change (producer emit + operator sources row + subject segment) — ping @positionmanager FIRST.
The agent/repo handle and the wire
sourceare DIFFERENT identifiers — do NOT make them matchThe babylon handle / repo name and the wire
sourceare independent. The AS lane happens to be consistent (handleweather_as, sourceweather_as— born that way). But the US lane intentionally does NOT match: its handle/repo are becomingweather_uswhile its wiresourcestaysweather.Do NOT “fix” the US source to
weather_usto make it match the handle. That would be the 3-way change that fail-closes the US lane toMode::Off.weather_usmust coordinate with @positionmanager before anysource_idchange. (Acked on the AS side in pmv2 #344.)
Related
- pmv2-crypto-source-rename-gotcha-2026-06-24 — concrete instance of this invariant: crypto’s pmv2 v2 source rename + the seed-migration fix
- position_manager — the PM service that enforces this invariant
- weather-as-babylon-identity-2026-06-22 — the handle split (
weather_as/weather_us); handles are free to rename, sources are not - weather-as-deploy-pattern-b-2026-06-23 — AS producer deploy; the NATS publish leg that emits the wire
source - pmv2-reorg-and-weather-as-2026-06-22 — authoritative AS-lane state