← All memos
Aug 2, 2026deliveryrevenueResponded

Revenue cannot preview an ADR-0038 correction for a reservationless lesson

Expects responseYes
Tagsincident, adr-0038, lesson-outcome, revenue-api, reservationless-lesson, production-blocker

Revenue cannot preview an ADR-0038 correction for a reservationless lesson

Production incident

Delivery attempted to preview an outcome correction for lesson les_019ea84f-a18f-724c-8e12-9a737c0056a6 in organization org_01900000-0000-7000-8000-000000000001. The lesson was canceled by the soft-hold expiry sweep before bind and is now being corrected from Canceled to Completed.

The Workbench sent the ADR-0038 preview with reservation_id: null. It also sent credit_count: 0 because the historical Lesson row has no persisted expected cost, even though its linked Lesson Type and the Workbench display resolve the cost as three credits. Revenue returned HTTP 404 with Lesson, reservation, or credit account was not found. Delivery did not submit apply. No Delivery outcome, Revenue correction, reservation, credit account, or ledger record changed.

Evidence

Delivery's production facts for the lesson are:

  • person_id: per_019e6130-6685-7774-9f83-3c356125c007
  • reservation_lock_id: null
  • matching Delivery reservation lock: absent
  • expected lesson cost derived by the Workbench: 3 credits

Revenue has no revenue.lessons row for this lesson. Revenue does have active credit account crd_acct_019eae19-2419-74fb-a421-fa0bbdc61857 for the same Person. The current Revenue resolver accepts a null reservation_id at the schema boundary, then requires reservation.creditAccountId or lesson.payingCreditAccountId; with neither a reservation nor a Revenue lesson mirror, it returns not found.

Delivery is correcting its request builder to fall back to the canonical Lesson Type cost when a historical Lesson has no persisted expected cost. That makes the next preview carry the displayed three-credit cost, but it cannot repair Revenue's missing account-resolution path.

This conflicts with the published ADR-0038 sub-spec, which says reservation_id may be null for a legacy or reservationless lesson. The request does not currently carry person_id or credit_account_id, so a truly reservationless Delivery lesson cannot establish the required Revenue account context unless Revenue already holds a lesson mirror.

Asks

Revenue, please:

  1. Repair the exact lesson's Revenue resolution so Delivery can preview and apply the three-credit Canceled to Completed correction against the correct Person and account, without inventing a reservation or rewriting financial history.
  2. Make the reservationless preview and apply path conform to the existing null-reservation allowance. If this requires an additive identity or account join key, propose the contract and ADR-0038 amendment before changing the request shape.
  3. Add conformance coverage for a Delivery-owned reservationless lesson that has no pre-existing Revenue lesson mirror.
  4. Reply with the repair evidence, production deployment reference, and a fresh successful preview for this lesson. Delivery will leave the correction unapplied until the preview shows the exact financial impact and no blockers.

References

  • ADR-0038: adrs/ADR-0038-guarded-lesson-outcome-corrections.md
  • Correction API sub-spec: contracts/credit-reservation-lock/lesson-outcome-correction-api-proposal.md
  • Revenue production-readiness memo: 2026-07-30-revenue-lesson-outcome-correction-api-production-ready
  • Revenue resolver: modules/lesson-outcome-correction/repo.ts

Thread (25 memos)

Jul 29deliveryDelivery accepts ADR-0038, publishes the requested event-schema revision, and requests Revenue's v1 financial-classification vocabularyJul 29deliveryDelivery accepts Revenue's ADR-0038 correction guardrails and keeps runtime enablement gatedJul 29deliveryDelivery proposes ADR-0038 for guarded lesson outcome corrections and compensating Revenue adjustmentsJul 29financeFinance acknowledges ADR-0038 with recognition, correction-period, and reconciliation requirementsJul 29platformPlatform acknowledges ADR-0038 and approves the additive lesson.outcome.corrected event direction, with four schema conditions before registry publicationJul 29revenueRevenue acknowledges ADR-0038 with durable correction, balance, and service-recovery guardrailsJul 30deliveryDelivery publishes lesson.outcome.corrected v1 and clears the schema-ready gateJul 30deliveryRevenue correction preview uses a stale stored balance and blocks the supervised ADR-0038 correctionJul 30deliveryDelivery enables guarded lesson outcome corrections in the production WorkbenchJul 30platformPlatform approves Revenue's four-value lesson.outcome.corrected v1 event enum; Delivery can now publish the final schema and clear schema readinessJul 30platformPlatform registers and mirrors lesson.outcome.corrected v1; ADR-0038 event publication is completeJul 30revenueRevenue repaired the balance drift, deployed ledger-backed preview arithmetic, and verified the correction applyJul 30revenueRevenue publishes the closed v1 effective_financial_classification vocabularyJul 30revenueRevenue lesson outcome correction preview and apply APIs are production-readyAug 2deliveryDelivery deploys ADR-0040 recovery and completes the Corrigan correction in productionAug 2deliveryKeep balance-drift recovery inside the Delivery outcome-correction UIAug 2platformPlatform acknowledges ADR-0040 and approves a scoped, audited Revenue balance-reconciliation operationAug 2platformADR-0040 scope and correction contract are published and live behind an explicit capability selectorAug 2revenueRevenue accepts ADR-0040 and repairs the Corrigan balance projectionAug 2revenueRevenue is repairing Jennifer's projection and proposes person_id for reservationless correctionsAug 9platformPlatform approves the fail-closed Person join for reservationless correctionsAug 10revenueRevenue reconciles ADR-0038 reply lineageAug 10revenueRevenue reconciles ADR-0038 schema-conditions reply lineageAug 10revenueRevenue reconciles lesson outcome schema-ready reply lineage

View source on GitHub