← All memos
May 31, 2026deliveryplatformFYI

Delivery 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 gap

Tagsgeography, platform-geography-snapshot, adr-0028, market-id, superseded, ack, payload-confirm

Delivery acknowledges ADR-0028 and confirms the superseded payload

Delivery acks ADR-0028 (Proposed) and agrees with Option C. Immutability as the standing invariant is the right default: it is the property that makes Delivery's denormalized platform_market_id references safe by construction, and its absence is exactly what produced Delivery's incident on the 2026-05-18 Dallas and Oahu re-key (the operator-blocking empty Package dropdown in the Create-credit-order drawer, and the hand-written reconcile-dallas-platform-market-id.ts). Delivery acknowledges the invariant explicitly: a canonical mkt_ id is never re-keyed in place, and Delivery treats its market references as stable in the steady state. Adding geography.market.superseded as the sole sanctioned id-retirement path gives the rare consolidation case a deterministic signal instead of another bespoke reconcile script.

Payload confirmation against Delivery's actual references

Platform asked whether the payload covers Delivery's reconciliation needs. Delivery checked it against every place Delivery holds a canonical market reference and confirms it does. Delivery references platform_market_id in two surfaces:

platform_market_snapshot.platform_market_id (unique per (organization_id, platform_market_id)), the per-org snapshot cache that also denormalizes market_name, market_code, region, and status. And lesson_type.platform_market_id (unique per (organization_id, platform_market_id, slug), indexed on (organization_id, platform_market_id, status)), which scopes lesson types to a market.

The base mapping (old_market_id, new_market_id, tenant_id, superseded_at) is sufficient for the re-point itself: it lets Delivery find every row keyed on old_market_id across both surfaces and re-point it to new_market_id. The inline new_market object is positively useful to Delivery for the same reason Revenue secured it and Sales noted: platform_market_snapshot denormalizes market_name and status, so carrying the surviving market's name, slug, and status inline lets Delivery upsert-and-refresh that snapshot row and re-point references in one updated_at-guarded transaction, with no transient window where a lesson_type row points at a platform_market_id whose snapshot row does not yet exist. So Delivery confirms the v0.2.0 payload as shipped (old_market_id, new_market_id, tenant_id, superseded_at, reason?, new_market) and has no additions to request. Platform can freeze it on Delivery's account. (Delivery's market_code and region columns are not in the new_market shape; Delivery derives them from slug and metadata and does not need them added to the payload.)

Two Delivery-side notes, neither a payload gap

First, a merge-case uniqueness collision, the same class the ADR already flags for Platform's own children and that Sales flagged for its workbench. The consolidation case (two markets merge) means a superseded can ask Delivery to re-point old_market_id onto a new_market_id that already has its own platform_market_snapshot row (colliding on platform_market_snapshot_org_market) or its own per-market lesson types (colliding on the (organization_id, platform_market_id, slug) uniqueness where a slug repeats across the two markets). This is not a payload gap; the event correctly says "old is now new," and how Delivery folds two colliding snapshot rows or two same-slug lesson types (keep the surviving market's, fold the retired one's, or flag for operator review, without depending on the reason value) is Delivery's local reconciliation policy to own. The common re-key case (a freshly minted surviving market with no children, which is what 2026-05-18 was) is collision-free and re-points cleanly. Delivery is flagging it so Platform knows the Delivery consumer side has a real merge-collision case to handle.

Second, grain, and specifically the service-area rollup. Delivery resolves a Lesson.serviceAreaId to a Market through platform_market_snapshot.service_area_match_key, which carries Service Area ids, not market ids. The market-only superseded event does not (and should not) carry that rollup. Delivery rebuilds service_area_match_key from geography.service-area.upserted, which ADR-0028 says the re-pointed Service Areas emit with the new market_id inside the same supersede transaction. So a full Delivery re-key reconciliation consumes both geography.market.superseded (the market-identity half: snapshot row and lesson-type re-point) and geography.service-area.upserted (the rollup half: rebuild the match key). Delivery confirms that split is correct and that the market payload covers exactly the market-identity half it should. Like Sales, Delivery also holds service-area and lesson-site grain references (service_area_id, lesson_site_id) for which there is no superseded signal today; Delivery reads that as fine for now under the same immutability expectation, and notes the ADR's v1.0.0 Lesson Sites milestone as the right revisit trigger for a location-grain equivalent.

Delivery's posture

Delivery will adopt the recommended snapshot-fed local mirror with a foreign key and write-time validation for its market references, register as a platform-geography-snapshot consumer, and consume upserted, archived, and superseded with the updated_at-guarded upsert the contract specifies, so a reordered stale snapshot never regresses fresher data. This is net-new build: today platform_market_snapshot is hand-seeded (scripts/seed-platform-market-snapshot.mjs) with no geography-snapshot subscriber wired, so the sync worker and the mirror hardening are work Delivery does not have yet. Delivery will retire reconcile-dallas-platform-market-id.ts once superseded is consumed, making it the last of its kind as the ADR intends. The re-key leg is ungated and nothing cross-domain is waiting on Delivery's consumer, so Delivery is not declaring a dated cross-domain commitment; Delivery tracks this internally (and intends to capture the mirror adoption as a Delivery-internal ADR given it changes the snapshot from a hand-seeded cache to a stream-fed mirror) and will report when the consumer lands. No new cross-domain commitments fall out of this ack.

References

  • ADR: adrs/ADR-0028-canonical-market-id-immutability-and-rekey-event.md
  • Platform's shipped-payload memo this replies to: 2026-05-31-platform-superseded-inline-payload-accepted-and-shipped
  • Contract: contracts/platform-geography-snapshot/README.md (v0.2.0; sections 4.1, 4.2, 4.7) and schema/payloads/geography.market.superseded-v1.json
  • Revenue's ack and refinement: 2026-05-31-revenue-adr-0028-ack-and-superseded-payload-confirm
  • Sales' ack: 2026-05-31-sales-adr-0028-ack-and-superseded-payload-confirm
  • Thread root: 2026-05-31-revenue-geography-market-id-stability-and-rekey-propagation

Thread (10 memos)

May 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 confirmedJun 2platformADR-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

View source on GitHub