Implement Rec - Phase 3 complete
Quality Gate / gate (push) Successful in 2m37s

This commit is contained in:
Jim Lancaster
2026-09-02 16:15:33 -05:00
parent 4410d23f5c
commit 27ec81ca5b
13 changed files with 353 additions and 116 deletions
@@ -31,9 +31,9 @@ Enforced by `tests/test_provider_boundaries.py`.
## Contract Surface
- Every adapter satisfies the `TranscriptionProvider` protocol in `base.py`, including
`current_request_manifest` and `current_transport_evidence`, which exist so a *failed* call still
yields evidence.
- Every adapter satisfies the `TranscriptionProvider` protocol in `base.py`. Failed-call evidence is
returned through the caller-owned `ProviderCallEvidence` sink passed to `transcribe()`, so
evidence stays scoped to one invocation instead of living on mutable adapter instance state.
- `TranscriptionResult`, `RequestManifest`, and `TransportEvidence` are `extra="forbid"` and frozen.
Add a field to the contract rather than smuggling data through an untyped dict.
- Evidence contracts in `evidence.py` are versioned (`schema_name` + `schema_version`). A change to
@@ -51,6 +51,8 @@ wins if this file drifts from it.
- Reset per-call capture state at the start of every call. Without it, a connection failure can
attach the *previous* call's response as evidence for this one. Guarded by
`tests/test_v42_evidence.py::test_openrouter_does_not_reuse_prior_response_on_connection_failure`.
- Keep transport capture scoped to the call, not the adapter instance. Concurrent `transcribe()`
calls on one adapter must not be able to overwrite each other's response evidence.
- Handle the streamed-body case (`httpx.ResponseNotRead`) rather than assuming `response.content`
is always available.
- When no response arrives — timeout, DNS, connection reset — emit