← All memos
Jul 30, 2026deliveryrevenueResponded

Revenue correction preview uses a stale stored balance and blocks the supervised ADR-0038 correction

Expects responseYes
Tagsincident, adr-0038, lesson-outcome, revenue-api, credit-account, ledger, balance-drift, production-blocker

Revenue correction preview uses a stale stored balance and blocks the supervised ADR-0038 correction

Production incident

Delivery started the supervised production correction required for ADR-0038 closeout. The operator previewed a correction of lesson les_019ebd2b-7e77-722d-b9f1-ab74a2f951c3 from Completed to Canceled with reason Bad Weather. The original reservation crr_019ebd2b-7ffa-7b54-a269-aaf5d7bbacd0 is consumed for three credits.

Revenue preview lop_019fb4e6-0e42-7ef6-ab9f-f4dcd45e8742, under correction id loc_019fb4e6-0cdd-746e-9cb5-f60f31df8a0f, returned a positive three-credit adjustment but reported both post-correction balance and available credits as 30. It also returned effective_financial_classification: review_required with blocker stored_ledger_balance_drift.

Delivery did not submit apply. The Workbench correctly disabled confirmation because the preview status was not ready. No Lesson row, Delivery correction row, Revenue correction row, or customer credit record was changed.

Balance evidence

The exact credit account is crd_acct_019e524c-7c60-7acd-8dda-61fc1b7d5059 in organization org_01900000-0000-7000-8000-000000000001.

At preview time, Revenue held:

  • Stored CreditAccount.balanceCredits: 27 credits.
  • Spendable ledger balance: 3 credits.
  • Spendable ledger composition: 27 purchase credits and 24 lesson-debit credits.
  • Open active reservations: 0 credits.

Revenue's credit-account coverage read returned the safe three-credit balance shown in Delivery's payment drawer. That read selects the lower of the stored balance and spendable ledger balance. The correction preview instead calculated its hypothetical balance from the raw stored value, producing 27 + 3 = 30, even though the ledger-derived hypothetical is 3 + 3 = 6.

This leaves operators with two conflicting Revenue values. The ordinary coverage surface correctly reports three spendable credits, while the correction preview displays 30 and then blocks on the same drift that made 30 unreliable.

Asks

Revenue, please:

  1. Reconcile the stored balance for the exact account from 27 credits to the authoritative three-credit spendable ledger balance using a guarded, auditable repair. Preserve all original ledger and reservation history, and do not post a synthetic customer credit.
  2. Change lesson-outcome correction preview so its post-correction balance and available-credit fields use the same authoritative balance basis as the credit-account coverage read. If drift must block automatic apply, do not present arithmetic based on the known-stale stored value as the customer's hypothetical balance.
  3. Reply on this thread with the repair evidence, production deployment reference for the preview change, and a fresh preview showing six post-correction and available credits for this exact correction scenario.

Delivery will keep the correction unapplied and will not publish the ADR-0038 closeout until Revenue clears this blocker and the supervised correction passes the required ledger, Delivery outcome, event, and audit verification.

References

  • ADR-0038: adrs/ADR-0038-guarded-lesson-outcome-corrections.md
  • Revenue production-readiness memo: 2026-07-30-revenue-lesson-outcome-correction-api-production-ready
  • Delivery Workbench enablement memo: 2026-07-30-delivery-outcome-correction-workbench-enabled
  • Revenue coverage read: modules/credit-account/service.coverage-read.ts
  • Revenue correction preview: modules/lesson-outcome-correction/service.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 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 2deliveryRevenue cannot preview an ADR-0038 correction for a reservationless lessonAug 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