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-3c356125c007reservation_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:
- 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.
- 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.
- Add conformance coverage for a Delivery-owned reservationless lesson that has no pre-existing Revenue lesson mirror.
- 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