Skip to content

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

Closed
jaytbarimbao-collab wants to merge 1 commit into
JSONbored:mainfrom
jaytbarimbao-collab:cross-repo-full-exec-7634
Closed

feat(miner): add a dry-run --full-execution mode to the cross-repo evaluation harness#7650
jaytbarimbao-collab wants to merge 1 commit into
JSONbored:mainfrom
jaytbarimbao-collab:cross-repo-full-exec-7634

Conversation

@jaytbarimbao-collab

Copy link
Copy Markdown
Contributor

Summary

The cross-repo evaluation harness (#4788) is readiness-only — it exercises detectRepoStack / resolveMinerGoalSpec / buildCodingTaskSpec against the benchmark repos to answer "can the miner form a plan for this repo," but never runs the coding agent or the repo's tests. This adds a dry-run --full-execution mode that runs the discover → plan → code → test loop against ≥2 of the existing benchmark repos locally, and reports per-repo pass/fail with execution-specific failure categories — real signal toward #4810's launch-readiness bar.

What's here

  • Extended taxonomy: CROSS_REPO_FAILURE_CATEGORY gains exec_setup_gap, plan_compile_gap, test_failure, no_op_diff — the 5 readiness members are untouched, and summarize/formatReport surface the new ones in the same format (readiness output byte-identical).
  • evaluateRepoExecution / runCrossRepoExecution: mirror the readiness evaluator's options.X ?? realImpl injection, with three new injectable seamscloneRepo, runCodingAgent, runTests — so unit tests drive success and every failure category with zero real IO. Readiness's single (non-idempotent) buildCodingTaskSpec call is refactored into a shared core and reused, not duplicated.
  • CLI: a --full-execution flag on the existing scripts/cross-repo-evaluation.mjs (no new script), with its hand-maintained .d.mts kept in sync.
  • Tests: miner-cross-repo-evaluation.test.ts extended (+12, 53 total, all passing) — a passing run plus each new failure category, fully mocked. All original readiness tests unchanged and green.
  • Docs: docs/cross-repo-evaluation.md documents the new mode.

Dry-run safety (hard constraint honored)

No live GitHub PR submission, no write access to the third-party repos, no credentials beyond a local clone. The default runCodingAgent seam is a non-spawning shadow (no credentials, empty diff → honest no_op_diff when run with no agent injected); a real diff is produced only when a real/fake agent is injected via options.runCodingAgent (as the tests do). There is no octokit/PR-open/network path anywhere in the new code.

Note: packages/loopover-miner/** is outside the root Codecov coverage.include, so no patch-% gate applies; the new logic still carries real unit tests per this package's conventions.

Closes #7634

…aluation harness

The cross-repo evaluation harness (JSONbored#4788) is readiness-only — it checks whether
the miner can FORM A PLAN for a repo (detectRepoStack, resolveMinerGoalSpec,
buildCodingTaskSpec) but never runs the coding agent or its tests. This adds a
dry-run --full-execution mode that runs the discover -> plan -> code -> test
loop against >=2 benchmark repos locally and reports per-repo pass/fail with
execution-specific failure categories.

- Extend CROSS_REPO_FAILURE_CATEGORY with exec_setup_gap, plan_compile_gap,
  test_failure, and no_op_diff (the readiness categories are unchanged).
- Add evaluateRepoExecution / runCrossRepoExecution, mirroring the readiness
  evaluator's options-injection pattern with new injectable seams (cloneRepo /
  runCodingAgent / runTests) so tests drive every path with zero real IO. The
  default agent seam is a non-spawning shadow (no credentials), preserving the
  harness's read/execute-locally-and-discard safety posture.
- --full-execution CLI flag on the existing script; summarize/formatReport
  surface the new categories in the same format (readiness output unchanged).
- Extend miner-cross-repo-evaluation.test.ts (+12 tests, 53 total) covering a
  passing run and each new failure category, all mocked.
- Document the new mode in docs/cross-repo-evaluation.md.

Dry-run only: no live GitHub PR submission, no write access to benchmark repos,
no credentials beyond a local clone.

Closes JSONbored#7634
@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

❌ Patch coverage is 56.36364% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.45%. Comparing base (4d9b9d1) to head (6b4792d).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...ckages/loopover-miner/lib/cross-repo-evaluation.ts 56.36% 37 Missing and 11 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7650      +/-   ##
==========================================
- Coverage   88.51%   88.45%   -0.06%     
==========================================
  Files         724      724              
  Lines       75992    76087      +95     
  Branches    22618    22651      +33     
==========================================
+ Hits        67263    67303      +40     
- Misses       7681     7725      +44     
- Partials     1048     1059      +11     
Flag Coverage Δ
shard-1 35.75% <56.36%> (+0.02%) ⬆️
shard-2 32.90% <0.00%> (-0.08%) ⬇️
shard-3 28.54% <0.00%> (-0.10%) ⬇️
shard-4 40.45% <0.00%> (-0.18%) ⬇️
shard-5 33.93% <0.00%> (-0.06%) ⬇️
shard-6 35.90% <0.00%> (-0.13%) ⬇️

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 81.88% <56.36%> (-18.12%) ⬇️

... 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 - fixes required

Review updated: 2026-07-21 06:45:57 UTC

7 files · 1 AI reviewer · no blockers · CI failing · unstable

🛑 Suggested Action - Fix Blockers

Review summary
This adds a `--full-execution` dry-run mode to the cross-repo evaluation harness, extending the readiness core (`evaluateRepoReadinessCore`) into a full discover→plan→code→test loop via three injectable seams (`cloneRepo`, `runCodingAgent`, `runTests`), with a new failure taxonomy appended (not mutating) the existing one. The refactor correctly extracts a shared `evaluateRepoReadinessCore` so `buildCodingTaskSpec` (documented as side-effecting/non-idempotent) is only ever called once, and readiness output is provably byte-identical since `executedCount`/`executed` only appear when set. The default `runCodingAgent` shadow and `defaultCloneRepo`/`defaultRunTests` real implementations are unexercised by the fully-mocked test suite, which is the main gap given the 56.36% patch coverage failure. No PR-open or credential path is introduced; the dry-run boundary looks structurally sound from the diff.

Nits — 5 non-blocking
  • packages/loopover-miner/lib/cross-repo-evaluation.ts: `defaultCloneRepo`, `defaultRunCodingAgent`, and `defaultRunTests` (the real, non-injected code paths) appear to have zero direct test coverage — every test injects `cloneRepo`/`runCodingAgent`/`runTests`, which is exactly why codecov/patch is failing at 56.36% against a 99% target; add at least one test that exercises the default `sh -c` spawn path (e.g. with a trivial always-passing command) and the default shadow agent's no-op summary.
  • `evaluateRepoExecution` (cross-repo-evaluation.ts:523) is a ~90-line function with cyclomatic complexity well above the file's other functions; consider extracting the test-run/no-op-guard tail (lines handling `withDiff`/`withExit`) into a small helper for readability, though this is not blocking given the seam-based test coverage.
  • docs/cross-repo-evaluation.md correctly states 'never opens a PR or writes to the third-party repo,' but doesn't mention that `defaultCloneRepo` will fall back to `ensureRepoCloned`, which does perform a real network clone when the local path is absent — worth a one-line caveat since 'dry-run' could otherwise be read as fully offline.
  • The PR description says 'documents the new mode' and the test asserts `doc.toContain('--full-execution')`/`'no_op_diff'`, but there's no test verifying the `exec_setup_gap`/`plan_compile_gap` strings are documented — minor asymmetry in the doc-contract test, not blocking.
  • Add a coverage-closing test that calls `evaluateRepoExecution` with `runTests` unset so the real `defaultRunTests` spawns `sh -c "true"` (or similar) and asserts exit code 0, to close the codecov/patch gap directly tied to the spawn logic (the highest-risk untested code, since it's the one path that does real IO).

CI checks failing

  • codecov/patch — 56.36% of diff hit (target 99.00%)

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7634
Related work ⚠️ Same linked issue: #7642 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: 159 registered-repo PR(s), 77 merged, 16 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jaytbarimbao-collab; Gittensor profile; 159 PR(s), 16 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: significant
Linked issue satisfaction

Addressed
The PR adds an injectable, dry-run --full-execution mode to the existing cross-repo-evaluation.mjs/lib module (clone → reuse plan → runCodingAgent → runTests), extends the failure taxonomy with exec_setup_gap/plan_compile_gap/test_failure/no_op_diff in the same report format, and states docs and unit tests were updated, matching the issue's explicit deliverables and safety constraints.

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 (CI is failing (codecov/patch)). 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