Add typed transport error evidence #105

Open
nsaspy wants to merge 11 commits from fix/61-transport-error-evidence into fix/68-expert-response-ingest
Owner

Tracks #61 as a bounded core transport-evidence slice.

Stacked on #87 so typed failures build on stream integrity and response observation without conflicting edits to the live proxy.

What changed

  • add a closed typed transport taxonomy persisted to append-only errors.jsonl, separate from immutable events.jsonl;
  • classify downstream client disconnects at the response-write boundary and do not create a completed provider CaptureEvent for them;
  • classify pre-response upstream resets separately from ordinary HTTP/provider failures;
  • classify HTTP 401/403/429 as gateway_or_account evidence and deliberately clear model attribution;
  • classify OpenRouter/in-stream error frames even when the HTTP status is 200;
  • classify silent SSE EOF using the stream_completed=false integrity evidence from #86;
  • retain safe bounded error codes only; raw provider error messages and bodies never enter errors.jsonl;
  • keep transport evidence in the transport domain rather than treating it as a model/quantization anomaly;
  • record durable invariants in Org-roam and the project Prolog KB.

RED evidence

Exact test-only head e3aed841e0cc41c48180de2938ff7f4832d65534 ran 110 tests. Exactly five new error-evidence cases failed while the new success/no-error control passed. The downstream-disconnect fixture reproduced the real aiohttp failure:

ClientConnectionResetError: Cannot write to closing transport

Existing stream-integrity and response-observation contracts remained green.

GREEN evidence

Implementation head 2af15cea6cb6a0fd0aa553ac8d5aa1be6c565038 passed:

  • full Python regression suite;
  • adversarial analytics contract;
  • quota exact-head suite;
  • delivered Python capture package build.

Final exact head 29bf347bd5b265efc9baf0afe1251910010e058c also passed both exact-head workflows after knowledge promotion and attribution hardening:

  • Analytics API run 50: success, including full Python regression + adversarial analytics.
  • Quota telemetry exact-head run 55: success, including full Python regression + delivered package build.

Boundary

This establishes the core durable taxonomy/sink and attribution rules for #61. It does not claim the entire issue is closed: provider-attempt correlation, retry-chain reasoning, alert severity/rate policy, and model/quantization anomaly detection remain separate follow-up work.

Tracks #61 as a bounded core transport-evidence slice. Stacked on #87 so typed failures build on stream integrity and response observation without conflicting edits to the live proxy. ## What changed - add a closed typed transport taxonomy persisted to append-only `errors.jsonl`, separate from immutable `events.jsonl`; - classify downstream client disconnects at the response-write boundary and do not create a completed provider CaptureEvent for them; - classify pre-response upstream resets separately from ordinary HTTP/provider failures; - classify HTTP 401/403/429 as `gateway_or_account` evidence and deliberately clear `model` attribution; - classify OpenRouter/in-stream error frames even when the HTTP status is 200; - classify silent SSE EOF using the `stream_completed=false` integrity evidence from #86; - retain safe bounded error codes only; raw provider error messages and bodies never enter `errors.jsonl`; - keep transport evidence in the `transport` domain rather than treating it as a model/quantization anomaly; - record durable invariants in Org-roam and the project Prolog KB. ## RED evidence Exact test-only head `e3aed841e0cc41c48180de2938ff7f4832d65534` ran 110 tests. Exactly five new error-evidence cases failed while the new success/no-error control passed. The downstream-disconnect fixture reproduced the real aiohttp failure: `ClientConnectionResetError: Cannot write to closing transport` Existing stream-integrity and response-observation contracts remained green. ## GREEN evidence Implementation head `2af15cea6cb6a0fd0aa553ac8d5aa1be6c565038` passed: - full Python regression suite; - adversarial analytics contract; - quota exact-head suite; - delivered Python capture package build. Final exact head `29bf347bd5b265efc9baf0afe1251910010e058c` also passed both exact-head workflows after knowledge promotion and attribution hardening: - Analytics API run 50: success, including full Python regression + adversarial analytics. - Quota telemetry exact-head run 55: success, including full Python regression + delivered package build. ## Boundary This establishes the core durable taxonomy/sink and attribution rules for #61. It does not claim the entire issue is closed: provider-attempt correlation, retry-chain reasoning, alert severity/rate policy, and model/quantization anomaly detection remain separate follow-up work.
Some checks failed
Analytics API / test (pull_request) Failing after 48s
Quota telemetry exact-head contract / quota-contracts (pull_request) Failing after 24s
Analytics API / package (pull_request) Has been skipped
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/61-transport-error-evidence:fix/61-transport-error-evidence
git switch fix/61-transport-error-evidence

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch fix/68-expert-response-ingest
git merge --no-ff fix/61-transport-error-evidence
git switch fix/61-transport-error-evidence
git rebase fix/68-expert-response-ingest
git switch fix/68-expert-response-ingest
git merge --ff-only fix/61-transport-error-evidence
git switch fix/61-transport-error-evidence
git rebase fix/68-expert-response-ingest
git switch fix/68-expert-response-ingest
git merge --no-ff fix/61-transport-error-evidence
git switch fix/68-expert-response-ingest
git merge --squash fix/61-transport-error-evidence
git switch fix/68-expert-response-ingest
git merge --ff-only fix/61-transport-error-evidence
git switch fix/68-expert-response-ingest
git merge fix/61-transport-error-evidence
git push origin fix/68-expert-response-ingest
Sign in to join this conversation.
No description provided.