feat(miner): run the target repo's own test/lint/build commands before opening a PR#8819
Conversation
…e opening a PR (#8807) Nothing independently verified a coding agent's work before submission: the only verification module (engine lint-guard) is hardcoded to loopover's own monorepo commands and never passed in production, and coding-task-spec's validation guidance only TELLS the agent which commands to run. A known-bad change passed every AMS-side gate on the agent's self-attestation alone. - target-repo-verification.ts: runs stack-detection's already-inferred commands (test → lint → build, highest signal first) from the attempt's worktree, per-command timeout (10 min), stop at first failure, bounded output tail. An undetected stack or empty command set SKIPS (recorded, never a failure) — the gate is only as smart as detection, and empty detection must not block repos with unconventional tooling. - attempt-runner: the gate runs after handoff + kill-switch recheck and BEFORE the freshness read (a failing build never spends GitHub budget); a failure returns the new verification_failed outcome — the attempt never submits, the worktree is retained for postmortem, and the existing not-submitted notification plumbing carries the reason. Deliberately not re-entering the iterate loop in this change (the loop's own self-review iterations already ran; never-submit-known-bad is the trust win) — loop feedback is the tracked follow-up on the issue. - attempt-cli binds the worktree-scoped thunk (same stack detection the agent's guidance rendered), with MINER_SKIP_TARGET_REPO_VERIFICATION as the escape hatch for suites exceeding the per-command bound.
|
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 |
loopover-ui | 7127ce4 | Commit Preview URL Branch Preview URL |
Jul 26 2026, 08:28 AM |
Bundle ReportChanges will increase total bundle size by 72 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: loopover-uiAssets Changed:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8819 +/- ##
==========================================
+ Coverage 90.56% 92.97% +2.40%
==========================================
Files 96 704 +608
Lines 22490 57313 +34823
Branches 3884 20306 +16422
==========================================
+ Hits 20367 53284 +32917
- Misses 1945 3147 +1202
- Partials 178 882 +704
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-26 09:03:13 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionPartially addressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver 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://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
…settle bounded
The default verification spawn killed only the shell at the timeout; on
Linux the command's descendants survive, keep the stdio pipes open, and
stall the close event (observed as a 30s hang in CI). Spawn detached,
kill the negative pid, and add a bounded post-kill settle so the gate
can never outlive its per-command timeout even if an orphan escapes the
group.
Also fix the queue.test.ts/queue-2.test.ts fetch stubs whose generic {}
fallback broke the close-explanation marker search (the comment list
endpoint must return an array) — a latent mock-shape gap surfaced by
routing enforced closes through createOrUpdateCloseExplanationComment.
Summary
The final round-2 audit item (#8807), and the biggest AMS trust gap: submission quality rested entirely on the coding agent's self-attestation — the only real verification module (engine
lint-guard) is loopover-monorepo-hardcoded and never passed in production, and the task spec's validation guidance only tells the agent what to run.Changes
target-repo-verification.ts(new): runs the target repo's own detected commands (stack-detection's inferred test → lint → build, same source the agent's guidance renders) from the attempt worktree via a shell spawn seam — per-command 10-minute bound, timeout-kill = failure, stop-at-first-failure, 4KB output tail for postmortem. Undetected stack / no inferred commands ⇒ recorded SKIP, never a failure (empty detection must not block unconventional repos).attempt-runner.ts— optionalverifyTargetRepodep, gated after handoff + kill-switch recheck and before the freshness read (a failing build never spends GitHub API budget). Failure ⇒ newverification_failedoutcome: no submission, worktree retained (attemptOk=false path), existing not-submitted notification plumbing carries the reason. Absent dep = byte-identical pre-feat(miner): run the TARGET repo's own test/build commands before opening a PR — stop trusting the agent's self-attestation #8807 flow (pinned).attempt-cli.ts— binds the worktree-scoped thunk;MINER_SKIP_TARGET_REPO_VERIFICATIONescape hatch for suites exceeding the bound; injection seam mirroring the sibling resolvers.Test plan
npm run typecheckclean;@loopover/minerbuildsverification_failedblocks before the freshness read and the PR write; passed/skipped/absent-dep all submit unchangedCloses #8807