Repository navigation
feat(registry): move Skills when GitHub moves their Repository - #499
Merged
Merged
Conversation
ADR-0002 kept a moved Repository under its old name, so pages, sitemaps and run commands named Repositories GitHub no longer serves, and two renames left duplicate Repositories in the registry. Sync now follows GitHub: it stores the Repository ID, moves every row to the new name in one batch, and keeps the old name as an alias that answers 301. ADR-0013 replaces ADR-0002.
Sync moves a Repository the next time it reads it. The script runs the same statements now for the 13 moves the 2026-10-07 run sweep found, with a read-only dry run as the default.
Contributor
🤖 MERGED
GitHub merged this pull request.
6f436aa6-678d-4bc1-a9bc-c22080fe16e7 Selected findings run after merge and open separate pull requests. |
Main gained its own 0144 migration, and two migrations may not share a number. The batched summary read narrowed the Repository ID with a check TypeScript could not carry into the parser, so the parser now owns it.
The hourly prefetch records an unchanged Repository in place without a sync job. A moved Repository with an unchanged tree never reached syncRepo, so its rows would never move.
Collaborator
Author
|
Agent check outside CI, by Harlan Agent Kit, on
|
The backfill now runs the held-row check sync runs, so it never merges into a row stored for a different Repository ID. It also stops with a clear message when the D1 lacks the moves migration.
Contributor
There was a problem hiding this comment.
Harlan Agent Kit posted this automated review. AI open source policy.
Automated Review: READY.
Contributor
There was a problem hiding this comment.
Harlan Agent Kit posted this automated review. AI open source policy.
Automated Review: BLOCKED.
Contributor
There was a problem hiding this comment.
Harlan Agent Kit posted this automated review. AI open source policy.
Automated Review: READY.
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.
🔗 Linked issue
Related to #488
❓ Type of change
📚 Description
229 Skills in 13 Repositories still carry a name that GitHub has moved.
facebook/reactis nowreact/react, for example. ADR-0002 froze the registry name at admission, so these pages, sitemaps and run commands name a Repository GitHub no longer serves. Two moves also left a duplicate Repository in the registry:hyf0/vue-skillsbesidevuejs-ai/skills, andshadcn/uibesideshadcn-ui/ui.ADR-0013 replaces ADR-0002: the registry follows GitHub.
repositoryMoveStatementsmoves the Repository's rows to that name in one D1 batch, and sync carries on under the new name. The hourly prefetch leaves a moved Repository in the queue, so its sync job makes the move. A move into a name the registry already holds merges, and a clash keeps the row under the new name. If that row is stored for a different Repository ID, sync and the backfill refuse the move. A root Skill takes the new Repository name. Every moved Skill is queued for a trust and indexability recompute.repo_aliaseskeeps each old name with its Repository ID. A new middleware answers/gh/<old-owner>/<old-repo>and every path under it with one 301 to the same path under the new name. A later move points older aliases at the newest name.run-identityandpage-urlfall back to the alias, sonpx skilld run facebook/react/fixresolves the Skill the page shows now, and delivery reports the new page URL. Delivery follows GitHub's 301 since fix(artifact-delivery): read moved and oversized Repositories #488.official-repos.tslists the 8 official Repositories under both names, so they stay official before and after the backfill. Track pins inclusters.tsname the new Repositories.On 2026-10-07 production held 503 Repositories under a moved name. 69 of them hold 560 Skill rows. The backfill moves the 13 the run sweep found. Sync moves each of the others the next time it reads it.
📝 Migration
The deploy applies
0145_repository_moves.sql. After it, from the repository root:pnpm exec tsx scripts/move-repositories.ts. It reads production and GitHub only, prints the rows each move touches, and writes one SQL file per move to a temporary folder.pnpm exec tsx scripts/move-repositories.ts --apply. It repeats the checks, then runs each file withwrangler d1 execute --remote --file. Each file runs in one transaction, and a second run changes nothing.Old URLs answer 301 once the alias cache expires, within 15 minutes. When no row carries an old name, delete that name from
official-repos.ts.--reversemoves each Repository back to its old name. Sync moves it forward again unless this deploy is rolled back. A merge does not split back into two Repositories.