LearnNewsExamplesServices
Frontmatter
id9137
titleImplement ID-Based Rename Handling for DevIndex
stateClosed
labels
enhancementai
assigneestobiu
createdAtFeb 13, 2026, 3:23 AM
updatedAtFeb 13, 2026, 2:20 PM
githubUrlhttps://github.com/neomjs/neo/issues/9137
authortobiu
commentsCount1
parentIssue9106
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 13, 2026, 2:20 PM

Implement ID-Based Rename Handling for DevIndex

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

Currently, when a user changes their GitHub username, the DevIndex Updater fails with a 404 (Not Found) because it queries by the old login. This results in the user being moved to the Penalty Box and eventually deleted, while the new username might be rediscovered as a fresh user, losing history continuity.

The Solution: ID-Based Rename Recovery

  1. Trigger: When fetchUserData(login) returns a 404/Not Found.
  2. Lookup: Retrieve the immutable github_id (field i) from our local users.jsonl record for that login.
  3. Recovery: Query the GitHub API using the ID (node(id: "...") or user(id: ...)) to find the current login.
  4. Resolution:
    • If Found (New Login):
      • Update tracker.json: Remove old key, add new key (preserve timestamp or reset).
      • Update users.jsonl: Update l (login) and n (name) fields.
      • Log the rename event.
    • If Not Found: Confirm it is a deletion/suspension. Move to Penalty Box (as per existing logic).

This ensures we track the human, not just the handle.

tobiu added the enhancement label on Feb 13, 2026, 3:23 AM
tobiu added the ai label on Feb 13, 2026, 3:23 AM
tobiu assigned to @tobiu on Feb 13, 2026, 3:24 AM
tobiu added parent issue #9106 on Feb 13, 2026, 3:24 AM
tobiu referenced in commit b50101a - "feat: Implement ID-Based Rename Handling for DevIndex (#9137) on Feb 13, 2026, 2:15 PM
tobiu
tobiu Feb 13, 2026, 2:16 PM

Input from Gemini 3 Pro:

✦ Implemented ID-Based Rename Handling for DevIndex.

Key Components:

  1. GitHub Service (GitHub.mjs):

    • Added getLoginByDatabaseId(dbId): Queries the GraphQL API using the integer databaseId (stored in our users.jsonl as i) to resolve the current login.
  2. Storage Service (Storage.mjs):

    • Added deleteUsers(logins): Efficiently removes a batch of users from the rich data store (users.jsonl). This is crucial for cleaning up the old/stale login records after a rename is detected.
  3. Updater Service (Updater.mjs):

    • Enhanced processBatch with a Rename Detection Logic flow inside the error handler.
    • Trigger: When a user fetch fails with a fatal error (404/Not Found) AND we have a record of that user with a GitHub ID (i).
    • Resolution:
      1. Queries GitHub for the new login using the ID.
      2. If a new login is returned (and is different from the old one):
        • Prune Old: Marks the old login for deletion from tracker.json (via indexUpdates) and users.jsonl (via prunedLogins).
        • Fetch New: Immediately fetches data for the new login.
        • Persist New: Adds the new user data to results and indexUpdates.
    • Outcome: The system self-heals. The old record is replaced by the new one without losing continuity (other than the login key change).

This logic ensures that high-value users who rename their accounts are not lost or penalized.

tobiu closed this issue on Feb 13, 2026, 2:20 PM