feat(miner): wire real git worktree preparation into the attempt CLI (#5132) - #5252
Merged
Conversation
Advances #5132 worktree-allocator.js only reserves a concurrency SLOT (its own `slot-N` placeholder directories never receive real git content) -- attempt-cli.js never called attempt-worktree.js's prepareAttemptWorktree (#5237) to actually clone/fetch and create a real `git worktree`, so the worktreePath reported by a blocked attempt pointed at an empty directory, not real repo content. Wires it in: prepared right after the coding-agent driver is confirmed configured, its real path replaces the allocator's slot path in every reported result, a new "blocked_worktree_preparation_failed" outcome (exit code 6) reports a real clone/fetch failure, and the worktree is cleaned up in `finally` since no real attempt runs in it yet.
Contributor
|
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 | 35b5946 | Commit Preview URL Branch Preview URL |
Jul 12 2026, 11:45 AM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5252 +/- ##
=======================================
Coverage 94.34% 94.34%
=======================================
Files 473 473
Lines 39982 39982
Branches 14576 14576
=======================================
Hits 37722 37722
Misses 1585 1585
Partials 675 675
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
5 tasks
JSONbored
added a commit
that referenced
this pull request
Jul 12, 2026
…rktree Advances #5132 runMinerAttempt's killSwitchScope needs MinerGoalSpec.killSwitch.paused from the target repo's real .gittensory-miner.yml. checkMinerKillSwitch (governor-kill-switch.js, #2341) already resolves the scope once given that value, but nothing in this package ever fetched/parsed the file itself. Unlike self-review-context.js/rejection-signal.js/ams-policy.js (which fetch live over raw.githubusercontent.com before any clone exists), this reads the file from an ALREADY-CLONED repo on disk -- by the time a real attempt reaches this point, attempt-worktree.js's prepareAttemptWorktree (#5237/#5252) has already cloned it, so no extra network round trip is needed. KNOWN GAP, same discipline as this epic's other standalone pieces: not yet wired into attempt-cli.js's runAttempt, since that wiring needs a real repoPath from #5252's worktree preparation (open, CI-green, not yet merged as of this PR). Follow-up once it lands.
JSONbored
added a commit
that referenced
this pull request
Jul 12, 2026
…rktree (#5255) Advances #5132 runMinerAttempt's killSwitchScope needs MinerGoalSpec.killSwitch.paused from the target repo's real .gittensory-miner.yml. checkMinerKillSwitch (governor-kill-switch.js, #2341) already resolves the scope once given that value, but nothing in this package ever fetched/parsed the file itself. Unlike self-review-context.js/rejection-signal.js/ams-policy.js (which fetch live over raw.githubusercontent.com before any clone exists), this reads the file from an ALREADY-CLONED repo on disk -- by the time a real attempt reaches this point, attempt-worktree.js's prepareAttemptWorktree (#5237/#5252) has already cloned it, so no extra network round trip is needed. KNOWN GAP, same discipline as this epic's other standalone pieces: not yet wired into attempt-cli.js's runAttempt, since that wiring needs a real repoPath from #5252's worktree preparation (open, CI-green, not yet merged as of this PR). Follow-up once it lands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Advances #5132
worktree-allocator.jsonly reserves a concurrency SLOT -- its ownslot-Nplaceholder directories never receive real git content.attempt-cli.jsnever calledattempt-worktree.js'sprepareAttemptWorktree(#5237) to actually clone/fetch and create a realgit worktree, so theworktreePathreported by a blocked attempt pointed at an empty directory, not real repo content.Wires it in: prepared right after the coding-agent driver is confirmed configured, its real path replaces the allocator's slot path in every reported result, a new
"blocked_worktree_preparation_failed"outcome (exit code 6) reports a real clone/fetch failure, and the worktree is cleaned up infinallysince no real attempt runs in it yet (nothing to postmortem).Test plan
npx vitest run test/unit/miner-attempt-cli.test.ts-- 24/24 (existing coverage updated with real worktree-prep mocks, plus new regression coverage for the preparation-failure path andbaseBranchthreading)npx vitest run test/unit/miner-attempt-worktree.test.ts test/unit/miner-repo-clone.test.ts-- 18/18, unaffectednpm run test:engine-paritynode --check packages/gittensory-miner/lib/attempt-cli.jsnpx tsc --noEmit