Repository navigation
Implement retention and verified deletion jobs - #791
Open
therealbibson wants to merge 1 commit into
Open
therealbibson wants to merge 1 commit into
therealbibson wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
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.
solved #676
Summary
This PR implements bounded retention and deletion workflows for operational data classes, with explicit legal hold protections and auditable cleanup behavior.
It addresses the production-readiness gap identified by the post-Wave-9 API audit for retention policy enforcement and verified deletion handling.
What changed
Added retention enforcement for audit logs and privacy-scrubbed data
Added bounded cleanup for notifications and delivery history
Added protection for replayed quarantine records with expiration-based retention
Ensured cleanup jobs are idempotent and bounded to eligible records only
Added audit logging for retention actions
Preserved fail-closed handling for stale, missing, ambiguous, or unauthorized state
Prevented immutable blockchain-derived data from being misrepresented as deleted
Key behaviors
Legal holds are explicit and audited
Retention windows are configurable and bounded
Cleanup only targets eligible records
Replayed/quarantined rows are kept until retention criteria are met
Non-terminal or protected records are never deleted
Jobs are safe to retry and re-run without producing unsafe side effects
Validation
Added/updated retention-focused tests for:
boundary age
legal-hold protections
retry-safe execution
partial-failure safety
invalid configuration/default behavior
idempotent cleanup behavior
audit logging and retention metadata
Verified with project test suite:
npm test
or the repository’s equivalent Jest validation command
Notes
This work is intentionally scoped to retention and verified deletion behavior and does not broaden into unrelated deployment or feature work.