fix(registry): preserve stored affected repo counts for legacy capped registry drift reports - #510
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 686d8b9 | Commit Preview URL Branch Preview URL |
Jun 10 2026, 08:20 AM |
|
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: 70/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. |
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
JSONbored
force-pushed
the
codex/fix-undercounting-in-legacy-drift-reports
branch
from
June 10, 2026 08:18
f18b6ef to
686d8b9
Compare
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.
Motivation
affectedReposfrom stored (capped)eventscaused legacy reports that stored a pre-capaffectedRepoCountto be underreported wheneventswere truncated at the cap.Description
unidentifiedAffectedRepoCountfield to theRegistryHyperparameterDriftPayloadand default it inemptyRegistryHyperparameterDriftPayloadto track stored counts not represented by identifiable repos (src/upstream/ruleset.ts).readRegistryHyperparameterDriftPayloadcomputederivedAffectedReposfromaffectedReposor legacyevents, preserve the parsedaffectedRepoCount, and exposeunidentifiedAffectedRepoCountas the positive difference between the stored count and the number of identifiable repos when applicable (src/upstream/ruleset.ts).summarizeRegistryHyperparameterDriftReportsunion known repo names across reports and add the sum of allunidentifiedAffectedRepoCountvalues to the union size to produceaffectedRepoCount, while still falling back to the event-derived summary when appropriate (src/upstream/ruleset.ts).preserves stored affected repo counts for legacy capped registry drift reportsthat inserts a legacy-shaped report withaffectedRepoCount: 150and only 100 capped event repos and asserts the aggregated status reports 150 affected repos (test/unit/upstream-ruleset.test.ts).Testing
npm run typecheck(tsc --noEmit) and it succeeded.npx vitest run test/unit/upstream-ruleset.test.tsand the tests covering the change passed.npm run test:unitand all tests passed (no regressions observed).Codex Task