Skip to content

Report each failed storage-capture scope's failure code - #622

Merged
fazpu merged 2 commits into
mainfrom
fix/capture-refusal-reasons
Nov 18, 2026
Merged

fazpu merged 2 commits into
mainfrom
fix/capture-refusal-reasons

Conversation

@fazpu

@fazpu fazpu commented Nov 18, 2026

Copy link
Copy Markdown
Member

Summary

capture_storage_batch turned every per-Project failure into completed=None, so the hosted nightly capture could only report "2 scopes unacknowledged" with no reason. Several nights failed and the cause could not be read from the logs.

Each ManagedStorageCaptureResult now carries exactly one of completed evidence or a failure code:

  • the error's code-shaped message ([a-z0-9_]{1,64}, e.g. capture_writer_class_unknown), or
  • for free-text messages, only the exception type name. Free text can hold paths or content, so it never leaves.

When the provider context breaks, every pending scope fails, but a scope keeps its own earlier code because that is usually the root cause. The result constructor refuses evidence and failure together, or neither.

The storage-capture fixture is regenerated because it hashes this source.

Verification

  • uv run pytest on all storage-capture tests: 39 passed, 27 skipped (need Postgres/MinIO; run in CI). New src/tests/profiles/test_storage_capture_batch.py covers worker failure beside a completed peer, a broken provider context, free-text preflight errors and the result invariant.
  • ruff check, ruff format --check, pyright src/ benchmarks/: clean.
  • scripts/generate_storage_capture_fixture.py --check: current.
  • Review: GPT 6.1 sol (max), round 1: no blocking findings.

Contributor agreement

Signing on behalf of a legal entity (leave blank if accepting individually):

🤖 Generated with Claude Code

https://claude.ai/code/session_01AXAuJJ6Tswr9Q3Auc1VPKb

fazpu and others added 2 commits November 18, 2026 14:41
capture_storage_batch swallowed every per-Project exception into
completed=None, so operators only saw a count of unacknowledged scopes.
Each result now carries exactly one of completed evidence or a failure
code: the error's code-shaped message (for example
capture_writer_class_unknown) or, for free text, only its type name.
A broken provider context fails every pending scope but keeps a scope's
own earlier code, which is usually the root cause.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AXAuJJ6Tswr9Q3Auc1VPKb
@fazpu
fazpu merged commit 1c5ab0b into main Nov 18, 2026
16 checks passed
@fazpu fazpu mentioned this pull request Nov 18, 2026
1 task done
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