Skip to content

feat(signals): slop signal — trivial/whitespace churn - #617

Merged
JSONbored merged 8 commits into
JSONbored:mainfrom
kiannidev:feat/issue-560-slop-trivial-churn
Jun 13, 2026
Merged

feat(signals): slop signal — trivial/whitespace churn#617
JSONbored merged 8 commits into
JSONbored:mainfrom
kiannidev:feat/issue-560-slop-trivial-churn

Conversation

@kiannidev

Copy link
Copy Markdown
Contributor

Summary

  • Scaffold buildSlopAssessment in src/signals/slop.ts with SLOP_WEIGHTS, SLOP_RUBRIC_MARKDOWN, and deterministic band mapping.
  • Add the trivial/whitespace churn slop signal using the same source/test/non-code line split as buildLocalScoreInput, flagging high-churn diffs with minimal substantive source edits.
  • Export isCodeFile / isTestFile from src/signals/local-branch.ts for shared file classification and add unit coverage in test/unit/slop.test.ts.

Fixes #560

Scope

  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; global coverage stays at or above 97% for lines, statements, functions, and branches (aim for 98%+ branch coverage locally so CI variance does not fail near the threshold)
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm run audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • npm run validate was run locally (covers typecheck + test:coverage); branch coverage met the 97% threshold.
  • Remaining CI checks are left for CI to run.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests. (not applicable)
  • API/OpenAPI/MCP behavior is updated and tested where needed. (internal slop scorer only)
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks. (not applicable — backend only)
  • Visible UI changes include screenshots or a short recording. (not applicable)
  • Public docs/changelogs are updated where needed. (not applicable)

Notes

Made with Cursor

Scaffold buildSlopAssessment and raise a deterministic churn finding when
high-line-count diffs touch minimal substantive source code using the same
line-split approach as local score input.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ghost

ghost commented Jun 12, 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 #617 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 12, 2026
@ghost

ghost commented Jun 12, 2026

Copy link
Copy Markdown

gittensory · advisory review

Reviewed 2 changed file(s) — two independent AI reviewers.

Suggested action:Safe to merge — both reviewers found no blocking issues.

Reviewer A · gpt-oss-120b — recommends ✅ merge
The PR adds a new "trivial/whitespace churn" signal to the slop assessment, updating weights, rubric, and assessment logic, with accompanying unit tests. The implementation is clean, respects public safety constraints, and all tests pass.

Suggestions

  • Add a comment documenting the rationale behind the MIN_CHURN_LINES and MAX_SOURCE_LINE_SHARE thresholds.
  • Consider adding a test case where the source share is exactly at the MAX_SOURCE_LINE_SHARE boundary.
  • Verify that the slopRisk weight of 25 maps to the "elevated" band in the existing band logic.

Worth double-checking

  • Ensure the new weight does not cause the combined slopRisk to exceed the 100 cap in future extensions.
  • Confirm that the new public text does not inadvertently include any forbidden terms.

Reviewer B · nemotron-3-120b-a12b — recommends ✅ merge
The PR adds a new 'trivial/whitespace churn' signal to the slop assessment logic, which flags diffs with high line churn but minimal substantive source changes. The implementation is clean, well-tested, and respects the public/private boundary by sanitizing public text via existing safeguards.

No blocking issues spotted.

@ghost ghost added the gittensory-review label Jun 12, 2026
@JSONbored JSONbored added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jun 12, 2026
@dosubot dosubot Bot added the lgtm label Jun 12, 2026
@ghost ghost mentioned this pull request Jun 12, 2026
23 tasks
@JSONbored
JSONbored self-requested a review June 12, 2026 18:01

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

Please fix merge conflicts.

@dosubot dosubot Bot removed the lgtm label Jun 12, 2026
Combine the merged missing-test-evidence slop signal with trivial
whitespace churn in buildSlopAssessment and reconcile unit tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dosubot dosubot Bot added size:M and removed size:L labels Jun 12, 2026
@kiannidev
kiannidev requested a review from JSONbored June 12, 2026 18:12
ghost

This comment was marked as duplicate.

ghost

This comment was marked as duplicate.

ghost

This comment was marked as resolved.

ghost

This comment was marked as duplicate.

@superagent-security superagent-security Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Superagent found 1 security concern(s).

Comment thread src/signals/slop.ts
@superagent-security superagent-security Bot added the pr:flagged PR flagged for review by security analysis. label Jun 12, 2026
@kiannidev
kiannidev force-pushed the feat/issue-560-slop-trivial-churn branch from 837662c to ecf21b4 Compare June 12, 2026 18:30

@superagent-security superagent-security Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Superagent found 1 security concern(s).

Comment thread src/signals/slop.ts Outdated
@superagent-security

Copy link
Copy Markdown
Contributor

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

@superagent-security superagent-security Bot removed the pr:flagged PR flagged for review by security analysis. label Jun 12, 2026

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

Gittensory review · advisory — a maintainer merges

0 actionable · 4 nitpick(s) · 2 file(s) · two independent AI reviewers

Suggested action:Safe to merge — both reviewers found no blocking issues.

📋 Walkthrough

This PR introduces a new slop signal that flags high‑churn diffs with minimal substantive source changes, adds its weight and description to the rubric, implements the detection logic, and expands the test suite to cover the new behavior.

Changes

File Summary
src/signals/slop.ts Added trivialWhitespaceChurn weight, updated rubric, introduced churn detection constants and functions, and integrated new signal into assessment calculation.
test/unit/slop.test.ts Updated imports and rubric test, added multiple tests for the new churn signal, and added sanitization test for the new finding.
🔍 Reviewer notes

Reviewer A · gpt-oss-120b — recommends ✅ merge
The PR adds a new "trivial / whitespace‑only churn" signal to the slop assessment, updates weights and rubric, implements detection logic, and adds comprehensive tests. The implementation is clean, respects public‑safe text constraints, and all new behavior is covered by tests.

Suggestions

  • Consider adding a unit test for the band determination logic at the boundary (e.g., when slopRisk equals 25) to guarantee the expected "elevated" band.
  • Document the rationale for the MIN_CHURN_LINES (40) and MAX_SOURCE_LINE_SHARE (0.15) constants in a comment for future maintainers.

Worth double-checking

  • If the band mapping thresholds change, the test expecting "elevated" may break; ensure alignment.
  • Large changedFiles arrays could have minor performance impact, though unlikely in typical PRs.

Reviewer B · mistral-small-3.1-24b-instruct — recommends ✅ merge
This PR adds a new 'slop' signal to detect trivial or whitespace-only churn in pull requests. The implementation is clear, well-tested, and adheres to the project's conventions. The changes are safe and ready to merge.

Suggestions

  • Consider adding a comment explaining the rationale behind the chosen thresholds (MIN_CHURN_LINES and MAX_SOURCE_LINE_SHARE).

Worth double-checking

  • Verify that the new signal does not introduce any false positives or negatives in real-world scenarios.
🤖 Prompt for AI agents

Copy this to your coding agent to fix everything flagged:

Address the following in this PR:

1. src/signals/slop.ts (line 101): The function name 'nonNegative' does not follow the camelCase convention used elsewhere in the file. Suggested fix: function nonNegativeValue(value: number | undefined): number {

Nitpicks:
- Consider adding a unit test for the band determination logic at the boundary (e.g., when slopRisk equals 25) to guarantee the expected "elevated" band.
- Document the rationale for the MIN_CHURN_LINES (40) and MAX_SOURCE_LINE_SHARE (0.15) constants in a comment for future maintainers.
- Consider adding a comment explaining the rationale behind the chosen thresholds (MIN_CHURN_LINES and MAX_SOURCE_LINE_SHARE).

💰 Earn for open-source contributions like this — Gittensor lets contributors earn for the work they already do. · Advisory review by Gittensory.

Comment thread src/signals/slop.ts
@kiannidev

Copy link
Copy Markdown
Contributor Author

@JSONbored
I resolved conflicts...

@JSONbored

Copy link
Copy Markdown
Owner

@JSONbored I resolved conflicts...

Still dialing in the enhanced review bot, sorry if it's a bit noisy.

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

Gittensory review · advisory — a maintainer merges

0 actionable · 3 nitpick(s) · 2 file(s) · two independent AI reviewers

Suggested action:Safe to merge — both reviewers found no blocking issues.

📋 Walkthrough

The PR extends the slop signal module by introducing a weight and rubric entry for trivial/whitespace-only churn, implements detection based on line counts and source code share, and adds comprehensive unit tests for the new behavior.

Changes

File Summary
src/signals/slop.ts Added weight, rubric entry, constants, detection logic, and helper functions for trivial whitespace churn signal.
test/unit/slop.test.ts Added tests for the new trivial whitespace churn signal and updated existing tests to reflect rubric changes.
🔍 Reviewer notes

Reviewer A · gpt-oss-120b — recommends ✅ merge
This PR adds a new "trivial whitespace churn" signal to the slop assessment, including weight, rubric entry, detection logic, and corresponding tests. The implementation follows existing patterns and respects public safety constraints.

Suggestions

  • Consider adding a test case for the edge condition where sourceShare equals MAX_SOURCE_LINE_SHARE to verify the boundary behavior.
  • Run the full TypeScript linting suite to ensure no new unused imports or naming conflicts were introduced.

Worth double-checking

  • The new helper functions increase the file size; ensure they do not impact performance for large diffs.
  • Verify that the exported function is correctly re-exported if used elsewhere beyond the test suite.

Reviewer B · mistral-small-3.1-24b-instruct — recommends ✅ merge
This PR adds a new 'slop' signal to detect trivial or whitespace-only churn in pull requests. The implementation is clear, well-tested, and maintains the project's standards. The changes are safe and ready to merge.

Suggestions

  • Consider adding a comment explaining the choice of MIN_CHURN_LINES and MAX_SOURCE_LINE_SHARE values for better maintainability.

Worth double-checking

  • Verify that the new signal does not introduce false positives for legitimate changes with high churn but minimal source changes.

🤖 Automated advisory review · a maintainer makes the final call.

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

@kiannidev current head looks merge-ready.

A few notes:

  • The trivial/whitespace churn signal is deterministic and stays inside the existing slop rubric.
  • The tests cover high-churn non-code diffs, substantive-source dominance, small diffs, and public-safe output.
  • The stale changes-requested state does not map to an unresolved blocker on this head.

No code changes requested.

@dosubot dosubot Bot added the lgtm label Jun 13, 2026
@JSONbored
JSONbored merged commit 2a4a2fb into JSONbored:main Jun 13, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 13, 2026
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

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

feat(signals): slop signal — trivial/whitespace churn

2 participants