Skip to content

feat(github-app): slop gate mode + check surfacing #532

Description

@JSONbored

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

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions