Skip to content

Implement archive retention policy checks for stored reports#349

Open
RemmyAcee wants to merge 16 commits intoRemitwise-Org:mainfrom
RemmyAcee:feature/reporting-archive-retention-policy
Open

Implement archive retention policy checks for stored reports#349
RemmyAcee wants to merge 16 commits intoRemitwise-Org:mainfrom
RemmyAcee:feature/reporting-archive-retention-policy

Conversation

@RemmyAcee
Copy link
Copy Markdown

@RemmyAcee RemmyAcee commented Mar 23, 2026

Close: #313

Implement Archive Retention Policy
I have implemented stricter retention policy enforcement for archived reporting records in the
reporting
contract. This ensures that data is kept for a minimum period before being archived or permanently deleted, satisfying compliance and storage optimization requirements.

Changes
Reporting Contract (
reporting/src/lib.rs
)
New Constants: Added REPORT_RETENTION_WINDOW (30 days) and ARCHIVE_RETENTION_WINDOW (90 days).
Error Handling: Added ReportingError::InvalidRetentionWindow to handle premature archival or deletion attempts.
Function Updates:
archive_old_reports
: Now returns Result<u32, ReportingError> and validates that before_timestamp is at least 30 days old.
cleanup_old_reports
: Now returns Result<u32, ReportingError> and validates that before_timestamp is at least 90 days old.

@RemmyAcee
Copy link
Copy Markdown
Author

Done, Close: #349

@Baskarayelu
Copy link
Copy Markdown
Contributor

Please resolve the conflicts

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.

Implement archive retention policy checks for stored reports

2 participants