mirror of
https://github.com/0xWheatyz/handler.git
synced 2026-08-30 03:31:36 +00:00
Root checkout is a ref store: worktree spawns never touch it
Worktree spawns now fetch only. The agent's branch is cut from origin/* and the root checkout - which may hold the operator's own work - is never fast-forwarded, merged, or re-parked by a spawn. A failed fetch on a worktree spawn is fatal instead of a silent note: the contract is 'starts at the remote's latest push', and cutting a branch from stale refs would break it quietly. Hardening around the same contract: the branch start falls back origin/HEAD -> origin/main -> origin/master when the head pin is missing, and a stale agent/<name> branch left behind by a deleted agent is reset to the remote tip (-B) instead of silently shadowing it - while -B's refusal to move a branch checked out elsewhere keeps in-flight agents protected. Root/subdir placements (schedule firings, mise-init) keep the fast-forward behavior for their shared tree, as does the explicit sync command. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01731mKtVzsfeT4Vi3TvkR48
This commit is contained in:
@@ -8,6 +8,20 @@ the image workflows publish (plus `latest` from every push to `main`).
|
||||
|
||||
### Fixed
|
||||
|
||||
- **The project-root checkout is now a ref store, never a working tree Handler moves.**
|
||||
Worktree spawns fetch only: the agent's branch is cut from `origin/*` and the root
|
||||
checkout — which may hold the operator's own work — is never fast-forwarded, merged,
|
||||
or re-parked. A failed fetch on a worktree spawn is now **fatal** instead of a silent
|
||||
note (the contract is "starts at the remote's latest push"; cutting from stale refs
|
||||
would break it quietly). Branch starts fall back `origin/HEAD` → `origin/main` →
|
||||
`origin/master` when the head pin is missing, and a stale `agent/<name>` branch left
|
||||
by a deleted agent is reset to the remote tip instead of shadowing it. Root/subdir
|
||||
placements (schedule firings, mise-init) keep the old fast-forward behavior for
|
||||
their shared tree. 2 end-to-end regression tests (bare remote, parked root,
|
||||
out-of-band push).
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Agents missing freshly pushed commits.** A spawn with no explicit placement ran
|
||||
the agent in the shared project-root checkout, and the root only fast-forwards
|
||||
while parked on the default branch — so as soon as one agent left it on a feature
|
||||
|
||||
Reference in New Issue
Block a user