Requesting a Platform decision on canonical market id stability and re-key propagation
Why
The 2026-05-18 Dallas and Oahu market migration re-keyed canonical market ids, and the stale references it left behind are still surfacing as incidents two weeks later. Revenue hit it this week as an operator-blocking empty Package dropdown in Delivery's Create credit order drawer: offerings carry a denormalized platform_market_id that went stale against the new ids, so Delivery's fail-closed market filter matched nothing. Delivery hit the same migration earlier and wrote its own reconcile-dallas-platform-market-id script. Sales mirrors the geography snapshot into platform_location_snapshot. ADR-0022 (Revenue) derives a credit account's purchase-time market from the offering tag, so the same drift reaches account provenance. This is a shared, recurring drift, not a Revenue-specific bug, and it is worth settling at the source rather than re-fixing per consumer after each migration.
The structural gap
Platform owns canonical market identity (ADR-0013) and publishes geography.market.upserted and geography.market.archived through the platform-geography-snapshot contract (v0.1.0). Those events express a market being minted, having a canonical field change, or being archived. They do not express an id re-key. When market_id itself changes, a geography.market.upserted for the new id reads to every consumer as a brand-new market, while the old id is left orphaned on every reference that points at it (Revenue offerings and accounts, Delivery snapshots, Sales caches). There is no event that says "old_market_id is now new_market_id," so no consumer can reconcile a re-key deterministically from the snapshot. Each consumer instead writes an ad-hoc reconcile script after the fact, which is exactly what produced the staggered, per-domain incidents.
The decision Revenue is asking for
This belongs to Platform as the owner of canonical geography under ADR-0013, and is likely worth a coordination ADR. Revenue is asking Platform to settle market id stability one of two ways:
Either canonical market ids are immutable: re-keys are forbidden, a migration like 2026-05-18 does not change market_id going forward, and denormalized references across all domains are safe by construction. This is the simplest contract and the one Revenue would prefer.
Or, if re-keys can occur, the platform-geography-snapshot contract gains an explicit geography.market.superseded (or rekeyed) event carrying old_market_id and new_market_id, emitted on any id change, so every consumer reconciles its references in lockstep from the stream rather than from a hand-written script. A minor version bump on the contract covers it.
Either answer makes the drift class non-recurring. The current state, where re-keys happen and propagate only through per-consumer cleanup, does not.
Revenue's own direction, for context
Independently, Revenue is moving offering market resolution off the free-form denormalized tag and onto a Revenue-local Market mirror fed by the snapshot, with a foreign key from offerings and write-time validation, so Revenue's references become referential and self-healing (Revenue-internal ADR-0023, drafted today; it also covers ADR-0022's account provenance through the same mirror). Revenue will register as a platform-geography-snapshot consumer, which the contract already anticipates. That work hardens Revenue against the upsert and archive cases on its own, but the re-key case is only fully closed once the propagation question above is answered, because a mirror still ingests an unhandled re-key as two markets. That is why Revenue is raising the contract question rather than just fixing its own tables.
Asks
Platform: decide market id stability under ADR-0013 (immutable ids, or a geography.market.superseded event on platform-geography-snapshot), and say whether you will steward a coordination ADR for it. Delivery and Sales are co-affected consumers and may want to weigh in on this thread, since both hold their own geography references.
References
contracts/platform-geography-snapshot/README.md(the snapshot stream;geography.market.upserted/.archived; Revenue named as an anticipated consumer)- ADR-0013 (Platform-owned canonical geography)
- Revenue ADR-0023 offering market resolution (revenue repo, drafted 2026-05-31); ADR-0022 credit account market provenance
2026-05-31-delivery-offerings-not-scoped-to-credit-account-market,2026-05-31-delivery-offerings-market-scope-nudge,2026-05-31-revenue-offerings-market-scope-option-a-and-catalog-audit(the incident thread)- Delivery
scripts/reconcile-dallas-platform-market-id.ts(the per-consumer reconcile precedent)