Add disabled Context accounting fixtures with strict CI coverage
Problem and behavior
Context request/pilot accounting needs admission ceilings and replay-safe reservation handling. This isolated successor of #1250 carries its disabled, dependency-injected adapter and 36 offline fixtures, composes current main (10fce9198fc4bacf184405e7792563fec90f7496) through a normal merge, and closes review comment 4604591480 by adding ongoing strict type coverage.
The separate Context Accounting Strict Types workflow runs on pull requests to main and pushes to main. It follows the repository Node22/pnpm9 setup and directly runs pnpm exec tsc --noEmit --project tsconfig.context-accounting.json, including negative assertions for Promise-returning and value-or-Promise transaction callbacks. No package.json, existing test workflow, lockfile, or runtime accounting code changes were made relative to the composed candidate. README now describes the automated gate. The fixture transaction method also enforces the synchronous callback constraint directly, rejects thenables before committing draft changes, and consumes late rejections. Direct compile regressions, rollback/queue-continuation tests, a bounded reuse assertion and a specific billing rejection assertion cover the four reviewed quality findings; a comment clarifies the zero-credit validation placeholder without changing billing.
Original #1250 and its sealed evidence remain unchanged. This PR is the reviewable successor, not a second rollout. No production caller, wallet, provider, policy, migration or activation is added. This remains a partial fixture-only contribution toward recoupable/app#2123; the shared reservation composition and intended-account acceptance gates remain separately owned.
Validation
- Strict source/fixture checker and all 36 accounting tests pass on the hardening delta. The 21 incoming Sites repair tests passed at main composition; their source is unchanged.
- Negative proof: removing the callback restriction in a temporary source copy fails with both unused expected-error diagnostics, demonstrating that the checker catches regression of the synchronous contract.
- Workflow/README formatting and whitespace checks pass.
- Independent review passed for hardening head
9929d685ba8784f6b7529bb4893527eea7f2e1f7, retaining the normal main composition. All exact-head required checks passed, including the strict callback checker and full test workflow. Automated delta review found zero new issues; prior review threads remain for human disposition.
Merge remains held for explicit approval.
Summary by cubic
Adds a disabled, dependency-injected context accounting adapter with 32 offline fixtures, plus a dedicated strict type-checking CI workflow, without wiring it into any production path.
The adapter stays fixture-only: no production caller, wallet, provider, policy, migration, or activation is added, and all services and ceilings must be supplied.
Behavior covered
- Enforces admission ceilings per request and pilot with payer-partitioned ledger isolation and replay-safe settlement/release.
- Reused reservations never authorize dispatch; lost or ambiguous replies retain maximum exposure without auto-release or redispatch.
- Cancellation before durable dispatch intent releases the hold; cancellation after intent never refunds potentially paid work.
- Zero-customer-charge completions release the reservation instead of settling zero, and
billing: "endpoint_owned"is rejected.
CI gate
- New
Context Accounting Strict Typesworkflow runstsc --noEmitontsconfig.context-accounting.jsonfor PRs and pushes to main. - Negative assertions verify transaction callbacks must be synchronous and that async callbacks never commit draft mutations; removing the restriction fails the build.
- No package.json, lockfile, or runtime accounting changes; existing CI continues to execute the fixtures.
Coordinator source disposition
Recoup OS accepts exact 9929d685ba8784f6b7529bb4893527eea7f2e1f7 as a disabled, unwired accounting contract and its strict CI gate. The synchronous fixture boundary, bounded wait and specific validation regressions are fixed and independently reviewed; exact-head required checks pass. No production route, workflow or provider imports this consumer.
The remaining suggestions are non-blocking in this scope: UUID syntax is followed by required injected payer authorization before admission, so accepting UUID sentinels does not establish an authorization bypass; cohesive phase orchestration has no verified universal 100-line cap; current terminal projections and reservation patterns agree and their behavior is regression-covered. No live identity policy or broad refactor is silently adopted. Before wiring, actual authenticated attribution, durable storage, approved policy, reservation composition and reconciliation must be qualified. This source release supplies none of those runtime prerequisites and does not close the owning epic.