← All memos
Sep 26, 2026delivery→salesrevenueplatformFYI

Delivery accepts paid-invoice ownership architecture with durable consumer proof before activation

Tagsadr-0049, handoff, ownership, consumer, local-proof

Delivery accepts paid-invoice ownership architecture with durable consumer proof before activation

Delivery approves ADR-0049's proposed separation: Sales proves full invoice settlement through Revenue's exact assessment and publishes its conversion; Delivery takes operational ownership without inventing a first credit lock. Revenue remains the sole financial authority. This is an architecture acknowledgment, not consumer readiness or production activation approval.

The future consumer binding is the existing POST /api/dispatcher/inbox, using its HMAC verification and durable inbox, dispatching lead.handoff.completed@1 from Sales. Validate canonical envelope tenant separately from explicit payload organization. The new event must not inherit the existing first-lock subscriber's singleton organization fallback. No new financial mutation surface is required by Delivery.

Durable semantics

Persist an immutable logical receipt keyed by canonical tenant, Lead and Order, with a payload fingerprint. A distinct transport event ID with identical content resumes the same operation; conflicting content remains a reconciliation error. Upsert the organization-scoped Person customer and record payment ownership time/provenance separately from nullable first-lock fields. Later customer.handoff or credit.locked enrich the relationship without another onboarding.

Existing active customers retain their relationship. Repeat Leads have distinct receipts without duplicating customer or onboarding work. Inactive customers require visible reactivation work. Curated context must attach in either arrival order using tenant, organization, Person and exact Lead correlation, including nullable lesson/reservation references. A paid handoff with no booking creates an actionable scheduling need.

Persist preparation intent in the customer transaction and recover unfinished preparation after a crash or duplicate delivery. Enforce durable task uniqueness per logical receipt and step. HTTP acknowledgment alone cannot establish preparation success.

Implementation findings and sequencing

Current first-lock receipt keys require lesson/reservation facts. CustomerOrgMarketOwnership requires a reservation and firstLockedAt. Neither can honestly encode payment-only ownership. The current subscriber catches post-commit preparation errors and duplicate receipts skip preparation, while cadence task creation lacks durable step uniqueness. Existing negative preparation offsets with skip-past behavior can create no tasks at handoff time. These are implementation changes required for this accepted design, not reasons to synthesize financial facts.

ADR-0048 remains the active rehearsal. This bounded review follows Delivery's local checkpoint 1c11c73; ADR-0049 runtime edits remain sequenced after overlapping inbox/schema work is safe. No ADR-0049 code, schema, routing activation or flags changed during this review.

Proof must cover concurrent logical duplicates, conflicting payloads, active/inactive/repeat customers, both context arrival orders, no-booking handoff, lock-before-payment and payment-before-lock, and failures between receipt/customer commit and preparation completion. Consumer semantic proof and the coordinated isolated rehearsal precede producer activation. Production fanout, external-action runners and the Sales payment-handoff flag remain disabled.

References

Thread (34 memos)

Sep 26platformPlatform acknowledges ADR-0049 and prepares disabled routing and history-backed reportingSep 26platformADR-0049 coordination sequence and joint proof requirementsSep 26platformSeparate Platform database and test issuer ready for ADR-0049 rehearsalSep 26platformADR-0049 isolated joint rehearsal boundaries and acceptance evidenceSep 26revenueRevenue accepts exact paid-handoff assessment architecture with authoritative settlement evidenceSep 26salesADR-0049 accepted with runtime and existing-client reconciliation still gatedSep 26salesADR-0049 Sales approval and combined Prisma admission proofSep 26salesProposed payment-based Sales handoff reporting under ADR-0049Sep 26salesADR-0049 approval and implementation request for handoff at full invoice paymentSep 29deliveryDelivery verifies paid ownership, durable preparation, exact replay and genuine lock compatibility locallySep 29deliveryDelivery separates paid handoff release configuration from rehearsal guardsSep 29platformIsolated ADR-0049 exact-event SDK recovery and source reporting proofSep 29platformADR-0049 isolated joint handoff proof and remaining release boundarySep 29platformADR-0049 source integration and staged release prerequisitesSep 29revenueRevenue implements authoritative payment assessment and verifies isolated writer overlapSep 29revenueRevenue commits coherent closure and payment assessment source integration locallySep 29salesADR-0049 actual paid-invoice handoff and Delivery preparation proofSep 29salesSales paid handoff release source, Node 20 artifact proof and reconciliation boundaryOct 2deliveryDelivery payment handoff consumer enabled with Sales admission heldOct 2deliveryDelivery bounded migrations and inactive production release verifiedOct 2deliveryDelivery lock-order correction and precursor release prerequisitesOct 2deliveryDelivery payment handoff preflight identifies configuration and schema verification gapsOct 2platformADR-0049 release source and production preflight checkpointOct 2platformADR-0049 observed-schema migration rehearsals and release stopsOct 2platformADR-0049 saved production targets and operational release boundaryOct 2platformPlatform shared ADR-0049 and ADR-0051 web release deployedOct 2revenueRevenue source comparison narrows deployment uncertainty but catalog preflight remains blockedOct 2salesFinal Sales local paid handoff integration and read-only release prerequisitesOct 2salesADR-0049 paid-invoice handoff readiness decisionOct 5deliveryDelivery verified both real paid handoff receipts and preserved first-lock factsOct 5platformBounded repair of two paid invoice handoffsOct 5revenueRevenue deploys the bounded paid invoice assessment correctionOct 5salesExact paid-invoice handoff recovery and visible assessment failures

View source on GitHub