Skip to content

feat: freeze OpenRouter real-E2E confirmation contract - #33

Merged
ohdearquant merged 5 commits into
mainfrom
codex/openrouter-real-e2e
Aug 17, 2026
Merged

feat: freeze OpenRouter real-E2E confirmation contract#33
ohdearquant merged 5 commits into
mainfrom
codex/openrouter-real-e2e

Conversation

@ohdearquant

Copy link
Copy Markdown
Owner

Summary

  • add a credential-free, content-bound OpenRouter challenge builder and offline authority projection
  • require a separate trusted confirmation consumer; production CLI and retired Boolean execution fail closed
  • add direct fixed-origin transport, quote-admission, secret-containment, replay, media-failure, and reporting contracts
  • preserve explicit provider cost currency in immutable receipts

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

  • 1721 passed, 5 skipped, 1 expected xfail
  • 102 focused OpenRouter, real-E2E, and publication tests passed
  • Ruff clean
  • targeted Pyright clean
  • git diff --check clean

@ohdearquant
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
ohdearquant changed the base branch from codex/provider-media-admission-success to main August 17, 2026 17:27
khive and others added 3 commits August 17, 2026 13:36
…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.
@ohdearquant
ohdearquant merged commit 638ff66 into main Aug 17, 2026
3 checks passed
@ohdearquant
ohdearquant deleted the codex/openrouter-real-e2e branch August 17, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant