Skip to content

Implement retention and verified deletion jobs - #791

Open
therealbibson wants to merge 1 commit into
DigiNodes:mainfrom
therealbibson:scratch/no-pr
Open

therealbibson wants to merge 1 commit into
DigiNodes:mainfrom
therealbibson:scratch/no-pr

Conversation

@therealbibson

@therealbibson therealbibson commented Oct 22, 2026 •

Copy link
Copy Markdown

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.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

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.

1 participant