Repository navigation
fix(j5): pin a new Crew worktree to a commit so branch renames don't break launches - #761
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Panel review: #761Live (Astra, stack tip): new-worktree members showed No code findings. The panel checked that the pin is taken after the replay check, that Process nit: the roster card existed before, so it needs a before shot rather than "new". Review panel for the #750–#762 stack, judged as the code that lands at |
d630b46 to
6cb5575
Compare
6cb5575 to
b28ee63
Compare
b28ee63 to
c8160e1
Compare
|
Thanks for the live check. Rebased onto the updated #760 and pushed ( |
…lved to (#752) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…al is accepted (#752) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…oval and preparation (#752) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…hen proposed (#752) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
76996bc to
c41cbaa
Compare
|
Review panel: Claude Opus 5.5 (lead) and GPT-6.1 Sol. We reviewed the whole stack at Should-fix: a fetch failure refuses every worktree seat. In Effects:
Suggestion:
|
…layer Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A start_from_origin base whose fetch fails no longer makes the whole checkout unreadable, which refused every worktree seat and every direct spawn. That seat is refused by name with a next step; other seats resolve, and a base with no origin branch still falls back to the local ref. A direct j5_spawn_agent checks that its base exists without fetching. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ched Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…layer Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Fixed in |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ing exported Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Summary
A Crew proposal took a new worktree's base from a branch name, and J5 renamed that branch before I approved, so preview said the member was unavailable and blocked the whole roster. Keeping a mutable branch name as the launch dependency lets routine renaming invalidate a proposal. This pins a new worktree's base to a commit when the proposal is accepted and launches from that commit. Closes #752.
This is stacked on #747, so the base is
j5/747-adjudication-request. It is built on the rebased stack, which includes #660's replay-conflict behavior.baseCommiton a worktree seat's workspace choice, withbaseRefkept as the readable label. It lives in the stored seats, the approved seats and the seat context, which are JSON already, so there's no migration.{baseRef: <sha>, startFromOrigin: false}, so nothing moves the pin afterwards. A branch renamed, moved or deleted after acceptance doesn't change the revision while the commit still exists. A vanished commit fails visibly with the member and the short SHA named at preview and approval.HEAD) resolves live to that checkout's current commit, ignoring uncommitted changes. No new sentinel in the contract or the MCP tool.New worktree from <ref> @ <8-char sha>, with the full SHA in a tooltip.gh-merge-baseand the setup tracker shows the SHA as its base, because upstream derives both from a branch name. I decided to accept that rather than edit upstream's preparation. It's documented, andgh pr createfrom such a worktree needs an explicit base.Docs: the workspace paragraph in agent-tools.md (tool descriptions in
tools.tskept in sync) and crews.md.Evidence
At
c41cbaa78e, on top of #747.vp run -r typecheck(the CI command) exits 0 on the stack tip:mcp,EnvelopeFormatterandruntimeLayertests, plus 5 contracts tests and 112 webj5/crewtests:cd apps/server && vp test run src/j5/a2a src/mcpspawnWorkspacePin.test.tsruns real git: a branch moved, renamed and deleted with the commit kept, a missing pinned commit, and the origin fetch showing the pin doesn't advance when origin moves again.b8a42e0bc0, after the stack was rebased onto j5/main): server 1298, web 1150, contracts 736, client-runtime 182, provider-core 205 and shared 1680 tests pass.Not verified: an already-open proposal from before this change, a start-from-origin member, an automatic approval and a direct addition on a live server (tests cover them). I didn't run repo-wide checks.
Merge Danger
Door: two-way. The pin is an optional field in stored JSON and there's no migration. After a revert an old proposal's extra field is simply ignored.
Blast Radius: every Crew proposal and addition that includes a new-worktree member.
Things worth knowing:
j5_spawn_agentwithstart_from_originnow fetches origin once while the spawn is accepted. Preparation still fetches as before, and direct spawns don't use the pin.CrewProposalService.ts,CrewLaunchService.tsandspawnWorkspace.tsare the likeliest to conflict with anything else in the Crew launch path.After merge: nothing.
UI changes
One new line under each new-worktree member on the roster card.
Live testing
Ran on the whole stack at
da64b2795c, before the last rebase onto j5/main, in an isolated test home fromj5-live-test. Claude Haiku 5.5.main. The card showedNew worktree from main @ c02a2d96for both.mainin the test repo, then approved. Approval succeeded, and git shows both new worktrees atc02a2d96. The Captain's checkout was on the renamed branch.Not exercised live: an already-open proposal from before the change, start from origin, automatic approval and a direct addition.
Upstream impact
None. Everything is under J5-owned paths, and I used
GitVcsDriver.resolveCommitinstead of adding a method to upstream'sGitWorkflowService.Checklist
FORK.md(case text and file-table row) in this PR — none editeddocs/j5/product/upstream.md— no upstream behavior changesAGENTS.md) — the roster card and the proposal path ran live on Claude; automatic approval, direct additions and start from origin are covered by tests onlydocs/j5/product/and user docs rewritten where this changes themClaude Sonnet 5.5 through the Claude Code harness in J5 Code.
🤖 Generated with Claude Code