Repository navigation
exports: report disposition honestly in record archives and verification - #251
Open
fieldmouseworks-workers[bot] wants to merge 4 commits into
Open
fieldmouseworks-workers[bot] wants to merge 4 commits into
fieldmouseworks-workers[bot] wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…es apart Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Fixes #215. Refs #64, #44.
Record exports now carry disposition in the archive itself. A file verified alone says which content it holds, which records were lawfully disposed, and where a policy boundary closed the metadata. It never claims destroyed bytes were checked or that a scope is legally complete.
What changes
docs/formats/record-export.md). The archive manifest addsdisposition_evidence: a path and SHA-256 fordisposition/evidence.json, a portable disposition evidence document for the scope, ornull.unitslists retained versions only. It may be empty only when the evidence accounts for the scope.format_version1, so trainee packets and installation exports are unchanged.record_export.rs,record_export/disposition.rs). The manifest and evidence are read in one transaction.draft_access::may_read_disposed_record).zip'sZipWriterfinalizes itself on drop. A failed streamed export used to append a central directory and reach the client as a readable ZIP, with only a missing unit to show the failure.ArchiveWriternow seals its sink when dropped unfinished, so a failed archive is never finalized. This is shared by every export family.export_verify/record.rs, file-only). Version 1 and version 2 are dispatched by name, and any other version is refused.content_status()distinguishes retained-only, mixed, fully disposed, retained with a policy boundary, and boundary-only outcomes. The CLI prints each one honestly.Proof
tests/fixtures/):record-export-v1.zipwas produced byorigin/main's own build (format v1), so compatibility is proven against real v1 output, not an archive rewritten through the new types.-mixed,-fully-disposedand-boundary-only. All four verify on every build, fail once tampered, and the regenerator refuses to overwrite them.tests/record_export_disposition/) cover missing and tampered evidence, conflicts, out-of-scope tombstones, unsupported versions, and a v1 archive with an extra evidence entry.EXPORT_STALL_LIMIT, so the abort cannot come from a stall.export verifyruns in an empty directory withCONSOLEBOOK_DATA_DIRunset, and the test asserts that only the three archives remain there afterwards.a_dropped_writer_leaves_no_readable_archivefails.verification_names_every_findingfails.cargo xtask proof --chromium /nix/store/v62sqj1frk8ggvbibvgicf4dqc60y5q3-chromium-158.0.8127.36/bin/chromiumran insidenix developin aheavyslot, underenv -u LD_LIBRARY_PATH, on8bea324. All 7 gates passed (guidance names, web check/build, fmt, clippy, workspace tests, build, e2e). Receipt sha2563b87d4d0875e5e6fe96aa966f5c6c3ddc82db4693673099e9abc4c0401028497. CI results are separate and still to come.Correction-ladder rung: 1 (codebase) for the failed-archive finalization, since
ArchiveWriternow makes a finalized failed archive unrepresentable, and 2 (mechanical) for its unit test and the golden pins.Roles: integrator, with one independent review pass before freezing.
🤖 Generated with Claude Code