Skip to content

feat(slop): per-PR slop score row in the maintainer panel#726

Merged
JSONbored merged 1 commit into
mainfrom
feat/slop-panel-row
Jun 14, 2026
Merged

feat(slop): per-PR slop score row in the maintainer panel#726
JSONbored merged 1 commit into
mainfrom
feat/slop-panel-row

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

What

Completes the slop feature's visibility half (the companion to #724's AI-advisory layer): the maintainer dashboard now shows each open PR's latest deterministic slop band + score.

How

  • Persist slop_risk / slop_band on the cached pull_requests row (migration 0035). Written by the public-surface processor only when the repo opted into slop (slopGateMode != off). These are gittensory-computed signals, so they're deliberately omitted from the GitHub-sync upsert's SET clause — a later sync never clobbers them.
  • updatePullRequestSlopAssessment writes the assessment; the cached record and the /v1/app/maintainer-dashboard reviewability rows now expose slop: { risk, band } (null when unassessed — e.g. slop off, or PR not yet processed).
  • maintainer-panel — a new Slop column renders a band+score pill (clean/low/elevated/highok/info/warn/blocked tone), or a muted em-dash when there's no assessment.

Notes

  • The dashboard response uses a generic z.record OpenAPI schema, so no spec change was needed.
  • Slop data is sparse by design (only slop-enabled repos populate it); the column degrades to everywhere else.

Tests

DB round-trip (latest-wins + no-op on a missing row), dashboard exposure (assessed and null rows), the panel column render (pill + em-dash), and slop + AI-review coexisting in one surface pass. Backend 97% coverage held (Branches 97.03%); UI typecheck + tests clean.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 14, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 36067ec Commit Preview URL

Branch Preview URL
Jun 14 2026, 03:40 PM

@dosubot dosubot Bot added the size:M label Jun 14, 2026
@ghost

ghost commented Jun 14, 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 #726 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 14, 2026
@ghost

ghost commented Jun 14, 2026

Copy link
Copy Markdown

gittensory · advisory review

Reviewed 11 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
This PR adds a deterministic slop assessment column to the maintainer dashboard, persisting slop risk and band in the database, exposing it via the API, and rendering it in the UI with appropriate tests. The implementation follows existing patterns and respects the public/private boundaries.

Suggestions

  • Verify that the new migration (0035) is included in the production deployment pipeline so the columns exist in live databases.
  • Add a responsive test or check to ensure the new "Slop" column does not break layout on narrow viewports.
  • Consider adding a default value or explicit NOT NULL constraint if future logic expects slopRisk to always be an integer when slopBand is set.

Worth double-checking

  • If the migration is not applied, runtime errors could occur when accessing the new columns.
  • UI layout could be impacted on small screens; verify responsive behavior.

Reviewer B · nemotron-3-120b-a12b — recommends ✅ merge
The PR adds a per-PR slop score column to the maintainer dashboard, including DB schema changes, backend persistence, API exposure, and UI rendering. The slop score is advisory-only (never blocks) and uses deterministic bands. Changes are well-tested with unit, integration, and UI tests, and respect the public/private boundary by avoiding forbidden terms.

Suggestions

  • Add a tooltip to the assessed slop pill showing the risk and band for clarity (e.g., 'Slop score: 72 (high)').
  • Verify table responsiveness on narrow screens after adding the new column.
  • Consider adding a down migration for completeness (though additive changes are low-risk).

Worth double-checking

  • New column may affect table layout on small screens; check responsiveness.
  • Ensure slop assessment logic doesn't inadvertently leak forbidden terms (current implementation appears safe).

Before = production · After = this PR's preview deploy.

Route Viewport Before After
/ desktop before desktop after desktop
mobile before mobile after mobile

@ghost ghost added the gittensory-review label Jun 14, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

Completes the slop feature's visibility half: the maintainer dashboard now
shows each open PR's latest deterministic slop band + score.

- Persist slop_risk / slop_band on the cached pull_requests row (migration
  0035). Written by the public-surface processor ONLY when the repo opted
  into slop; gittensory-computed, so deliberately omitted from the GitHub
  sync upsert's SET clause (a later sync never clobbers it).
- updatePullRequestSlopAssessment writes the assessment; the cached record
  and the maintainer-dashboard reviewability rows expose slop {risk, band}
  (null when unassessed).
- maintainer-panel: a new "Slop" column renders a band+score pill
  (clean/low/elevated/high -> ok/info/warn/blocked tone), or an em-dash
  when the repo has slop off / the PR is not yet assessed.

Tests: DB round-trip (+ latest-wins + no-op on missing row), dashboard
exposure (assessed vs null), the panel column render, and slop + AI review
coexisting in one surface pass. 97% coverage held; UI typecheck clean.
@JSONbored
JSONbored force-pushed the feat/slop-panel-row branch from 87205b4 to 36067ec Compare June 14, 2026 15:39
@JSONbored
JSONbored merged commit 4967dfd into main Jun 14, 2026
12 checks passed
@JSONbored
JSONbored deleted the feat/slop-panel-row branch June 14, 2026 15:42
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 14, 2026
JSONbored added a commit that referenced this pull request Jun 14, 2026
…740)

Closes the outcome-learning loop by measuring whether gittensory's
deterministic signals actually predict reality — without ever auto-
adjusting a live score (like time-decay, recalibration stays an
owner-reviewed decision).

Two questions a maintainer can act on, over data that already exists:
  • Is the slop score predictive? For resolved PRs carrying a persisted
    slop band (#726), do higher-slop bands merge less often?
    (`discriminates`: merge rate non-increasing as band severity rises,
    given >=5 samples/band; null when too little resolved data.)
  • Are recommendations panning out? Positive (accepted/merged/improved)
    vs negative (rejected/closed) split from the agent
    recommendation-outcome ledger, scoped to the repo.

- src/services/outcome-calibration.ts: pure builders
  (buildSlopOutcomeCalibration / buildRecommendationOutcomeCalibration /
  buildOutcomeCalibrationSignals) + buildRepoOutcomeCalibration env loader.
- GET /v1/repos/:owner/:repo/outcome-calibration (maintainer-gated,
  read-only; optional ?windowDays bounds the recommendation window).

No public surface, no score mutation, no reward/payout fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant