[APIView] WI-6: Retention Backfill
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 143
Description
## Goal
Apply retention policy to existing data so historical superseded versions and revisions are cleaned up.
**Area:** Retention · **Depends on:** WI-5 · **Stable alone:** ✅ Yes — sets `RetainUntil` on historical data; purge loop picks it up on next cycle
## Deliverables
### Migration
One-time migration:
1. Each `RollingPrerelease` version whose major.minor.patch has a shipped `Stable` version → `RetainUntil = stableReleasedOn + 30d` (may already be past — purge cleans up next cycle)
2. Each unapproved/unreleased `Preview` version with a newer shipped `Stable` → `RetainUntil = stableReleasedOn + 90d`
3. Each superseded revision (not latest, not approved, not released) within a version → `RetainUntil = now + 30d` and soft-delete
Contributor guide
Research direction
The issue names no files or tests; start by reviewing dependency WI-5 and tracing APIView's retention and purge entry points. Check how RollingPrerelease versions, Preview versions, Stable releases, and revisions are represented, then verify the migration sets the three stated RetainUntil rules and soft-deletes superseded revisions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100