Skip to content

test(slop): fix #3939 golden-fixture and rubric-doc drift breaking main - #3975

Merged
JSONbored merged 2 commits into
mainfrom
fix/main-red-slop-3939-fixture-drift
Jul 7, 2026
Merged

test(slop): fix #3939 golden-fixture and rubric-doc drift breaking main#3975
JSONbored merged 2 commits into
mainfrom
fix/main-red-slop-3939-fixture-drift

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • #3939 (c760477, b8607bd) recalibrated the deterministic slop-band thresholds in src/signals/slop.ts (low 1-24→1-30, elevated 25-59→31-59) but the matching golden-fixture update to test/unit/slop.test.ts never landed on mainmain has been failing validate-code (5 tests in test/unit/slop.test.ts) since #3939 merged, blocking every PR built on top of it.
  • Applies the fixture update (five buildSlopAssessment/buildNonSubstantivePaddingFinding/golden-fixture cases updated to the post-recalibration bands, per the recalibration's own documented design: elevated now needs ≥45 or a genuine 3-signal stack, not two weak signals at 30).
  • Fixes two docs/comment sites that still described the pre-recalibration 1-24/25-59 split and now contradicted the actual slopBandFor behavior: ISSUE_SLOP_RUBRIC_MARKDOWN (issues route through the same slopBandFor) and the header comment directly above slopBandFor.

Scope

  • Test-only + doc-comment changes; no behavior change (production thresholds were already correct on main).
  • Narrow: src/signals/slop.ts, test/unit/slop.test.ts.

Validation

  • npx vitest run test/unit/slop.test.ts — 63/63 pass.
  • npx tsc --noEmit — clean.
  • Repo-wide grep for 1-24/25-59 confirms no remaining stale threshold references.

Safety

  • No secrets/wallets/hotkeys/trust-scores/reward-values touched.
  • No changelog edit; no site//CNAME/lovable changes.

JSONbored added 2 commits July 7, 2026 01:20
#3939 raised the elevated-band floor from 25 to 31, so two stacked
weak signals (30) now land in low, not elevated. Five fixtures still
asserted the pre-recalibration boundary; adjust the genuine multi-
signal cases to a real 3-signal stack (45) and the single-signal
cases to their now-correct low band, per the recalibration's own
stated design (elevated requires >=45 or 3x weak).
…ments

The #3939 recalibration updated slopBandFor and SLOP_RUBRIC_MARKDOWN but
left ISSUE_SLOP_RUBRIC_MARKDOWN (which renders through the same banding
function) and two comments still documenting the old 1-24/25-59 split.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 7, 2026
@loopover-orb

loopover-orb Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-07 08:33:00 UTC

2 files · 1 AI reviewer · 2 blockers · readiness 100/100 · CI green · clean

⏸️ Suggested Action - Manual Review

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.

Review summary
This is a test-only and doc-comment fix that realigns the golden fixtures in test/unit/slop.test.ts with the slop-band thresholds already shipped in src/signals/slop.ts by #3939 (low 1-30, elevated 31-59), which had been left stale and breaking main's validate-code check. The production slopBandFor logic itself is untouched (only its header comment and the ISSUE_SLOP_RUBRIC_MARKDOWN doc string are edited to match reality), and every updated test expectation checks out arithmetically against the stated SLOP_WEIGHTS (e.g. missingTestEvidence+duplicateClusterMembership+noLinkedIssueWithoutRationale = 15+15+15 = 45 → elevated; a single 30-weight strong signal → low under the new <31 boundary). CI is green and the change is narrowly scoped to the two files described.

Nits — 5 non-blocking
  • The PR description cites the causal commits (fix(ops): recalibrate PR quality gates and slop bands #3939, c760477, b8607bd) but doesn't link a dedicated open issue for the main-breaking drift itself — worth confirming this qualifies under the repo's issue-link requirement given it's a CI-restoring fix rather than a feature.
  • src/signals/slop.ts:511-512 — the magic numbers 31/60 are pre-existing band boundaries (not newly introduced by this diff), but since the comment is already being rewritten here, a `SLOP_BAND_LOW_MAX`/`SLOP_BAND_ELEVATED_MAX` constant would make the 1-30/31-59 split self-documenting instead of relying on the comment staying in sync (the exact bug this PR is fixing).
  • test/unit/slop.test.ts:117-121 — the inline comment breaks mid-object-literal after `hasLinkedIssue: false,`; consider moving the multi-line explanation above the field for readability.
  • Consider adding a lint/CI check (e.g. a grep-based test or a shared constant) that fails fast if slop.ts's band thresholds and the golden fixtures in slop.test.ts ever diverge again, since this exact drift is what broke main.
  • Since slopBandFor's boundary comment now explicitly states the multi-signal design intent, it may be worth exporting the 31/60 cutoffs as named constants referenced by both the rubric markdown and the function, eliminating the class of doc/code drift this PR is fixing.

Concerns raised — review before merging

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.
Signal Result Evidence
Code review ❌ 2 blockers 1 reviewer
Linked issue ✅ No-issue rationale PR body explains why no issue is linked.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 51 registered-repo PR(s), 43 merged, 343 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 51 PR(s), 343 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, JavaScript, Ruby, Go, Kotlin, MDX, Shell
  • Official Gittensor activity: 51 PR(s), 343 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@e515572). Learn more about missing BASE report.
⚠️ Report is 9 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3975   +/-   ##
=======================================
  Coverage        ?   93.69%           
=======================================
  Files           ?      373           
  Lines           ?    34952           
  Branches        ?    12796           
=======================================
  Hits            ?    32748           
  Misses          ?     1584           
  Partials        ?      620           
Files with missing lines Coverage Δ
src/signals/slop.ts 98.07% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 7, 2026
@JSONbored
JSONbored merged commit 283a496 into main Jul 7, 2026
10 checks passed
@JSONbored
JSONbored deleted the fix/main-red-slop-3939-fixture-drift branch July 7, 2026 08:33
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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant