Skip to content

feat(miner): add dry-run full-execution mode to the cross-repo evaluation harness - #7672

Closed
luciferlive112116 wants to merge 5 commits into
JSONbored:mainfrom
luciferlive112116:feat/cross-repo-full-execution-7634-v3
Closed

feat(miner): add dry-run full-execution mode to the cross-repo evaluation harness#7672
luciferlive112116 wants to merge 5 commits into
JSONbored:mainfrom
luciferlive112116:feat/cross-repo-full-execution-7634-v3

Conversation

@luciferlive112116

Copy link
Copy Markdown
Contributor

Closes #7634

Summary

Extends the cross-repo evaluation harness (#4788) from readiness-only to a full-execution dry-run mode, so it answers not just "can the miner form a plan for this repo?" but "does the miner actually produce working, correct code?" — the real signal behind the #4810 launch-readiness bar.

A new --full-execution flag on the existing packages/loopover-miner/scripts/cross-repo-evaluation.mjs runs the discover → plan → code → test loop against the benchmark repos: it drives the configured coding-agent driver to generate a real diff in the local clone, builds the result, runs the target repo's own test suite locally, and checks the diff isn't a no-op. Dry-run only — it edits the clone and hard-resets it afterward; it never opens a PR, never pushes, and needs nothing beyond a local clone + a configured driver (the same safety posture the readiness harness already has).

What's added

  • Execution taxonomy (CROSS_REPO_EXECUTION_CATEGORY), extending the readiness taxonomy per the issue: plan_not_formed, code_build_failed, tests_failed, no_op_diff (tests passed but the diff was empty), plus the shared clone_setup / other.
  • evaluateRepoFullExecution / runFullCrossRepoExecution — reuse evaluateRepoReadiness for the plan stage, then delegate the code/build/test steps to injectable seams (runAgentAttempt, buildRepo, runRepoTests) so the orchestration + taxonomy are unit-testable without a live agent.
  • summarizeCrossRepoExecution / formatCrossRepoExecutionReport — an execution report in the same shape the readiness report already produces.
  • CLI --full-execution mode wiring real dry-run seams: build/test spawn the repo's own commands in the clone; the agent seam runs the configured driver via runCodingAgentAttempt and captures git diff, then resets.
  • Docsdocs/cross-repo-evaluation.md documents the new mode, taxonomy, and operator prerequisites.

Scope

  • --full-execution mode on the existing CLI + lib module (no new script; no live PR submission against benchmark repos)
  • In scope (packages/loopover-miner/**, test/**), no blockedPaths; no secrets
  • No changelog / site/ / CNAME / lovable edits

Test Coverage

packages/loopover-miner/** is outside Codecov's coverage.include (src/** only), so no patch-coverage gate applies — but the new logic has real unit tests (test/unit/miner-cross-repo-full-execution.test.ts) following this package's conventions: every execution category and the pass path are exercised with injected fake seams, plus runFullCrossRepoExecution, the summary, the report, and the CLI arg/dispatch wiring.

Validation

  • tsc -p packages/loopover-miner/tsconfig.json — new module compiles clean; emitted .js/.d.ts committed
  • node --check on the emitted .js and the CLI script
  • Readiness mode unchanged (--full-execution is additive); CLI --help documents the new flag
  • vitest run on the new test suite — green
  • Branch current with main

Safety

  • Dry-run only — edits the local clone and hard-resets; never opens a PR, pushes, or writes to any benchmark repo
  • No forge API calls, no credentials beyond a local clone + a configured coding-agent driver

…tion harness

Extends the cross-repo evaluation harness (JSONbored#4788) from readiness-only to a
full-execution dry-run mode (JSONbored#7634): a new --full-execution CLI flag runs the
discover -> plan -> code -> test loop against the benchmark repos, driving the
configured coding agent to generate a real diff in the local clone, building
it, running the target repo's own test suite locally, and flagging a no-op
diff. Dry-run only -- it edits the clone and hard-resets it; it never opens a
PR, pushes, or writes to any third-party repo.

Adds the CROSS_REPO_EXECUTION_CATEGORY taxonomy (plan_not_formed,
code_build_failed, tests_failed, no_op_diff, plus shared clone_setup/other),
evaluateRepoFullExecution / runFullCrossRepoExecution (readiness reused for the
plan stage; code/build/test delegated to injectable seams so the orchestration
is unit-testable without a live agent), and summarize/format helpers in the
same shape the readiness report produces. The CLI wires real dry-run seams
(child_process build/test in the clone; the driver via runCodingAgentAttempt +
git diff capture + reset). Docs updated.
…ensive arms

Covers the non-Error agent throw, the build/test no-detail reason fallbacks, and
the null-manifest guard directly, and narrows the post-readiness stack to its
detected shape so the (unreachable-after-readiness) optional-chain arms are
gone -- bringing the new code to full patch coverage.
…xecution

Split the stack-detected command and spawn it directly (shell:false) instead of
sh -c, so there is no shell-metacharacter interpretation of the command string.
…execution

evaluateRepoFullExecution hardcoded built:true in the tests-failed, no-op, and
success results even when no build ran (no inferred build command or no build
runner wired), misreporting a skipped build as built. Track built explicitly:
null when skipped, true only after a build actually ran and passed, false on a
build failure. Adds regression tests for the skipped-build paths.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.51%. Comparing base (4d9b9d1) to head (b707bed).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7672   +/-   ##
=======================================
  Coverage   88.51%   88.51%           
=======================================
  Files         724      724           
  Lines       75992    76068   +76     
  Branches    22618    22646   +28     
=======================================
+ Hits        67263    67332   +69     
- Misses       7681     7688    +7     
  Partials     1048     1048           
Flag Coverage Δ
shard-1 36.49% <1.31%> (+0.77%) ⬆️
shard-2 36.82% <100.00%> (+3.84%) ⬆️
shard-3 30.20% <0.00%> (+1.57%) ⬆️
shard-4 38.31% <0.00%> (-2.31%) ⬇️
shard-5 32.62% <0.00%> (-1.38%) ⬇️
shard-6 33.86% <0.00%> (-2.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ckages/loopover-miner/lib/cross-repo-evaluation.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 21, 2026
@loopover-orb

loopover-orb Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - reject/close recommended

Review updated: 2026-07-21 07:30:57 UTC

8 files · 1 AI reviewer · 2 blockers · CI green · clean

🛑 Suggested Action - Reject/Close

Review summary
This PR extends the cross-repo evaluation harness with a full-execution dry-run mode that drives a real coding agent through discover→plan→code→test against benchmark repos, adding an execution taxonomy, injectable seams (runAgentAttempt/buildRepo/runRepoTests), CLI wiring, and a reasonably thorough unit test suite. The core orchestration in evaluateRepoFullExecution correctly stages readiness→build→test→no-op-diff checks and cleanly reuses evaluateRepoReadiness. The .d.mts test-coverage gap is notable: the test file explicitly avoids exercising the CLI wiring (runFullCrossRepoExecutionCli, parseCrossRepoEvaluationArgs' fullExecution flag) because the hand-written scripts/cross-repo-evaluation.d.mts predates them, leaving the actual CLI entry point (including the real buildAgentAttemptSeam and its git diff/reset lifecycle) unit-untested despite being part of the shipped surface.

Blockers

  • The new CLI seam wiring in packages/loopover-miner/scripts/cross-repo-evaluation.mjs (buildAgentAttemptSeam, runFullCrossRepoExecutionCli, spawnRepoCommand, resetRepo) has zero unit test coverage — the test suite explicitly skips it per its own comment, and the coding-agent lifecycle (writing acceptanceCriteriaPath, git diff capture, hard-reset in `finally`, tempdir cleanup) is the highest-risk new code in this PR (it edits a real clone) yet is unverified.
Nits — 6 non-blocking
  • packages/loopover-miner/scripts/cross-repo-evaluation.mjs: magic numbers like maxTurns 40 and maxBuffer 64*1024*1024 in buildAgentAttemptSeam could use named constants for clarity.
  • evaluateRepoFullExecution in cross-repo-evaluation.ts is a large function (~75 added lines) with 5 sequential early-return stages; consider extracting the build/test steps into small helpers for readability.
  • docs/cross-repo-evaluation.md and the .d.mts type files are updated, but confirm the scripts/cross-repo-evaluation.d.mts actually declares fullExecution/runFullCrossRepoExecutionCli (diff shows it does) so downstream typechecked consumers of the CLI aren't blocked the same way the test file was.
  • Add at least a smoke-level unit test for runFullCrossRepoExecutionCli/buildAgentAttemptSeam using a fake git repo or mocked spawnSync, even if @​loopover/engine itself is mocked, to cover the reset-on-finally and diff-capture path.
  • Consider extracting the resetRepo + tempdir-cleanup pattern into a single guaranteed-cleanup helper to reduce risk of leaving a dirty clone if an exception occurs before the try block.
  • Pull request duplicates other open work — Check for an existing pull request or issue covering this change and coordinate or consolidate before continuing.

Why this is blocked

  • The new CLI seam wiring in packages/loopover-miner/scripts/cross-repo-evaluation.mjs (buildAgentAttemptSeam, runFullCrossRepoExecutionCli, spawnRepoCommand, resetRepo) has zero unit test coverage — the test suite explicitly skips it per its own comment, and the coding-agent lifecycle (writing acceptanceCriteriaPath, git diff capture, hard-reset in `finally`, tempdir cleanup) is the highest-risk new code in this PR (it edits a real clone) yet is unverified.
  • Linked issue overlaps another open PR — Review the related PRs before spending reviewer time on duplicate work.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. The new CLI seam wiring in packages/loopover-miner/scripts/cross-repo-evaluation.mjs \(buildAgentAttemptSeam, runFullCrossRepoExecutionCli, spawnRepoCommand, resetRepo\) has zero unit test coverage — the test suite explicitly skips it per its own comment, and the coding-agent lifecycle \(writing acceptanceCriteriaPath, git diff capture, hard-reset in \`finally\`, tempdir cleanup\) is the highest-risk new code in this PR \(it edits a real clone\) yet is unverified.

2. Linked issue overlaps another open PR — Review the related PRs before spending reviewer time on duplicate work.

Decision drivers

  • ❌ Code review — 2 blockers (1 reviewer)
  • ❌ Gate result — Blocking (Repo-configured hard blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7634
Related work ⚠️ Same linked issue: #7668 Another open PR references the same linked issue.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 125 registered-repo PR(s), 67 merged, 28 issue(s).
Contributor context ✅ Confirmed Gittensor contributor luciferlive112116; Gittensor profile; 125 PR(s), 28 issue(s).
Improvement ✅ Minor risk: low · value: minor · LLM: significant
Linked issue satisfaction

Addressed
The diff adds a full-execution taxonomy, evaluateRepoFullExecution/runFullCrossRepoExecution orchestration reusing the readiness stage, a --full-execution CLI mode wiring dry-run build/test/agent seams that reset the clone, and an extended report format, directly matching the issue's requested deliverables including a --full-execution flag, extended pass/fail categories, and doc updates.

Review context
Contributor next steps
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask 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.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

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.

  • Re-run LoopOver review

@loopover-orb

loopover-orb Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (Linked issue overlaps another open PR; AI reviewers agree on a likely critical defect: The new CLI seam wiring in packages/loopover-miner/scripts/cross-repo-evaluation.mjs (buildAgentAttemptSeam, runFullCrossRepoExecutionCli, spawnRepoCommand, resetRepo) has zero unit test coverage — the test suite explicitly skips it per its own comment, and the coding-agent lifecycle (writing acceptanceCriteriaPath, git diff capture, hard-reset in `finally`, tempdir cleanup) is the highest-risk new code in this PR (it edits a real clone) yet is unverified.; duplicate of open PR #7668). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend the cross-repo evaluation harness from readiness-only to full execution on benchmark repos

1 participant