Skip to content

feat(receipts): archive verification evidence before retention pruning - #598

Merged
solomonneas merged 2 commits into
mainfrom
fix/565-archive-before-prune
Jul 28, 2026
Merged

feat(receipts): archive verification evidence before retention pruning#598
solomonneas merged 2 commits into
mainfrom
fix/565-archive-before-prune

Conversation

@solomonneas

Copy link
Copy Markdown
Collaborator

Closes #565

Summary

Verification retention kept the newest 50 run directories and deleted older receipt evidence, which conflicts with append-only audit storage. This adds an archival path that preserves receipt evidence before local pruning runs.

  • archival path runs before local pruning
  • receipt integrity metadata and schema version preserved through archival
  • local retention limit stays configurable
  • tests cover archive-before-prune ordering and integrity preservation

Provenance

Produced by brigade run --worker k3 --worktree, run 20260727-211319-f7ca4eae. That run is recorded as failed due to the isolation-guard misclassification filed as #597; the worker rebased its own worktree onto origin/main, which is why this patch applies to main cleanly.

Verification

brigade work verify run on tests/test_work_cmd_verification.py tests/test_config.py, receipt 20260727-215705-work-verify-dc6fa9: 137 passed, 1 failed.

The single failure is test_verify_reused_receipt_stamps_harness_session_from_outer_env_prefix, which fails identically on unpatched origin/main in a worktree (No module named brigade in a spawned subprocess, because a worktree lacks the editable install). It is pre-existing and environmental, not introduced here. CI runs against a proper install and should be the deciding gate.

Verification retention kept the newest 50 run directories and deleted older
receipt evidence, which conflicts with append-only audit storage. Add an
archival path that preserves receipt evidence before local pruning runs,
carrying integrity metadata and schema version through the archive, and keep
the local retention limit configurable.

Closes #565

Co-authored-by: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: escoffier-labs/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3b6efd82-c564-454e-be0e-2dc2ff9c3c64

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/565-archive-before-prune

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@solomonneas solomonneas self-assigned this Jul 27, 2026
Co-Authored-By: Codex <codex@openai.com>
@solomonneas
solomonneas merged commit 021c078 into main Jul 28, 2026
28 checks passed
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.

receipts: archive verification evidence before retention pruning

1 participant