feat(slop): wire + modernize the deterministic slop score into the gate, context & MCP (#530/#531/#532)#716
Merged
Merged
Conversation
…te, context & MCP (#530/#531/#532) The slop-assessment core (#530) existed but was dead code — wired into nothing. This makes it a real, opt-in maintainer feature: a deterministic slop score that surfaces warnings in context and (opt-in) blocks, configurable via .gittensory.yml. Detector (#530, strengthened): adds an `empty_pr_description` signal and recalibrates weights (whitespace-churn 30 / missing-test-evidence 30 / empty-description 15) so the `high` band (>=60) is now reachable (it was mathematically impossible before). Stays deterministic + high-precision — this score is the ONLY thing allowed to block. Config + gate (#532): new `slopGateMode` (off | advisory | block) + `slopGateMinScore` on RepositorySettings (migration 0033, default off) and `.gittensory.yml gate.slop: { mode, minScore }`. The gate computes the slop assessment over the PR's changed files + description ONLY when opted in, surfaces the findings as advisory context, and adds a `slop_risk_above_threshold` hard blocker only under `slop: block` when slopRisk >= threshold (default 60) — confirmed-contributor-gated like every blocker. Advisory by default; blocking is opt-in. Self-check (#531): new MCP tool `gittensory_check_slop_risk` — a source-free, agent- native quality self-check over local diff metadata (paths + line counts) + description; returns slopRisk / band / findings / rubric. No repo data or auth scope needed. AI-assisted advisory slop signals + a dedicated panel score-row are a planned follow-up; this PR is the deterministic core + wiring (the part allowed to block). Tests: detector (new signal, recalibration, reachable high band, public-safe), gate (advisory never blocks; block at/above threshold; default-60; confirmed-contributor gate; .gittensory.yml overlay end-to-end), settings round-trip + default off, manifest parse + round-trip + warning, MCP tool. 97% coverage gate green; workers pass.
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 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. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 6511646 | Commit Preview URL Branch Preview URL |
Jun 14 2026, 01:49 PM |
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…ew ones The slop.test.ts fixups for the recalibrated weights + new empty_pr_description signal were left out of the prior commit; without them the isolated-signal tests score the extra +15 (empty description). Adds descriptions to the single-signal cases and the new empty-description / reachable-high-band tests.
This was referenced Jun 14, 2026
JSONbored
added a commit
that referenced
this pull request
Jun 14, 2026
…cks) (#724) Completes the slop feature (#716) with an opt-in AI second opinion that augments the deterministic detector with the SEMANTIC slop it cannot quantify: generated boilerplate that does not match intent, comments that merely restate code, cosmetic churn dressed up as substantive, a description that does not correspond to the diff. Hard guarantees (AI assistance never changes who can be blocked — only the deterministic core can block): - the new `ai_slop_advisory` finding code is NOT recognised by isConfiguredGateBlocker, so it can never be a blocker; - severity is at most `warning`, never `critical`; - it never feeds slopRisk or the gate policy; - fail-safe on every path (AI off / no binding / over budget / unparseable / unsafe text -> no finding, never throws). - src/services/ai-slop.ts: runGittensoryAiSlopAdvisory — one free Workers-AI call (reuses the ai-review budget window + public-safe sanitizer), returns at most one advisory SignalFinding. - opt-in `slopAiAdvisory` setting wired through types, schema (migration 0034), repositories, focus-manifest (.gittensory.yml gate.slop.aiAdvisory) and the RepositorySettings OpenAPI schema. Runs only when slopGateMode != off AND slopAiAdvisory. - processors: runAiSlopForAdvisory appends the advisory finding, reusing the already-fetched changed files; deliberately does NOT touch slopRisk. Also fixes a latent bug: slop_gate_mode / slop_gate_min_score were absent from the settings upsert's onConflictDoUpdate SET clause, so slop settings silently did not persist on update of an existing row.
This was referenced Jun 14, 2026
Closed
12 tasks
This was referenced Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




What
You asked whether gittensory's CI actually has a "slop score." It didn't, really —
src/signals/slop.tshad a slop-score core (#530) but it was dead code wired into nothing (no gate, no context, no.gittensory.yml, no MCP). This makes it the real, opt-in maintainer feature you described.Detector strengthened (#530)
empty_pr_descriptionsignal (code change shipped with an empty/whitespace description).highband (≥60) is now reachable (with only 2 signals maxing at 55, it was mathematically impossible before).Config + gate (#532)
slopGateMode(off|advisory|block) +slopGateMinScoreonRepositorySettings(migration0033, default off) and.gittensory.ymlgate.slop: { mode, minScore }.slop_risk_above_thresholdhard blocker only underslop: blockwhenslopRisk ≥ threshold(default 60) — confirmed-contributor-gated like every blocker.Self-check (#531)
gittensory_check_slop_risk— a source-free, agent-native quality self-check over local diff metadata (paths + line counts) + description; returnsslopRisk/band/findings/rubric. No repo data or auth scope needed.Accuracy posture
Per our discussion: the deterministic core is the only tier that blocks (false-positive-averse), it's advisory by default, blocking is opt-in at a maintainer-set threshold, and it's confirmed-contributor-gated. The AI-assisted advisory slop layer + a dedicated panel score-row are the planned follow-up (advisory-only, never blocks).
Tests
Detector (new signal, recalibration, reachable
high, public-safe); gate (advisory never blocks even at 90; blocks at/above threshold; default-60; confirmed-contributor gate;.gittensory.ymloverlay end-to-end); settings round-trip + default off; manifest parse + round-trip + non-mapping warning; MCP tool. 97% coverage gate green; workers +git diff --check+ui:openapi:checkpass.Implements #530 (strengthened) + #531 + #532. (#533 issue-side triage + AI-assist advisory remain.)