feat(retention): administer policies and attributed holds - #66
Merged
Conversation
TusanHomichi
marked this pull request as ready for review
September 5, 2026 18:47
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Sep 5, 2026
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.
Operators can now configure immutable retention policy versions and administer attributed holds through a dedicated Retention page. A new explicit
manage_retentiongrant controls installation-wide policy and hold access; no role bundle includes it. Existing user administrators grant or revoke it with an atomic reason, authority event, and audit event.Policy changes require the expected current version. Holds use typed installation, enrollment, or record scopes and preserve creation, replacement, and release history. Replacement and predecessor release commit together; revoked authority, stale policies, concurrent hold changes, and injected audit failures have integration proof. Migration 0015 enforces append-only history, vocabulary, scope shape, policy succession, and attributed replacement pairing.
ADR 0020 defines the durable contracts. Focused retention services own vocabulary, policies, holds, and explicit authority. Shared web request/error transport moves into
api/transport.tswith compatible legacy exports; retention has its own client and components. The older enrollment migration test now permits additive schema owners while asserting every preexisting object remains unchanged.This completes the administration stage only. Confirmed destruction, complete copy and backup/restore scope, independently retained tombstones, and portable disposition evidence remain in #64. Saving a policy or releasing a hold deletes nothing.
Validation at
61da869:npm ci,npm run check(zero errors/warnings), andnpm run buildpassed. Existing low-severity dependency advisories remain tracked in web(deps): resolve SvelteKit cookie audit advisory #54.cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace(165 passed), andcargo build -p consolebook-serverpassed. Local compilation used two jobs and tests used two threads.npx playwright install chromiumandnpm run e2e -- --workers=2 --trace retain-on-failure: all nine Chromium scenarios passed. The first run passed eight scenarios; the new scenario reached its final revoke step and failed on an ambiguous test label selector. That selector now uses exact matching; the complete rerun passed.Closes #65. Refs #64, #59, #44.