feat(retention): port data-retention settings + purge (Phoenix)#88
Merged
Conversation
Brings escalated-phoenix toward parity with the laravel reference for the data-retention domain (previously absent). Ships the safe subset; the closed-ticket purge is intentionally deferred (see below). - Escalated.Support.Retention: shared retention-value -> days map + cutoff helper (mirrors the laravel map). - mix escalated.purge_expired (--dry-run): deletes attachments and audit logs older than their configured retention (laravel hard-deletes these too — no divergence). Closed-ticket purge is reported only, not enforced: the laravel command soft-deletes tickets with a grace period, which needs a deleted_at column the Phoenix ticket schema lacks. Left as a follow-up so a destructive cron isn't shipped without that safety net. - Admin DataRetentionController: retention settings + read-only purge preview. Router wired under admin settings. Verified in Docker: mix format, mix credo --strict, full suite (501 tests, 0 failures).
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.
Brings escalated-phoenix toward parity with the laravel reference for the data-retention domain (previously absent). Ships the safe subset; the closed-ticket purge is intentionally deferred.
What
Escalated.Support.Retention— shared retention-value → days map + cutoff helpermix escalated.purge_expired(--dry-run) — deletes attachments and audit logs older than configured retention (laravel hard-deletes these too — no divergence). Closed-ticket purge is reported only, not enforced: laravel soft-deletes tickets with a grace period, which needs adeleted_atcolumn the Phoenix ticket schema lacks. Deferred so a destructive cron isn't shipped without that safety net.DataRetentionController— settings + read-only purge preview; router wired under admin settingsVerified (Docker, elixir:1.15-otp-26)
mix format✓ ·mix credo --strict✓ · full suite 501 tests, 0 failures ✓Part of the backend parity program (escalated-laravel baseline).