fix(reconciler): auto-deregister repos delisted from gittensor master list#138
Open
Khaostica wants to merge 1 commit into
Open
fix(reconciler): auto-deregister repos delisted from gittensor master list#138Khaostica wants to merge 1 commit into
Khaostica wants to merge 1 commit into
Conversation
… list Adds a BullMQ repeatable job that runs every 2 hours, fetches the canonical master_repositories.json from entrius/gittensor, and flips registered=false on any repo whose key is absent. Fails safe on network/HTTP errors and on empty payloads. Preserves installation_id so a re-listed repo can be re-registered via the existing admin endpoint without a GitHub App reinstall. The repos schema comment already commits to this work: "a future reconciler will sync from on-chain registration." Closes entrius#137 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
The
repos.registeredschema comment inpackages/db/01_repos.sqlalready commits to this work:Today the only path to
registered = falseis theinstallationwebhook firing. If a repo is delisted fromgittensorbut the App stays installed, the mirror keeps persisting webhook events indefinitely — accumulating scoring data for a repo that is no longer part of the subnet. This change closes that gap.Mirrors the four design decisions from the issue:
installation_idpreserved — delisting ≠ uninstalling the App. Re-listing flows through the existingPOST /api/v1/admin/repos/registerendpoint with no GitHub App reinstall.github-fetchqueue with cron0 */2 * * *. Repeat-key dedup means app restarts don't pile up duplicate schedules.fetch.Related Issues
Closes #137
Type of Change
Testing
npm run build— cleannpx tsc --noEmit— cleangit diff --check— cleanOut of scope
Re-registration on re-listing already works via
POST /api/v1/admin/repos/register; not modified here.Checklist