Skip to content

fix(signals): diff all registry config fields in change reports - #307

Merged
JSONbored merged 3 commits into
JSONbored:mainfrom
philluiz2323:fix/registry-change-report-fields
Jun 3, 2026
Merged

fix(signals): diff all registry config fields in change reports#307
JSONbored merged 3 commits into
JSONbored:mainfrom
philluiz2323:fix/registry-change-report-fields

Conversation

@philluiz2323

Copy link
Copy Markdown
Contributor

Closes #280.

Problem

buildRegistryChangeReport diffed only 5 of the 8 comparable RegistryRepoConfig fields, omitting fixedBaseScore, defaultLabelMultiplier, and eligibilityMode. A repo whose only change is one of those fields produced an empty changes array and was dropped from changedRepos, so the report said 0 changed even though scoring materially changed (fixedBaseScore overrides the entire base score, preview.ts:287). The authoritative drift comparator (REGISTRY_DRIFT_COMPARABLE_FIELDS in upstream/ruleset.ts:606-615) already compares all 8 fields; the live report had drifted from it.

This is public-facing: GET /v1/registry/changes (routes.ts) and the registry-changes MCP tool.

Fix

Replace the 5 hardcoded comparison branches with a single data-driven field-descriptor table (REGISTRY_CHANGE_FIELDS) covering all 8 comparable fields, rendered to stable strings and diffed in one loop (registryConfigChanges). This adds fixed_base_score, default_label_multiplier, and eligibility_mode to the report and keeps the live report and the upstream drift comparator from diverging again as config fields are added. Existing change-line output for the original fields is preserved.

Tests

Added a fail-on-revert test: a snapshot pair differing only in fixedBaseScore (2 -> 50) must yield a changedRepos entry with fixed_base_score 2 -> 50 and a 1 changed summary; and eligibility_mode / default_label_multiplier changes are likewise surfaced. The existing test only exercised the 5 originally-compared fields, ratifying the omission.

vitest run signals-v2 + signals + registry 61/61; integration api 21/21; tsc --noEmit clean.

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@philluiz2323 the change looks useful and CI is green, but the PR title needs to match the repo convention.

Required change:

  • Retitle this to something like fix(signals): diff all registry config fields in change reports.

Validation expected:

  • Keep npm run test:ci green.

@philluiz2323 philluiz2323 changed the title Diff all comparable registry config fields in the change report fix(signals): diff all registry config fields in change reports. Jun 2, 2026
@philluiz2323
philluiz2323 requested a review from JSONbored June 2, 2026 17:44
@philluiz2323

Copy link
Copy Markdown
Contributor Author

@philluiz2323 the change looks useful and CI is green, but the PR title needs to match the repo convention.

Required change:

  • Retitle this to something like fix(signals): diff all registry config fields in change reports.

Validation expected:

  • Keep npm run test:ci green.

done

@JSONbored JSONbored changed the title fix(signals): diff all registry config fields in change reports. fix(signals): diff all registry config fields in change reports Jun 3, 2026

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@philluiz2323 the change may be small, but the PR still needs to meet the repo gate.

A few notes:

  • Registry config diff coverage is a reasonable fix.
  • The current title has a trailing period. (I fixed this)
  • The body is missing current template evidence. (it's fine for now).

Required changes:

  • None for now.

Validation expected:

  • Focused signal tests.
  • Full CI green.

@dosubot dosubot Bot added the lgtm label Jun 3, 2026
@JSONbored
JSONbored merged commit 5ed2313 into JSONbored:main Jun 3, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 3, 2026
@JSONbored JSONbored added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x 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.

Projects

No open projects
Status: Done

2 participants