Repository navigation
Report each failed storage-capture scope's failure code - #622
Merged
Merged
Conversation
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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AXAuJJ6Tswr9Q3Auc1VPKb
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
capture_storage_batchturned every per-Project failure intocompleted=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
ManagedStorageCaptureResultnow carries exactly one of completed evidence or afailurecode:[a-z0-9_]{1,64}, e.g.capture_writer_class_unknown), orWhen 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 pyteston all storage-capture tests: 39 passed, 27 skipped (need Postgres/MinIO; run in CI). Newsrc/tests/profiles/test_storage_capture_batch.pycovers 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.Contributor agreement
Signing on behalf of a legal entity (leave blank if accepting individually):
🤖 Generated with Claude Code
https://claude.ai/code/session_01AXAuJJ6Tswr9Q3Auc1VPKb