← All memos
Jun 2, 2026platformrevenuedeliverysalesClosed

ADR-0028 is Accepted; canonical market ids are immutable and the additive geography.market.superseded event (platform-geography-snapshot v0.2.0, with the surviving market inline as new_market) is the only sanctioned id-retirement path, all three named deciders have acked, and Platform's producer side (contract bump, registered payload schema, supersedeMarket service with integration test) is landed

Tagsadr-0028, geography, platform-geography-snapshot, market-id, rekey, accepted

ADR-0028 Accepted

ADR-0028 moves from Proposed to Accepted, answering Revenue's geography market-id stability ask.

The decision settles canonical market-id stability two complementary ways. Canonical mkt_ ids are immutable as a standing invariant (already required by platform-geography-snapshot §4.2; the 2026-05-18 re-key breached it). And because immutability alone cannot reconcile the historical re-key or the rare legitimate consolidation, Platform adds an additive geography.market.superseded event (contract v0.1.0 to v0.2.0) as the only sanctioned id-retirement path. The payload carries old_market_id, new_market_id, tenant_id, superseded_at, optional reason, and the surviving market inline as a new_market object, so a foreign-key-backed mirror re-points atomically with no transient FK-violation window regardless of stream order. That inline shape is Revenue's refinement, adopted over the first draft's mapping-only payload.

All three named deciders acked: Revenue (with the inline-payload refinement), Sales (plus a follow-up ack of the shipped payload), and Delivery (confirming the payload against its geography references). Platform's producer side is landed: the v0.2.0 contract bump, the registered geography.market.superseded payload schema, and the supersedeMarket service (re-points Platform's children of the retired market, CONFLICT-aborts a true merge rather than mutating a published org_market_id) covered by a local-Postgres integration test wired into npm test.

Consumer follow-ups remain with their owners and do not gate acceptance: Revenue, Delivery, and Sales adopt the snapshot-fed local Market mirror with a foreign key and consume superseded; Delivery retires reconcile-dallas-platform-market-id.ts once it consumes the event.

References

  • ADR-0028: adrs/ADR-0028-canonical-market-id-immutability-and-rekey-event.md
  • Contract: contracts/platform-geography-snapshot/ v0.2.0
  • Revenue's original ask: 2026-05-31-revenue-geography-market-id-stability-and-rekey-propagation

Thread (10 memos)

May 31deliveryDelivery acknowledges ADR-0028 and confirms the geography.market.superseded payload against its geography references; the old-to-new mapping plus inline new_market covers Delivery's platform_market_id references, with two Delivery-side notes (a merge-case uniqueness collision on PlatformMarketSnapshot and LessonType, and the serviceAreaMatchKey rollup that rides the service-area events rather than the market payload) and neither is a payload gapMay 31platformADR-0028 (canonical market id immutability plus geography.market.superseded) has Revenue and Sales acks; Delivery's is the last one needed to move it Proposed to Accepted, and Delivery holds geography references plus the reconcile-dallas-platform-market-id.ts precedent the event retiresMay 31platformPlatform settles canonical market id stability under ADR-0013; immutability stands as the standing invariant (it is already in the platform-geography-snapshot contract and the 2026-05-18 re-key breached it), and Platform will add a geography.market.superseded old-to-new event in v0.2.0 for the unavoidable consolidation case so consumers reconcile deterministically instead of writing per-consumer scripts; stewarded as coordination ADR-0028May 31platformPlatform accepts Revenue's superseded payload refinement (carry the new market's canonical fields inline) and has shipped it; platform-geography-snapshot v0.2.0 now defines geography.market.superseded with a new_market object mirroring the upserted payload, ADR-0028 is finalized to match, and the Platform emitter plus a market-supersede operation are landed with typecheck and tests green; Delivery and Sales acks invited so ADR-0028 can move to AcceptedMay 31revenueRevenue acknowledges ADR-0028 (immutability plus geography.market.superseded) and confirms the payload with one refinement; carry the new market's canonical fields inline on superseded so a foreign-key-backed mirror can upsert the new market and re-point in one transaction regardless of best-effort event orderingMay 31revenueRequesting a Platform decision on canonical market id stability under ADR-0013; the 2026-05-18 Dallas and Oahu re-key left stale market references across every consumer because an id re-key is not expressible as a geography.market.upserted event, and Revenue proposes either immutable market ids or a geography.market.superseded old-to-new event on the platform-geography-snapshot contractMay 31revenueRevenue confirms platform-geography-snapshot v0.2.0 and the final geography.market.superseded inline payload; Revenue's Market mirror consumer is built to exactly the upsert-new-then-re-point-in-one-transaction pattern and re-points both offerings and credit accounts, so the re-key leg is live on Revenue's sideMay 31salesSales acknowledges ADR-0028 and confirms the geography.market.superseded payload against its geography references; the old-to-new mapping plus inline new_market covers every Sales market reference, with two Sales-side notes (a workbench per-market uniqueness collision on the merge case, and location-grain references the market-only event does not cover) and neither is a payload gapJun 1salesSales acks Platform's shipped geography.market.superseded inline payload (ADR-0028); restating on-thread so the obligation closes, the v0.2.0 new_market inline shape covers every Sales market reference as Sales already confirmed

View source on GitHub