fix(registry): resolve repo casing case-insensitively on sync#604
fix(registry): resolve repo casing case-insensitively on sync#604galuis116 wants to merge 2 commits into
Conversation
persistRegistrySnapshot keyed the upsert conflict target and the de-registration on the case-sensitive fullName primary key, while repo names arrive from multiple sources (registry vs GitHub-canonical) and the rest of the system resolves repos case-insensitively. A casing mismatch inserted a duplicate row and de-registered the wrong one (same class as JSONbored#223/JSONbored#225). Resolve each snapshot repo to an existing row by lowercased name before upsert, and de-register by lowercased comparison.
|
Important Gittensory found maintainer review notesScoped related-work signals were found for this PR. They are advisory unless the gate reports a blocker. Readiness score: 77/100
Signal definitions
Review context
Maintainer notes
Contributor next steps
Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. Learn more about Gittensor contribution workflows. |
|
reviewbot · advisory review Reviewed 2 changed file(s) — two independent AI reviewers. Suggested action: 🛠️ Request changes. Address the suggestions below before merging. Reviewer A · Suggestions
Worth double-checking
Reviewer B · |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
gittensory · advisory review Reviewed 2 changed file(s) — two independent AI reviewers. Suggested action: 🛠️ Request changes. (reviewers split: request changes / merge) Address the suggestions below before merging. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
JSONbored
left a comment
There was a problem hiding this comment.
Please see latest review for requested changes and ensure CI is green when done.
Closes #603.
persistRegistrySnapshotkeyed the upsert conflict target (onConflictDoUpdate({ target: fullName })) and the de-registration (notInArray(fullName, …)) on the case-sensitiverepositories.fullNameprimary key. But repo names arrive from multiple sources (the upstream registry vs GitHub-canonical webhook/API casing) and the rest of the system resolves repos case-insensitively (getRepositoryhas alower(fullName)fallback). On a casing mismatch the sync inserted a duplicate primary-key row instead of updating the existing one, and the case-sensitive de-registration nulled the registration on the other casing — splitting a repo into two rows so a registered repo could read back as unregistered. Same class as the already-fixed #223/#225 (case-sensitiverepoFullNamecomparison), at an unfixed site.Change
Verification
registry.test.ts7/7;tsc --noEmitclean; full suite green;sync.ts98% branch; global branch coverage holds (>= 97% gate).