Skip to content

Implement Safe Purge for Invalid Users in DevIndex Updater #9135

@tobiu

Description

@tobiu

We need a mechanism to purge invalid entities (Organizations, deleted users) from the tracker.json index while ensuring we don't accidentally delete valid users due to API glitches.

The "Safe Purge" Protocol:

  1. Trigger: Updater.mjs catches a fatal error (Could not resolve to a User or NOT_FOUND).
  2. Safety Check: Check if the user exists in users.jsonl (Rich Data Store).
    • If Exists: This implies the user was valid in the past. Treat the 404 as suspicious (glitch, rename, suspension). Action: Move to Penalty Box (failed.json) for manual review. Do NOT delete.
    • If NOT Exists: The user has never been indexed. It is likely a "Bad Seed" (Org, Bot, Typo) that leaked into the tracker. Action: Mark for deletion ({ delete: true }) in tracker.json.

Implementation:

  • Modify apps/devindex/services/Updater.mjs inside processBatch.
  • Load users.jsonl (or use Storage.getUsers()) to perform the existence check.

Metadata

Metadata

Assignees

Labels

aibugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions