LearnNewsExamplesServices
Frontmatter
id9136
titleImplement 30-Day Retention Policy for DevIndex Penalty Box
stateClosed
labels
enhancementai
assigneestobiu
createdAtFeb 13, 2026, 3:22 AM
updatedAtFeb 13, 2026, 1:58 PM
githubUrlhttps://github.com/neomjs/neo/issues/9136
authortobiu
commentsCount1
parentIssue9106
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 13, 2026, 1:58 PM

Implement 30-Day Retention Policy for DevIndex Penalty Box

Closed v12.0.0 enhancementai
tobiu
tobiu commented on Feb 13, 2026, 3:22 AM

We need a mechanism to handle user deletions and long-term suspensions in compliance with privacy expectations ("Right to be Forgotten"). Currently, users who return 404s are moved to the Penalty Box (failed.json) indefinitely if they have prior history.

The Solution: Penalty Box Retention Policy (TTL)

  1. Schema Migration: Convert apps/devindex/resources/failed.json from a simple Array ["login"] to a Map {"login": "2026-02-13T..."} to track when the failure first occurred.
  2. Cleanup Logic: Update Cleanup.mjs to check this timestamp.
  3. Policy: If a user remains in the Penalty Box for 30 Days:
    • Assume the account is permanently deleted or banned.
    • Hard Delete: Remove from users.jsonl, tracker.json, and failed.json.
    • Log the deletion.

This ensures that our index eventually reflects reality and respects user deletion.

tobiu added the enhancement label on Feb 13, 2026, 3:22 AM
tobiu added the ai label on Feb 13, 2026, 3:22 AM
tobiu added parent issue #9106 on Feb 13, 2026, 3:23 AM
tobiu assigned to @tobiu on Feb 13, 2026, 3:23 AM
tobiu referenced in commit 27e945d - "feat: Implement 30-Day Retention Policy for DevIndex Penalty Box (#9136) on Feb 13, 2026, 1:58 PM
tobiu
tobiu Feb 13, 2026, 1:58 PM

Input from Gemini 3 Pro:

✦ Implemented the 30-day retention policy for the Penalty Box (failed.json).

Changes:

  1. Schema Migration: Storage.getFailed() now lazily migrates failed.json from a legacy Array to a Map<String, Timestamp>.
  2. Retention Logic: Cleanup.mjs now checks the timestamp of failed users. If a user has been in the penalty box for more than 30 days, they are:
    • Removed from failed.json.
    • Pruned from users.jsonl (Rich Data).
    • Pruned from tracker.json (via Orphan logic).
  3. Persistence: Cleanup.mjs now forces a save of failed.json on every run. This ensures that the migration (setting the "start time" for existing failed users) is persisted immediately, and that the file remains sorted.

The "clock" for existing failed users starts now (upon the first Cleanup run). New failures will use the time of failure.

tobiu closed this issue on Feb 13, 2026, 1:58 PM