Skip to content

feat(engine): port slop-scoring to gittensory-engine for local pre-submission prediction #4249

Description

@JSONbored

Found during a 2026-07-08 miner-roadmap audit: the single highest-value unextracted module for the miner's self-review goal.

predicted-gate.ts documents this exact gap in its own note text (PREDICTED_GATE_NOTE_SLOP): "The slop score is NOT evaluated pre-submission (it needs the diff content)." That's a correct limitation for the hosted metadata-only API — it never has the diff on hand pre-submission. It is NOT an inherent limitation for a local miner CLI, which has the full diff on disk before it ever submits. Without this, a miner can predict most of what the live gate will do, but not the one signal most directly tied to the roadmap's own #1 strategic risk ("slop-at-scale paradox" — an autonomous fleet maximizing score mass-produces gate-passing-but-low-value PRs).

Dependency audit of src/signals/slop.ts (~25KB): imports from ./engine (2 named symbols only — GENERIC_COMMIT_PATTERN, hasClearNoIssueRationale, out of the much larger un-extracted src/signals/engine.ts), ./local-branch (symbols already portable), ./test-evidence (already extracted), ./focus-manifest (already shimmed), and ./path-matchers (extraction filed separately, see the sibling engine-extraction issues). It's closer to extractable than its size suggests — genuinely blocked on 2 named symbols plus the path-matchers prerequisite.

Flagged maintainer-only specifically for the final port, not the mechanical prerequisites: a subtly-wrong port could make a miner predict "clean" when the live gate would score high and auto-close — this is scoring-integrity-sensitive in a way the pure extraction prerequisites aren't.

Deliverables

  • Prerequisite: path-matchers.ts extraction lands first (separate issue)
  • Lift or port GENERIC_COMMIT_PATTERN and hasClearNoIssueRationale from src/signals/engine.ts to gittensory-engine (narrowly — not the rest of engine.ts, see the separate 7-builder extraction tracking issue for that)
  • Port slop.ts's pure assessment logic to packages/gittensory-engine/src/slop.ts, exported from the package's public entrypoint
  • src/signals/slop.ts becomes a thin re-export shim, matching the existing pattern (src/scoring/preview.ts, src/rules/predicted-gate.ts)
  • Golden-fixture regression tests proving the ported version produces byte-identical scores to the pre-port src/ version across a representative sample of real historical PRs
  • Update predicted-gate.ts's PREDICTED_GATE_NOTE_SLOP note text once a miner can actually evaluate this pre-submission

References

  • src/signals/slop.ts (source to port)
  • src/rules/predicted-gate.ts (PREDICTED_GATE_NOTE_SLOP — the gap this closes)
  • packages/gittensory-engine/src/signals/test-evidence.ts, src/scoring/preview.ts (existing shim precedent to follow)
  • Roadmap's "feat(docs): add install site and mcp diagnostics #1 strategic risk — slop-at-scale paradox" (project memory, Autonomous Miner System roadmap)

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions