Parent roadmap: #525
Parent phase: #526
Background
Maintainers need to enforce a quality floor on incoming PRs. The CI already has GitHub contents:read, so it can score the real diff (deeper than the metadata-only miner side) and optionally augment with the existing opt-in LLM path.
Goal
Add a slopGateMode gate and surface slop in the existing check runs / PR panel.
Current Behavior
Gate modes exist (linkedIssueGateMode, duplicatePrGateMode, qualityGateMode) but there is no slop gate.
Desired Behavior
- Add
slopGateMode (off / advisory / block, default advisory) + slopGateMaxRisk to RepositorySettings (src/types.ts), sibling to qualityGateMode.
- New
buildSlopGateBlocker in src/rules/advisory.ts folded into evaluateGateCheck; computed in src/queue/processors.ts from the real PullRequestFileRecord[].
- Optional LLM augmentation via existing
src/services/ai-summaries.ts: runs only on elevated/high deterministic bands, can only raise risk (never lower the deterministic floor), reuses AI_DAILY_NEURON_BUDGET.
- Surface via the existing
Gittensory Gate / Gittensory Context checks + PR panel — no new comment.
Implementation Requirements
Public/Private Output Boundaries
- All gate/panel text routed through
sanitizeForCheckRun / the shared public-safe filter. No private scores or reward/trust language.
Acceptance Criteria
slopGateMode off/advisory/block behaves correctly; block only fails when slopRisk > slopGateMaxRisk.
- LLM augmentation never weakens the deterministic gate; default advisory avoids false-positive blocks.
Testing Requirements
npm run test:ci, 97%+ coverage. Gate-mode tests + sanitizer tests for the surfaced text + LLM-floor invariant test.
Sub-issues
Parent roadmap: #525
Parent phase: #526
Background
Maintainers need to enforce a quality floor on incoming PRs. The CI already has GitHub
contents:read, so it can score the real diff (deeper than the metadata-only miner side) and optionally augment with the existing opt-in LLM path.Goal
Add a
slopGateModegate and surface slop in the existing check runs / PR panel.Current Behavior
Gate modes exist (
linkedIssueGateMode,duplicatePrGateMode,qualityGateMode) but there is no slop gate.Desired Behavior
slopGateMode(off / advisory / block, default advisory) +slopGateMaxRisktoRepositorySettings(src/types.ts), sibling toqualityGateMode.buildSlopGateBlockerinsrc/rules/advisory.tsfolded intoevaluateGateCheck; computed insrc/queue/processors.tsfrom the realPullRequestFileRecord[].src/services/ai-summaries.ts: runs only on elevated/high deterministic bands, can only raise risk (never lower the deterministic floor), reusesAI_DAILY_NEURON_BUDGET.Gittensory Gate/Gittensory Contextchecks + PR panel — no new comment.Implementation Requirements
quality_gate_*). Depends on slop core (roadmap(pillar 1): anti-slop contribution quality layer #526 child).Public/Private Output Boundaries
sanitizeForCheckRun/ the shared public-safe filter. No private scores or reward/trust language.Acceptance Criteria
slopGateModeoff/advisory/block behaves correctly; block only fails whenslopRisk > slopGateMaxRisk.Testing Requirements
npm run test:ci, 97%+ coverage. Gate-mode tests + sanitizer tests for the surfaced text + LLM-floor invariant test.Sub-issues