Skip to content

fix(registry): preserve stored affected repo counts for legacy capped registry drift reports - #510

Merged
JSONbored merged 1 commit into
mainfrom
codex/fix-undercounting-in-legacy-drift-reports
Jun 10, 2026
Merged

fix(registry): preserve stored affected repo counts for legacy capped registry drift reports#510
JSONbored merged 1 commit into
mainfrom
codex/fix-undercounting-in-legacy-drift-reports

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • A change to derive affectedRepos from stored (capped) events caused legacy reports that stored a pre-cap affectedRepoCount to be underreported when events were truncated at the cap.
  • The goal is to keep deduplication of known repo identities across reports while preserving the stored legacy counts that exceed the capped event list so operator-facing summaries are not misleading.

Description

  • Add an unidentifiedAffectedRepoCount field to the RegistryHyperparameterDriftPayload and default it in emptyRegistryHyperparameterDriftPayload to track stored counts not represented by identifiable repos (src/upstream/ruleset.ts).
  • In readRegistryHyperparameterDriftPayload compute derivedAffectedRepos from affectedRepos or legacy events, preserve the parsed affectedRepoCount, and expose unidentifiedAffectedRepoCount as the positive difference between the stored count and the number of identifiable repos when applicable (src/upstream/ruleset.ts).
  • In summarizeRegistryHyperparameterDriftReports union known repo names across reports and add the sum of all unidentifiedAffectedRepoCount values to the union size to produce affectedRepoCount, while still falling back to the event-derived summary when appropriate (src/upstream/ruleset.ts).
  • Add a regression unit test preserves stored affected repo counts for legacy capped registry drift reports that inserts a legacy-shaped report with affectedRepoCount: 150 and only 100 capped event repos and asserts the aggregated status reports 150 affected repos (test/unit/upstream-ruleset.test.ts).

Testing

  • Ran static type checking with npm run typecheck (tsc --noEmit) and it succeeded.
  • Ran the targeted unit test file with npx vitest run test/unit/upstream-ruleset.test.ts and the tests covering the change passed.
  • Ran the full unit suite with npm run test:unit and all tests passed (no regressions observed).

Codex Task

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 9, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@ghost

ghost commented Jun 9, 2026

Copy link
Copy Markdown

Important

Gittensory found maintainer review notes

Scoped related-work signals were found for this PR. They are advisory unless the gate reports a blocker.

Readiness score: 70/100

Signal Result Evidence Action
Linked issue ⚠️ Missing No linked issue or no-issue rationale found. Explain no-issue PR.
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden. Review top overlaps.
Review load ❌ 8/20 Readiness component derived from cached public PR metadata and labels; size label size:S. Add scope summary.
Validation evidence ✅ 25/25 PR body includes validation/test evidence. No action.
Open PR queue ⚠️ 5/10 13 open PR(s), 5 likely reviewable, 8 unlinked. Expect slower review.
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 68 PR(s), 309 issue(s). No action.
Gate result ✅ Passing No configured blocker found. No action.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Review load = cached public PR metadata such as size labels, changed paths, and preflight status.
  • Open PR queue = repo-wide review pressure; it is not a PR quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
Review context
Maintainer notes
  • No linked issue detected: The planned PR does not reference a closing issue or explicit linked issue number.
  • Possible duplicate or overlapping work: 8 related open work cluster(s) were detected.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Explain no-issue PR.
  • Review top overlaps.
  • Add scope summary.
  • Expect slower review.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
  • Check active issues and PRs before submitting.
  • Re-run Gittensory review

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. Learn more about Gittensor contribution workflows.

@ghost ghost added the gittensory:reviewed label Jun 9, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored JSONbored self-assigned this Jun 10, 2026
@JSONbored JSONbored changed the title Preserve stored affected repo counts for legacy capped registry drift reports fix(registry): Preserve stored affected repo counts for legacy capped registry drift reports Jun 10, 2026
@github-actions github-actions Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 10, 2026
@JSONbored
JSONbored force-pushed the codex/fix-undercounting-in-legacy-drift-reports branch from f18b6ef to 686d8b9 Compare June 10, 2026 08:18
@JSONbored JSONbored changed the title fix(registry): Preserve stored affected repo counts for legacy capped registry drift reports fix(registry): preserve stored affected repo counts for legacy capped registry drift reports Jun 10, 2026
@JSONbored
JSONbored merged commit 52f3ddb into main Jun 10, 2026
11 checks passed
@JSONbored
JSONbored deleted the codex/fix-undercounting-in-legacy-drift-reports branch June 10, 2026 08:21
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 10, 2026
@JSONbored JSONbored added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant