feat(miner-governor): build a real production runSlopAssessment implementation (#5133) - #5140
Conversation
…mentation (#5133) attempt-runner.js's deps.runSlopAssessment had no production binding, only a test double. Extracts the PR-side deterministic slop scorer from src/signals/slop.ts to packages/gittensory-engine/src/signals/slop.ts (byte-parity verified: all 63 pre-existing tests pass unchanged, and every extracted function diffed identical against the original), so the miner CLI can run the SAME scorer the live gate uses. src/signals/slop.ts becomes a partial shim re-exporting the PR-side pieces; issue-side triage stays local (not needed by the miner). Wires the now-portable buildSlopAssessment into a real runSlopAssessment binding in packages/gittensory-miner, matching self-review-adapter.ts's own structural-mirror design.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 0928068 | Commit Preview URL Branch Preview URL |
Jul 12 2026, 04:32 AM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5140 +/- ##
=======================================
Coverage 94.32% 94.33%
=======================================
Files 471 472 +1
Lines 39837 39839 +2
Branches 14535 14535
=======================================
+ Hits 37576 37581 +5
Misses 1583 1583
+ Partials 678 675 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - fixes requiredReview updated: 2026-07-12 04:40:22 UTC
🛑 Suggested Action - Manual Review Review summary Nits — 6 non-blocking
CI checks failing
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 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.
|
src/signals/slop.ts's PR-side exports were converted to a re-export shim over packages/gittensory-engine/src/signals/slop.ts (#5133), but the file still carried host-only issue-side triage code alongside the shim, so scripts/check-engine-parity.ts's shim detection (which only recognizes a file containing NOTHING but the re-export statement) treated it as a hand-duplicated twin and failed on the now-intentional divergence. Moves the issue-side code to src/signals/issue-slop.ts so slop.ts is a pure shim again.
Summary
attempt-runner.js'sdeps.runSlopAssessmenthad no production binding — only the test double intest/unit/miner-attempt-runner.test.tsexisted. The real self-review scorer (src/signals/slop.ts) had never been made portable to the miner CLI.packages/gittensory-engine/src/signals/slop.ts— the canonical implementation now;src/signals/slop.tsbecomes a partial re-export shim for the PR-side pieces (issue-side triage, not needed by the miner, stays local, unmoved).SignalFinding→AdvisoryFindingtype rename), and all 63 pre-existingtest/unit/slop.test.tstests pass unchanged against the new shim.nonNegativehelper was missing the original'sNumber.isFiniteguard andMath.trunccall — fixed to match exactly before this PR, so no scoring-behavior drift shipped.buildSlopAssessmentintopackages/gittensory-miner/lib/slop-assessment.js'srunSlopAssessment— a direct pass-through, sinceself-review-adapter.ts'sSelfReviewSlopInput/SelfReviewSlopAssessmentwere already deliberately hand-kept structural mirrors ofSlopAssessmentInput/SlopAssessmentfor exactly this purpose (see that file's own header comment).Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlint— not run (no workflow files touched)npm run typechecknpm run test:coverage(targeted:test/unit/slop.test.ts65/65,test/unit/miner-slop-assessment.test.ts3/3, plus the 4 other slop-dependent suites — 178/178 total passing; 100% statement/branch/function/line coverage on both the newpackages/gittensory-engine/src/signals/slop.tsand thesrc/signals/slop.tsshim)npm run test:workers— not run (no Workers runtime code touched)npm run build:mcp/npm run test:mcp-pack— not run (no MCP server changes)npm run ui:openapi:check/npm run ui:lint/npm run ui:typecheck/npm run ui:build— not run (no UI changes)npm audit --audit-level=moderate— no new dependencies addedhasClearNoIssueRationale's omitted-body branch andbuildUnfilledIssueTemplateFinding's omitted-body branch (both real, reachable via the public API but previously untested in isolation); the one genuinely unreachable branch (ensurePublicSafeText's fallback — every current caller only interpolates integer counts) isv8 ignore-marked with a comment, matching the existingisConfiguredCodingAgentDriverprecedent indriver-factory.tsrather than fabricating an artificial test.If any required check was skipped, explain why:
src/signals/slop.tssurface is scoped entirely topackages/gittensory-engine/packages/gittensory-miner(their ownnode --check/tsc -pbuild conventions, not the UI/Workers/MCP-pack pipelines) plussrc/signals/slop.ts+ its existing roottest/unit/coverage — the skipped checks above have no surface this diff touches.Safety
Notes