Skip to content

feat(signals): slop golden-fixture + determinism coverage and documented thresholds (#565) - #967

Merged
JSONbored merged 2 commits into
JSONbored:mainfrom
jaso0n0818:feat/565-slop-golden-fixtures
Jun 21, 2026
Merged

feat(signals): slop golden-fixture + determinism coverage and documented thresholds (#565)#967
JSONbored merged 2 commits into
JSONbored:mainfrom
jaso0n0818:feat/565-slop-golden-fixtures

Conversation

@jaso0n0818

Copy link
Copy Markdown
Contributor

Summary

Addresses #565. Adds golden-fixture coverage of buildSlopAssessment across all four bands (clean / low / elevated / high) — each fixture pins the exact slopRisk, band, and sorted finding codes — plus an explicit determinism check (identical metadata → identical slopRisk + findings), and documents the band thresholds on slopBandFor.

Acceptance

Matches the issue's acceptance: documented thresholds; identical metadata → identical slopRisk.

Weights unchanged (intentional)

The golden fixtures demonstrate the current SLOP_WEIGHTS already separate every band cleanly (15 → low, 30 → elevated, two strong = 60 → high), so no retuning is warranted; keeping the weights stable preserves the deterministic contract both the MCP tool and CI consume.

Tests

npx vitest run test/unit/slop.test.ts → 42 passed · npx tsc --noEmit → clean · git diff --check → clean.

Closes #565.

…ted thresholds (JSONbored#565)

Adds golden-fixture coverage of buildSlopAssessment across all four bands (clean/low/elevated/high) with exact slopRisk, band, and finding codes, plus an explicit determinism check (identical metadata -> identical slopRisk + findings), and documents the band thresholds on slopBandFor.

Per the issue's acceptance (documented thresholds; identical metadata -> identical slopRisk). Weights are intentionally left unchanged: the golden fixtures show the current weights already separate every band cleanly, so no retuning is warranted.

Closes JSONbored#565.
@jaso0n0818
jaso0n0818 requested a review from JSONbored as a code owner June 21, 2026 03:23
@dosubot dosubot Bot added the size:XS label Jun 21, 2026
@ghost ghost added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jun 21, 2026
@ghost

ghost commented Jun 21, 2026

Copy link
Copy Markdown

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

🛠️ Maintainer review — Held for maintainer review

Reviewed 2 changed file(s) — two independent AI reviewers, synthesized. ✅ Safe to merge — both reviewers found no blocking issues.

ℹ️ Correct and green, but touches a sensitive area (src/signals/slop.ts) — held for your review.

Merge readiness: ✅ Mergeable · all CI checks green/neutral/skipped.

Summary

The change adds documentation comments describing deterministic slop risk bands and expands unit tests to verify band mapping and determinism. No functional code changes alter behavior, security, or public output. Tests ensure forbidden public terms are not emitted. All existing CI checks are presumed green.

💡 Nits — non-blocking, optional

  • Comment line length exceeds typical limits; could be wrapped.
  • Importing type SlopBand assumes it is exported; ensure the type is exported from slop.ts.
  • Consider tightening the clean condition in slopBandFor to slopRisk === 0 if negative risks are impossible, to match the documented definition.
  • Keep the test file organized; large fixture arrays could be split for readability.
  • The comment in src/signals/slop.ts uses an en-dash (–) in 'clean = 0,' which is consistent with the project's style but could be replaced with a hyphen for uniformity if preferred.
  • The golden fixture description for 'low — generic commit subject' uses an em-dash (—) consistently; no issue found.
  • Consider adding a test case for the boundary condition slopRisk=25 (should be 'elevated') and slopRisk=60 (should be 'high') to complement the golden fixtures.
  • In the determinism test, consider using a dedicated deep equality matcher (e.g., toEqual) instead of relying on implicit equality for objects, though current implementation is acceptable.

@ghost ghost added the reviewbot-review label Jun 21, 2026
@ghost

ghost commented Jun 21, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #967 is no longer open. No action.

💰 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.

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

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.60%. Comparing base (c18d525) to head (f96c423).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #967   +/-   ##
=======================================
  Coverage   96.60%   96.60%           
=======================================
  Files         110      110           
  Lines       15069    15069           
  Branches     5445     5445           
=======================================
  Hits        14558    14558           
  Misses        107      107           
  Partials      404      404           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Held for maintainer (guardrail_area) — correct + CI green

@dosubot dosubot Bot added the lgtm label Jun 21, 2026
@JSONbored
JSONbored merged commit 283aa13 into JSONbored:main Jun 21, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(signals): slop weight tuning + golden-fixture tests

2 participants