feat: freeze OpenRouter real-E2E confirmation contract - #33
Merged
Conversation
ohdearquant
marked this pull request as ready for review
August 17, 2026 14:33
…response rejection A paid provider response was stranded when usage carried a non-conforming currency or amount: decode raised invalid_provider_response after the charge, the receipt was never persisted, and the harness is non-retrying by construction — the opposite of the contract eval/README.md freezes on this branch. _decimal_cost now certifies telemetry into the receipt or returns the schema's unavailable state, a non-dict usage degrades the same way, and the raw response bytes keep whatever was actually reported. The digit bound still runs before format(), so a compact huge-exponent lexeme cannot expand. Authority references missing the key the packet build indexes now fail at the stable authority_invalid boundary instead of escaping as a KeyError. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ohdearquant
changed the base branch from
codex/provider-media-admission-success
to
main
August 17, 2026 17:27
…ed_uncertifiable Degrading every uncertifiable telemetry shape to not_reported made the receipt claim the provider sent no cost when it did, and result.json could not distinguish a reported $12.50 against the $0.05 quote admission limit from absent telemetry. The receipt schema gains reported_uncertifiable, the adapter distinguishes absent cost from present-but-uncertifiable cost (including a non-object usage), and the summary carries the distinct status. The secret-scan verdicts (credential_material_persisted, artifact_secret_scan_failed) now survive the generic failure collapse as their own codes, the injected credential seam enforces the production token shape so an empty or non-ASCII token cannot make the artifact scan vacuous, and eval/README.md states that JSON structural budgets are a document-integrity bound distinct from telemetry judgment. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…s is pinned end to end A usage that is not an object carries no legible cost value, so recording reported_uncertifiable claimed a report that never happened — the same inversion in the other direction. reported_uncertifiable now means exactly a present cost value the adapter could not certify, the summary status is asserted end to end for a paid run, and every exit of the execute path that runs after provider evidence is durable scans the private artifacts for credential material, not only the returning ones. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The generic exception handlers collapsed every unanticipated post-response failure to execution_failed without running the artifact secret scan the surrounding code declares as an every-exit invariant. The terminal scan now runs in both handlers and its verdict outranks the collapse; a clean scan preserves the generic code. Also: _parse_json threads its stable error code into _bounded_tree, and the acceptance map names the number-lexeme document-integrity bound.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scope and safety
This is an offline and injected contract slice stacked on PR #29. It makes no live-run claim and performed no network, Keychain, or provider call. Paid execution remains blocked on governed evidence republication, trusted authority-to-session integration, a durable Studio confirmation ledger, and an idempotent credential-free post-response finalizer.
Verification