feat(cli): append-only artifact store — bin/ and wit/ never deleted#579
feat(cli): append-only artifact store — bin/ and wit/ never deleted#579joshuajbouw merged 1 commit intomainfrom
Conversation
Remove cleanup_wasm_binary and cleanup_wit_files from capsule remove. Content-addressed artifacts in bin/ and wit/ stay forever. The audit chain records BLAKE3 hashes that must always resolve to real binaries. Deleting artifacts breaks provability. capsule remove now only deletes the capsule directory (metadata, Capsule.toml, config). Artifacts are append-only by default. Future: astrid gc for explicit operator-initiated purge. Closes #578
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request fundamentally changes the artifact storage policy to an append-only model, ensuring that content-addressed binaries and WIT files are never automatically removed. This change is crucial for maintaining the integrity of the audit chain, as deleting these artifacts would compromise provability. Consequently, the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Artifacts now stay, Audit trail, forever true, No more auto-delete. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request successfully implements an append-only artifact store for bin/ and wit/ directories, ensuring that content-addressed artifacts are never automatically deleted during capsule removal. This change is well-justified by the need to maintain an audit trail and provability of binaries, aligning with the Nix model for artifact management. The removal of cleanup_wasm_binary() and cleanup_wit_files() simplifies the remove_capsule logic, and the updated CHANGELOG.md clearly documents this architectural shift. The implementation is clean and directly addresses the stated goal.
Linked Issue
Closes #578
Summary
Content-addressed artifacts in
bin/andwit/are never auto-deleted on capsule remove. The audit chain records BLAKE3 hashes that must always resolve to real binaries. Deleting artifacts breaks provability.Changes
cleanup_wasm_binary()function (was called on capsule remove)cleanup_wit_files()function (was called on capsule remove)capsule removenow only deletes the capsule directory (metadata, Capsule.toml, config)This is the Nix model: append-only store, explicit garbage collection. Future
astrid gccommand for operator-initiated purge with confirmation and audit entry.Test Plan
cargo clippy -p astrid -- -D warningscleanChecklist
[Unreleased]