Repository navigation
status judges a parked feature's worktree by the PATH resume computes for it — a worktree on that branch anywhere else and anything else AT that path are both refusals of the WHOLE feature, asked in resume.sh's own order and stopped at the first leg that refuses — computing that path out of the root GIT would spell, and out of $SPECKIT_GIT_WORKTREE_ROOT before any file - #27
Conversation
…mputes for it, so a worktree on that branch anywhere else is the whole-feature refusal it is and not the feature present and clean The independent reviewer's note of 2026-09-12, verbatim: "`worktree_on_branch` (in `status`) matches any path while RR4 matches only the computed one." It is REAL, and what it hid is the worst shape a hole in this layer can take — SILENCE. `worktree_on_branch` answers with the worktree checked out on the recorded branch WHEREVER IT SITS, and every arm of `check_parked_leg` read "there is one" as "the feature is here": with the tip at the parked commit that is no line at all and exit 0. `resume.sh`'s RR4 is `leg_registered_at "$leg_repo" "$tree"`, an exact-string match against ONE path — `collect_legs` computes `$WORKTREE_ROOT/$branch` for a `repo` leg and `$WORKTREE_ROOT/$branch/$SHAPE_SPEC_PATH` (or `…CODE…`) for a three-leg one, out of THIS checkout's `worktree_root` and never out of the record's, which `workspace_load_project` loads into `MANIFEST_WORKTREE_ROOT` and `resume.sh` then never reads again. VERIFIED AGAINST THE EXTENSION BEFORE A LINE WAS WRITTEN, on 2026-09-12, on scratch single-shape estates — a bare remote in a temp dir, a fake `$HOME`, workBenches' own `resume.sh`, `park.sh`, `git-common.sh` and `workspace-common.sh` — whose record carried `pushed: true`, `worktree_root: worktrees` and a parked commit that was origin's tip. With the worktree on the branch at `$HOME/elsewhere/001-a-thing` instead of `worktrees/001-a-thing`, `resume.sh` answered "Error: could not add the repo leg worktree 'worktrees/001-a-thing' for '001-a-thing'; that feature was NOT recreated. / fatal: '001-a-thing' is already used by worktree at '…/elsewhere/001-a-thing'", "REFUSED: 001-a-thing — git worktree add failed", exit 2 — and `status` at e18ec53, this branch's base, answered "0 finding(s) in 1 repository; nothing was changed.", exit 0. With that one worktree AT `worktrees/001-a-thing` the extension answered "[specify] 001-a-thing (repo): worktree already registered at worktrees/001-a-thing; left as it is", exit 0, and answered the same after a `git worktree move` between the two runs. THE TIP DOES NOT SAVE IT EITHER: off the path and moved on with a push, RR1 — "001-a-thing (repo leg) has moved since it was parked", "REFUSED: … — divergence"; off the path and moved on without one, RR5 — "the repo leg already has a local branch '001-a-thing' at <sha>, not the parked commit <sha>", exit 2 both times, where a worktree AT the computed path is called already-recreated by RR4 and neither RR is reached. The whole feature goes with it every time. `park` IS BLIND TO IT TOO, and that decides where the reading stops. Every arm below this one exits through "park again" — moved on, and a record naming no parked commit to read the tip against — and `park.sh` collects a single checkout's features through `verify_git_worktree_candidate "$REPO_ROOT" "$WORKTREE_ROOT" …` and a three-leg one's through `shape_load_features "$WORKTREE_ROOT"`, each of which drops every worktree outside that root: on the same estate `park --dry-run` answered "[specify] No open features under 'worktrees'; nothing to park.", and answered "PARKED: 001-a-thing" with the worktree at the computed path. So the leg ENDS at this line rather than carrying arms whose exit cannot run, which is the rule at the top of `check_parked_leg`; what they would have said is said on the run after the move. THE PATH IS COMPUTED, NOT GUESSED, out of the same three sources in the same order `get_config_value` reads them: `$SPECKIT_GIT_WORKTREE_ROOT` where it carries a value, else the LAST `worktree_root:` line in `.specify/extensions/git/git-config.yml` at any indent, else the default — and THE DEFAULT IS THE SHAPE'S, `worktrees` inside a three-leg root and `../<root folder>-worktrees` beside a single one, which is why this reading needed `read_root_shape` to exist first. `config_scalar` is that function's scalar and NOT `record_scalar`'s: `get_config_value`'s sed cuts a `#` only where whitespace comes in front of it, so `worktree_root: a#b` is the directory `a#b` to the other end, and it strips one leading and one trailing quote whether or not they pair. `lexical_path` is `os.path.abspath`'s normalisation and no more, because `resolve_path_from_repo_root` resolves no symlink either and a path normalised harder than the other end normalises it would not compare equal to the one the other end computes. Both were held against the real sed and the real `os.path.abspath` over thirteen inputs. WHERE IT SITS AND WHAT IT DOES NOT SAY. After the `pushed:` arms, because RR6 is first and refuses those legs before it reads a path — and NOT INSTEAD OF THEM, which is not the same claim and was made as one (the independent review of this commit, 2026-09-12, its second nit). `resume.sh` tests `[ "$pushed" != true ]` at the TOP of the leg loop and `break`s there, so for a `--no-push` leg it never reaches RR4 and never looks at a path at all: a record off the path with that spelling draws both lines, and the second is not a second reading of the run the first describes. It is printed because what it says is true of THIS workstation whatever the record says — a worktree on the recorded branch sitting where neither verb looks, which `park` here does not collect either — and because the exit it names is one that RUNS — the reviewer ran that `worktree move` on four twin estates and `resume` went on afterwards in three of them and refused for the behind-ness in the fourth, which is the run-after-the-move this reading designs for — and an exit that runs is the test the rule at the top of `check_parked_leg` applies to an arm under a refusal. (One mount it does not run for is recorded at the tip of this branch: a leg the manifest declares `path: "."`, whose computed path ends in a `/.` no `mv` will take and no `worktree move` lands on.) Where something is already AT that path the second line is not printed at all, which is the commit above this one. Never for a feature `collect_legs` refuses WHOLE, whose verdict is a sibling leg's and whose own line says so, and never for a role this checkout's shape has no place for, which never reaches RR4 either. THE EXIT IS TWO COMMANDS AND BOTH ARE THE PERSON'S: `worktree move` creates no parent directory, and with the worktree root not yet on disk — the ordinary state where nothing has been resumed here — it answers "fatal: failed to move '…' to '…': No such file or directory", exit 128 (git 2.43, the same day), so the `mkdir -p` stands in front of it. Where the path found is the LEG'S OWN CHECKOUT the line names no command at all: git refuses that move, "'…' is a main working tree", and `resume` refuses a root on a feature branch in any case, which the local layer says on the row this line is printed under. A leg's own checkout is told from a worktree of it by the path AND by `.git` being a directory, because a mounted leg's own `.git` is a FILE. THE FIXTURES MOVE WITH THE READING. `home/Atlas-wt/<branch>` is a path `park` never makes and `resume` never looks at, so every fixture that meant "the worktree `park` made" now calls `parked_worktree()`, which computes those same two defaults; the three-leg seed gains the `.gitignore` line `setup-openspeckit` writes and `resume.sh` warns about ("'…/.gitignore' does not ignore /worktrees/"), because a `worktrees/` inside the root is dirt in `git status` without it. Seven tests: the silent case, which is the note itself; the moved-on case, which proves the leg ends; the `git-config.yml` and the environment override, each run TWICE on one estate — off the path, then on it, with the very `worktree move` the finding names in between; a three-leg `spec` leg at the feature directory instead of under its own mount; the leg's own checkout, which names no move; and a feature refused whole, which says nothing about the path. Six fail against e18ec53; the seventh is the gate for a feature refused whole and passes there, because that `status` prints this line in no state at all. TWO EXISTING TESTS CARRY THE NEW WORDS, and both fail there too: the help test, which pins the finding list byte for byte and whose docstring says why this entry is in the LIST and not in the exception above it — nothing is being brought back for a worktree that is already here, and the exit is neither a `resume` nor a re-park; and Copilot's `path: "."` test, because the mount this reading needs is not the leg repository's name under the root for a leg declared AT the root, which is `leg_mount_for_role` and is worded in the commit above. Eight failures in all against e18ec53, plus the five that need a real git checkout and fail in any exported tree. THE GUARD, e18ec53's `status` against this one on TWIN estates — each side builds its own out of the suite's own builders, and the temp root, every object name and every timestamp are normalised before exit code, stdout and stderr are compared: 61 scenario families × nine spellings of `pushed:`, 501 comparisons, 328 byte-identical. THE NUMBERS THIS COMMIT FIRST CARRIED — 220 / 165 / 54 over 28 families — WERE THE AUTHOR'S OWN HARNESS AND NOBODY COULD REPRODUCE THEM: the independent reviewer's run over a superset came back 290 / 191 / 99, and these are a second superset, re-run against the base this commit actually sits on. THE 99 THAT THIS COMMIT INTENDS are eleven families, all nine spellings each because the reading is made before the tip arms and the spelling cannot change it, and they are the reviewer's own eleven family for family: a worktree off the path at the parked commit (where the base said NOTHING and exited 0 for `pushed: true`, and the other end's refusal is the `git worktree add`, "already used by worktree at …"), the same with dirt in the tree, the same under `--fetch`, moved on (RR1's divergence), behind (RR5), with no parked commit recorded (RR1 with the commit blank), with the branch gone from origin (RR2), the leg's OWN checkout on the branch (the add fails on the main working tree and no move is named), a `git-config.yml` whose `worktree_root` moves the path off the worktree, and a three-leg `spec` leg at the feature directory and outside the root entirely. THE OTHER 74 ARE TEN FAMILIES THIS COMMIT GETS WRONG, every one of them named in the independent review of it and every one taken by the two commits above this one: a SYMLINKED spelling of the projects directory with the worktree AT the computed path (9 — a healthy feature turned into a whole-feature refusal, the review's blocker 1), the same spelling with it off the path (9, the finding right and the path spelled lexically), a symlinked WORKTREE ROOT (9), TWO WORKTREES ON ONE BRANCH with one of them at the computed path (9 — `resume` resumes that, the review's blocker 2), a stray directory at the computed path with the worktree elsewhere (9, where the `worktree move` this names nests one worktree inside another) and the two dead-registration spellings of that state (9 and 9, where the move is refused outright), a prunable block on the recorded branch at that path with a live worktree elsewhere (9), a `--no-push` record in the first of those (1) and a three-leg feature whose SIBLING leg still offered `resume Trio` while the culprit leg said it was refused whole (1). THE 28 FAMILIES THAT MUST NOT MOVE DID NOT, all nine spellings each: every on-path state (in sync, moved on, behind, diverged), no worktree here, no record at all, a config or an environment override that AGREES with the worktree, an absolute and a `../`-laden `worktree_root`, every stale-registration state on the path, origin gone with no worktree, an unrecorded worktree, an empty role, `role: assembly`, `role: spec` in a single checkout, a feature a sibling leg costs whole, all four healthy three-leg families, and a prunable registration on the recorded branch with nothing on disk. `status --help` widens the finding list it already carries and names `$SPECKIT_GIT_WORKTREE_ROOT`, which this command now reads because both verbs read it first of the three; AGENTS.md rule 4 and the README take the reading, 162 -> 169 and 256 -> 261 in dated entries naming the rule the lines bought (re-measured on `main`, where the rule's own paragraph is re-wrapped as it is widened). NOT TAKEN HERE, and recorded for whoever reads this next: `resume.sh`'s RR3 is the same question from the other side — a path that EXISTS at `<worktree_root>/<branch>` and is not a registered worktree of that leg refuses the feature, "'…' exists and is not a registered worktree of the repo leg … Move it aside" — and this layer still says "`resume <Name>` brings it back" for a record whose feature has no worktree here and a stray directory in the way. It needs the path this commit computes and nothing else, but it is a reading of its own and is not made here. REBASED ONTO `main` AT 0aded19 (2026-09-13), which is PR #23 squash-merged with its rounds 3 to 5 in it. Every run, count and guard number in this message was made against e18ec53, the commit of `fix/record-origin-gone-and-shape` this was written on, and is kept as the evidence it was; the caps in it are re-measured on the new base, and the guard of `main` against this branch's tip — 60 families, 394 comparisons, 246 identical — is at the foot of the commit above the three. Co-Authored-By: Claude Fable 5.1 <[email protected]>
… AT the path `resume` computes, the branch read after — so a stray path or somebody else's worktree there is the whole-feature refusal it is, and a second worktree on the branch is not THE TWO READINGS fd9ae96 RECORDED AND DID NOT TAKE are the first half of this: "`resume.sh`'s RR3 is the same question from the other side — a path that EXISTS at `<worktree_root>/<branch>` and is not a registered worktree of that leg refuses the feature … and this layer still says "`resume <Name>` brings it back" for a record whose feature has no worktree here and a stray directory in the way." RR4's SECOND ARM is the same state read from the other side — `leg_registered_at` matching the computed path and `[ "$LEG_REGISTERED_BRANCH" = "$branch" ]` failing — and `resume.sh` words the two identically down to the `look:`, differing only in the REFUSED line's reason. Both `break` the leg loop, so both take the WHOLE feature, its other legs with it, and both are reached before RR2 reads origin and before RR1 compares any commit. VERIFIED AGAINST THE EXTENSION BEFORE A LINE WAS WRITTEN, on 2026-09-12, on scratch single-shape estates — a bare remote in a temp dir, a fake `$HOME`, workBenches' own `resume.sh`, `park.sh`, `git-common.sh` and `workspace-common.sh` — whose record carried `pushed: true`, `worktree_root: worktrees` and a parked commit that was origin's tip, the feature having no worktree here. A plain DIRECTORY at `worktrees/001-a-thing`: "Error: 'worktrees/001-a-thing' exists and is not a registered worktree of the repo leg; that feature was NOT recreated. / Nothing here overwrites a directory it did not create. / look: git -C . worktree list / Move it aside, then re-run `make resume`.", "REFUSED: 001-a-thing — an unrelated path is in the way", exit 2. A plain FILE: the same, byte for byte. A worktree of `002-other` registered there: the same four lines and "REFUSED: 001-a-thing — an unrelated worktree is in the way", exit 2 — and so did one with a DETACHED head, one git held LOCKED, and one locked whose `.git` had been deleted. A PRUNABLE block there answered "an unrelated path is in the way" instead, because `load_git_worktrees` DROPS it and what refuses the feature is the directory. With nothing at that path the same estate RESUMED the feature, exit 0. `status` at fd9ae96 answered "`resume Atlas` brings it back", exit 1, for every one of them. AND RR4's QUESTION IS THE PATH'S, WHICH THE ARM fd9ae96 ADDED ASKED THE OTHER WAY ROUND — the independent review of that commit, blocker 2, verbatim: "RR4 is `leg_registered_at "$leg_repo" "$tree"` — 'is ANY worktree registered AT the computed path', with the branch checked afterwards. The new arm asks 'is the worktree found on the recorded branch AT the computed path'." The two part company wherever one branch is checked out twice, which `git worktree add --force` makes and this file's own comments already name: `worktree_on_branch` answers with the first live block and `git worktree list` orders by path, so a decoy outside the root wins. Run on the same estates the same day with the leg's own worktree at `worktrees/001-a-thing` and a forced second on the branch at `$HOME/elsewhere/001-a-thing`, the extension answered "[specify] 001-a-thing (repo): worktree already registered at worktrees/001-a-thing; left as it is", "RESUMED: 001-a-thing", exit 0 — while fd9ae96's `status` refused the WHOLE feature and named a `git worktree move` ONTO the very worktree the feature had just resumed from. `registered_at` is that question asked the way RR4 asks it: an exact-string walk of `worktree list --porcelain` for the block at that path, the branch read off the block that matched, and `prunable` its own answer because `_git_worktree_finalize_record` stages a block only `if [ "$prunable" = false ]` and the other end is blind to those whatever is on disk. THE EXITS WERE RUN, EVERY ONE, against git 2.43 on 2026-09-12, because each of them is a command handed to a person. `git worktree move` INTO an occupied destination does not fail: it behaves like `mv` and puts the worktree INSIDE it — `worktrees/001-a-thing/001-a-thing`, where neither verb looks and now under the obstruction — which is what fd9ae96's path-parity arm named wherever something was already at the computed path. `git worktree move` onto a path git still holds registered with nothing on disk DIES, "'…' is a missing but already registered worktree; use 'move -f' to override, or 'prune' or 'remove' to clear", exit 128 — and `git worktree add` at that same path dies in the same sentence with `add -f` in place of `move -f`, whether the directory was moved aside first or never existed, which is why an `mv` alone is not the whole exit where a dead registration still names the path. `git worktree move` refuses a LOCKED worktree, "fatal: cannot move a locked working tree; use 'move -f -f' to override or unlock first", exit 128, and `unlock` then `move` exits 0 — so the unlock goes in front. `git worktree prune` SKIPS a locked registration, which is why the same unlock goes in front of it too, and git prints no `prunable` for a locked block at all. And `git worktree move` refuses a main working tree, "'…' is a main working tree", which is why the computed path being the leg's OWN checkout names no command. So: a `worktree move` where git holds a worktree there, a plain `mv` where it holds nothing, the `unlock` in front of either where it holds it LOCKED, and the `prune` beside the `mv` where a dead registration still names that path — and the path-parity arm below speaks only for a computed path that holds nothing and has nothing on it, which is the only destination its `mkdir -p && worktree move` works for. WHERE IT SITS IS `resume.sh`'s OWN ORDER. After the `pushed:` arms and NOT FOR A LEG RR6 REFUSES, whose `pushed:` is anything but `true`: the extension tests that at the top of the leg loop and `break`s there, so no path is ever looked at for such a leg and the REFUSED reason this line quotes is one the other end does not print. In front of the path-parity arm, because RR4 and RR3 are reached before the `git worktree add` that arm predicts — verified on an estate carrying BOTH states, the feature's own worktree at `$HOME/elsewhere/001-a-thing` and a stray directory at the computed path, where the extension answered "an unrelated path is in the way" and the arm below would have named the move that nests. THE VERDICT IS THE FEATURE'S, because the refusal is, and it carries its own EXIT — the first verdict in this layer that does. RR3 and RR4's second arm are per leg, inside the loop that `break`s, so one leg's obstructed path takes every other leg of that feature with it; `read_record`'s first pass therefore asks the question of each leg in the record's order, as it already does for `collect_legs`' three, and closes the walk at the first leg that refuses. Every `collect_legs` verdict is settled by a park that parks the feature THROUGH, which is why the `$refused` arm names that one exit in its own words; a path in the way is settled by nothing done on another workstation, so the leg that costs the feature and every sibling leg carry the same clause. A `collect_legs` verdict still wins where both exist, because it is made before any leg is read. What the first pass does NOT model is the rest of that loop — RR2, RR1 and RR5 `break` it too, and asking them there would be `check_parked_leg`'s whole job done twice per leg — so where an EARLIER leg is the one origin has lost, `resume` names that first and this names the path; both are true of a feature it refuses whole, and the run after the path is clear says the one that is left. WHAT IS NOT IN THE WAY, and both carve-outs are the other end's. A block `resume` SEES at that path on the RECORDED branch is RR4's FIRST arm — already recreated, not a refusal at all — whether or not the worktree is really there, because a locked block git calls no prunable is one `leg_registered_at` matches and reads as done, and whatever worktree of that branch sits elsewhere. A PRUNABLE block on the recorded branch is the stale-registration arms' state, WHERE THOSE ARMS NAME IT: their prune, the unlock in front of it and the leftover directory behind it are already one line ending in the `resume` that follows, and naming the path twice would be two findings about it — so `worktree_on_branch` is asked which block it answered with, and where a live worktree on the branch sits elsewhere it answers with that, nothing names this path, and this reading is the only one that does. THE GUARD, fd9ae96's `status` against this one on TWIN estates — each side builds its own out of the suite's own builders, and the temp root, every object name and every timestamp are normalised before exit code, stdout and stderr are compared: 52 scenario families × nine spellings of `pushed:`, 428 comparisons, 377 byte-identical. THE 34 FAMILIES OF THE INDEPENDENT REVIEW'S OWN GUARD ARE ALL 34 IDENTICAL — including every one fd9ae96 moved from its own base — so nothing that commit settled is unsettled here. The 51 that differ are 16 families and every one is a state above: a directory (2 of 9, the two spellings of `pushed:` that read as `true`, because RR6 is first), a file (2), a worktree of another branch (2), a detached one (2), a LOCKED live one (2), a locked one whose worktree is gone (2), a prunable one of another branch over its directory (2), the leg's own checkout at that path (2), a stray directory with origin gone (2) and with no parked commit recorded (2) and under a `git-config.yml` that moves the path onto it (2) — RR3 and RR4 before RR2 and RR1 in each — a stray directory with the feature's own worktree elsewhere (9, where the path-parity arm no longer names a move that nests), a `--no-push` record in that same state (1, the same), a prunable block on the recorded branch with a live worktree elsewhere (9, RR3 with the prune in the exit), a three-leg feature whose `spec` mount is obstructed (1, where both legs offered `resume Trio` and the `code` leg now carries the spec leg's verdict and exit), and two worktrees on one branch with one AT the computed path (9, where `resume` resumes and this now says nothing). THIRTEEN NEW TESTS AND ONE WIDENED, in the record layer's own style. The stray path, RR3 as a directory and as a file; the worktree of another branch and the detached one, RR4's second arm; the LOCKED live worktree, which is the unlock in front of the move; the PRUNABLE block over its directory, which is the prune beside the `mv`; the locked-and-gone registration, which is the unlock and the prune and no move at all; the two worktrees on one branch, which is silence; the prunable block on the recorded branch, which is the stale arms' line until a live worktree elsewhere takes it away; the leg's own checkout, which names no command; a branch origin has lost and a record with no parked commit, which prove the leg ends; the stray directory in front of the path-parity arm; RR6 first, twice, with and without a worktree off the path; the `spec` leg's obstructed mount, which proves no line of a feature `resume` refuses whole names `resume <Name>`; and the gate, a feature `collect_legs` refuses whole, which says nothing about the path and passes at fd9ae96 as it must. Thirteen of the fourteen status tests this commit adds or widens FAIL against fd9ae96's `status`; the fourteenth is that gate. The full suite was 342 passed and none failed on the branch as it then stood (352 on the rebased tree), and the two `upstream/openRepoShape` pin tests that need a real git checkout are the only extra failures in the bite tree, which is a `cp -a` of it. `status --help`, AGENTS.md rule 4 and the README take the reading and the exit that goes with it — AGENTS 169 -> 177 and README 261 -> 268, in dated entries naming what the lines buy. The three had said "a `git worktree move` where git holds it registered, a plain `mv` where it does not", which a prunable registration falsifies in both halves; they now say what git holds and what each thing held wants. NOT TAKEN HERE, and recorded for whoever reads this next. The independent review's BLOCKER 1 — `$root` is lexical and `git worktree list` is always physical, so an estate reached through a symlink compares a logical path with a physical one — is untouched and unmade-harder: `leg_tree_path` is the same string arithmetic on `$RECORD_WORKTREE_ROOT` the arm already did, hoisted out of the per-leg call. Its SHOULD-FIX 1 (the path-parity line quotes a `git worktree add` failure the other end prints in only one of five off-path states) and its NITs are untouched. And one state this reading leaves disagreeing with the extension, found while verifying it: a PRUNABLE registration at the computed path for ANOTHER branch with NO directory on disk. `leg_registered_at` misses it, `[ -e "$tree" ]` is false, so RR3 and RR4 both pass and `resume` dies at the end of the run — "Error: could not create the repo leg worktree … '…' is a missing but already registered worktree", "REFUSED: 001-a-thing — git worktree add failed" (run 2026-09-12) — while this layer still offers `resume <Name>`. It is neither RR3 nor RR4, its REFUSED line is its own, and it belongs with the stale-registration arms, which look for the recorded branch and never at the path. REBASED ONTO `main` AT 0aded19 (2026-09-13), which is PR #23 squash-merged with its rounds 3 to 5 in it. Every run, count and guard number in this message was made against e18ec53, the commit of `fix/record-origin-gone-and-shape` this was written on, and is kept as the evidence it was; the caps in it are re-measured on the new base, and the guard of `main` against this branch's tip — 60 families, 394 comparisons, 246 identical — is at the foot of the commit above the three. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…e refusal `resume` makes rather than the one check of five that happens to print a sentence, reads a registration git still holds at that path with nothing on disk as the `worktree prune` it is, and hands an off-path leg's verdict to every sibling leg — so a healthy feature reached through a symlinked projects directory is silent again, and no line of a feature `resume` refuses whole offers `resume <Name>`
THE INDEPENDENT REVIEW OF THIS BRANCH'S FIRST COMMIT, 2026-09-12, verdict MERGE AFTER FIXES: "The reading is the right reading and the machinery under it is correct … Two things stop it being mergeable as it stands." Its BLOCKER 2 — the arm asked "is the worktree on the recorded branch AT the computed path" where RR4 asks "is ANY worktree registered AT the computed path" — is the commit below this one. This is the rest of it: BLOCKER 1, both SHOULD-FIXes, NIT 1, and the two nits that are about a message and a number, which the commit below's own message and the guard at the foot of this one answer. Every claim below was run against the REAL extension — workBenches' own `resume.sh`, `park.sh`, `git-common.sh` and `workspace-common.sh` — on scratch estates with bare remotes in temp dirs and a fake `$HOME`, on 2026-09-12.
BLOCKER 1 — `$root` IS A LEXICAL STRING AND GIT'S IS ALWAYS PHYSICAL, so an estate reached through a symlink compared one with the other and turned a HEALTHY feature into a whole-feature refusal. `estate_walk_up "$PWD"` and `$PROJECTS_DIRS` keep every symlink the person typed; `git worktree list --porcelain` resolves them all, and `resume.sh` sets `REPO_ROOT="$(git rev-parse --show-toplevel)"`, which resolves them too. Run both ways on ONE estate whose worktree is AT the computed path, nothing differing but the spelling of the projects directory: `resume.sh` answered "[specify] 001-a-thing (repo): worktree already registered at worktrees/001-a-thing; left as it is", "RESUMED: 001-a-thing", exit 0 — while the first commit of this branch answered "its worktree is at …/home/projects/Atlas/worktrees/001-a-thing, which is not the …/home/proj-link/Atlas/worktrees/001-a-thing `resume` computes for it", exit 1, naming a `git worktree move` between two spellings of one directory, and the commit below answered "a directory is at …/proj-link/Atlas/worktrees/001-a-thing, which is the path `resume` computes", exit 1, naming an `mv` of the very worktree that run had resumed from. `RECORD_WORKTREE_ROOT` is now computed from `physical_path "$root"`, the idiom `locate_record` already used on the workspace checkouts and for the same reason, and this layer is silent on that estate under both spellings, exit 0.
AND NO FURTHER THAN GIT RESOLVES IT, which is the other half and is a finding that had to SURVIVE the fix. `get_config_value` resolves nothing in `worktree_root:` and `resolve_path_from_repo_root` is `os.path.abspath`, which resolves no symlink either, so where the WORKTREE ROOT is itself a link both ends compute the unresolved path and git reports the resolved one — and RR4 misses at the other end exactly as it misses here. Run with `worktree_root: wtlink` pointing elsewhere and the worktree added through the link, git registering `…/home/real-wt/001-a-thing`: `resume.sh` answered "Error: 'wtlink/001-a-thing' exists and is not a registered worktree of the repo leg … Move it aside", "REFUSED: 001-a-thing — an unrelated path is in the way", exit 2, and this layer says the same. Resolving harder than the other end resolves would have deleted a refusal it makes.
SHOULD-FIX 1 — THE QUOTED `git worktree add` FAILURE IS THE MECHANISM IN ONE OFF-PATH STATE OF FIVE. `resume.sh` reaches that add only after the leg clears RR3, RR2, RR1 and RR5: off the path and at the parked commit it is the add ("already used by worktree at …"); moved on it is RR1's divergence; behind it is RR5; with no parked commit recorded it is RR1 again with the commit blank; with the branch gone from origin it is RR2 — all five run against the extension, four of them by the reviewer on twin estates. The CONCLUSION and the EXIT are the same in all five, so the line now names the outcome — the whole feature refused, the other legs with it, at whichever of its own checks this leg reaches first — and keeps the quoted sentence in a parenthesis for the state that prints it. A line about the other end that the other end does not print is the drift this file's own rules forbid. AGENTS.md rule 4 took the same edit.
SHOULD-FIX 2 — AGENTS.md AND THE README SAID THE ROOT IS READ "out of THIS checkout's `git-config.yml`, and read no other" while both verbs read `$SPECKIT_GIT_WORKTREE_ROOT` FIRST of the three. "read no other" is the clause that actively misleads an agent that has the variable set, and with the rule's own authority behind it. One clause in each; `status --help` already gave the variable an entry of its own saying why it is read here, which is why it is untouched.
NIT 1 — THE COMMENT JUSTIFIED `[ "$tree" = "$repo" ]` BY A MOUNTED LEG'S `.git` BEING A FILE, which is not the path that test guards: git 2.43 reports an absorbed submodule's main worktree at `<root>/.git/modules/<leg>` and never at `<root>/<leg>`, so that path is one `worktree_is_usable` calls a stale registration long before this arm is reached. The rationale now says what the test answers — the single-shape `repo` leg, whose repository IS the root, where `worktree_on_branch` can hand back the root's own checkout and `git worktree move` refuses one ("'…' is a main working tree") — and it lives in `off_path_exit`, which words that exit ONCE, for the culprit leg's own line and for every sibling leg of the feature it costs.
THE STATE THE COMMIT BELOW RECORDED AND DID NOT TAKE: A PRUNABLE REGISTRATION AT THE COMPUTED PATH WITH NOTHING ON DISK. `load_git_worktrees` drops a prunable block before RR4's walk begins, so RR4 misses it; RR3's `[ -e "$tree" ]` finds nothing; RR2, RR1 and RR5 pass — and the run dies on the LAST thing it does. Run in three spellings against the extension: for ANOTHER branch with no worktree here, for another branch with the feature's own worktree elsewhere, and for the RECORDED branch with a live worktree elsewhere — "fatal: '…/worktrees/001-a-thing' is a missing but already registered worktree; use 'add -f' to override, or 'prune' or 'remove' to clear", "REFUSED: 001-a-thing — git worktree add failed", exit 2, every time, while this layer said "`resume Atlas` brings it back". It is neither RR3 nor RR4 and its REFUSED line is its own, and what settles it is the prune the stale-registration arms already name — so it is said in their words, on their line, with their prune and the `resume` that follows it. AND THE SAME REGISTRATION GOES IN FRONT OF THE MOVE: `git worktree move` refuses such a destination in the same sentence `git worktree add` refuses it, "a missing but already registered worktree; use 'move -f' to override, or 'prune' or 'remove' to clear" (git 2.43, both run), so where the feature's worktree is off the path AND a dead registration holds the path, `off_path_exit` names the prune first and the move second.
AND THE OFF-PATH READING IS NOW THE FEATURE'S, WHICH IT WAS NOT. `resume.sh` runs its RR loop over EVERY leg of a feature and only then walks the legs again to add the worktrees — `[ "$refused" = false ] || continue` sits between the two — so a worktree off the path in ONE leg refuses the feature whole, its other legs with it. A three-leg record proved this layer still said "`resume Trio` brings it back" on the sibling leg while the culprit leg said the feature was refused: the pair the rule at the top of `check_parked_leg` forbids, and one this layer's own reading had created. `read_record`'s first pass now asks a FIFTH question of every leg — is this leg's worktree somewhere other than the path `resume` computes — and it CLOSES NOTHING, because the add runs last and every RR verdict on any leg outranks it.
A LEG DECLARED AT THE ROOT IS THE ROOT AT BOTH ENDS, AND `collect_legs` STILL HANGS A MOUNT ON IT. This came out of the rebase onto e18ec53, which taught `leg_repo_for_role` to answer `$root` for a leg whose `project.yaml` says `path: "."`; subtracting that repository from the root then left NOTHING to subtract, while `collect_legs` builds `LEG_TREES` out of `$SHAPE_CODE_PATH` — `_shape_record_leg`'s `"${path:-code}"`, which keeps a literal `.` — and computes `$WORKTREE_ROOT/$branch/.`, a string `leg_registered_at` matches nothing against because git spells no registered path with a trailing `/.`. So the mount is asked for in its own right: `leg_mount_for_role` answers `$SHAPE_SPEC_PATH` / `$SHAPE_CODE_PATH` the way the loader computes them, `leg_tree_path` takes the ROLE rather than the leg's repository, and Copilot's `path: "."` test moved with it. Verified on a three-leg estate whose `code` leg carries `path: "."` and whose `spec` leg is a real submodule: with nothing at that path `resume.sh` RESUMED the feature, "code worktrees/001-a-thing/.", exit 0, and with a worktree on the recorded branch AT `worktrees/001-a-thing` it REFUSED — "Error: 'worktrees/001-a-thing/.' exists and is not a registered worktree of the code leg", "REFUSED: 001-a-thing — an unrelated path is in the way", exit 2. Reading the mount any other way called that second estate present and clean.
FIVE NEW TESTS, FOUR OF THEM BITING: the symlinked spelling of the root, which is blocker 1; the symlinked WORKTREE ROOT, which is the gate — it passes against the commit below and must, because that finding may not move; the prunable registration with nothing on disk; the same registration in front of a move; and the sibling leg of an off-path feature, which asserts that no line of it says "`resume Trio`". Against the commit below's `status` in a copy of this tree: 13 failed, 340 passed — five of the thirteen are the two hygiene tests and three pin tests that need a real git checkout and fail in any exported tree (the same five fail there with THIS `status`, 348 passed), so the bite is EIGHT: four of the five new tests, and the four existing path-parity tests that carry SHOULD-FIX 1's words. The suite on this tree was 353 passed, 0 failed, with `upstream/openRepoShape` initialised; on the rebased tree it is 357 at this commit.
THE GUARD, e18ec53's `status` — the commit of `fix/record-origin-gone-and-shape` this branch sits on — against this one, on TWIN estates: each side builds its own out of the suite's own builders, offline, bare remotes in temp dirs and a fake `$HOME`, and the temp root, every object name and every timestamp are normalised before exit code, stdout and stderr are compared. 61 scenario families × nine spellings of `pushed:`, 501 comparisons, 332 byte-identical. THE 169 THAT DIFFER ARE 33 FAMILIES AND EVERY ONE IS A STATE THESE THREE COMMITS ADDRESS. The path-parity reading, all nine spellings each because it is made before the tip arms: a worktree off the path at the parked commit, dirty, and under `--fetch` (the add, "already used by worktree at …"), moved on (RR1), behind (RR5), with no parked commit recorded (RR1, the commit blank), with the branch gone from origin (RR2), the leg's OWN checkout on the branch (the add fails on a main working tree and no move is named), a `git-config.yml` that moves `worktree_root` off the worktree, a three-leg `spec` leg at the feature directory and outside the root, the same reading under a symlinked spelling of the projects directory, and the two dead-registration-at-the-destination spellings of it, where the prune goes in front of the move. The in-the-way reading, TWO of nine spellings each because RR6 comes first and no path is read for a leg whose `pushed:` is not `true`: a directory, a file, a worktree of another branch, a detached one, a LOCKED live one, a locked one whose worktree is gone, a prunable one over its directory, the leg's own checkout at that path, a stray directory with origin gone and with no parked commit recorded and under a `git-config.yml` that moves the path onto it, the same under a symlinked spelling, a SYMLINKED WORKTREE ROOT, a locked registration with nothing on disk (git computes no `prunable` for a locked block, so it is RR4's second arm and not the new arm), a stray directory with the worktree elsewhere, a prunable block on the recorded branch with a live worktree elsewhere, and a three-leg feature whose `spec` mount is obstructed. And this commit's own two: a prunable registration at the path with nothing on disk (9), and the sibling leg of an off-path three-leg feature (1). THE 28 FAMILIES THAT MUST NOT MOVE DID NOT, all nine spellings each — and three of them are the review: a HEALTHY feature under a symlinked projects directory is silent on both sides, exit 0 (blocker 1); two worktrees on one branch with one AT the computed path is silent on both sides, because `resume` resumes that (blocker 2, taken below); and a dead registration on the RECORDED branch with nothing on disk was already the stale-registration arms' state at the base. The other 25: every on-path state, no worktree here, no record at all, a config or an environment override that AGREES with the worktree, an absolute and a `../`-laden `worktree_root`, every stale-registration state on the path, origin gone with no worktree, an unrecorded worktree, an empty role, `role: assembly`, `role: spec` in a single checkout, a feature a sibling leg costs whole, the four healthy three-leg families, and a `--no-push` record off the path with something already at that path.
AGENTS.md 177 -> 181 in a dated hygiene entry naming what the four lines buy — the variable the rule had denied, the refusal it had attributed to the wrong check, and the prune that goes in front of the move — and the README is re-wrapped inside its 268. `status --help` is unchanged: its finding list already carried this reading and its ENVIRONMENT section already names `$SPECKIT_GIT_WORKTREE_ROOT`.
NOT TAKEN HERE, AND RECORDED FOR WHOEVER READS THIS NEXT: THE EXITS THIS LAYER NAMES FOR A LEG DECLARED `path: "."` DO NOT RUN, and the verdict above them does. `leg_tree_path` answers `<worktree_root>/<branch>/.` for such a leg because that is the string `collect_legs` computes and the string this layer must compare against — but it is then spoken as a command operand, and `mv '<…>/001-a-thing/.' <dest>` is refused by coreutils outright ("cannot move '…/.' to '…': Device or resource busy", exit 1, GNU coreutils 9.4), while `mkdir -p <…>/001-a-thing && git worktree move <tree> '<…>/001-a-thing/.'` exits 0 and puts the worktree INSIDE the destination, `<…>/001-a-thing/001-a-thing` — the nesting the independent review's blocker 2 refused for the ordinary path (git 2.43, both run 2026-09-12). AND NO DESTINATION WOULD HELP: RR4 matches that string against no worktree git can spell, so such a leg has no already-recreated state at all — the other end is not idempotent for it either, and the run after a successful resume refuses the worktree IT JUST CREATED, "Error: 'worktrees/001-a-thing/.' exists and is not a registered worktree of the code leg", "REFUSED: 001-a-thing — an unrelated path is in the way", exit 2 (run the same day on the `path: "."` estate above). This layer mirrors that refusal exactly, which is what it is for; what it cannot yet do is name an exit for it, because there is not one on this side. The reading is a strict improvement on the base, which called that estate present and clean, and the exit is a round of its own — the words for four states and, under them, a `collect_legs` that computes `$WORKTREE_ROOT/$branch` for a leg whose path is `.`, which is workBenches'.
Base: e18ec53, which is a commit of `fix/record-origin-gone-and-shape` (PR #23); rebased onto `main` at 0aded19 on 2026-09-13, that pull request having squash-merged with its rounds 3 to 5 in it. The suite on the rebased tree is 357 passed at this commit and 360 at the one above it, which is where the rebase's own verification lives.
REBASED ONTO `main` AT 0aded19 (2026-09-13), which is PR #23 squash-merged with its rounds 3 to 5 in it. Every run, count and guard number in this message was made against e18ec53, the commit of `fix/record-origin-gone-and-shape` this was written on, and is kept as the evidence it was; the caps in it are re-measured on the new base, and the guard of `main` against this branch's tip — 60 families, 394 comparisons, 246 identical — is at the foot of the commit above the three.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…DER and stops at the first leg that refuses, so a path in the way on an EARLIER leg is the verdict a later leg's lost branch is not, a stale registration at that path is neither, and a leg RR6 refuses still says where its own worktree sits THIS IS THE REBASE ONTO `main` FINISHED. The three commits below were written against `fix/record-origin-gone-and-shape`'s round 2; `main` then took that branch's rounds 3 to 5, and its third round made the whole-feature verdict THE FIRST REFUSING LEG'S IN THE RECORD'S ORDER — RR6, RR2 and RR1 in one pair of arrays, walked until one of them answers. The two readings these commits add are refusals of the same loop, so they belong in that walk and not beside it: `read_record`'s first pass now asks RR6, then RR4 and RR3, then RR2, then RR1 of each leg in turn, keeps the FIRST answer with the exit that travels with it, and `check_parked_leg` reads one verdict and one kind — `pushed`, `inway`, `gone`, `moved`, or `add` for the `git worktree add` that is the last thing the other end does. Read back in any other order, a later leg's reading could overtake an earlier leg's; asked in this one, it cannot. COPILOT'S FIFTH ROUND ON #23 (2026-09-13, suppressed, status 3701), verbatim: "A stale-registration leg before a later gone-origin leg is not represented in this verdict pass … `resume` stops at RR3 first." FIVE ESTATES WERE BUILT TO SETTLE IT on 2026-09-13, against workBenches' own `resume.sh`, `park.sh`, `git-common.sh` and `workspace-common.sh` — a three-leg estate, bare remotes in a temp dir, a fake `$HOME`, the `spec` leg recorded FIRST and the `code` leg second with `code`'s branch deleted on its origin. (a) A STRAY DIRECTORY at the `spec` leg's computed path: "Error: 'worktrees/001-a-thing/spec' exists and is not a registered worktree of the spec leg; that feature was NOT recreated", "REFUSED: 001-a-thing — an unrelated path is in the way", exit 2 — RR3 on the earlier leg, origin never read for the later one. THE ROUND IS REAL FOR THIS SHAPE, and `main`'s `status` answered the gone-from-origin verdict on both legs, with RR2's exits, which are the wrong thing to do about a directory in the way. (b) A PRUNABLE REGISTRATION at that path with nothing on disk: "Error: 001-a-thing is no longer on origin in the code leg", "REFUSED: 001-a-thing — gone from origin", exit 2 — in BOTH spellings, the registration naming ANOTHER branch and the one naming the RECORDED branch, because `load_git_worktrees` drops a prunable block whichever branch it names, so RR4 never sees it and `[ -e "$tree" ]` finds nothing. THE ROUND'S PREMISE IS WRONG FOR A STALE REGISTRATION, which is what the finisher of #23 said and this is the run behind it. (c) The `spec` leg's WORKTREE ON THE BRANCH, off the computed path: "Error: 001-a-thing is no longer on origin in the code leg", "REFUSED: 001-a-thing — gone from origin", exit 2 — the add is the last thing the run does and every RR of every leg comes first. WRONG THERE TOO, and this reading never claimed otherwise. And the control that tells (a) from (b): a LOCKED registration for another branch at that path with nothing on disk — which git computes no `prunable` for, so `leg_registered_at` does match it — answered "REFUSED: 001-a-thing — an unrelated worktree is in the way", exit 2, RR4's second arm on the earlier leg in front of the later leg's RR2. This layer now answers all four the way the extension does; against `main` the first two are findings that move and the third is byte-identical, which is the gate. AND A LEG RR6 REFUSES STILL SAYS WHERE ITS OWN WORKTREE SITS, which is the first commit below's "after the `pushed:` arms, and NOT INSTEAD OF THEM" meeting a verdict that did not exist when it was written. Since `main`'s third round a `pushed:` that is not the literal `true` is RR6's refusal OF THE WHOLE FEATURE and every leg carries it, so the gate that silences the path arms for a feature `resume` refuses whole would have silenced them for the culprit leg too — and `resume.sh` tests `[ "$pushed" != true ]` at the TOP of the leg loop, which makes RR6 "whichever of its own checks this leg reaches first". The gate therefore lets an RR6 verdict through for a leg whose OWN `pushed:` is not `true`, and for no other: an EARLIER leg's RR6 is a refusal this leg never reaches, and a line about the check it would have reached would be this layer inventing one. Run both ways on 2026-09-13 on the same scratch estate, the `code` leg recorded first as `pushed: false` and the `spec` leg's worktree at `$HOME/elsewhere/001-a-thing`: "Error: 001-a-thing (code leg) was parked with --no-push; that feature was NOT recreated", "REFUSED: 001-a-thing — parked with --no-push", exit 2, the path never read — and the same estate with that leg's `pushed: true`, which is the control, "Error: could not add the spec leg worktree 'worktrees/001-a-thing/spec' for '001-a-thing'", "REFUSED: 001-a-thing — git worktree add failed", exit 2. NOT TAKEN, AND RECORDED FOR WHOEVER READS THIS NEXT: `moved_on_leg` ASKS `worktree_here`, WHICH IS A WIDER QUESTION THAN RR4's. `main` added that arm with RR4 read as "a worktree on the branch here", and this branch is what says RR4 matches ONE path — so for a leg with no `parked_commit:` whose worktree is off that path, RR1 IS reached at the other end and this answers no. Run on 2026-09-13 on a scratch three-leg estate: with the `spec` leg's `parked_commit:` left out and its worktree at `$HOME/elsewhere/001-a-thing`, "Error: 001-a-thing (spec leg) has moved since it was parked", "REFUSED: 001-a-thing — divergence", exit 2; with that worktree AT `worktrees/001-a-thing/spec`, RESUMED, exit 0 — RR4's first arm skipping the leg before RR1 is reached. IT IS NOT NARROWED HERE because the state is one the off-path arm already answers, and answers with an exit that WORKS: the `git worktree move` it names puts the worktree where RR4 looks, and the second half of that run is the proof that `resume` then succeeds. Narrowing it would trade a line about THIS workstation for RR1's re-park, which is a park on another one. The comment on that function now says so, and the off-path line hedges for exactly this state — "at whichever of its own checks this leg reaches first". THREE NEW TESTS, ALL THREE BITING against `main`'s `status` in a `cp -a` of this tree: the three cases above in one, with the locked control and the (c) gate that must NOT move; the RR6 leg whose own worktree is off the path, which draws both lines; and the later leg that says nothing about a path an earlier leg's RR6 beat it to, with its `pushed: true` control. The suite is 360 passed, 0 failed, with `upstream/openRepoShape` initialised; in the bite tree 25 status tests fail with `main`'s `status` — 23 of the 28 this branch adds, plus Copilot's `path: "."` test and the help's byte-for-byte pin, which took the new words — and the two `test_upstream_pin.py` failures there are the ones that need a real git checkout and fail in any copied tree. THE GUARD, `main`'s `status` (0aded19) against this one on TWIN estates — each side builds its own out of the suite's own builders, offline, bare remotes in temp dirs and a fake `$HOME`, and the temp root, every object name and every timestamp are normalised before exit code, stdout and stderr are compared: 60 scenario families, 394 comparisons, 246 byte-identical. THE 148 THAT DIFFER ARE 36 FAMILIES AND EVERY ONE IS A STATE THESE FOUR COMMITS ADDRESS. Fifteen are the path-parity reading in all nine spellings of `pushed:`, because it is made before the tip arms and RR6 does not silence a leg's own line: off the path at the parked commit, dirty, under `--fetch`, moved on, behind, with no parked commit, with the branch gone from origin, the leg's OWN checkout on the branch, a `git-config.yml` that moves the root, the same under a symlinked spelling of the projects directory, a dead registration at the destination, a three-leg `spec` leg at the feature directory and outside the root, and a prunable registration at the path with nothing on disk. Fourteen more are what is AT that path, one spelling of nine each because RR6 comes first — a directory, a file, a worktree of another branch, a detached one, a LOCKED live one, a locked one whose worktree is gone, a prunable one over its directory, the leg's own checkout there, a stray directory with origin gone and with no parked commit and under a config that moves the path onto it, the same under a symlinked spelling, a symlinked WORKTREE ROOT, and a locked registration with nothing on disk. The rest: a LOCKED registration at an off-path leg's destination (1 of 9, RR4's second arm rather than the add, because git calls a locked block no prunable), a stray directory with the worktree elsewhere and the same with a `--no-push` record (1 of 9 each, the `--no-push` spelling itself byte-identical), a prunable block on the recorded branch with a live worktree elsewhere (1 of 9), a three-leg feature whose `spec` mount is obstructed and the sibling leg of an off-path one (1 each), and cases (a) and (b) above. THE 24 FAMILIES THAT MUST NOT MOVE DID NOT: case (c), a HEALTHY feature under a symlinked projects directory, two worktrees on one branch with one AT the computed path, a dead registration on the RECORDED branch with nothing on disk, every on-path state (in sync, moved on, behind, diverged), no worktree here, no record at all, a config override that AGREES, an absolute and a `../`-laden `worktree_root`, a stale registration on the path, origin gone with no worktree, an unrecorded worktree, an empty role, `role: assembly`, `role: spec` in a single checkout, a feature a sibling leg costs whole, and the four healthy three-leg families. ONE DOCUMENT LINE MOVES, and it is a wrap the rebase left ragged: the clause the second commit below adds to the README's record paragraph split the line that followed it, leaving "a worktree whose tip moved on from, fell" alone on one — so the paragraph is re-wrapped whole and the cap re-measured, 268 -> 267, with that entry's own count corrected. AGENTS.md stays at 181. `status --help`'s record paragraph is re-wrapped for the same reason and by the same arithmetic — 41 lines to 40, the two clauses the commits below splice in having left "), a worktree" and "does not know (never parked)." alone on lines of their own — and the byte-for-byte pin on it passes unchanged, because that test compares the help with its whitespace collapsed. NO WORD OF ANY OF THE THREE CHANGES. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 4 days and 6 hours by commenting @sourcery-ai review. Upgrade to get a review now.
Reviewer's GuideThis PR makes status mirror resume’s path-based worktree decisions: it computes the same leg paths with the same precedence, identifies occupancy and stale registrations at those paths, reports whole-feature refusals in resume’s evaluation order, and adds extensive end-to-end coverage and documentation for the resulting behavior. Sequence diagram for status path-based feature evaluationsequenceDiagram
participant User
participant Status
participant GitConfig
participant Git
participant ResumeRules
User->>Status: status
Status->>GitConfig: get_config_value
GitConfig-->>Status: SPECKIT_GIT_WORKTREE_ROOT or worktree_root or default
Status->>Status: leg_tree_path
Status->>Git: worktree list --porcelain
Git-->>Status: registrations and paths
Status->>ResumeRules: evaluate legs in resume order
ResumeRules-->>Status: first refusal or healthy
alt refusal found
Status-->>User: whole-feature refusal
else no refusal
Status-->>User: findings or clean status
end
Flow diagram for occupancy decisions at the computed leg pathflowchart TD
A[Compute leg path] --> B{Registered worktree at path?}
B -->|Yes, prunable| C[worktree prune]
B -->|Yes, live or locked| D[Refuse whole feature]
B -->|No| E{Anything else exists at path?}
E -->|Directory or file| F[Refuse whole feature]
E -->|Worktree of another branch| F
E -->|Nothing| G{Worktree on recorded branch elsewhere?}
G -->|Yes| H[Refuse whole feature]
G -->|No| I[Continue resume checks]
C --> I
D --> J[Person moves or unlocks path]
F --> J
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical command-quoting and moderate status-handling findings remain, along with a documentation nit.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Aligns status with park/resume when evaluating worktree paths, obstructions, and multi-leg refusal ordering.
Changes:
- Adds computed-path and obstruction analysis.
- Propagates first-refusing-leg verdicts.
- Expands tests and updates documentation.
File summaries
| File | Summary |
|---|---|
tests/test_status_command.py |
Adds path, obstruction, ordering, and multi-leg coverage. |
tests/test_repo_hygiene.py |
Updates documentation and hygiene checks. |
tests/test_park_resume_commands.py |
Isolates worktree-root environment settings. |
status |
Implements path-aware worktree and refusal handling. |
README.md |
Documents status behavior and recovery guidance. |
AGENTS.md |
Updates operational guidance and path rules. |
Review details
Suppressed comments (3)
AGENTS.md:132
- This contract documents only the environment override and
git-config.yml, but the implementation also falls back to the shape default (worktreesfor a three-leg root or../<root>-worktreesfor a single root). For an estate without either override, readers cannot derive the path thatresumeand the recovery guidance use; include that third source in this statement and its mirrored help/README wording.
RECORDED BRANCH AT ANOTHER PATH IS NOT THAT FEATURE'S WORKTREE: both
verbs compute `<worktree_root>/<branch>` — the leg's own mount under it
in a three-leg root — out of `$SPECKIT_GIT_WORKTREE_ROOT`, else THIS
checkout's `git-config.yml`, and never out of the record, so `resume`
status:3666
- When an earlier leg has already set the feature verdict to
inway(oradd),refused_exitis nonempty for every sibling, so this guard still lets later legs re-enterpath_in_the_way(and the analogous off-path guard below). If a later leg also has an obstruction, its own refusal/exit is reported even thoughresumestops at the earlier leg and the first-pass verdict is meant to be carried to all siblings. Track the refusing leg and only run these path checks for that leg; otherwise render the stored verdict for siblings.
if [ "$pushed" = true ] && role_maps_here "$role" &&
{ [ -z "$refused" ] || [ -n "$refused_exit" ]; }; then
status:3150
- This compares Git's physical worktree path with the lexical repository argument. For a three-leg estate reached through a symlink, or a declared path such as
./spec, Git can report the mounted leg's main checkout with a normalized spelling whilereporetains the other spelling; its.gitis a file, so the second predicate is false too.statusthen suggestsgit worktree movefor the leg's main worktree, which Git rejects. Compare againstphysical_path "$repo"(or detect the main worktree from Git) before emitting a move.
if [ "$tree" = "$repo" ] || [ -d "$tree/.git" ]; then
- Files reviewed: 5/6 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…quotes every command it hands a person, compares git's physical path with a physical one, and names the third source of the worktree root — the shape's own default — where the rule had named two COPILOT'S FIRST ROUND ON #27 (2026-09-13): one inline comment and three suppressed, every one verified against workBenches' own `resume.sh`, `park.sh`, `git-common.sh` and `workspace-common.sh`, on scratch estates with bare remotes in a temp dir and a fake `$HOME`, before anything moved. THREE ARE TAKEN AND ONE IS DISPROVED AND TAKEN AS HARDENING. SUPPRESSED, TAKEN — ONLY THE LEG THE RUN STOPS AT MAY SPEAK FOR A PATH, verbatim: "When an earlier leg has already set the feature verdict to `inway` (or `add`), `refused_exit` is nonempty for every sibling, so this guard still lets later legs re-enter `path_in_the_way` (and the analogous off-path guard below). If a later leg also has an obstruction, its own refusal/exit is reported even though `resume` stops at the earlier leg and the first-pass verdict is meant to be carried to all siblings. Track the refusing leg and only run these path checks for that leg; otherwise render the stored verdict for siblings." IT IS REAL: run on 2026-09-13 on a three-leg estate with a stray DIRECTORY at the `spec` leg's computed path and a worktree of `002-other` at the `code` leg's, `resume.sh` answered ONCE — "Error: 'worktrees/001-a-thing/spec' exists and is not a registered worktree of the spec leg; that feature was NOT recreated", "REFUSED: 001-a-thing — an unrelated path is in the way", exit 2 — while this layer drew BOTH legs' lines, the second quoting "an unrelated worktree is in the way", a REFUSED reason that run never printed. That is the drift this file's own rules forbid, and the same fault the commit below closed from the other side. The verdict now carries the ORDINAL of the leg it belongs to — not its role, because a record may name one role twice and the second is not the leg the run refused — `read_record`'s second pass counts the legs of each feature as the first pass did, and `check_parked_leg` takes both numbers and asks one question, `$mine`. IT SUBSUMES THE CARVE-OUT THE REBASE NEEDED: a leg whose own `pushed:` is not `true` IS the leg RR6 stops at, so "after the `pushed:` arms and NOT INSTEAD OF THEM" is now that rule rather than a clause beside it, and a LATER leg's off-path line — which the carve-out let through for a second RR6 leg — is gone. INLINE, TAKEN — EVERY COMMAND THIS FILE HANDS A PERSON IS NOW A SHELL OPERAND, verbatim: "The remediation command here interpolates `$repo` and `$want` directly into a shell snippet. Valid paths containing spaces split the command, and shell metacharacters make the copy-pasted `git worktree move` unsafe, so the prescribed cleanup is not reliably runnable. Please emit shell-quoted operands through a shared formatter (and cover such paths in tests)." IT IS RIGHT BY THIS LAYER'S OWN RULE: every one of those lines ends in "which is yours to run", and the rule at the top of `check_parked_leg` is that an arm may not name an exit that does not run — `~/My Projects` is an ordinary spelling on a Mac and splicing it in makes four operands where git wants two. `sh_operand` is that formatter and it quotes ONLY where a shell would need it: a path of letters, digits and `/._@%+:,=-` is its own operand everywhere, so not one byte-for-byte pin in the suite moves, and a path outside that set comes back in single quotes with the one escape that ends and reopens them for a literal `'`. Sixteen operands across seven commands go through it — the `worktree move`, the `mv`, the `mkdir -p`, the `worktree prune` (six of them, four of which predate this branch), the `worktree unlock` and the `log --oneline` — which is every command in this file that carries a path. The estate NAME is not one: `is_safe_folder_name` already refuses anything outside `[A-Za-z0-9_.+@-]`, so `resume <Name>` has no operand to quote. SUPPRESSED, TAKEN — AGENTS.md, THE README AND THE HELP NAME ALL THREE SOURCES, verbatim: "This contract documents only the environment override and `git-config.yml`, but the implementation also falls back to the shape default (`worktrees` for a three-leg root or `../<root>-worktrees` for a single root). For an estate without either override, readers cannot derive the path that `resume` and the recovery guidance use; include that third source in this statement and its mirrored help/README wording." IT IS RIGHT, AND THE DEFAULT IS THE COMMON CASE — this suite's own fixtures carry no `git-config.yml` at all, so every path in every finding it pins comes from the shape. It is the same fault as the should-fix that put `$SPECKIT_GIT_WORKTREE_ROOT` in that sentence: a list that reads as exhaustive and is not, with the rule's own authority behind it. One line in AGENTS.md (181 -> 182), one in the README (267 -> 268), one clause in `status --help`, each in a dated entry; the help's byte-for-byte pin took the clause and its docstring the round. SUPPRESSED, DISPROVED — AND TAKEN AS HARDENING, verbatim: "This compares Git's physical worktree path with the lexical repository argument. For a three-leg estate reached through a symlink, or a declared path such as `./spec`, Git can report the mounted leg's main checkout with a normalized spelling while `repo` retains the other spelling; its `.git` is a file, so the second predicate is false too. `status` then suggests `git worktree move` for the leg's main worktree, which Git rejects." THE STATE COULD NOT BE BUILT, in three tries on 2026-09-13. A mounted submodule leg's own checkout is reported by `git worktree list` at `<root>/.git/modules/<leg>`, never at `<root>/<leg>` — the independent review's NIT 1 recorded that — and `worktree_is_usable` calls that path a stale registration long before either arm is reached, so `$tree` is empty and the stale-registration line is what prints, byte-identical with and without a symlinked projects directory. A checkout made with `--separate-git-dir`, whose `.git` is a FILE at a path that IS its own main worktree, is reported the same way, at the separate git dir, and takes the same arm. And a root's own `.git` is a DIRECTORY, so the directory test answers it: run both ways, the symlinked spelling drew "… is the repo leg's OWN checkout rather than a worktree of it, and no `worktree move` moves a main working tree" exactly as the plain one did. SO NO LINE MOVES — and the comparison is made physical anyway, in both arms, because comparing `git worktree list`'s always-physical path with `leg_repo_for_role`'s lexical one is the shape of the independent review's BLOCKER 1, and the directory test should not be the only thing standing between a person and an exit git refuses. TWO NEW TESTS, BOTH BITING against `main`'s `status`: a projects directory with a SPACE in it, where the `mv`, the `mkdir -p` and the `worktree move` all come back quoted and the same estate under a plain directory prints them unquoted, which is why nothing else moves; and two obstructed legs in one feature, where the earlier one speaks and the later one carries the verdict — run in BOTH record orders, because that is what makes it the record's order and not a priority between readings. The suite is 362 passed, 0 failed; in the bite tree 27 status tests fail with `main`'s `status` and the two `test_upstream_pin.py` failures there are the ones that need a real git checkout. THE GUARD, TWICE, on TWIN estates built out of the suite's own builders, offline, with the temp root, every object name and every timestamp normalised before exit code, stdout and stderr are compared. AGAINST THE HEAD THIS BRANCH PUSHED (f199f01), which is the round's own control: 62 scenario families, 396 comparisons, 394 byte-identical — and THE TWO THAT DIFFER ARE THE TWO NEW FAMILIES, the same feature with two obstructed legs in each record order, which is the only reading this round changes. The shell quoting moves nothing because every path in those estates is its own operand already; the physical comparison moves nothing because the state it hardens could not be built; the three document lines are not `status`'s output. AGAINST `main` (0aded19): 62 families, 396 comparisons, 246 byte-identical, and the 150 that differ are the 36 families the commit below enumerates plus those two. THE 24 THAT MUST NOT MOVE DID NOT, and they are the same 24, including the three the independent review's blockers are pinned by. No `status --help` line count moves — five before, five after, the clause re-wrapped inside its paragraph — and the record layer's `check_parked_leg` grew two positional arguments, `${13}` and `${14}`, which is why its header now says what all fourteen are. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot's first round on this branch, verified and dispositioned (2f7e700)One inline comment and three suppressed. Every one was run against the extension's own scripts — workBenches' Inline ( Suppressed, Suppressed, Suppressed, Guard. Against the head this branch pushed ( Lane: openrepotools-3 (openRepoTools-3) 🤖 Generated with Claude Code |
There was a problem hiding this comment.
🟡 Changes recommended
Six moderate issues remain in status around verdict precedence, path normalization, and recovery commands.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (5)
status:3852
- This branch returns the off-path finding before it evaluates the remaining resume checks. Consequently an off-path worktree whose branch is gone from origin, moved/diverged, behind, or has no parked commit is still reported with the generic move/add outcome, even though
resumereaches RR2/RR1/RR5 before its finalgit worktree addand refuses with that check's verdict. Please defer this path verdict until those earlier checks have been evaluated (and only use the add outcome when they pass), while preserving the first refusing leg for siblings.
if [ "$tree" != "$want" ] && [ "$held" -ne 0 ] && [ ! -e "$want" ]; then
move="$(off_path_exit "$repo" "$role" "$tree" "$want" "$held")"
finding "parked feature $branch ($role leg): its worktree is at $tree, which is not the $want \`resume\` computes for it — \`resume\` matches a leg's worktree on that path alone, so it does not read this one as already recreated and refuses the WHOLE feature, the other legs with it, at whichever of its own checks this leg reaches first (with the branch still at the parked commit that is the \`git worktree add\` it makes last of all, which cannot take a branch another worktree holds); \`park\` does not carry it either, because it parks the features under $RECORD_WORKTREE_ROOT and no others — $move"
return 0
status:2734
- Absolute
worktree_rootvalues are returned without the lexical normalization that the relative branch receives.resolve_path_from_repo_rootusesos.path.abspath(os.path.join(REPO_ROOT, raw)), so an absolute override such as/tmp/wt/../real/is normalized byresumeto/tmp/real, while this code compares/tmp/wt/../real/001...against Git's normalized path and misclassifies a healthy worktree as an obstruction/off-path worktree. Normalize the absolute branch too.
case "$raw" in
/*) printf '%s\n' "$raw" ;;
*) lexical_path "$root/$raw" ;;
esac
status:3194
- For a declared
path: ".",wantends in/<branch>/.here. This remediation emitsgit worktree move <source> <want>; aftermkdir -pcreates the branch directory, Git treats that/.destination as the existing directory and nests the worktree instead of putting it whereresumecan register it. The nextstatusrun reports the result as an obstruction, so this new remediation is not runnable/idempotent; handle this mount spelling or avoid advertising a move untilcollect_legsis fixed.
printf '%s\n' "move it where both look: \`mkdir -p $(sh_operand "${want%/*}") && git -C $(sh_operand "$repo") worktree move $(sh_operand "$tree") $(sh_operand "$want")\`, which is yours to run — \`worktree move\` creates no parent directory of its own"
status:2977
- This branch handles a locked registration at the computed path as RR4's obstruction, but the cleanup only adds a move when
[ -d "$want" ]is true. If the locked registration's worktree directory has been replaced by a regular file,unlock+pruneleaves that file in place and the subsequentresumestill refuses because the destination exists. Treat any remaining path as something to move aside, not only a directory.
[ ! -d "$want" ] ||
IN_THE_WAY_EXIT="$IN_THE_WAY_EXIT, and move aside the directory the prune leaves behind, which \`resume\` refuses for existing whatever git holds"
status:3500
- The stale-registration cleanup below only handles a leftover directory. For a stale registration on the recorded branch whose old worktree path is now a regular file, the
-dcheck is false, so status tells the user to prune and then resume even though the file remains andresumestill rejects the existing destination. Detect and describe any leftover path here, not just directories.
# THE DIRECTORY THE PRUNE LEAVES BEHIND is the second half of that exit
# where git called the registration stale with the directory still on
# disk: the prune clears the registration and touches nothing on disk, and
- Files reviewed: 5/6 changed files
- Comments generated: 1
- Review effort level: Lite
…e add` refuses a FILE there in the same three words it refuses a directory, names `/` as a parent no `${p%/*}` can spell, and names NO command for the one computed path every command was run against and refused
COPILOT'S SECOND ROUND ON #27 (2026-09-13): one inline comment and five suppressed, every one settled by running git or the extension before anything moved. THREE ARE TAKEN AND TWO ARE DISPROVED.
INLINE, TAKEN — A PARENT THAT IS NEVER THE EMPTY STRING, verbatim: "When the configured worktree root is `/`, `want` can be `/branch`, so `${want%/*}` expands to the empty string. The generated recovery command becomes `mkdir -p '' && git worktree move ...`, which fails before the move even though `resume` only needs the already-existing `/` parent. Use a parent-directory fallback of `/` (or `dirname`) when constructing this command." RUN: `mkdir -p ''` answers "mkdir: cannot create directory '': No such file or directory", so the exit dies on its first operand — and an exit that does not run is what the rule at the top of `check_parked_leg` forbids. `parent_dir` is that fallback and `/` is the one directory `${p%/*}` cannot name. Its test pins the whole command on an estate whose `git-config.yml` says `worktree_root: /`, where the computed path is `//001-a-thing` — the doubled slash BOTH ends spell, because `resolve_path_from_repo_root` hands an absolute value back unchanged and `collect_legs` joins `$WORKTREE_ROOT/$branch` — and nothing is created by that run, because `status` only asks whether the path exists.
SUPPRESSED, TAKEN — WHAT THE PRUNE LEAVES BEHIND IS A PATH, NOT A DIRECTORY. Two comments, one on each arm; the second verbatim: "For a stale registration on the recorded branch whose old worktree path is now a regular file, the `-d` check is false, so status tells the user to prune and then resume even though the file remains and `resume` still rejects the existing destination. Detect and describe any leftover path here, not just directories." RUN against git 2.43 on 2026-09-13: a worktree registered, its directory replaced by a regular FILE, git calling the block "prunable gitdir file points to non-existent location"; `git worktree prune` cleared the registration and `git worktree add` at that same path then answered "fatal: '…' already exists". THE REASON IS THE PATH EXISTING AND NOT WHAT KIND OF PATH IT IS, so both clauses ask `-e` and say "whatever": "whose path is still on disk and is no longer a worktree", "a move of what is there aside", and on the locked arm "move aside whatever the prune leaves behind there". Four existing byte-for-byte pins took the words.
SUPPRESSED, TAKEN — AND IT IS THE HALF OF THE RECORDED FINDING THAT IS THIS FILE'S TO GIVE, verbatim: "For a declared `path: \".\"`, `want` ends in `/<branch>/.` here. This remediation emits `git worktree move <source> <want>`; after `mkdir -p` creates the branch directory, Git treats that `/.` destination as the existing directory and nests the worktree instead of putting it where `resume` can register it. The next `status` run reports the result as an obstruction, so this new remediation is not runnable/idempotent; handle this mount spelling or avoid advertising a move until `collect_legs` is fixed." BOTH HALVES WERE ALREADY RUN AND RECORDED at the tip of this branch — `mv '<…>/001-a-thing/.' <dest>` refused by coreutils outright ("Device or resource busy", GNU coreutils 9.4) and `mkdir -p <…>/001-a-thing && git worktree move <tree> '<…>/001-a-thing/.'` exiting 0 with the worktree nested at `<…>/001-a-thing/001-a-thing` (git 2.43, 2026-09-12) — and the note said the exit was a round of its own. THE SECOND OF THE COMMENT'S TWO OPTIONS IS TAKEN, which is the one that needs nothing from workBenches: `dot_mount` names NO command for such a path, on the off-path arm and on the in-the-way arm both, and says why and what answers it — a `collect_legs` that computes `<worktree_root>/<branch>` for a leg declared at the root, which is the standard's. The READING does not move: the finding, the verdict and the exit code are what they were, and Copilot's own `path: "."` test took the two assertions.
SUPPRESSED, DISPROVED — AN ABSOLUTE `worktree_root` IS NOT NORMALISED BY THE OTHER END EITHER, verbatim: "Absolute `worktree_root` values are returned without the lexical normalization that the relative branch receives. `resolve_path_from_repo_root` uses `os.path.abspath(os.path.join(REPO_ROOT, raw))`, so an absolute override such as `/tmp/wt/../real/` is normalized by `resume` to `/tmp/real`, while this code compares `/tmp/wt/../real/001...` against Git's normalized path and misclassifies a healthy worktree as an obstruction/off-path worktree. Normalize the absolute branch too." THE PREMISE IS WRONG. `resolve_path_from_repo_root` tests `[[ "$raw_path" == /* ]]` FIRST and `printf`s the string back unchanged; the `os.path.abspath` is in the `elif`, for a RELATIVE path only. Sourced from workBenches' own `git-common.sh` and run on 2026-09-13, it answered `/tmp/wt/../real/` for `/tmp/wt/../real/` and `/tmp/wt/../real` for `/tmp/wt/../real`, normalising neither, while `wt/../real` came back normalised. So this `case` matches the other end exactly, and normalising here would compute a path `resume` does not — the one thing `lexical_path`'s own comment forbids. A comment on that `case` now says so, with the run.
SUPPRESSED, NOT TAKEN — THE OFF-PATH ARM ENDS THE LEG ON PURPOSE, verbatim: "This branch returns the off-path finding before it evaluates the remaining resume checks. Consequently an off-path worktree whose branch is gone from origin, moved/diverged, behind, or has no parked commit is still reported with the generic move/add outcome, even though `resume` reaches RR2/RR1/RR5 before its final `git worktree add` and refuses with that check's verdict. Please defer this path verdict until those earlier checks have been evaluated (and only use the add outcome when they pass), while preserving the first refusing leg for siblings." THE FEATURE'S VERDICT ALREADY DOES THAT: `read_record`'s first pass asks RR2 before the add and reads the add back LAST, so under `--fetch` a gone-origin leg gives the feature RR2's verdict and RR2's exits, and every sibling carries them — which is the case the comment names first. What is left is the CULPRIT leg's own line, and it ends the leg because of what is under it: every arm below exits through "park again", and `park.sh` collects a single checkout's features through `verify_git_worktree_candidate "$REPO_ROOT" "$WORKTREE_ROOT" …` and a three-leg one's through `shape_load_features "$WORKTREE_ROOT"`, each of which DROPS every worktree outside that root — `park --dry-run` on such an estate answered "[specify] No open features under 'worktrees'; nothing to park." So those arms would name an exit that cannot run, which is the one thing the rule at the top of that function forbids, and the line already refuses to name the mechanism: it says "at whichever of its own checks this leg reaches first" and keeps the `git worktree add` in a parenthesis for the state that prints it, which is the independent review's SHOULD-FIX 1 taken. The move is the exit that RUNS, and the run after it says whatever is left — which is the design, not an oversight.
THE GUARD, against the head this branch pushed (2f7e700), on TWIN estates built out of the suite's own builders, offline, normalised: 62 scenario families, 396 comparisons, 386 byte-identical. THE 10 THAT DIFFER ARE TWO FAMILIES AND BOTH ARE THE LEFTOVER-PATH WORDING — a stale registration ON the path (9, all nine spellings) and a locked worktree whose `.git` is gone (1). `parent_dir` and `dot_mount` move nothing there because no family in it carries `worktree_root: /` or a leg declared at the root; their two tests are what cover them. Suite: 364 passed, 0 failed; in the bite tree 31 status tests fail with `main`'s `status` and the two `test_upstream_pin.py` failures there are the ones that need a real git checkout. No document line moves, so no cap moves: AGENTS.md 182, README.md 268.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot's second round on this branch, verified and dispositioned (df91ee8)One inline comment and five suppressed. Every one was settled by running git or the extension before anything moved. Three taken, two disproved. Inline ( Suppressed ( Suppressed ( Suppressed ( So this Suppressed ( Guard, against the head pushed before this round ( Lane: openrepotools-3 (openRepoTools-3) 🤖 Generated with Claude Code |
There was a problem hiding this comment.
🟡 Changes recommended
Five unresolved findings remain in status, including one critical shell-quoting issue.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (4)
status:3928
- This off-path/add-failure arm runs before the RR2 origin check, but it does not honor a
goneverdict. If the branch is checked out outside the computed path and a successful--fetchshowsorigin/<branch>is missing,resumereaches RR2 before its finalgit worktree add; this row instead recommends moving the worktree and hides the delete/push exits for the actual refusal. Suppress this arm when the feature's first-pass verdict isgone, or otherwise make it use the same refusal ordering asresume.
if [ "$tree" != "$want" ] && [ "$held" -ne 0 ] && [ ! -e "$want" ]; then
move="$(off_path_exit "$repo" "$role" "$tree" "$want" "$held")"
finding "parked feature $branch ($role leg): its worktree is at $tree, which is not the $want \`resume\` computes for it — \`resume\` matches a leg's worktree on that path alone, so it does not read this one as already recreated and refuses the WHOLE feature, the other legs with it, at whichever of its own checks this leg reaches first (with the branch still at the parked commit that is the \`git worktree add\` it makes last of all, which cannot take a branch another worktree holds); \`park\` does not carry it either, because it parks the features under $RECORD_WORKTREE_ROOT and no others — $move"
status:3225
- The
worktree_herecheck above delegates toworktree_on_branch, so it returns true for any live worktree on this branch, not just the path RR4 computes. With--fetch, an off-path worktree plus a successfully fetched missingorigin/<branch>should reach RR2 inresume, but this return suppresses the first-passgoneverdict and can make sibling legs recommend the wrong re-park/move exit. Use the same exact-path registration predicate asleg_registered_atfor this RR2 test.
return 0
status:3315
mineonly gates the later path checks; the RR6 output blocks below still run before the carried-verdict block. Thus with an earlier leg obstructed at its computed path and a later sibling recordedpushed: false(or an unreadable value) with no worktree, this sibling returns its own--no-push/unreadable finding instead of carrying the first leg'sinwayverdict and exit.resumestops at the earlier leg, so gate these RR6 findings on the same refusing-leg check (and add the path-obstruction-plus-later-RR6 regression).
{ [ -n "$refused" ] && [ "$refused_leg" != "$leg_no" ]; } || mine=1
status:3261
off_path_exitstill advertises this move whenworktree_rootis a symlink.record_worktree_rootdeliberately preserves that lexical spelling, while Git reports the physical worktree path; moving an off-path worktree to thiswanttherefore leavesregistered_atunable to match it, so the nextresumestill refuses at RR3. The existing symlink-root test covers an already occupied destination, but not this recovery path; suppress this command or handle the canonical-path mismatch before claiming the move fixes the feature.
printf '%s\n' "move it where both look: \`mkdir -p $(sh_operand "$(parent_dir "$want")") && git -C $(sh_operand "$repo") worktree move $(sh_operand "$tree") $(sh_operand "$want")\`, which is yours to run — \`worktree move\` creates no parent directory of its own"
- Files reviewed: 5/6 changed files
- Comments generated: 1
- Review effort level: Lite
…an off-path leg whose branch origin has lost carries RR2's two exits and not a `git worktree move`; names no move at all where the worktree root is itself a symlink, because that move runs and fixes nothing; and quotes the REF in the diverged command beside the path COPILOT'S THIRD ROUND ON #27 (2026-09-13): one inline comment and four suppressed, every one run against workBenches' own scripts or git before anything moved. THREE ARE TAKEN — two of them one finding read from two sides — AND ONE IS NOT. SUPPRESSED, TAKEN — RR2's PREDICATE ASKS RR4's QUESTION NOW, and the arm it feeds takes RR2's exits. Two comments, one finding. On the predicate, verbatim: "The `worktree_here` check above delegates to `worktree_on_branch`, so it returns true for any live worktree on this branch, not just the path RR4 computes. With `--fetch`, an off-path worktree plus a successfully fetched missing `origin/<branch>` should reach RR2 in `resume`, but this return suppresses the first-pass `gone` verdict and can make sibling legs recommend the wrong re-park/move exit." On the arm, verbatim: "This off-path/add-failure arm runs before the RR2 origin check, but it does not honor a `gone` verdict … this row instead recommends moving the worktree and hides the delete/push exits for the actual refusal." ONE RUN SETTLES BOTH: on a scratch three-leg estate on 2026-09-13, one leg, its worktree at `$HOME/elsewhere/001-a-thing` and its branch deleted on origin, `resume.sh` answered "Error: 001-a-thing is no longer on origin in the spec leg; that feature was NOT recreated", "REFUSED: 001-a-thing — gone from origin", exit 2 — RR4 missing ON THE PATH, RR3 finding nothing there, RR2 refusing before any add — while this layer named a `git worktree move`, which brings back no branch origin has lost. `already_recreated` is RR4's first arm asked of a leg row — a registration AT the computed path whose branch is this one, the one state `resume.sh` `continue`s past — and it replaces `worktree_here` in `origin_lost_leg`. THE FINDING IS STILL THE OFF-PATH ONE, because where the worktree sits is true of THIS workstation, RR2's own words do not carry it and `park` here will not collect it either; what changes is the EXIT, which is now RR2's own two, and the clause that says which refusal it is. It also closes the note this branch recorded and did not take against `moved_on_leg`, from the side that has the wrong EXITS rather than the wrong name. SUPPRESSED, TAKEN — NO MOVE WHERE THE WORKTREE ROOT IS ITSELF A LINK, verbatim: "`off_path_exit` still advertises this move when `worktree_root` is a symlink. `record_worktree_root` deliberately preserves that lexical spelling, while Git reports the physical worktree path; moving an off-path worktree to this `want` therefore leaves `registered_at` unable to match it, so the next `resume` still refuses at RR3." RUN END TO END on 2026-09-13: the `git worktree move` this layer named exited 0, git then held the worktree at the PHYSICAL `…/real-wt/001-a-thing/spec`, and `resume.sh` answered "Error: '…/wtlink/001-a-thing/spec' exists and is not a registered worktree of the spec leg", "REFUSED: 001-a-thing — an unrelated path is in the way", exit 2. A move that runs and fixes nothing is the exact thing the rule at the top of `check_parked_leg` forbids. AND THE EXIT THAT DOES WORK WAS RUN TOO: the same estate with `worktree_root` set to the path git spells RESUMED the feature, exit 0 — so that is what the line names, and the resolving is still not done inside `record_worktree_root`, because a root resolved harder than the other end resolves it would compute a path `resume` does not, which is the finding this branch already carries from the other side. INLINE, TAKEN — THE REF IS AN OPERAND TOO, verbatim: "The generated `git log` command now quotes the repository path but still interpolates `branch` unquoted. Git refnames can contain shell metacharacters such as `$`, so a valid recorded branch can make this copy-pasted diagnostic expand or split in the user's shell. Pass the ref through the same shell-operand formatter and cover a metacharacter-bearing branch in the command-output test." Right, and it is the round before this one finished properly: `git check-ref-format` takes a `$` in a refname, and `git log --oneline <sha>..feat/$HOME-thing` in a shell is `git log --oneline <sha>..feat/` followed by whatever `$HOME-thing` expands to. The whole revision range is ONE operand, so the whole range goes through `sh_operand`, which leaves an ordinary branch untouched — which is why the pin beside it did not move. SUPPRESSED, NOT TAKEN — A LATER LEG'S RR6 LINE IS THE ONE `main`'s THIRD ROUND SETTLED, verbatim: "`mine` only gates the later path checks; the RR6 output blocks below still run before the carried-verdict block. Thus with an earlier leg obstructed at its computed path and a later sibling recorded `pushed: false` (or an unreadable value) with no worktree, this sibling returns its own `--no-push`/unreadable finding instead of carrying the first leg's `inway` verdict and exit." THE BEHAVIOUR IS REAL and it is DELIBERATE, and not this branch's to change: `main`'s third round on #23 made exactly this choice for the same shape with a GONE leg first — "the `--no-push` leg keeps the line it always had — its own refusal, in its own words" — and `test_the_features_verdict_is_the_first_leg_resume_refuses_at` pins it byte for byte, `findings[1]` being "parked with --no-push on Falcon and no worktree on that branch here … park it again from there" with a gone leg in front of it. What that line says is true of the record whatever else is wrong, it names no `resume <Name>`, and its exit — a park from the workstation that holds the WIP commit — is one that RUNS and is needed whatever clears the path. Changing it here would overturn a ruling of the commit below this branch, in a round about paths. THE GUARD, against the head this branch pushed (df91ee8), on TWIN estates built out of the suite's own builders, offline, normalised — with TWO FAMILIES ADDED for the states this round is about, 64 in all: an off-path worktree whose branch origin has lost, under `--fetch`, and an off-path worktree under a SYMLINKED worktree root. The first differs in ONE spelling of nine, `true`, which is the only one that reaches a `pushed:`-gated reading at all; the second in all nine, because the move it named is replaced whatever the record says about the push. 64 families, 414 comparisons, 404 byte-identical, and the 10 that differ are those two and nothing else. Suite: 367 passed, 0 failed; in the bite tree 34 status tests fail with `main`'s `status` and the two `test_upstream_pin.py` failures there are the ones that need a real git checkout. No document line moves, so no cap moves: AGENTS.md 182, README.md 268. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot's third round on this branch, verified and dispositioned (37244eb)One inline comment and four suppressed. Every one was run against workBenches' own scripts or git before anything moved. Three taken — two of them one finding read from two sides — and one not. Suppressed ( RR4 missed on the path, RR3 found nothing there, and RR2 refused before any add — while this layer named a Suppressed ( A move that runs and fixes nothing is exactly what the rule at the top of Inline ( Suppressed ( Guard. Two families added for the states this round is about, 64 in all. Against the head pushed before it ( Lane: openrepotools-3 (openRepoTools-3) 🤖 Generated with Claude Code |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved status handling remains for dangling symlinks, uncreated symlink roots, and locked off-path worktrees, with related documentation updates needed.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (5)
Previously missed (1) — in code that hasn't changed since the last review.
status:3047
[ -e "$want" ]follows symlinks, so a dangling symlink at the computed destination is treated as absent.git worktree addstill rejects that existing path, so a parked feature with no branch worktree falls through to theresumesuccess guidance even thoughresumefails at its final add (and an off-path worktree can still be moved onto the dangling link after pruning). Please use a shared destination-exists predicate such as-e || -Lfor this check and the related! -egates in the first-pass/off-path and stale-registration paths.
AGENTS.md:141
- This contract says every off-path worktree's exit is
git worktree move, but the implementation deliberately suppresses that command forpath: "."and for a symlink-spelled worktree root because the move cannot produce a pathresumeregisters. Please document those exceptions here so the operational guidance does not direct users to a non-working recovery.
a branch another worktree holds) and `park` never parks it; the exit is a
`git worktree move` to that path, the PERSON'S to run, with a `worktree
prune` in front of it where git still holds that path registered with
nothing on disk, and where the path found is the leg's own checkout there
is nothing to move at all. A worktree the record does not know wants
README.md:90
- This user-facing paragraph likewise presents
git worktree moveas the off-path exit without mentioning thepath: "."and symlink-root cases where status intentionally emits no move because it would leaveresumerefusing the worktree. Add the exceptions consistently with the command's actual diagnostics.
recorded branch that is not at the path BOTH verbs compute for that leg —
`<worktree_root>/<branch>`, the leg's own mount under it in a three-leg root,
read out of `$SPECKIT_GIT_WORKTREE_ROOT`, this checkout's `git-config.yml`, or
the shape's own default — which `resume` refuses the whole feature for and
`park` never parks, leaving a `git worktree move` of yours as the exit, and a
worktree the record does not know, which was never parked. No config, or no
status:185
- This help text overstates the recovery for an off-path worktree: it says the exit is always
git worktree move, butoff_path_exitintentionally emits no move for a declaredpath: "."and for a symlink-spelled worktree root because that move does not produce a pathresumecan register. Qualify this sentence (and keep the mirrored AGENTS/README wording consistent) sostatus --helpdoes not promise an invalid command.
carries, so the exit is a `git worktree move` of yours, and where that path is
the leg's own checkout there is nothing to move, anything at that same path
that is not that leg's worktree, which `resume` refuses the whole feature for
status:3304
- When the off-path worktree itself is locked,
worktree_on_branchstill returns it as live, but this branch only checksheldfor the destination and printsgit worktree move <tree> <want>. Git refuses moving a locked source, so the recovery command cannot run; please carry the source registration's lock state through the lookup and prependgit worktree unlock <tree>before the move.
printf '%s\n' "move it where both look: \`mkdir -p $(sh_operand "$(parent_dir "$want")") && git -C $(sh_operand "$repo") worktree move $(sh_operand "$tree") $(sh_operand "$want")\`, which is yours to run — \`worktree move\` creates no parent directory of its own"
- Files reviewed: 5/6 changed files
- Comments generated: 1
- Review effort level: Lite
…rktree add` refusal it is rather than the absence `[ -e ]` calls it, puts a `worktree unlock` in front of a move whose SOURCE git holds locked, asks the symlink question of a root whose target is not there yet, and says in all three documents which states get no move at all COPILOT'S FOURTH ROUND ON #27 (2026-09-13): one inline comment and five suppressed, one of them marked "previously missed". EVERY ONE IS TAKEN, and every one was run before anything moved. SUPPRESSED (previously missed), TAKEN — A DANGLING SYMLINK IS THE ADD's REFUSAL, verbatim: "`[ -e "$want" ]` follows symlinks, so a dangling symlink at the computed destination is treated as absent. `git worktree add` still rejects that existing path, so a parked feature with no branch worktree falls through to the `resume` success guidance even though `resume` fails at its final add (and an off-path worktree can still be moved onto the dangling link after pruning). Please use a shared destination-exists predicate such as `-e || -L` for this check and the related `! -e` gates in the first-pass/off-path and stale-registration paths." RUN on 2026-09-13: at such a path `[ -e ]` is false, `[ -L ]` is true, and `git worktree add` answers "fatal: '…' already exists". AND IT IS THE ADD's REFUSAL AND NOT RR3's, which is what decides where it is said: `resume.sh`'s RR3 is the same `[ -e "$tree" ]`, so it looks straight through the link too and the run goes on to RR2, RR1 and RR5 and dies on the last thing it does — the exact shape of the prunable registration this layer already reads in the stale-registration arms' words. So it is read there, in words of its own, and what settles it is not a prune (nothing is registered at that path) but the `mv` every other leftover there wants. `dest_exists` is the shared predicate for the GATES — the off-path arm's and the first pass's — and `path_in_the_way` still asks `[ -e ]` and nothing more, because a reading harder than the other end's would invent an RR3 refusal `resume` does not make. SUPPRESSED, TAKEN — THE MOVE's SOURCE CAN BE LOCKED TOO, verbatim: "When the off-path worktree itself is locked, `worktree_on_branch` still returns it as live, but this branch only checks `held` for the destination and prints `git worktree move <tree> <want>`. Git refuses moving a locked source, so the recovery command cannot run; please carry the source registration's lock state through the lookup and prepend `git worktree unlock <tree>` before the move." RUN the same day: a locked source answered "fatal: cannot move a locked working tree; use 'move -f -f' to override or unlock first", and after `git worktree unlock` the same move exited 0. `$held` was only ever the DESTINATION's registration; `off_path_exit` asks `registered_at` about the SOURCE as well now, and the unlock goes in front — the same pair the in-the-way arm has named for a locked destination since this branch's second commit. INLINE, TAKEN — THE SYMLINK QUESTION IS LEXICAL, verbatim: "This symlink guard misses a valid configuration where `worktree_root` is a symlink whose target directory has not been created yet: `physical_path` falls back to the lexical path when `cd` fails, so this condition treats the root as non-symlinked and advertises a move to the lexical destination. `mkdir -p` followed by `git worktree move` then records the worktree under the physical target, while `resume` still compares the lexical path and refuses it on the next run. Detect symlink components even when the destination is not yet present, or suppress this remediation until the root is spelled physically." RUN: `cd` into such a link fails, the fallback returns the lexical path, and the two compare equal — and `mkdir -p` through it answers "cannot create directory '…': File exists", so the exit would die on its first operand as well. `has_symlink_component` walks the prefixes and asks `[ -L ]`, which has an answer whether or not the target is there, and the line names the resolved directory only where there is one to name. SUPPRESSED ×3, TAKEN — AND THIS IS DRIFT THIS BRANCH MADE. AGENTS.md rule 4, the README and `status --help` all said the off-path exit is a `git worktree move`, while the two rounds before this one taught the command to print NO move for a leg declared `path: "."` and for a `worktree_root` spelled through a symlink. Copilot's words for the first of the three, verbatim: "This contract says every off-path worktree's exit is `git worktree move`, but the implementation deliberately suppresses that command for `path: \".\"` and for a symlink-spelled worktree root because the move cannot produce a path `resume` registers. Please document those exceptions here so the operational guidance does not direct users to a non-working recovery." A rule that promises a command the command itself refuses to print is exactly what these caps exist to catch. All three name the three states that get no move — the leg's own checkout, a `path: "."` leg, a symlinked worktree root — and rule 4 names the `worktree unlock` above with them; AGENTS.md 182 -> 187 and the README 268 -> 270, in dated entries, and the help's byte-for-byte pin took the clause. TWO NEW TESTS, BOTH BITING against `main`'s `status`: the dangling symlink, which asserts the add's words and no `prune` and no "in the way"; and the locked off-path worktree, with its unlock and, one `git worktree unlock` later, the control. The suite is 369 passed, 0 failed; in the bite tree 36 status tests fail with `main`'s `status` and the two `test_upstream_pin.py` failures there are the ones that need a real git checkout. THE GUARD, against the head this branch pushed (37244eb), on TWIN estates built out of the suite's own builders, offline, normalised: 64 scenario families, 414 comparisons, 405 byte-identical. THE 9 THAT DIFFER ARE ONE FAMILY — an off-path worktree under a symlinked worktree root, in all nine spellings of `pushed:` — and it is the same line reworded, because the resolved directory is now named as a clause rather than spliced into the sentence. Nothing else moves: the dangling symlink, the locked source and the three document lines are states no family in this guard carries, and their four tests are what cover them. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot's fourth round on this branch, verified and dispositioned (fa51e74)One inline comment and five suppressed, one of them marked previously missed. Every one is taken, and every one was run before anything moved. Suppressed ( And it is the add's refusal, not RR3's, which is what decides where it is said: Suppressed ( Inline ( Suppressed ×3 ( Guard, against the head pushed before this round ( Lane: openrepotools-3 (openRepoTools-3) 🤖 Generated with Claude Code |
There was a problem hiding this comment.
🟡 Changes recommended
Six unresolved moderate findings remain in status, including symlink, destination-check, recovery-ordering, prune, and shell-escaping issues.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (5)
status:1140
- All callers embed
sh_operandthrough command substitution, and the nested command substitution aroundprintf | sedstrips trailing newlines from the escaped value. A valid repository/worktree path ending in\nis therefore shortened in the emitted recovery command, despite this being the shared shell-safe formatter. Avoid command substitutions for the transformed operand, or otherwise preserve trailing newlines while retaining Bash 3.2 compatibility.
printf "'%s'\n" "$(printf '%s' "$1" | sed "s/'/'\\\\''/g")"
status:3649
- Restricting this probe to
[ -z "$ghost" ]misses a destination obstruction whenever the recorded branch has a stale registration at some other path. For example, an off-path prunable registration for the recorded branch plus a prunable registration at$wantleavesghostnonempty, so the destination is never examined and the report offersresumeeven though its finalgit worktree addis blocked by the destination registration. The destination check and first-pass verdict need to run independently of the off-path stale-registration finding.
if [ -z "$ghost" ] && [ -z "$tree" ] && role_maps_here "$role"; then
status:3075
- Because this branch is a locked registration whose worktree directory is missing,
[ -e "$want" ]is also false for a dangling symlink left at that path.resumestill sees that symlink afterunlock/pruneand its finalgit worktree addfails, but this diagnostic omits the required move-aside step. Test destination existence withdest_existshere, as the add-failure paths do.
[ ! -e "$want" ] ||
status:3339
- The symlink-root safeguard is bypassed when the destination also has a prunable registration:
held == 2selects this branch beforehas_symlink_component. It then recommends pruning and moving the off-path worktree to the lexical symlink path; Git can complete that move but records the physical target, soresumestill cannot match the lexical path and refuses again. This case needs the symlink-root handling to take precedence (while still accounting for the stale destination/source lock), rather than advertising that move.
elif [ "$held" -eq 2 ]; then
status:3340
- In the
held == 2recovery, the required destination prune appears only in the prose; the copy-pastable command is${unlock}mkdir -p ... && git worktree move ...and never runsgit worktree prune. With a live off-path source and a stale destination registration, the advertised command therefore still fails atworktree move. Include the prune in the executable sequence, ordered with any required source unlock.
printf '%s\n' "clear the stale registration git still holds for that path with \`git -C $(sh_operand "$repo") worktree prune\` first — \`worktree move\` refuses a destination git still holds (\"a missing but already registered worktree\") — then move it where both look: \`${unlock}mkdir -p $(sh_operand "$(parent_dir "$want")") && git -C $(sh_operand "$repo") worktree move $(sh_operand "$tree") $(sh_operand "$want")\`, both yours to run"
- Files reviewed: 5/6 changed files
- Comments generated: 2
- Review effort level: Lite
…erson pastes — the source's unlock, the destination's prune, the move of a dangling link — stops calling a path only a link occupies "clean", puts the symlinked root in front of all of them, and names a leftover at the destination beside a prune that clears a registration somewhere else COPILOT'S FIFTH ROUND ON #27 (2026-09-13): two inline comments and five suppressed. SIX ARE TAKEN AND ONE IS NOT, and one of the six is a SILENCE THE ROUND BEFORE THIS ONE MADE. INLINE, TAKEN — AND IT IS MY OWN REGRESSION, verbatim: "`dest_exists` treats a dangling symlink as occupied, but `resume`'s RR3 uses `[ -e ]` and therefore proceeds to its final `git worktree add`, which still rejects that symlink. With an off-path live worktree and a dangling symlink at this computed destination, this condition is false, so no add verdict is carried to sibling legs and the report can claim the feature is clean even though `resume` fails." RIGHT, AND EXACTLY RIGHT: the round before this one put `dest_exists` in the GATES as well as the exits, and a gate is where it does harm. `[ -e ]` is the test RR3 makes at the other end, so a path only a link occupies is one the run walks PAST and the add then refuses — the feature is refused, the finding is the off-path one, and clearing the link is a STEP IN ITS EXIT rather than a reason to say nothing. Both gates are `[ ! -e ]` again, in `check_parked_leg` and in `read_record`'s first pass, and the `mv` of the link goes in front of the `mkdir -p`. SUPPRESSED, TAKEN — EVERY STEP IS IN THE COMMAND AND NOT IN THE PROSE BESIDE IT, verbatim: "In the `held == 2` recovery, the required destination prune appears only in the prose; the copy-pastable command is `${unlock}mkdir -p ... && git worktree move ...` and never runs `git worktree prune`. With a live off-path source and a stale destination registration, the advertised command therefore still fails at `worktree move`. Include the prune in the executable sequence, ordered with any required source unlock." Right, and it is this file's own rule: an exit a person can run is one they can PASTE. `off_path_exit` builds one sequence now — the source's `worktree unlock` where git holds it locked, the destination's `worktree prune` where git holds a dead registration there, the `mv` of a dangling link where one occupies it, then the `mkdir -p` and the `worktree move` — and the clause behind it says which of them git refuses for what, so nothing is asserted that was not run. SUPPRESSED, TAKEN — THE SYMLINKED ROOT COMES BEFORE ALL OF THEM, verbatim: "The symlink-root safeguard is bypassed when the destination also has a prunable registration: `held == 2` selects this branch before `has_symlink_component`. It then recommends pruning and moving the off-path worktree to the lexical symlink path; Git can complete that move but records the physical target, so `resume` still cannot match the lexical path and refuses again." Right: no sequence ENDING IN A MOVE to that path works, whatever is cleared out of the way first, so the spelling is the only exit and it is named before every clearing step. The leg's own checkout and a `path: "."` mount stay above it, because neither is a path a spelling would fix. SUPPRESSED ×2, TAKEN — A DANGLING LINK IS A LEFTOVER TOO, on both arms that name one. Verbatim on the first: "Using `-e` here misses a dangling symlink left at a prunable registration's path … `git worktree add` still rejects the dangling destination because the path exists." And on the locked twin: "Because this branch is a locked registration whose worktree directory is missing, `[ -e "$want" ]` is also false for a dangling symlink left at that path." Both are the round before this one's own evidence — `git worktree add` answered "fatal: '…' already exists" for a dangling link on 2026-09-13 — and both clauses ask `dest_exists` now. SUPPRESSED, TAKEN IN THE HALF THAT IS REAL, verbatim: "Restricting this probe to `[ -z "$ghost" ]` misses a destination obstruction whenever the recorded branch has a stale registration at some other path … so the destination is never examined and the report offers `resume` even though its final `git worktree add` is blocked by the destination registration." THE PRUNE ITSELF IS NOT THE GAP: `git worktree prune` walks every registration in the repository, not one, so the exit those arms name already clears a dead block at the destination too, and the run after it is the `resume` they promise. WHAT THE PRUNE DOES NOT DO IS MOVE ANYTHING ON DISK — and a leftover at the DESTINATION is what the add refuses after it. So that is the clause, named where the two paths differ, which is the only shape in which the arms above have not named it already; the probe itself stays where it is, because moving it whole overwrites the registration those arms found and rewrites five lines that are right. SUPPRESSED, NOT TAKEN — A TRAILING NEWLINE IS LOST BEFORE `sh_operand` EVER SEES IT, verbatim: "All callers embed `sh_operand` through command substitution, and the nested command substitution around `printf | sed` strips trailing newlines from the escaped value. A valid repository/worktree path ending in `\n` is therefore shortened in the emitted recovery command, despite this being the shared shell-safe formatter." The observation about `$( )` is true and the conclusion is not this function's: EVERY path in this file arrives through a command substitution long before the formatter — `physical_path`, `record_worktree_root`, `leg_tree_path`, `worktree_on_branch`, `leg_repo_for_role` all `printf` their answer and are all captured with `$( )` — and the output itself is line-oriented, one finding per line, which a path with a newline in it breaks whatever the quoting does. Fixing it inside one helper would be a claim about paths the rest of the command cannot keep, and the honest place for it is the reading that builds those paths, which is a round of its own and not a shell-quoting one. TWO NEW TESTS, BOTH BITING: an off-path worktree with a dangling symlink at the computed destination, which is the silence, pinning the `mv` inside the command and the clause behind it; and a leftover at the destination named beside a prune that clears a registration somewhere else. One existing pin took the `held == 2` command's new sequence. The suite is 371 passed, 0 failed; in the bite tree 38 status tests fail with `main`'s `status` and the two `test_upstream_pin.py` failures there are the ones that need a real git checkout. THE GUARD, against the head this branch pushed (fa51e74), on TWIN estates, offline, normalised: 64 scenario families, 414 comparisons, 405 byte-identical. THE 9 THAT DIFFER ARE ONE FAMILY — an off-path worktree with a dead registration at the destination, in all nine spellings of `pushed:` — and it is that command gaining the prune it had only named in the prose. No document line moves, so no cap moves: AGENTS.md 187, README.md 270. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot's sixth round on this branch, verified and dispositioned (2a6f7e7)Six suppressed comments and no new inline threads. Four taken, one disproved at the line it names and taken at the one that is reachable, one the limit this branch already records. TAKEN — the symlink question is the whole path's ( TAKEN — every spelling of a leg declared at the root ( TAKEN — the feature directory is a path too ( TAKEN — the DISPROVED at the line it names, TAKEN at the one that is reachable ( So the arm that speaks is RR3's NOT TAKEN — RR5 and the divergence half of RR1 are the limit this branch records ( Guard, against the head pushed before this round ( Lane: openrepotools-3 (openRepoTools-3) 🤖 Generated with Claude Code |
There was a problem hiding this comment.
🟡 Changes recommended
Three moderate issues remain in status and affect refusal diagnostics and recovery guidance.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (4)
status:4829
- This add-verdict prepass only runs when
worktree_on_branchfinds a live off-path worktree. It misses other failures that happen before or atgit worktree addwhen no worktree exists, such as a dangling symlink at the computed destination (RR3's[ -e ]check passes) or a regular file at the feature-directory parent (resume'smkdir -pfails). In a multi-leg record, the culprit line can then say to clear the path and resume while sibling legs still advertiseresume, even though the run refuses the whole feature. Please model these destination/preparation blockers in the first pass and carry the add verdict to siblings.
if [ -z "${feature_rr[legs - 1]}" ] &&
[ -z "${feature_why[legs - 1]}" ] &&
[ -z "${feature_add[legs - 1]}" ] &&
[ -n "$a" ] && [ -n "$b" ] && [ "$d" = true ] &&
role_maps_here "$b"; then
status:3430
- When an off-path worktree exists but the computed destination's feature-directory parent is a regular file, this branch emits
mkdir -p <parent> && git worktree move ....resumecannot create that parent, somkdirexits with "Not a directory" and the move never runs; the recovery command printed bystatusis therefore not executable. Detect a non-directory parent before advertising this move and tell the user to move that obstruction aside (or suppress the move), as the no-worktree path handling does.
printf '%s\n' "move it where both look: \`${unlock}${prune}${clear_link}mkdir -p $(sh_operand "$(parent_dir "$want")") && git -C $(sh_operand "$repo") worktree move $(sh_operand "$tree") $(sh_operand "$want")\`, which is yours to run — \`worktree move\` creates no parent directory of its own${unlock:+, and it refuses a LOCKED source until the unlock in front of it}${prune:+, and it refuses a destination git still holds registered (\"a missing but already registered worktree\") until the prune}${clear_link:+, and \`git worktree add\` refuses the dangling symlink at that path (\"already exists\") whatever \`[ -e ]\` says of it}"
status:3760
dest_existswas introduced specifically because[ -e ]follows dangling symlinks, but this parent-directory check still uses[ -e ]. In a three-leg record where<worktree_root>/<branch>is a dangling symlink, the final mount path appears absent, so this branch is skipped and status recommendsresumeeven thoughresume's initialmkdir -pfails. Usedest_existsfor the parent check as well.
[ -e "$(parent_dir "$want")" ] &&
status:3802
- Once
ghostis set, this follow-up only checks the final destination. If a stale registration exists elsewhere and the three-leg feature directory (parent_dir "$want") is a regular file or dangling symlink, the final path is absent, so the report saysprune, thenresume; after pruning,resumestill fails itsmkdir -pbefore adding any worktree. The parent obstruction also needs to be detected and included in the recovery exit when a ghost registration is already present.
if [ -n "$ghost" ] && [ -z "$tree" ] && role_maps_here "$role"; then
want="$(leg_tree_path "$root" "$role" "$branch")"
if [ "$want" != "$ghost" ] && dest_exists "$want"; then
clear="$clear, and a move aside of what is at the $want \`resume\` computes for this leg, which the prune does not touch and \`git worktree add\` refuses for existing"
- Files reviewed: 5/6 changed files
- Comments generated: 1
- Review effort level: Lite
…was in review, and a PUSHED branch is merged, never rebased `main` moved to d4b5710 — openRepoTools #24, the lane collision protocol's Amendment 9 act 3 — while this branch was answering its sixth round of review, and GitHub called the pull request DIRTY. THE BRANCH IS PUSHED, so the estate's rule is the one that decides how: nothing that has been pushed is rebased or amended, and a merge commit is what carries the base forward. ONE CONFLICT, IN `tests/test_repo_hygiene.py`, AND IT IS THE TWO CAPS. Both sides raised AGENTS.md and the README from the same base and neither touched the other's lines, so both dated entries stay and the number becomes the count of what merged: AGENTS.md 187 (this branch, from 162) and 186 (`main`, from 155 by way of 162) meet at 211; the README's 270 (this branch, from 256) and 363 (`main`, from 251 by way of 256) meet at 377. Each entry still names the rule its own lines bought, which is what the cap's own docstring asks of them, and a third entry in each says the arithmetic. EVERYTHING ELSE AUTO-MERGED. `status` and `tests/test_status_command.py` are this branch's alone — `main` touched neither — and `AGENTS.md`, `README.md` and `tests/test_park_resume_commands.py` merged clean, the two documents because the paragraphs are in different sections and the third because `main` widened the same environment list this branch had added `$SPECKIT_GIT_WORKTREE_ROOT` to. The openRepoShape pin moves with `main`: gitlink and `contracts/openreposhape-pin.yaml` both at ba14e1d, taken whole from that side, because this branch never touched either and rule 3 of the pin section says they move in ONE commit. THE SUITE IS 479 PASSED, 0 FAILED on the merged tree with `upstream/openRepoShape` checked out at ba14e1d — this branch's 374 and the 105 `main` brought with the lane tooling. `bash -n status` and `shellcheck --severity=warning status` are clean. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
| file | this branch | main |
merged |
|---|---|---|---|
AGENTS.md |
187 (from 162) | 186 (from 155 via 162) | 211 |
README.md |
270 (from 256) | 363 (from 251 via 256) | 377 |
A third entry in each says the arithmetic, which is what that docstring asks of every raise.
Everything else auto-merged. status and tests/test_status_command.py are this branch's alone — main touched neither, and git show origin/main:status is byte-identical to the 0aded19 this branch's guard was run against, so every guard number posted above still stands. AGENTS.md and README.md merged clean (different sections), and tests/test_park_resume_commands.py merged clean because main widened the same environment list this branch had added $SPECKIT_GIT_WORKTREE_ROOT to.
The openRepoShape pin moves with main: the gitlink and contracts/openreposhape-pin.yaml are both at ba14e1d, taken whole from that side, because this branch never touched either and the pin section's rule 3 is that they move in one commit.
Suite on the merged tree: 479 passed, 0 failed — this branch's 374 and the 105 main brought with the lane tooling — with upstream/openRepoShape checked out at ba14e1d. bash -n status and shellcheck --severity=warning status clean.
Lane: openrepotools-3 (openRepoTools-3)
🤖 Generated with Claude Code
There was a problem hiding this comment.
🟡 Changes recommended
Symlink and dangling-path handling, add-preflight diagnostics, and related documentation remain inconsistent.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (6)
AGENTS.md:163
- This rule documents the no-move exception only when
worktree_rootitself is spelled through a symlink, but the implementation'shas_symlink_componentcheck also suppresses a move when the feature-directory or mount parent is symlinked. In those cases the current text neither describes the actual condition nor tells the user which path component must be corrected; the operational rule and its mirrored README wording need to match the implementation.
— AND THERE IS NO MOVE AT ALL for the leg's own checkout, for a leg
declared `path: "."` (whose computed path ends in `/.`, which no command
takes), or for a `worktree_root` spelled through a SYMLINK (git registers
the path the link resolves to and `resume` compares the one you wrote, so
the move runs and changes nothing; spell it as git spells it instead). A
README.md:92
- This README repeats the no-move exception as only a symlink-spelled
worktree_root, while the implementation suppresses moves for any symlink component in the computed destination's parents. A symlinked feature directory or mount parent therefore gets a status message and recovery behavior that this manual does not document; keep the README aligned with the broader path check and its actual remediation.
where no move works: the leg's own checkout, a leg declared `path: "."`, and a
`worktree_root` spelled through a symlink, each of which says so — and a
status:4777
- The first-pass verdict does not cover add-time obstructions that
check_parked_legdetects later. With a three-leg record and no worktree on the branch, a regular file at the feature-directory parent or a dangling symlink at the final destination makesleg_path_in_the_wayreturn clean and thefeature_addprobe is skipped because it requires an off-path live worktree; the second pass then reports the culprit leg, while a sibling can still sayresume Triobrings the feature back even thoughresumefails before/atgit worktree add. Carry the same add-preflight finding and exit into the first-pass whole-feature verdict so every sibling inherits it.
elif [ -n "$a" ] && leg_path_in_the_way "$root" "$b" "$a"; then
feature_rr[legs - 1]="$IN_THE_WAY_WHAT is at the $LEG_TREE it computes for its \`$b\` leg"
feature_rr_kind[legs - 1]=inway
feature_exit[legs - 1]="$IN_THE_WAY_EXIT"
status:3135
- When the destination exists through a symlinked branch or mount parent (rather than through the worktree root itself),
path_in_the_wayhas already constructed amv <want> ...remediation before this suffix merely tells the user to rewriteworktree_root. Moving the final path aside does not fix that parent spelling: the nextresumefollows the symlink and Git registers the physical path, so the exact-path check still refuses. This path needs the same no-move/configuration handling asoff_path_exit, or a recovery that fixes the symlinked component before retrying.
! has_symlink_component "$(parent_dir "$want")" ||
IN_THE_WAY_EXIT="$IN_THE_WAY_EXIT; and the path itself is reached through a symlink, so clearing it is only half — \`resume\` compares the spelling this checkout computes against the ALWAYS-PHYSICAL one git records, and no worktree made under that spelling ever matches: spell \`worktree_root\` (or \`\$SPECKIT_GIT_WORKTREE_ROOT\`) as the directory git spells"
status:3428
has_symlink_componentexamines every parent of the computed destination, but this message says only that the worktree root is symlinked and tells the user to rewriteworktree_root. For a symlink at$WORKTREE_ROOT/$branchor a declared mount parent, the root is not the offending component, so the diagnostic points at the wrong setting. Report the actual symlinked component or use wording/recovery that covers all parent components.
printf '%s\n' "no \`worktree move\` fixes this one, because the worktree root itself is reached through a symlink: both verbs compute $RECORD_WORKTREE_ROOT and git reports the path that link resolves to, so \`resume\` matches nothing registered there however the worktree is moved — spell \`worktree_root\` (or \`\$SPECKIT_GIT_WORKTREE_ROOT\`) as the directory git spells${resolved:+, which is $resolved}, and the \`git worktree move\` this line would otherwise name becomes one that works"
status:185
- This help text narrows the no-move case to a
worktree_rootsymlink, butoff_path_exitchecks every parent component of the computed destination. A symlinked feature directory or declared mount parent also gets no move, yet this text does not describe that case or its required configuration correction; update the help wording alongside the implementation and the other manuals.
carries, so the exit is a `git worktree move` of yours — except where no move
works and the line says so: the leg's own checkout, a leg declared `path: "."`,
and a `worktree_root` spelled through a symlink — anything at that same path
- Files reviewed: 5/6 changed files
- Comments generated: 1
- Review effort level: Lite
…locks the `git worktree add` with no worktree anywhere — a registration git still holds there, a dangling symlink, a feature directory that is not a directory — so no sibling leg offers `resume <Name>` for a run that refuses, and every line that names a symlink names the COMPONENT COPILOT'S SEVENTH AND EIGHTH ROUNDS ON #27 (2026-09-13, both after the merge commit): nine suppressed comments and no new inline ones, and they are four findings said from several sides. ALL FOUR ARE TAKEN, and two of them are drift THIS BRANCH made in the rounds before them. TAKEN — THE ADD's REFUSAL IS THE FEATURE's VERDICT, AND SIBLINGS CARRY IT, verbatim: "This add-verdict prepass only runs when `worktree_on_branch` finds a live off-path worktree. It misses other failures that happen before or at `git worktree add` when no worktree exists, such as a dangling symlink at the computed destination (RR3's `[ -e ]` check passes) or a regular file at the feature-directory parent (`resume`'s `mkdir -p` fails). In a multi-leg record, the culprit line can then say to clear the path and resume while sibling legs still advertise `resume`, even though the run refuses the whole feature." IT IS THIS BRANCH'S OWN RULE BROKEN — no line of a feature `resume` refuses whole may name `resume <Name>` — and the three states are ones `check_parked_leg` already reads on the culprit leg: a registration git still holds AT the path with nothing on disk, a DANGLING SYMLINK there (both of which `[ -e ]`, and therefore RR3 at both ends, look straight through), and a feature directory that is not a directory, which `resume`'s own `mkdir -p` refuses before it adds any leg ("mkdir: cannot create directory '…': Not a directory", run 2026-09-13). `leg_add_blocked` asks all three of a leg row, the first pass records the verdict with its exit, and the CULPRIT keeps its own richer line — which already names the blocker, the command that clears it and the `resume` that follows the clearing, the sentence this branch's third commit chose deliberately. TAKEN — AND THE LINE NAMES THE SYMLINKED COMPONENT, verbatim: "`has_symlink_component` examines every parent of the computed destination, but this message says only that the worktree root is symlinked and tells the user to rewrite `worktree_root`. For a symlink at `$WORKTREE_ROOT/$branch` or a declared mount parent, the root is not the offending component, so the diagnostic points at the wrong setting." THAT IS DRIFT THE ROUND BEFORE MADE: it widened the QUESTION to every parent and left the ANSWER naming the root. `has_symlink_component` reports the first prefix that is one now, and `symlink_exit` words the remedy against it — a link AT or ABOVE the worktree root is a `worktree_root` to respell, and a link BELOW it is a component that has to BE a directory rather than point at one. AGENTS.md rule 4, the README and `status --help` take the same widening, which is the other half of the round (211 -> 214 in a dated entry; the README's sentence rewords inside its 377). TAKEN — THE `mkdir -p` CANNOT MAKE A PARENT THAT IS NOT A DIRECTORY, verbatim: "When an off-path worktree exists but the computed destination's feature-directory parent is a regular file, this branch emits `mkdir -p <parent> && git worktree move ...`. `resume` cannot create that parent, so `mkdir` exits with \"Not a directory\" and the move never runs; the recovery command printed by `status` is therefore not executable." Run the same day, and the parent is moved aside first now, in the same pasted sequence as the source's unlock, the destination's prune and a dangling link's `mv`, each with its reason behind it. TAKEN — AND `dest_exists` IS THE QUESTION FOR A PARENT TOO, said twice: "`dest_exists` was introduced specifically because `[ -e ]` follows dangling symlinks, but this parent-directory check still uses `[ -e ]`", and "If a stale registration exists elsewhere and the three-leg feature directory (`parent_dir \"$want\"`) is a regular file or dangling symlink, the final path is absent, so the report says `prune`, then `resume`; after pruning, `resume` still fails its `mkdir -p`". Both clauses ask `dest_exists` of the parent now, and the stale-registration line names that obstruction beside its prune, which touches nothing on disk. FOUR NEW TESTS AND FOUR PINS MOVED. The sibling test is the round's own shape: a three-leg record whose `spec` mount is blocked in each of the three ways, where the culprit keeps its line and ends in the `resume` that follows the clearing and the sibling carries the verdict and offers no `resume` — and where a blocked FEATURE DIRECTORY makes both legs culprits, because one directory is the parent of both mounts. The suite is 480 passed, 0 failed on the merged tree; against `main`'s `status` in a `cp -a`, 42 of the 188 status tests fail. THE GUARD, against the head this branch pushed (218dc0e): 64 scenario families, 414 comparisons, 404 byte-identical. THE 10 THAT DIFFER ARE TWO FAMILIES, both the symlink wording: an off-path worktree under a symlinked worktree root in all nine spellings, and a symlinked worktree root in the way in its `true` one. The three add-blocking states are read by no family in this guard — each is covered by its own test — and nothing else moves. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot's seventh and eighth rounds on this branch, verified and dispositioned (864193c)Nine suppressed comments and no new inline ones across the two rounds; they are four findings said from several sides, and all four are taken — two of them drift this branch made in the rounds before them. TAKEN — the add's refusal is the FEATURE's verdict, and siblings carry it. "This add-verdict prepass only runs when
TAKEN — and every symlink line names the COMPONENT. " TAKEN — the TAKEN — and Four new tests and four pins moved. The sibling test is the round's own shape — a three-leg record whose Guard, against the head pushed before these rounds ( Lane: openrepotools-3 (openRepoTools-3) 🤖 Generated with Claude Code |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved moderate issues remain in status around symlinked paths and incomplete obstruction recovery.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 4/6 changed files
- Comments generated: 1
- Review effort level: Lite
…destination wants instead of choosing one, because a `worktree prune` clears a REGISTRATION and moves nothing on disk COPILOT'S NINTH ROUND ON #27 (2026-09-14), one inline comment and nothing suppressed, verbatim: "When `held == 2` and `[ ! -e \"$want\" ]`, this branch wins for both a truly absent destination and a dangling symlink (and can also hide a missing final component beneath a non-directory parent). `ADD_BLOCKED_EXIT` then contains only `worktree prune`, but prune does not remove the dangling link or parent file; in a multi-leg record, siblings carry that incomplete exit and `resume` still fails. Before choosing the prune-only verdict, include any `dest_exists` final/parent obstruction and its required move-aside action in the stored feature exit." IT IS RIGHT, AND IT IS THE SAME MISTAKE `off_path_exit` STOPPED MAKING TWO ROUNDS AGO: the prune clears a registration git holds and touches nothing on disk, so where something is ALSO in the way on disk both steps belong in the one exit a person pastes. `leg_add_blocked`'s three questions were an `if`/`elif` chain and are three independent tests now; what it saw is joined with "and", what it wants is joined with "then", and the verdict every sibling leg carries is the whole sequence: "clear it with `git -C <repo> worktree prune`, then `mv <path> <a path of your choosing>`, which is yours to run". ONE TEST GAINS THE CASE — the three-leg record whose `spec` mount carries a stale registration AND a dangling symlink at the same path, where the sibling's line has both steps in order — and one pinned exit in it takes the word "clear" where it said "move aside", because the sentence is one sentence now whichever of the three states made it. The suite is 480 passed, 0 failed; against `main`'s `status` in a `cp -a`, 42 of the 188 status tests fail. THE GUARD, against the head this branch pushed (864193c): 64 scenario families, 414 comparisons, 414 byte-identical — NOTHING MOVES, because no family in it carries two destination blockers at once, which is what the round is about, and the test is what covers it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
There was a problem hiding this comment.
🟡 Changes recommended
Three moderate issues remain in status involving final symlinks, ancestor blockers, and symlinked parents.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 4/6 changed files
- Comments generated: 1
- Review effort level: Lite
Copilot's tenth round, answered and NOT taken — the premise is disprovable (head stays d3d32db)One inline comment: "A live symlink parent is not detected when the final destination is absent … It is not an add blocker, and I ran it. A live symlink parent with no worktree anywhere, on a scratch three-leg estate (2026-09-14):
The residue is real and is recorded rather than taken. A symlinked component under the worktree root makes Head stays d3d32db, all checks green, mergeStateStatus CLEAN, every review thread resolved. Lane: openrepotools-3 (openRepoTools-3) 🤖 Generated with Claude Code |
…lineages that meet at 403 `#27` squash-landed as `7efc850` — `status` judging a parked feature's worktree by the PATH `resume` computes for it — and this branch takes it as a MERGE and not a rebase, for the reason `ea28e12` gives: this history carries merge commits with hand-written resolutions and `git rebase` drops them. The branch is pushed; it is never rewritten. ONE CONFLICT, AND IT IS THE README CAP'S DOCSTRING. Both sides raised it from the same 363 and neither dated entry is dropped: * this branch, 26 lines — 372 for ratified decisions 6 and 7, 382 for the round after them, 389 for the settled narrowing and the command file; * `main`, 14 lines — the computed path, its three sources and the states that get no move (#27). 363 + 26 + 14 = 403, and the merged README measures 403 exactly, so the cap is 403 and the arithmetic is written above it. AGENTS.md came through unconflicted at #27's 214, which is what the merged file measures. Nothing else conflicted: #27 touches `status`, its two suites and the two documents; this branch touches the lane tooling, its suite and the same two documents in other paragraphs. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…r and profile in the record (Amendment 11 tooling) Lane: openRepoTools-3 (taken over from openRepoProject-1) ← brettheap/new-workstation#20 Amendment 11's **tooling** half, against the moved layout, built to the text on `brettheap/new-workstation#21`, **SPEC rev 4** (issuecomment-5655199395) and the eight decisions Brett Heap ratified verbatim on 2026-09-13T18:05:29Z — *"Ratify all four"*, *"Yes, build `lanes` in A11"*, *"Ratify the bundle"*, *"Hotfix brett-wip now, move it with history"* — as corrected by **A11 Addendum 3** (`R-A11-12`, `R-A11-13`, `R-A11-14`). **Base is `main`.** #24 — adoption act 3, the tooling move — landed as `d4b5710`, and this branch MERGED it at `ea28e12` rather than rebasing onto it: this history carries two merge commits with hand-written resolutions — `git show --cc 301a7e3` prints a combined diff that is in neither parent, the `repoVT` window-name-veto fixture among them — and `git rebase` drops merge commits. ## Taken over **Lane `openRepoTools-3`, from 2026-09-13T23:38Z, on Brett Heap's word, after lane `openRepoProject-1`'s session died holding this work.** Its last four commits were pushed by the orchestrator at 23:33Z and stand exactly as they are: **nothing on origin is rewritten, nothing is force-pushed and nothing is amended.** Run `34790026014` at `708395e` was the baseline — `tests-windows` green, and **three distinct failing assertions** across the other three jobs (`tests` 1321/1, `tests-no-submodule` 1321/1, `tests-macos` 1313/3/6). The host-absolute-path hygiene failure named in the handover was already gone by then. **Five commits are added.** The first is seven things (`git log` for the evidence behind each); the four after it are the review of that first one, and then the fail-closed family Brett Heap ruled in, one commit per surface. **`3d06a2b` — seven things** (`git log -1` for the evidence behind each): 1. **The last two `case`s bash 3.2 cannot parse**, in the suite's own cross-lane-veto block: 3.2 reads the `)` that closes a case PATTERN as the one that closes the `$( )`, so `tests-macos` compared a fragment of the suite's own source against `did not`. Hoisted, as A9 Addendum 4 R-A9-11 did for the same shape at `584180a` — and the rule is held for **all eleven bash files** now by `test_no_shipped_bash_opens_a_case_inside_a_command_substitution`, because `bash -n` on a GNU runner parses the construct perfectly. 2. **The one failure the Linux jobs had:** `restart`'s no-recorded-directory refusal wrapped between `reads it` and `back`, and its own assertion reads `reads it back`. The message is reflowed; not one word of it changed. 3. **The settled narrowing reaches the prose.** `24f9f7e` and `c4b6868` built Brett Heap's settlement of 20:38:11Z (*"Narrow inside a checkout (Recommended)"*, and *"Yes, list and suggest (Recommended)"* for `lane-start <repo>`); **five surfaces still stated the pre-settlement default** — `lanes`'s own header line, README.md's code block, the manual's *"two words"* block, `--help`'s entry, and `restart`'s two notes and usage tail — wrong twice over, because the scope is the ESTATE now and inside a checkout it is one repository. All five corrected, the manual gains the section the settlement is entitled to, and **two new tests plus seven shell-suite assertions** hold them, ABSENCE included. 4. **The artifact count.** Three prose statements still said *sixteen* (`openRepoTools:38`, `openRepoTools:260`, the manual's R-A9-12 paragraph) and README.md's install paragraph named *five* things that are not files in the bin directory while listing four skill copies and the hook — never naming `commands/swap.md` at all. It is **eighteen**, derived in `tests/test_openrepotools_command.py` and unchanged by this round: `11 + 2×2 + 2×1 + 1`. 5. **`lanes --prefix <repo>`** — how `lane-start <repo>` with no position asks for its listing — was parsed, used and documented in the body of `--help`, and **missing from the synopsis**. Added, and `test_every_option_the_parser_accepts_is_in_the_usage` now derives the check from the parser's own arms for both of Amendment 11's words. 6. **The manual offered `kill <pid>` as the retirement**, three words after saying none of them kills anything. The one act is `lane-end <lane> --retire <pid|uuid>` (ratified decision 8(e), clause (k) rule (e)). `F-X8` corrected the five other surfaces at `83e3ab8`; this one survived because that test matches LINES and the contradiction's two halves were on two lines. The new test reads PARAGRAPHS. 7. **`lane-start`'s clause (c) fences were missing `; `.** SPEC rev 6 §5 refuses `, `, ` — ` **and `; `** in `dir` and `profile`; the `/lane-swap` skill has done all three since `68614bf` and this one did two. The quoting does not cover the gap: `payload_subfield` splits on `; ` BEFORE it honours a quote, so `dir "/p/a; b"` splits and `lane-dir` answers `"/p/a` — a wrong directory, silently, which is Evidence 3 exactly. Eight assertions. **`window` is not widened** (`R-A11-15`). **Then Brett Heap ruled on that list, verbatim: *"Take it first, then land (Recommended)"*** — so **four more commits** follow, and the fail-closed family is in this PR rather than after it. **`2f44da0` — the review of `3d06a2b`, eight findings taken and four answered.** The manual promised *"four rungs … there is no fifth rung"* while `708395e` had added **two**: the estate's `project.yaml` legs and a checkout named for the home's repository, each proved by that directory's own `origin` and each skipped where the lane has no recorded home. `restart`'s lane-name fence was `[A-Za-z0-9]*)`, which pins ONE CHARACTER — `repoA11-1/extra` passed it and the person was told the register had no row for it; it is `lanes-edit.sh`'s own `check_lane_name` pattern now, held by a test that takes the pattern out of the helper. `lanes --all --prefix repoA11` (either order) listed every lane in the estate under a footer saying `of repoA11` with a next free position computed from one repository's rows. Four stale counts in the installer's own comments (`FIVE ARTIFACTS`→seven, `FOUR FILES`→six, `NINE TARGETS … TWELVE`→eleven … eighteen, `twelve of eighteen`→eleven), two refusals that named the skills while covering the command file, and `/lane-swap`'s container message, which told an operator *"the row is still flipped to PAUSED"* about a write that block skips. Answered rather than taken: `readlink --` (four assertions read its output and **`tests-macos` runs them** — 481 passed, nothing skipped), `line.strip() == "esac"` (applied, the dispatcher parse drops from thirty arms to **two**), and `collect_commands` (it collects the eleven INSTALLABLES and `die`s on its own; the command files are fetched inside the guarded `collect_skills`). **`43b6320` — the family, 1 of 3: `lanes`.** `log_sync` falls back to the local refs when a fetch fails or times out, says so on stderr and answers 0, because a read in front of a launch may not refuse. This command ran it with `2>/dev/null` and printed **"as of a fetch just now"** over the top — the one line a person reads to decide whether the answer is current, asserting the opposite of what the run had been told. The fetch path's stderr is kept and rendered; the local path's still is not, because there the notice is `LANES_NO_FETCH=1` saying what the caller asked for. The **empty** listing gets it too: *"no lane is recorded"* off a stale checkout is the answer likeliest to be acted on. **`013e0d5` — the family, 2 of 3: `restart`.** Three reads had one arm for four codes. The window's `register-row` behind a `&&` could not tell `8` (this window is not a lane — the fall-through's whole purpose) from `1` (the register could not be read). `list_this_checkout`'s `|| out=""` turned every nonzero into *"no lane of this checkout"*, including the **`2` every workstation gives until act 3's install reaches it** — which now gets the same refusal `lanes` gives it, naming `openRepoTools --install`. And `swapped`'s status was unreadable twice over — a pipeline's `$?` is `awk`'s, and `awk` succeeds on empty input — where the fall-through is not a listing but **rungs 3 and 4 of the directory resolution**: a failed read resolved `$PROJECTS_ROOT/<repo>` while the record naming the real checkout sat unread, which is Evidence 3 exactly. **`73caa5d` — the family, 3 of 3: `/restart`.** Six reads, one fence (`lread`), defined once beside `$L` and `$WS`: `0` an answer · `8` no answer · `2` a helper predating the read — both fall to the next rung, which `R-A11-8` requires — anything else a refusal naming the read. **It sets a variable rather than printing**, because a refusal inside `$( )` kills only the substitution's subshell and the skill would carry on with an empty answer. The explicit-lane check joins the fence and gains the `LANES_NO_FETCH=1` it lacked, so `/restart <lane>` no longer fetches before deciding whether the lane exists. And step 4's empty row is a **refusal**: the act below it is `lane-start --no-launch`, whose new-lane path CREATES a row, so a read that answered 8 must not reach it. The fence is extracted from the file and RUN against a helper stubbed to exit 0, 8, 2 and 6. **`6508e99` and `c3ebcfe` — two the suite caught on itself.** The fence cases landed between a `run` and the assertion that reads its `$rc`, so a case that had passed measured the leading-dash refusal's 2; and the fallen-back footer QUOTED the sentence it disowns, so `hasnt "…never claims a fetch it did not get"` fired on the message written to prove it never fires. Both are in the round because the suite is what found them. **`370dcba` — `main` at `7efc850` is merged in** (#27's computed worktree path), as a MERGE and not a rebase, for the reason `ea28e12` gives. One conflict, the README cap's docstring, and **neither dated entry is dropped**: this branch's 26 lines from 363 (372, 382, 389) and `main`'s 14 (#27), `363 + 26 + 14 = 403`, and the merged README measures **403** exactly. AGENTS.md came through unconflicted at #27's **214**, which is what the merged file measures. **`f368a75`, `e7b7a85` and `37632b1` — Copilot's review of `c3ebcfe` (5193115486), which is this same family ONE LAYER OUT: thirteen suppressed findings and one raised inline, and all fourteen are taken.** Same ruling, same three-commit shape, a suite case for each. **`f368a75` — `lanes` and the helper.** `43b6320` closed the LOUD half of the fetch; **four ways out of `log_sync` never reach the fetch at all** — `LANES_NO_GIT=1`, a `LANES_NO_FETCH=1` already in the environment, a `$LANES_REPO` that is not a checkout, and an `origin/<branch>` `ls-remote` could not confirm, THE TIMEOUT AMONG THEM — and every one answered 0 in silence while the footer said *"as of a fetch just now"*. The helper records which of the four it took and says it in the one phrase the wrapper already matches on. The `mktemp` fallback that can make no capture file threw that same sentence away again (the inline finding). `lane_payload_field` read its events **inside the here-document that feeds its loop**, where a command substitution's status is discarded outright — measured, with `pipefail` on — so a log that could not be READ left through the **8** every caller reads as *"this lane has not started under Amendment 11 yet"*. And `--all` cleared four filters and left `lr_one`, so `lanes --all --lane X` answered about one lane. **`e7b7a85` — `restart` and `lane-start`.** The two reads `013e0d5` missed are the ones whose fall-through is **a refusal that prescribes a WRITE**: `lane-start --dir <checkout>`, which appends a second `dir` to an append-only log, and the form that asks the operator to supply a profile by hand, which is the one guess the command exists to refuse. `--dry-run` printed `cd $lane_dir` unquoted, for a clause (c) directory that may carry a space — `lane-start:550`'s own `quoted` has printed its plan properly all along. The `lanes --prefix` refusal promised *"a position from the listing above"* when what was above it was a refusal. `--dir=` with an empty value fell through as ABSENT while `--dir ""` refuses — **eight such arms across three files**, guarded in the two-token spelling and in none of the `=` ones, now all guarded and held by a rule derived from the arms themselves. And the contract at the top of `lane-start` still said *"FOUR RUNGS … THERE IS NO FIFTH RUNG"* a hundred lines above the sixth; a second new rule counts the rungs the block declares, the rungs it lists, the rungs the code marks, and the number the manual states, and requires them to be one number. **`37632b1` — the two skills.** `/lane-swap`'s three step-1 reads go through one `sread` fence, because the rung beneath them is the workstation's **newest swap — a different lane** — and step 4 would then write a PAUSED record and a restart command for it. Its `dir` read may not stop (`R-A11-11`, *a swap is never left unwritten*), so it takes no substitute, drops the sub-field and **names the read that failed** — the third source below it is this session's own `cwd`, which is Evidence 3 written into an append-only log. And `/restart`'s step 3 stops deriving `$PROJECTS_ROOT/<repo>` where that is not there, so `lane-start`'s rungs 5 and 6 — the two this PR added — finally reach the lane they were added for, and step 5 passes `--dir` only where step 3 has one rather than putting a DERIVED directory at rung 1, the operator's own word. **`29d3417` — Copilot then reviewed those three commits (5193967331), and six of its seven findings are taken here.** The largest is the family again, under the whole fork layer: `session_files` returns **1** for a session tree it could not read and three callers refuse on it directly, but `session_records` read it through `|| :` inside a `$( )` — losing the status and the message with the subshell — and **cached the empty answer for the life of the process**; below it `fork_map`, `live_session_ids` and `lane_forks` each read their own source inside a here-document. So `forks` answered **8**, *no fork of it is live*, and the refusal its own arm has carried since it was written — *"That is NOT 'no fork of it is live'"* — **was unreachable**. `who`, the SessionStart hook and `live-holder` now say they could not look instead of printing the same nothing they print for "no fork"; the LISTING answers and says the STATE column is the log's verb alone, which is `43b6320`'s rule for a read that sits in front of a launch — and to make that notice reachable both `lanes` and `restart` stop discarding the helper's stderr on the local path, keeping the stream and dropping only the one `LANES_NO_FETCH=1` sentence they asked for. With it: a relative `--dir`, which `restart` resolved twice from two different directories; the `/restart` skill's tmux probe, whose status nothing tested under a paragraph promising a refusal; and `openRepoTools`'s staging comment, which counted **four** files of eleven. One finding is answered rather than taken — *"`--dir` bypasses the lane's recorded `dir`"* — because clause (c) makes `--dir` **rung 1, the operator's own word**, ahead of the record, and this suite has asserted exactly that since it was written. **`0241402` — the macOS runner, and three descriptions that ran what their backticks held.** `29d3417` was green on Linux, no-submodule and Windows and RED on macOS, on two assertions it had just added: `restart` resolves a relative `--dir` with `cd … && pwd -P`, which is PHYSICAL, and on that runner `/var` is a symlink to `/private/var` — so the case asserted the sandbox's own spelling of a path the code had resolved, which on that one runner is an assertion that it was NOT resolved. The expectation is computed the way the code computes it now. The same log prints the suite's own stderr, and in it, twice: *"command substitution: syntax error near unexpected token `newline'"* — three assertion DESCRIPTIONS whose unescaped backticks bash read as command substitutions, running `kill <pid>` and `forks` and handing the assertion a description with a hole where those words were. None can fail a test, which is why all three sat there. A third rule holds every description in the file. **`90cef58` — Copilot's review of `29d3417` (5194269988): five taken here, one in this description, one answered.** `/lane-swap`'s `workstation` read tested `-z "$ws"` alone, and `workstation` is an Amendment 11 read — so a `lanes-edit.sh` that has not taken act 3's install exits **2** with no output, and the skill told the operator of an ordinary host that they were in a container with `$LANES_WORKSTATION` unset, and skipped step 4's writes. **Until the install reaches every workstation, 2 is the answer every one of them gives** (`R-A11-8`): this was the case a swap meets today. The writes still stop — `$ws` goes into the PAUSED payload and into `session <uuid>@<ws>`, and a record filed under nothing is the placeholder `R-A11-14` refuses — but the gap is named truthfully and the act that closes it is the install. With it: `/restart`'s step 2(d), whose heading says PRINT THE LISTING AND STOP and whose code fell through with `$lane` still empty; and three surfaces that still said `--retire` **writes** an Amendment 6(d) record when it is the DOOR to 6(d) and writes nothing (`lanes`'s own printed footer has said so all along). The stale **sixteen-artifact** line in this description's generated summary is corrected here too — it is eighteen, derived in `tests/test_openrepotools_command.py`. One finding is answered rather than taken: *"the normal path builds the launcher command without `--dir`"* — `restart` reaches the launch only with a directory it took from the lane's own record, so `lane-start` reads the same two rungs and finds the same directory, and passing it as `--dir` would put a value the operator never typed at rung 1, which is the defect `37632b1` took OUT of the `/restart` skill. **`bf59ad3` — and one defect this round INTRODUCED, taken on the review of the commit that made it reachable.** `/restart`'s step 2(d) read was the last one in that file outside the `lread` fence, and while the block fell through that cost nothing. `90cef58` made the rung terminal — which its heading and the outcome table had both said it was — and the moment a rung ENDS in an outcome, its read's status IS the outcome: a `lanes` that exited **1** or **64** would have printed as `NO LANE FOR THIS WINDOW` **[8]**, a refusal turned into a no-answer, at the one rung whose next act is `lane-start`, which CREATES a row. Through the fence now, like every other read there. **That is where this round stops taking**: a defect it introduced is taken, a defect that predates it is listed — and everything still open from the reviews is listed, with a verdict each, in the comment. **Measured at `bf59ad3` (HEAD):** `bash tests/test_lane_helpers.sh` **1500 passed, 0 failed, 0 skipped, 0 pending**; `python3 -m pytest tests -q` **538 passed**; `bash -n` over all eleven bash files, eleven ok; CI **all five green**. **Measured at `29d3417`:** `bash tests/test_lane_helpers.sh` **1482 passed, 0 failed, 0 skipped**; `python3 -m pytest tests -q` **537 passed**; `bash -n` over all eleven bash files, eleven ok. At `37632b1` CI was green on all five (`tests` 7m3s, `tests-macos` 20m23s, `tests-no-submodule` 7m25s, `tests-windows` 29s, SonarCloud 21s). **Measured at `37632b1`:** `bash tests/test_lane_helpers.sh` **1463 passed, 0 failed, 0 skipped** (1387 at `c3ebcfe`); `python3 -m pytest tests -q` **537 passed** (525 at `c3ebcfe`, +12 instances from the two new rules); `bash -n` over all eleven bash files, eleven ok. Both new rules were run against the defect each was written for and refused it, then against the fix and passed. **Still open:** nothing. Of the first review's findings, four are answered above rather than taken, with the measurement beside each; of the second review's fourteen, all fourteen are taken — four of them with a different remedy or a different reason than the review gives, each resting on a line already in force; and of the third review's seven, six are taken and one is answered on the ratified precedence it contradicts. Every one of them is named, with its verdict, in the comment for this round. ## What is here **Clause (c) — the record.** `lane-start`'s `STARTED`/`RESUMED` lines and the swap record carry `dir <path>` and `profile <name>`, and the `window` sub-field carries its `<@id>`. A path with a space is written **quoted**, which makes it one ref under Amendment 7(b)'s grammar; one carrying `, `, ` — `, `; ` or `"` is **refused, naming the path** — in **both** writers as of this round. Four rungs resolve the directory — `--dir`, the swap record, the lane's log, `$PROJECTS_ROOT/<repo>` — **no fifth rung**, the cwd ruled out by name, and `lane-start` `cd`s there before it launches. `swapped` gains a fourth `<dir>` field and a fifth `<profile>`. **Clause (h) — the reads.** `window-lane [<ws>]` (three callers) **owns** the `<@id>`-versus-ref agreement rule: a record carrying an id is matched on its `<session>:<index>` only where the window now holding that ref reports that same id. Beside it: `lane-dir`, `last-session` (the cell of any shape, then the log's last `PAUSED`/`RESUMED`, never a title while a uuid exists), `forks`, `lanes [--repo|--dir|--prefix|--ws|--here|--all|--fetch]`, `workstation`, `fetch-age`. All read-only, all out of `origin/<branch>`, all treating **2 as a helper predating Amendment 11** rather than as a refusal. **Decisions 6 and 7 — two words on PATH.** `restart [<lane>]` reads the lane's own record, `cd`s there and relaunches **through the launcher**, never `claude` itself; with no argument it takes this window's lane, else prints this checkout's lanes and stops. `lanes` is the estate-wide listing, **local by default** with `--fetch` — and **inside a lane checkout it narrows to that repository's lanes and ends with the next free position and the `lane-start <repo> <n>` that takes it**, which is the settlement of 20:38:11Z; `--all` clears it. Neither is a picker. `/restart [<lane>]` is the in-session half, `skills/restart/SKILL.md`, installed beside `lane-swap`. **Decision 8.** `R-A11-12`: step 3b's fence is **two vetoes and no permission** — the register veto is adoption act 0's, and this adds the **window-name veto**: a window named for another lane never lends its session. A name is a veto and **never a permission**, so a window still called `claude` vetoes nothing and the `/clear` case step 3b exists for stays alive. `R-A11-14`: the workstation name is **read** from `$LANES_WORKSTATION`; outside a container `hostname -s` still answers; **inside one with no value every writer refuses, exit 2, naming the variable**. Rule (c)/(e): a live **fork** of a lane's transcript is never a holder and is shown as a defect to retire by `lanes`, `who --lane`, `live-holder` and the `SessionStart` hook — and killed by none of them. **`--install`** places **eleven** files, **two** skills at two paths each and **one** command file at that same pair of paths, plus one merged `SessionStart` entry: **eighteen artifacts**, and the count is the invariant — derived in `tests/test_openrepotools_command.py`, never restated from memory. `R-A11-13`: **no second installer** — workBenches' `setup.sh` already runs `openRepoTools --install`, and these two words ride that. ## What is deliberately NOT here - **Adoption act 0's three defects** (step 3b's register veto, `--name` on every launch branch, `log` refusing `unknown`) and its **`session-lane`** arrive from `opensoft/brett-wip#5` through `openRepoTools#24`. They are not authored twice. - **Clause (g)'s arming** of the usage-guard flag by `lane-start` is not in this round. ## Verification `bash tests/test_lane_helpers.sh` and `python3 -m pytest tests -q` — counts in the progress comments, and in CI on all four runners. PR #26 Co-Authored-By: Claude Fable 5.1 <[email protected]>
…easured to 224/409 `main` moved twice under this branch while it waited on review. `7efc850` (#27, the path `resume` computes for a parked feature's worktree) it already sits on; `63a74af` (#26, Amendment 11's lane tooling — `restart`, `lanes`, `commands/swap.md`, `skills/restart/SKILL.md` and the `$LANES_WORKSTATION` rule) is what this merge brings in. A MERGE AND NOT A REBASE, deliberately. The branch is pushed and #33 is under review: three Copilot rounds are recorded against `8a77d39`, `2bedf9b` and `55bb7a1`, and every inline thread on it hangs off a line in one of those three commits. A rebase would rewrite all three and leave the review pointing at commits that no longer exist. **THE OVERLAP IS THREE FILES AND ONE CONFLICT.** #26 touches neither `status` nor `tests/test_status_command.py`, which are this branch's whole subject, so the only files both sides wrote are `AGENTS.md`, `README.md` and `tests/test_repo_hygiene.py`. `AGENTS.md` and `README.md` merged clean, and both readings stand in their own places. In `AGENTS.md` that is `main`'s opening count of what `--install` places — nine to eleven, line 6 — and this branch's ten lines on the record's KEY ORDER inside rule 4, line 129. In `README.md` it is this branch's six lines in the parked-record exception and `main`'s twenty-six for `restart`, `lanes`, the `$LANES_WORKSTATION` row and clause (j)'s settled narrowing. Measured against each side: the merged `AGENTS.md` differs from this branch's by exactly `main`'s one line, and the merged `README.md` differs from `main`'s by exactly this branch's six. **The one conflict was the two README cap entries, and both sides were right.** Each appended a dated entry after `270 AND 363 MEET AT 377` and each rewrote the same `assert` — this branch to 383 for the record's key order, `main` to 403 for the merge that carried A11's tooling in. Both entries are kept, in that order, and a third — `383 AND 403 MEET AT 409` — says what they meet at and why. Nothing is dropped, because a cap is only worth having while the reason for every line of it can still be read back. **THE CAPS ARE RE-MEASURED, NEVER CARRIED OVER.** AGENTS.md 224 this branch 224, `main` 214. #26 changed a WORD on line 6 and a word is not a line, so the count does not move — and the 224 is still the measurement, not the branch's number waved through. Its own docstring now says so. README.md 409 this branch 383, `main` 403. Both raises start from the 377 that `270 AND 363 MEET AT 377` records, +6 and +26, and the line sets are disjoint. 409 is the sum and NEITHER SIDE'S NUMBER, and here that is not a nicety: the merged README measures 409, so `main`'s 403 and this branch's 383 BOTH go red on `assert len(lines) <= cap`. There was no side to take the answer from. `AGENTS.md` reads the same way from the other end — `main`'s 214 fails the merged 224, and the 224 that passes is the one this merge measured, not the one the branch happened to be carrying. Both numbers were taken after the merge with `len(text.splitlines())`, the call each test itself makes, and each cap is that count EXACTLY rather than a round number above it, so the next line either file gains has to come back here and say what bought it. `python3 -m pytest tests -q` on the merged tree: **549 passed**, rc=0 — the 491 this branch measured at `55bb7a1` plus the 58 #26 brings with it. Among those 58, `ALL_BASH` now holds every shipped file to A9 Addendum 4's newest rule — a `case` opened inside a `$( )`, which bash 3.2 ends at the first pattern's `)` — and this is the first time it is asked of the 379 lines this branch added to `status`. It carries none. Re-checked on the merged tree beside the suite: `bash -n` clean on all ten shipped bash files; the shared estate resolver still byte-identical across `park`, `resume` and `status` (365 lines); `expand_home` still byte-identical across `status` and `resume`; and `gh api` still run in exactly one place, `gh_api_line`, with every other mention prose. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ill make, and a `- branch:` or a `- role:` the record's KEY ORDER leaves under a shut list is a finding naming the list that shut it and the two exits in the order that does not lose the work, instead of a `resume <Name>` that brings none of it back `workspace_load_project` — the loader `resume` and `park` both read a record through — reads a block by INDENT and SHUTS a list at the first key shallower than its items. `in_features=false` is the first line of its indent-4 arm, before the `case` that sets it true again for `features:` alone; `in_legs=false` is the first line of its indent-8 arm; its `- branch:` arm sits behind `[ "$in_features" = true ] || continue` and its `- role:` arm behind `[ "$in_legs" = true ] || continue`. So a project-level key a bad merge left between two features, or between a feature and its `legs:`, does not reorder the record — it ENDS the list, and everything under it is lines `resume` makes no feature and no leg out of. `status` had no such state: it matched the indent of a line and nothing above it. So it counted features `resume` never makes and legs it never collects, and offered `resume <Name>` for both — work `status` claims and `resume` will not bring back, in the direction that matters most, because a person reading it believes the feature is safe. ## The twelve records, the loader's answer, and what `main` says Run against the INSTALLED extension on this rebase, 2026-09-14 — `git-common.sh` and `workspace-common.sh` sourced in place, twelve hand-built records, the `MANIFEST_*` arrays printed — with the answers the runs of 2026-09-12 and 2026-09-13 recorded. `main` and this branch are read by lifting `record_rows` out of each `status` and running it over the same twelve. | record | the loader | `main` | this branch | |---|---|---|---| | (d) the ordinary record `park` writes, two features | 2 features, 2 legs | 2, 2 ✅ | 2, 2 ✅ | | (a) a project key BETWEEN two features | 1 feature, 1 leg | 2, 2 ❌ | 1, 1 ✅ | | (b) a project key between a `- branch:` and its `legs:` | 1 feature, 0 legs | 1, 1 ❌ | 1, 0 ✅ | | (c1) a `- branch:` above every `features:` key | 0 features, 0 legs | 1, 1 ❌ | 0, 0 ✅ | | (c2) …and with no `features:` key at all | 0 features, 0 legs | 1, 1 ❌ | 0, 0 ✅ | | (e) a feature-level key between `legs:` and its items | 1 feature, 0 legs | 1, 1 ❌ | 1, 0 ✅ | | (f) a feature-level key BETWEEN two legs | 1 feature, 1 leg | 1, 2 ❌ | 1, 1 ✅ | | (g) a project key between two legs | 1 feature, 1 leg | 1, 2 ❌ | 1, 1 ✅ | | (h) a SECOND `features:` key after a project key (the list REOPENS) | 2 features, 2 legs | 2, 2 ✅ | 2, 2 ✅ | | (i) a `- branch:` below a project key, no legs | 1 feature, 1 leg | 2, 1 ❌ | 1, 1 ✅ | | (j) a BLANK `- branch:`, a project key above its `legs:` | 1 feature named nothing, 0 legs | 1, 1 ❌ | 1, 0 ✅ | | (k) a second `features:` key BELOW an unread `- branch:` | 1 feature, 2 legs, both filed under the feature ABOVE it (`MANIFEST_LEG_FEATURE` is `0 0`) | 2, 2, the second leg under the phantom ❌ | 1, 2, both under the feature above ✅ | `main` agrees on (d) and (h) and on nothing else — the same answer e18ec53 gave, and for a reason worth one line: **`record_rows` is byte-identical between e18ec53 and 7efc850**. #23's rounds 3–5 and #27's whole computed-path reading are in `read_record` and below it; neither touched the row reader. **And what that costs the person reading it** (run against 7efc850's own `status`, on the estates this suite builds, 2026-09-14): * (a) — `2 feature(s)` and `resume Atlas` offered twice, once for a feature `resume` never selects. * (b), (e) — `(repo leg): no worktree on that branch here … `resume Atlas` brings it back` for a leg `collect_legs` never collects, which is a feature `resume` refuses WHOLE. * (c) — `1 feature(s)` and that same offer; and with no `features:` key at all the note line is `parked record: 1 feature(s), parked ? on ?`, the project row suppressed and the date and the workstation with it. * (f), (g) — in the three-leg fixture, the phantom leg's own line: ``resume Trio` brings it back, unless origin has lost that branch … taking the WHOLE feature with it ("001-a-thing is no longer on origin in the code leg")` — a whole-feature refusal over a leg `resume` never reads, and `resume Trio` twice. * (i) — a second feature, and `the record lists no leg for it`, which is `collect_legs`'s refusal of a feature it REACHES. * (j) — RR2's refusal, `is no longer on origin`, of a feature `collect_legs` throws out before RR2 is reached. ## What changed `record_rows` carries the loader's two flags, set where the loader sets them: every line at indent 0, 2 or 4 shuts the feature list and `features:` alone reopens it; every line at indent 6 or 8 shuts the leg list and `legs:` reopens it inside an open feature list; nothing at indent 10 or 12 moves either, and a full-line comment is no line to either reader. * A `- branch:` under a shut list gets a **`nofeature`** row instead of a `branch` row, and does NOT become `$branch` — `$branch` is this reader's `feature_index`, the last feature the loader MADE, which is record (k). * A `- role:` under a shut leg list gets a **`noleg`** row carrying the branch, the role and WHICH LIST WAS SHUT — because that is the line a person has to go and find. * `read_record` counts the unread legs onto the feature in its first pass and prints, in the second, one finding per unread `- branch:` and one per feature whose legs went unread: the whole-feature refusal where the feature keeps no leg, the one-leg line where it keeps some, and the two defects in ONE line where the branch has no name (rather than the "lists no leg" a record that lists one should not be told). * The why and the exits are worded once, in `record_unread_why` and `record_unread_exits`. The why names ONE arm, never both. The exits are **the record's key ORDER first** — the one hand-edit these rules ask for — and **the re-park second, and only from the workstation that has the feature**: `workspace_write_manifest` rewrites the project's whole block and `emit_recorded_feature` carries forward only what `MANIFEST_FEATURE_BRANCHES` holds, so a park run anywhere else writes the block back without these lines at all. The lines are one park from gone. * The project row's gate takes an `$unread` half beside `$has_features`, so a block whose `- branch:` sits above every `features:` key still gets the row its finding needs the date and the workstation out of. Every record `park` writes is byte for byte the rows it always was. **It composes with #27's verdict walk by being invisible to it.** The walk's questions — `collect_legs`'s three, then RR6, RR4/RR3, RR2, RR1 in `resume.sh`'s own order, each gated on "no earlier leg refused" — are asked in the `leg)` arm of the first pass and nowhere else, and a line under a shut list emits no `leg` row. That is the loader again: it puts no such line in `MANIFEST_LEG_ROLE`, so `collect_legs` never walks it and no RR is ever asked of it. A `nofeature` row appends no feature entry either, so every array the walk reads back is still indexed by the features the loader MAKES. ## The differential guard, rebuilt `7efc850` → `9b06ecb` Twin estates out of this suite's own fixture builders in a temp dir; the temp root and every hex sha normalised; exit code, stdout and stderr diffed. Eleven record shapes × seven phases — five spellings of `pushed:` (`true`, `false`, the key absent, the key with no value, a word that is neither) with no worktree here, one with a worktree on the branch, one with the branch dropped from origin under `--fetch`. **77 comparisons.** `main`'s `status` run AGAIN after this branch's run is byte-identical in all 77 — the harness reads nothing but the change, and neither run moved the estate. Against this branch: **14 identical, 63 differing**, and the split is exactly the loader's. | shape | pushed:true | pushed:false | pushed absent | pushed empty | pushed word | worktree | gone (`--fetch`) | |---|---|---|---|---|---|---|---| | (a) | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | | (b) | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | | (c1) | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | | (c2) | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | | **(d)** | **SAME** | **SAME** | **SAME** | **SAME** | **SAME** | **SAME** | **SAME** | | (e) | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | | (f) | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | | (g) | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | | **(h)** | **SAME** | **SAME** | **SAME** | **SAME** | **SAME** | **SAME** | **SAME** | | (i) | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | | (j) | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | DIFF | Every difference is an arm above: (a), (c) and (i) the feature count and the branch's own finding (the indent-4 arm); (b) and (e) the whole-feature refusal that replaces a leg read against disk (the project-indent and the feature-indent arm); (f) and (g) the phantom leg's line becoming the finding about the leg that will not come back, while the leg that does keeps its `resume`; (c2) also the note line, which is the project row's new `$unread` half; (j) the one line that now says both defects. Two differences are not a finding's wording and are named for that reason: **(c) in the worktree phase also gains `worktree on 001-a-thing (root): not in the parked record — never parked`**, because a branch the loader makes no feature of is in no recorded set and `park`, reading the record through that same loader, would park it as new — and the footer's finding COUNT moves with it. The `--fetch` phase adds no reading of its own: the role is read before any RR. ## Bite, suite, caps, invariants **Eight tests bite.** This branch's `tests/` against `main`'s `status` in a scratch tree, 2026-09-14: `8 failed, 6 passed` — `test_a_project_key_between_two_features_leaves_the_second_unread`, `test_a_branch_above_every_features_key_is_a_feature_resume_never_makes`, `test_a_feature_level_key_between_legs_and_its_items_leaves_no_leg`, `test_a_key_between_two_legs_costs_that_leg_and_not_the_feature`, `test_a_second_features_key_reopens_the_list_and_its_legs_keep_the_feature` (the five new ones), `test_a_root_key_between_a_branch_and_its_legs_still_reads_that_feature` and `test_a_blank_branch_above_the_root_key_is_still_the_feature_resume_refuses` (the two that took the split), and `test_the_help_carries_the_no_push_exception_its_findings_do`. **The suite: 480 passed at 7efc850, 485 here** (`python3 -m pytest tests -q`, both in a real checkout with the submodule at the pinned commit). **The caps are the measured counts, not either side's number.** `main` reached AGENTS.md 214 / README.md 377 while this branch waited; the ten and six lines it wrote on 162 and 256 land in the same rule 4 sentence and the same exception, over none of the lines the entries above them bought. Measured after the rebase: **AGENTS.md 224, README.md 383**, each with its own dated entry in `tests/test_repo_hygiene.py` beside `main`'s, which all stay. (Those were the counts AT THE REBASE. `main` has since moved to `63a74af` and the checked-in caps are now **224 / 409** — see *The merge of `main` at `63a74af`* below.) **Invariants**: the shared estate resolver byte-identical across `park`, `resume` and `status`; `expand_home` byte-identical across `status` and `resume`; `gh api` only in `gh_api_line`; no bash-4-only grammar; `bash -n status` clean; shellcheck 0.9.0's finding profile identical to `main`'s; and this commit adds no `"${arr[@]}"` expansion at all (its one array read is `${#feature_legs[@]}`, the count `main`'s own `leg)` arm already uses). ## The rebase `e18ec53` → `7efc850`, still ONE commit. The conflicts were the three texts this reading shares with #23 and #27, and the two caps: the `--help` exception paragraph, where `main`'s "after a fetch that WORKED in that repository" replaces "under `--fetch`" and the key-order clause follows it; `read_record`'s locals and its first pass, where the `noleg` arm and its three arrays join #27's `feature_rr`/`feature_add` walk rather than the `feature_gone` it replaced; and the two cap entries. AGENTS.md and the README merged clean. Everything above was re-measured on the rebase. Recorded and NOT taken, as before: `workspace_load_project` takes a list item by stripping `- ` and TRIMMING AGAIN, so `- branch:` and `- role:` are a feature and a leg to it while this reader's patterns match neither. Re-run 2026-09-14: `main` and this branch answer IDENTICALLY on both. It is neither this branch's regression nor its to fix; it wants an item parser this layer has never had. ## Copilot's three rounds, `8a77d39`, `2bedf9b` and `55bb7a1` Round 1 on `9b06ecb` (three inline threads, six suppressed), round 2 on `8a77d39` (one suppressed) and round 3 on `2bedf9b` (one inline) are **six findings, all six real and all six taken**; the loader run that decided each is in [this comment](#33 (comment)). * **The noun, six places.** "at the next **key** at feature indent" — in `status --help`, AGENTS.md rule 4, the README, both cap docstrings and the help string the suite pins byte-for-byte. `grep -rn "next at "` over the tree now returns nothing. * **A reopened list is a clean slate for `$dropped`.** The legs of a list reopened below an unread `- branch:` are collected onto the feature ABOVE it, so a `- role:` left under a shut leg list there is that feature's defect — and, left set, `$dropped` suppressed its row entirely: the leg went out in SILENCE, and where the feature above kept no read leg the report said "the record lists no leg for it" about a record that lists one. * **A list that was never OPENED has no key that shut it.** `record_unread_why` takes two arms more, `nolist` and `nolegs`, which name the key that opens each list and say it is missing above that line, rather than sending a hand to a closing key the record has not got. * **And the third state may not swallow the second** — not Copilot's finding but the hole taking the one above opened. The loader makes a feature at indent 6 only where the item's key is `branch`, so any other line there leaves the feature above it current, and THAT feature has its `legs:` key. `nolegs` is the `- branch:` line's alone. * **No unread-leg line promises back a feature this run already refuses.** The legs it DOES read can carry a whole-feature verdict of their own; the verdict is read back in the order the `leg)` arm reads it, and where there is one the sentence says so and stops. * **A leg the record gives no role is named by the role it has not got.** `- role: # note` is that line to both readers — `record_scalar`'s reading from #21 — and the finding about it had been naming the leg with a pair of empty backticks. Recorded and not taken: with the key put back such a leg is one `collect_legs` READS, which `check_parked_leg`'s roleless arm already answers on the run after the key moves. * **A blank `- branch:` that keeps a leg still names the one it drops.** The combined line was reached only where the feature keeps NO leg; where it keeps one the run fell through to "a `- branch:` in the record has no value" and stopped — and since the blank name suppresses every per-leg line and the `noleg` arm only counts, the dropped line was said NOWHERE. The new arm is the third of four and keeps RR2's refusal, because a feature that keeps a leg `collect_legs` collects is not refused as a shape mismatch; the exits stay the blank name's, since no re-ordering settles a feature named nothing. **Bite**: 5 tests fail against `9b06ecb`, 2 more against `8a77d39`, 1 more against `2bedf9b`. **Suite**: 485 → 488 → 490 → **491**. **Caps unmoved by those four commits**: AGENTS.md 224, README.md 383 (the later merge of `main` raises them to 224 / 409 — see below). **Row differential `9b06ecb` → `8a77d39` over 21 records**: the feature and leg counts identical in all 21 — every difference is which line a finding names, one line that was never printed, and one name that was printed empty. The estate-level guard above is `7efc850` → `9b06ecb` and is not rebuilt for these rounds, for that reason. Invariants unchanged at each step, shellcheck profile included. ## The merge of `main` at `63a74af` `main` moved to `63a74af` (#26, Amendment 11's lane tooling) while this branch waited on review, so the branch merges it — **a merge commit, `e2952d9`, not a rebase**, because three Copilot rounds are recorded against `8a77d39`, `2bedf9b` and `55bb7a1`, and a rebase would rewrite all three and leave the review pointing at commits that no longer exist. #26 touches neither `status` nor `tests/test_status_command.py`, so the overlap is three files. `AGENTS.md` and `README.md` merged CLEAN and both readings stand in their places: the merged `AGENTS.md` differs from this branch's by exactly `main`'s one line (the `--install` count, nine → eleven), and the merged `README.md` differs from `main`'s by exactly this branch's six. **The one conflict was the two README cap entries, and both sides were right** — each appended a dated entry after `270 AND 363 MEET AT 377` and each rewrote the same `assert`. Both entries are kept, and a third, `383 AND 403 MEET AT 409`, records the arithmetic. Nothing is dropped. **The caps are the measured counts of the MERGED files:** | file | this branch | `main` | **merged, checked in** | |---|---|---|---| | `AGENTS.md` | 224 | 214 | **224** | | `README.md` | 383 | 403 | **409** | `README.md` is 377 + 6 (this branch) + 26 (`main`), the line sets disjoint, and neither side's number would have done: 409 fails `<= 383` **and** `<= 403`. `AGENTS.md` does not move because #26 changed a *word* of it and not a line — and its 224 is still the number measured after the merge rather than the one the branch was carrying. **Suite on the merged tree**: `python3 -m pytest tests -q` → **549 passed**, rc=0 (the 491 measured here at `55bb7a1`, plus the 58 arriving with #26). Among those 58, `ALL_BASH` now holds every shipped file to A9 Addendum 4's rule against a `case` opened inside a `$( )`; it meets this branch's 379 added lines of `status` for the first time here, and they carry none. Lane: openrepotools-3 (openRepoTools-3) PR #33 Co-Authored-By: Claude Fable 5.1 <[email protected]>



Four commits, the stacked branch #23's own body records as where these are built ("
worktree_on_branchfinds a worktree on the branch anywhere in the leg's repository whileresume.sh'sleg_registered_atmatches the PATH it computes, so RR1, RR3, RR4's second arm and RR5 are readings this layer does not yet make"), each verified against the extension's own scripts on scratch estates — bare remotes in a temp dir, a fake$HOME, workBenches'resume.sh,park.sh,git-common.shandworkspace-common.sh— before a line was written.The PATH, and the silence it closed. The independent reviewer's note of 2026-09-12, verbatim: "
worktree_on_branch(instatus) matches any path while RR4 matches only the computed one."worktree_on_branchanswers with the worktree checked out on the recorded branch WHEREVER IT SITS and every arm ofcheck_parked_legread "there is one" as "the feature is here" — with the tip at the parked commit that is no line at all and exit 0, which is the worst shape a hole in this layer can take.resume.sh's RR4 isleg_registered_at "$leg_repo" "$tree", an exact-string match against ONE path:collect_legscomputes$WORKTREE_ROOT/$branchfor arepoleg and$WORKTREE_ROOT/$branch/$SHAPE_SPEC_PATH(or…CODE…) for a three-leg one, out of THIS checkout'sworktree_rootand never out of the record's. On a scratch estate with the worktree on the branch at$HOME/elsewhere/001-a-thingthe extension answered "fatal: '001-a-thing' is already used by worktree at '…/elsewhere/001-a-thing'", "REFUSED: 001-a-thing — git worktree add failed", exit 2, whilestatussaid "0 finding(s) in 1 repository", exit 0. The path is now computed out of the same three sources in the same orderget_config_valuereads them —$SPECKIT_GIT_WORKTREE_ROOT, else the LASTworktree_root:in.specify/extensions/git/git-config.yml, else THE SHAPE'S default — withconfig_scalarcutting a#only where whitespace comes in front of it andlexical_pathnormalising no harder thanos.path.abspathdoes, both held against the real sed and the realabspathover thirteen inputs. The leg ENDS at that line becauseparkis blind to it too (park --dry-runanswered "No open features under 'worktrees'; nothing to park." on the same estate), so the arms below it would name a re-park that cannot run; the exit is themkdir -pandgit worktree movethat can, and where the path found is the leg's own checkout it names no command at all, because git refuses that move. Seven tests,status --help, AGENTS.md rule 4 and the README take the reading, 162 → 169 and 256 → 261 in dated entries.RR4's QUESTION ASKED THE WAY RR4 ASKS IT. The first commit's arm asked "is the worktree found on the recorded branch AT the computed path"; RR4 asks "is ANY worktree registered AT the computed path", the branch read afterwards — the independent review's blocker 2 — and the two part company wherever one branch is checked out twice, which
git worktree add --forcemakes: run with the leg's worktree atworktrees/001-a-thingand a forced second on the branch outside the root, the extension RESUMED, exit 0, while the arm refused the whole feature and named agit worktree moveONTO the very worktree the feature had just resumed from.registered_atis now an exact-string walk ofworktree list --porcelain,prunableits own answer because_git_worktree_finalize_recordstages a block only where it is false. With it comes the other side of the same question, recorded and not taken by the commit below: RR3, a path that merely EXISTS there. A plain DIRECTORY answered "REFUSED: 001-a-thing — an unrelated path is in the way", exit 2, a plain FILE the same byte for byte, a worktree of002-other"an unrelated worktree is in the way", and so did a detached one, one git held LOCKED, and one locked whose.githad been deleted. EVERY EXIT WAS RUN against git 2.43:worktree moveinto an occupied destination does not fail, it nests; onto a path git still holds registered it dies; it refuses a LOCKED worktree until anunlock;pruneSKIPS a locked registration; and it refuses a main working tree. So the exit turns on what git holds there — aworktree movewhere it holds a worktree, anmvwhere it holds none, theunlockin front of either, theprunebeside themv. Thirteen new tests and one widened, AGENTS 169 → 177 and README 261 → 267.THE REVIEW OF THE FIRST COMMIT, taken whole (verdict merge after fixes). BLOCKER 1:
$rootis a lexical string and git's is always physical, so an estate reached through a symlink compared one with the other and turned a HEALTHY feature into a whole-feature refusal — run both ways on one estate,resume.shanswered "RESUMED: 001-a-thing", exit 0, while this layer named agit worktree movebetween two spellings of one directory.RECORD_WORKTREE_ROOTis computed fromphysical_path "$root"now, and NO FURTHER:get_config_valueresolves no symlink andresolve_path_from_repo_rootisabspath, so where the worktree ROOT is itself a link both ends miss and the refusal survives, which was run too. SHOULD-FIX 1: the quotedgit worktree addfailure is the mechanism in one off-path state of five — moved on it is RR1, behind it RR5, gone from origin RR2, with no parked commit RR1 again — so the line names the outcome and keeps the quoted sentence in a parenthesis for the state that prints it. SHOULD-FIX 2: AGENTS.md and the README said the root is read "out of THIS checkout'sgit-config.yml, and read no other" while both verbs read$SPECKIT_GIT_WORKTREE_ROOTfirst. NIT 1: the rationale for[ "$tree" = "$repo" ]now says what the test answers. With them, the state the commit above recorded and did not take — a PRUNABLE registration at the computed path with nothing on disk, which RR4 misses and RR3 passes and the run dies on at the end ("a missing but already registered worktree", "REFUSED: 001-a-thing — git worktree add failed") — is said in the stale-registration arms' own words, with their prune, and the same prune goes in FRONT of the move where a dead registration holds the destination. And the off-path reading became the FEATURE's, which it was not: a three-leg record proved a sibling leg still said "resume Triobrings it back" while the culprit leg said the feature was refused. Five new tests, AGENTS 177 → 181, the README re-wrapped inside its cap.THE REBASE ONTO
main, and Copilot's FIFTH round on #23 settled empirically.maintook #23's rounds 3 to 5, and its third round made the whole-feature verdict THE FIRST REFUSING LEG'S IN THE RECORD'S ORDER — RR6, RR2 and RR1 in one walk. The two readings above are refusals of the same loop, so they are asked inside that walk, inresume.sh's order: RR6, then RR4 and RR3, then RR2, then RR1, the first answer kept with the exit that travels with it, and one verdict and one kind handed down (pushed,inway,gone,moved, oraddfor thegit worktree addthat runs last of all). THE ROUND, verbatim: "A stale-registration leg before a later gone-origin leg is not represented in this verdict pass …resumestops at RR3 first." Five estates, 2026-09-13,specrecorded first andcodesecond withcode's branch deleted on origin. (a) A stray DIRECTORY at thespecleg's path: "REFUSED: 001-a-thing — an unrelated path is in the way", exit 2 — REAL, andmainanswered the gone verdict with RR2's exits, which are the wrong thing to do about a directory. (b) A PRUNABLE registration there with nothing on disk, in both spellings: "REFUSED: 001-a-thing — gone from origin", exit 2 — the premise is WRONG for a stale registration, becauseload_git_worktreesdrops a prunable block whichever branch it names. (c) Thespecleg's worktree off the path: "gone from origin" again — WRONG there too, the add being the last thing the run does. The control, a LOCKED registration for another branch with nothing on disk, which git calls no prunable: "an unrelated worktree is in the way", RR4's second arm on the earlier leg. And a leg RR6 refuses still says where its OWN worktree sits — RR6 is "whichever of its own checks this leg reaches first" — while an EARLIER leg's RR6 silences a later leg's path, both run. Three new tests, all three biting; no document line moves, so no cap moves. Recorded and not taken:moved_on_legasksworktree_here, which is wider than RR4's question, so a leg with noparked_commit:and an off-path worktree is RR1's divergence at the other end and the off-path line here — the exit it names is theworktree move, which makes that very run RESUME (both halves run 2026-09-13), so the reading is not narrowed and the comment on that function says why.Guard:
main'sstatus(0aded19) against this branch's tip on TWIN estates — each side builds its own out of the suite's own builders, offline, and the temp root, every object name and every timestamp are normalised before exit code, stdout and stderr are compared. 60 scenario families, 394 comparisons, 246 byte-identical; the 148 that differ are 36 families and every one is a state these four commits address — fifteen the path-parity reading in all nine spellings ofpushed:(it is made before the tip arms, and RR6 does not silence a leg's own line), fourteen what is AT that path in the one spelling that reaches RR4 and RR3, and the rest a locked registration at an off-path destination, a stray directory with the worktree elsewhere, a prunable block on the recorded branch with a live worktree elsewhere, two three-leg whole-feature families, and cases (a) and (b) above. THE 24 THAT MUST NOT MOVE DID NOT: case (c), a HEALTHY feature under a symlinked projects directory, two worktrees on one branch with one AT the computed path, a dead registration on the RECORDED branch with nothing on disk, every on-path state, no worktree here, no record at all, a config override that AGREES, an absolute and a../-ladenworktree_root, a stale registration on the path, origin gone with no worktree, an unrecorded worktree, an empty role,role: assembly,role: specin a single checkout, a feature a sibling leg costs whole, and the four healthy three-leg families.Suite: 360 passed, 0 failed, with
upstream/openRepoShapeinitialised. Againstmain'sstatusin acp -aof this tree, 25 status tests fail — 23 of the 28 this branch adds, the five that do not being gates that must pass there (a featurecollect_legsrefuses whole, a feature refused whole, a HEALTHY estate under a symlinked projects directory, two worktrees on one branch with one AT the computed path, and a--no-pushrecord with a stray directory at that path) — plus Copilot'spath: "."test and the help's byte-for-byte pin, which took the new words — and the twotest_upstream_pin.pyfailures there are the ones that need a real git checkout and fail in any copied tree. Caps: AGENTS.md 181, README.md 267, both re-measured on this base with the dated entries merged (the README paragraph the second commit splits is re-wrapped whole, which is the one document line that moves).RECORDED FOR LATER, NOT TAKEN: the exits this layer names for a leg declared
path: "."do not run.leg_tree_pathanswers<worktree_root>/<branch>/.for such a leg because that is the stringcollect_legscomputes and the string this layer must compare against, but spoken as a command operandmv '…/001-a-thing/.' <dest>is refused by coreutils outright andgit worktree move <tree> '…/001-a-thing/.'exits 0 and puts the worktree INSIDE the destination. And no destination would help: RR4 matches that string against no worktree git can spell, so the other end is not idempotent for it either — the run after a successful resume refuses the worktree it just created, "REFUSED: 001-a-thing — an unrelated path is in the way", exit 2 (run 2026-09-12). The reading is a strict improvement on the base, which called that estate present and clean; the exit is a round of its own, and under it acollect_legsthat computes$WORKTREE_ROOT/$branchfor a leg whose path is., which is workBenches'.Lane: openrepotools-3 (openRepoTools-3)
🤖 Generated with Claude Code
Summary by Sourcery
Make
statususeresume’s computed worktree paths and refusal order so parked features receive accurate whole-feature findings and actionable recovery guidance.New Features:
statuswithresumeby judging parked feature worktrees only at the computed path and treating off-path worktrees as whole-feature refusals.resume’s first-refusing-leg ordering.Bug Fixes:
Enhancements:
Documentation:
Tests: