Skip to content

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

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

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

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.
…am/cli)

Exports spawnRepoCommand, resetRepo, and buildAgentAttemptSeam so the CLI's
dry-run execution seams are unit-tested directly: real-subprocess build/test
runs, the git checkout+clean reset in a temp repo, the agent-seam's
no-provider-configured guard, and runFullCrossRepoExecutionCli end-to-end with
injected fakes. Also fixes runFullCrossRepoExecutionCli to forward the injected
readiness guards (existsSync/detectRepoStack/...) it was silently dropping.
@luciferlive112116

Copy link
Copy Markdown
Contributor Author

Superseded by #7668 which merged #7634. Closing my duplicate.

@superagent-security

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

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