fix(scripts): create agent slots from origin/main, not the removed dev branch - #531
Merged
Merged
Conversation
…v branch setup-agent-slots.sh still created missing slot worktrees from `dev`, which no longer exists, so recreating a slot failed with "invalid reference: dev". Fetch origin/main once up front and create slots from it. Also prune stale worktree registrations first so a slot directory deleted by hand can be recreated. The dispatch skill's post-merge pull pointed at dev as well. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Re-running setup-slots over existing slots must keep working offline. Co-Authored-By: Claude <noreply@anthropic.com>
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.
What
bun run setup-slotsfailed withfatal: invalid reference: devwhenever it had to (re)create a slot worktree. The repo is main-only now. The script now runsgit fetch origin mainonce and creates missing slots fromorigin/main. It also runsgit worktree prunebeforeworktree add, so a slot directory deleted by hand (which leaves a stale registration behind) can be recreated. The dispatch skill's post-mergegit pull --ff-only origin devnow pullsmaintoo.claim-slot.sh,release-slot.shand AGENTS.md "Parallel agent slots" had no staledevreferences (AGENTS.md already saysorigin/main).How I tested it
Scripts only, no plugin code.
bash -non the script. Replayed the worktree step against a scratch path: created a worktree fromorigin/main, deleted its directory, and confirmedworktree addfails without the prune and succeeds with it. Existing slots are untouched: the-d "$worktree"guard is unchanged, so the script stays idempotent. I did not re-run the full script because all three slots are currently claimed and it would rebuild them.AI assistance: Claude Code wrote the change from Leo's brief to fix the stale
devreference in setup-slots; Leo reviews it.Checklist
bun run check,bun run format,bun run lint, andbun run testpass locally (n/a: no TS/Svelte touched)manifest.json: I noted that the docs site needs updating (see "Documentation" in CONTRIBUTING.md)