Skip to content

lane: one word lists the lanes and binds the one you pick — available goes through the launcher in its own directory and profile, LIVE HERE attaches and never starts a second process, bound elsewhere names where; and restart leaves the person's PATH in the same breath (Amendment 18 Addendum 1 and Addendum 2) - #45

Merged
brettheap merged 22 commits into
mainfrom
feat/lane-the-word
Sep 15, 2026

Conversation

@brettheap

@brettheap brettheap commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openRepoTools-3

← brettheap/new-workstation#38 (Amendment 18 Addendum 1) and brettheap/new-workstation#39 (Addendum 2)

One word lists the lanes and binds the one you pick. Brett Heap, 2026-09-14, verbatim: "i dont understand in another window i want to attach to that lane. what command do i use to do that?" and "this is too hard for users. we need simple way to list the lanes and then pick one to bind." — and his answer to what the word should be, verbatim "lane (Recommended)". Amendment 18 Addendum 1, ratified 2026-09-14T14:05:54Z verbatim "ratify the addendum".

ADDENDUM 2 IS IN FORCE AND restart IS GONE FROM THE PATH. Ratified 2026-09-14T16:50:32Z verbatim "ratify", on his ruling "i think we can drop restart as a cli command and keep it inside a claude session with /restart. if we need it for ctx, keep it for that, but I do not see any reason to expose this to the user. lane does all the things a user wants". The file restart is DELETED (545 lines) and openRepoTools --install no longer places it: eleven files become ten, plus lane = eleven again. The count did not move because one word left as another arrived, and lane <name> is restart <lane>'s act — the launcher's path, the lane's own recorded directory and profile, asking nothing — plus the pick, the attach and the handoff branch. /restart (the SKILL) is untouched: it is the INSIDE half, for a session that cannot exec a launcher over itself.

The acts

act where its tests
1. lane on PATH, the numbered pick — available first (PARKED, or a binding this host proves dead), LIVE HERE next with where each is, bound elsewhere last; CLOSED and DORMANT hidden (Amendment 19); one question which? [1-N, f = a new lane at the next free position (<repo>-<n>), q]. Inside a checkout, that repository's; outside one, every repository grouped lane (new, 953 lines, 755); lanes-edit.sh lane_groups/lane_next_free and their two subcommands; openRepoTools INSTALLABLES tests/test_lane_helpers.sh — the partition asked of the helper over six seeded lanes covering five states; the listing and its three headings; tests/test_openrepotools_command.py (INSTALLED, from which every count derives)
2. three branches, one per state — available → cd <recorded dir> && exec pclaude --lane <lane> <profile>; LIVE HERE → tmux move-window -a -s <session>:<index> + select-window -t <@id>, or select-window alone where the window is already in this session, or tmux attach -t <session> outside tmux, or switch-client under --switch — and never a second process (clause (h)); bound elsewhere → a refusal naming the workstation, the window and the age, and clause (c)'s handoff, because #38's act 4 does not exist yet lane go_available, go_live, go_elsewhere, go_row a fake tmux of the section's own that logs move-window, select-window, switch-client and attach; each branch reached by number AND by name, with the launcher log asserted empty on both attach branches
3. lane <name> any case, --all, no terminal — the name goes through lanes-edit.sh canon-lane (Amendment 15, #41) before any read, so every line below it speaks of the lane by the register row's own spelling; [ -t 0 ] is the whole of what decides whether the question is asked lane lane REPOa11-1 launches under the register's spelling and never the typed one; lane repocase-1 and the 15(d) pair relayed with both spellings (#41's own two cases, on the word that now performs the act); lane --all carries two repositories, grouped; --all with a name is the contract's 64; the no-terminal form lists, suggests the acts filled in, and is asserted to contain no which?
4. bare lane-start is lane (clause (i-4)) — it renders nothing of its own and execs the word, because the launcher execs it lane-start, the 0) arm of case "${#positional[@]}" a bare lane-start now exits 0 where it refused with 2, prints lane's numbered listing and launches no session
5. tests tests/test_lane_helpers.sh +577/−191 against the merge base a new section, placed just before == the workstation seam ==; a pty harness that answers the ONE question for real rather than faking [ -t 0 ]
6. docs docs/README-lanes.md — "One word: lane" at the top of "Starting and ending a lane", and "Restart and list (Amendment 11)" rewritten as "Bind and list (Amendment 11, amended by Amendment 18)"; README.md install list and the lane-tooling section test_the_documents_say_what_a_bare_lanes_lists, test_every_fork_surface_prints_the_one_act, test_every_option_the_parser_accepts_is_in_the_usage, test_lane_fences_a_lane_name_the_way_the_helper_does
7. restart retired (Addendum 2) the file DELETED; INSTALLABLES; lanes' two hints and its did you mean refusal; lanes-edit.sh's column 10 (lr_restart); the CI bash-3.2 parse list; the prose in README.md, docs/README-lanes.md, openRepoTools, skills/lane-swap/SKILL.md and skills/restart/SKILL.md SHIPPED_BASH, FORK_SURFACES, the usage/parser parametrization and the lane-name fence all moved to lane; decision 7's suite section re-pointed at lane <name>, the section header included

What is one implementation and not two

lane renders the rows lanes renders, through the same lanes-edit.sh lanes read. Neither the partition nor the next free position is the word's own: both are computed in lanes-edit.sh, over rows handed in on stdin, so the caller pays for one read and two surfaces cannot come to disagree about which lanes are free — the rule A11 Addendum 4 ruling 7 gave column 10 after lanes and restart had each computed a restart line of its own. lanes' own next-free loop is DELETED in favour of next-free, and a helper that cannot answer it is a footer that says so rather than a position of 1 (Amendment 7(d)).

The fences

  • The window is matched by its id AND its session name. tmux reissues @ ids from @0 when its server is replaced — measured on Eagle 2026-09-13, 0 of 5 recorded windows resolving — so an id alone attaches to whatever pane has since been given it. Two cases: the id now in another session, and an id that names no window at all.
  • A profile is never guessed, and lane <name> <profile> on a LIVE lane is refused: an attach starts nothing, so there is no account for that argument to change.
  • The fail-closed family on both reads in front of a launch (Amendment 7(d)): a lanes that FAILED is not "there are no lanes"; a lane-groups that failed is not "no lane is available"; and each read's 2 is named as an un-upgraded workstation rather than a fault.
  • A --led word is an option before -- and a lane name after it: 64 from the parser, and past -- the helper's own whole-string fence at 2.

Amendment 15 (#41) is merged in, not rebased over

origin/main at 8345d2f is merged into this branch. Four conflicts, each one a line the two amendments both touch:

  1. restart — modify/delete. THE DELETION WINS (Addendum 2). Amendment 15 tooling: a lane name is ONE name under any case — canon_lane gives every <lane> argument and LANES_LANE the register row's spelling before any read or write, and a lane's object log is ONE file and ONE lane's under any case #41 had added a 38-line Amendment 15 block to that file; the block is not lost, it is ported into lane, because Addendum 2 moves the act and not only the word.
  2. lanes-edit.sh's unknown-subcommand refusal — union: lane-groups, next-free and canon-lane are three new reads and all three are named.
  3. docs/README-lanes.md's reads table — Amendment 15's sentence about window-lane answering in the register row's own spelling is kept, with the word it names changed to lane <name>.
  4. tests/test_lane_helpers.sh — both branches added a section immediately before == the workstation seam ==: union, Amendment 15 first, so that section keeps the position it landed on main in.

canon-lane is now lane <name>'s resolver — one resolver shared by every command that takes a <lane>, because four implementations of which row is this name's is how the four come to disagree. Its 2 is two answers, told apart by the refusal's own words: an un-upgraded helper's unknown-subcommand 2 is a silent fall-through, and canon-lane's own 2 — the register spelling one lane two ways — is relayed with both spellings and the 15(d) merge named, never reported as a read that failed. The estate-wide read under it stops being the resolver and becomes the fallback for a workstation that has not taken the install. Four of #41's cases move to the word that performs the act, behaviour unchanged.

Counts

Copilot round 1 — eight findings, eight taken, none declined

Requested and taken on fce18d5; the fixes are eb10256.

finding what it was what it is now
lane:610 critical all four attach paths select the lane's OWN window and three act after it; the outside-tmux path spelled that select || : and then exec tmux attach, so a window closed between the id-AND-session check and the act left the attach on whatever window that session had current — another lane one select_window_or_refuse carries all four sites and refuses, naming what had already been done (a client switched, a window moved)
lane:777 critical lanes_rows says on stderr, and goes on answering, that this workstation's session records could not be read — "a lane that is live may show as IDLE or PAUSED here" (lanes-edit.sh:4628). The row was relayed, grouped AVAILABLE and launched: a second process on a lane that may still be running read_rows catches the sentence out of the stderr it already reads; go_available refuses for a binding — a PAUSED lane is parked by its own last line, needs no such proof, and launches as before
openRepoTools:234 moderate dropping restart from INSTALLABLES stops this run copying it and does nothing about the copy the last run placed, so every workstation that took the install before Addendum 2 keeps restart on PATH for ever --install retires it — and removes only what it wrote: the test is the header this installer puts in every command it owns, so a person's own script of that name is named, left where it is, and the rm is printed for them
lane:710 moderate lane --dir <path> then f opened the new lane in a checkout nobody named --dir goes to lane-start with the position
lane:701, lane-start:658 moderate PATH before the sibling, against the rule lane states above its own $LANES_EDIT lookup sibling first, then PATH — and lane-start's older lanes lookup took the same correction, so the file carries one order
lane-start:661 moderate the bare alias execed lane with none of the flags its parser had taken: lane-start --no-launch became an interactive pick that launches --dry-run and --dir are forwarded (lane has both); every other flag is refused by name, with the form that does take it filled in
lanes:432 nit || : collapsed every status of the next-free read, so a read that FAILED was reported as an un-upgraded workstation 2 still names the install; anything else names the code it got and offers no position (Amendment 7(d))

And one this repository's own hygiene caught on top of them: grep -q "<pattern>" -- <file> puts -- after an operand, which BSD's getopt reads as a filename — test_no_shipped_bash_ends_its_options_after_an_operand named it in lane before it ever reached macOS. Both new greps take -e.

Copilot round 2 — four more, all four taken (and one CI found that no review did)

Round 2 reviewed round 1's own fixes. Every finding was real; one could have deleted something a person owns. Fixes are f00229d.

finding what it was
openRepoTools:262 the retirement's ownership test was [ -f "$target" ], and -f follows the link — a person's own restart symlink pointing at a file carrying this installer's header would have been unlinked. plan_install_targets refuses a -L target for exactly that reason; the retirement now does too, and a new case runs --install against such a symlink and requires it and its target to survive
lane:666 the select's target was a bare @id, which leaves tmux to pick the "best" session holding that window — and picking is what the id-AND-session fence exists to stop. Every select is <session>:<@id> now, in the acts and in the --dry-run lines that print them
lane:706 after move-window the window is in THIS session and a detached source with no windows left closes itself, but the refusal under it still named the source and offered tmux attach -t <source>. The helper takes the session it means
lane:589 lane <name> <profile> on a lane with a profile but no directory landed on the directory refusal, whose one-run exit dropped the profile — following it walked straight back into the no-profile refusal

And tests-macos was the only red job on fce18d5 — 1764 passed, 2 failed, both in the predecessor's --dir case. macOS's $TMPDIR is under /var, a symlink to /private/var; lane resolves --dir once, where the operator typed it, so the launcher sees the physical path while the case asserted the sandbox's own. Asserting the unresolved spelling is asserting that the resolution did not happen, which is the one thing that flag must do. $A11_DIR_R is computed once now, beside $A11_DIR and after the mkdir that creates it. tests, tests-no-submodule and tests-windows were green on that commit.

Copilot round 3 — four more, all four taken

Three of them are the same defect round 1 fixed one file over: a read whose status was thrown away with || :, and whose emptiness was then read as an answer. Amendment 7(d) is one rule; taking it in lanes and leaving it in lane was taking half. Fixes are 9581ac9.

finding what it was
lane:960 the picker's next-free read spent || : on every status, so the f answer simply vanished from the question with nothing on screen to say why. It now says which: 2 names the install, anything else names the code it got
lane:751 f's own read discarded its status too — and that one allocates. A next-free that printed digits and then failed handed them past the numeric fence into lane-start, opening a new lane at a position the estate may hold
lane:322 three states, not two. With no writable $TMPDIR the helper's notes go straight to the terminal and cannot be read back, and the flag stayed 0 — so a binding whose liveness was never established was launched anyway. 0 proved · 1 the helper said it could not · 2 this command could not read whether it did; a PAUSED lane launches under all three
tests/test_repo_hygiene.py:34 the paragraph above SHIPPED_BASH still said the macOS job parses "four" for a list of six

Sixteen findings across the first three rounds, sixteen taken, none declined. Each round's commit message names every finding it took, by file and line. Copilot posts most findings on this repository as review-body suppressed comments rather than as resolvable threads; the threads it does open are answered and resolved one by one, and as of 39ec308 there are none open.

Copilot round 4 — six taken, two declined, and CI's one red case

Round 4 read f00229d (three threads, six suppressed comments). Three of those
suppressed comments — lane:765, lane:969, lane:322 — were already fixed in
9581ac9, one commit after the tree it read. Fixes are f6200a05.

AND tests, tests-no-submodule AND tests-macos WERE ALL RED ON 9581ac9
WITH ONE CASE BETWEEN THEM
— 1832 passed, 1 failed on the two Linux jobs,
1817 passed, 1 failed, 7 skipped on macOS, the same case in all three, and
tests-windows green. It is the round-3 commit's own prose reflow: pulling
$ga_why out as a variable re-wrapped the refusal so that PROVED ended one
line and that binding dead began the next, and the assertion reads a substring
of ONE line. The words are the fix and never the assertion.

finding what it was
lane:560 the PAUSED exception was a hole in the fence at its widest point. Round 1 made an unread liveness read refuse a launch and passed PAUSED through, on the reading that a lane parked by its own last line needs no proof. The sentence that refusal REACTS to says otherwise and lane already quoted it whole: "a lane that is live may show as IDLE or PAUSED here" (lanes-edit.sh:4628), because "a live record … beats the log's own last verb … otherwise the verb answers" (lanes-edit.sh:4700) — so when the live read fails the verb is ALL that is left, and /lane-swap writes the PAUSED line while its session is still on screen. Every state refuses now
lane:715 the move's source was <session>:<index>, read one command before it was used. Measured, tmux 3.4 on a private socket: with w3 at src:2, killing it and opening another window at that index, move-window -a -s src:2 MOVED THE INTRUDER and exited 0 — while move-window -a -s src:@2 refused with can't find window: @2. The source is the @id the fence checked, and the move is a checked act: a move that failed is a refusal and the select under it never runs
lane:687 (round 2's thread, unresolved until now) switch-client then select-window leaves a client that lost the race in the target session's current window — another lane, this terminal already in it. The select comes first and the switch only follows one that worked; a switch-client that fails is itself a refusal naming the half that happened
lane:595 the no-directory refusal built its remedy as <repo> <position>, and a --verbatim lane has neither: lane-start --dir <path> nav-rail-audit <n> opens nav-rail-audit-<n>, A DIFFERENT LANE. lane-start:601 takes that name as one argument beside a --dir, which is what the line prints
lane-start:690 lane-start --estate x --yes printed lane-start <repo> <n> --estate --yes, whose --estate swallows the --yes and names an estate --yes. The -- words were dropped the same way. A line printed for a person to type is one this command has to be willing to have typed back at it
openRepoTools:261 -e follows the link and is FALSE for a dangling one, so a restart SYMLINK whose target had gone — and the pre-move link-estates put exactly those links in ~/.local/bin — was neither removed NOR named: it stayed on PATH and the run that was going to mention it said nothing

Two declined, and both measured rather than argued — the pattern this suite
already uses for the declined ls -- finding, "because a decline that is argued
rather than measured is one the next round makes again"
:

  • tests/test_lane_helpers.sh:6424 — env -C is not a GNU-only option here.
    tests-macos job 104128188482 on fce18d5 printed ok a bare lane inside a checkout exits 0 (which IS run env -C "$PICK_DIR" …) and ok answering with the number of an AVAILABLE lane exits 0 (lane_pick 1 env -C … under a pty);
    neither can exit 0 and carry its listing assertions if env had refused the
    flag. main has carried four more since Amendment 11. Asserted directly now,
    on every platform the suite runs on.
  • openRepoTools:263 — the header marker is the only ownership evidence an
    installer can have about a file it wrote before it knew it would retire it.

    No installer that placed restart wrote a receipt, so no receipt can identify
    the copies on people's PATHs — the remedy cannot answer for the population the
    act exists for. Filed as --install writes a receipt of what it placed, so a later retirement has ownership evidence stronger than a header substring #57 for retirements after this one (a receipt of
    name, destination, sha256 and stamp, with the marker kept as the fallback).

Copilot round 5 — three taken, six filed as #58

Round 5 read 9581ac9: thirteen suppressed comments, no new threads. Two
restated findings already taken in f6200a05 (lane:728, openRepoTools:261).

finding what it was
lane:1000, lanes:441 a read that printed digits and THEN failed is still a read that failed. Round 3 closed this in the f ANSWER (go_new, lane:751) and left it open in the two surfaces that OFFER f: both captured the status and then decided on the TEXT, and text from a failed read passes a shape test on its own output. The status decides first now, in both files
lane:1030 the acts a no-terminal run PRINTS dropped the --dir it was given, while the f answer has carried it since round 1 (lane:710) — so an agent typing the printed line opens the new lane in whatever checkout it happens to be standing in
lanes-edit.sh:4829 lane-groups groups a local row that is not LIVE as AVAILABLE, out of a STATE column that is the log's verb alone when the session records could not be read — so with the PAUSED exception gone, EVERY row under that heading is one go_available will refuse. The heading now says so, and says that a LIVE HERE attach is unaffected

Six more are prose that says "four" about inventories holding six, ten and
eleven
— README.md:333 and :403, .github/workflows/tests.yml:177,
openRepoTools:370, tests/test_repo_hygiene.py:6 and :2126,
tests/test_openrepotools_command.py:9-11 and four more docstrings,
tests/test_lane_helpers.sh:30 and :312. Every one of them is already false
on main at 8345d2f
, where INSTALLABLES holds eleven and SHIPPED_BASH
six: this pull request renames one member of those lists and moves no count.
Filed as #58 and claimed, rather than folded into a diff that is already
fourteen files.

Copilot round 6 — one taken, one declined, the rest already answered

Round 6 read f6200a05, one commit behind: nine suppressed comments, no new
threads. Two of them (lane:1048, lanes:440) were taken in 39ec308, one
(lanes-edit.sh:4829) was answered there, and five are the "four" prose filed
as #58.

finding what happened
lane:708 — TAKEN outside tmux, a select and then attach -t <session> are TWO acts, and a window that closes between them leaves the attach on whatever that session has since made current — the same defect round 1 took in the select and round 4 in the move, one act further. Measured, tmux 3.4 on a private socket: with dst current on @0, attach -t dst:@2 attached AND made @2 current in ONE act, while attach -t dst:@3 (a window of another session) refused with can't find window: @3. The attach names <session>:<@id> now, act and dry-run alike; the select stays in front of it because it is this command's own refusal in its own words
lanes:424 — DECLINED, measured the rc=8 branch prints next free position: 1 without calling next-free. lane_next_free (lanes-edit.sh:4847) reads ONLY the rows on stdin and keeps those named <repo>-…, and lanes_rows' --prefix filter keeps every lane whose NAME carries the prefix — so an empty filtered listing IS "no lane named <repo>-<n> in this register" and 1 is the only answer that helper could give. Routing it through the read would add a failure path in front of an answer that needs none. Four assertions hold both halves: the listing's 8, its 1, and next-free answering 1 over the same empty rows
lanes-edit.sh:4829 — answered in 39ec308, and by a paragraph rather than a regrouping the partition is ONE read that lane and lanes share. Moving a row out of AVAILABLE while the liveness is unknown would either hide a lane from the person who most needs to see it or invent a fourth group in a read two words render. What is true is that every row under that heading is one go_available will refuse — which the heading now says, naming live-holder and lanes --all, and saying a LIVE HERE attach is unaffected

Forty-seven findings across twelve rounds: thirty-eight taken, eight declined
(each decline measured or quoted, never merely argued, and each one now
asserted in the suite), and the prose-count family filed as #58. No review
thread is open.

Copilot rounds 7 and 8 — eight more taken, three declined

Round 7 read 39ec308 and round 8 b8dddc1; between them nine suppressed
comments were new and five were restatements of what the commit under review
had already taken.

finding round what happened
lane:738 7 the --switch branch named only the session, so another client could change that session's current window between the select and the switch. Measured: switch-client -t dst:@3 moved the client AND made @3 current in one act; switch-client -t dst:@999 refused. TAKEN
lanes-edit.sh:4839 7 the paragraph said positions "come back as lanes end"; lane_next_free has never done that and the fixture proves it. The CODE is right — a lane's identity is its name and lanes/log/<lane>.md is APPEND-ONLY, so a second lane at a retired position writes its life into the first one's file — and the comment and the manual now say so. TAKEN
lanes-edit.sh:4853 7 the prefix test read repo-foo-1 as a lane of repo, so a repository whose name is another plus a hyphen took positions out of its neighbour. The name before the last hyphen is compared whole now. TAKEN
lane-start:698 7 --estate 'team blue' printed bare is two words when typed again. Everything printed goes through quoted (printf %q). TAKEN
openRepoTools:369 7 retire_commands ran BEFORE place_skill_and_hook, so a skills directory this run could not write left the old word already deleted and the adoption unfinished. The one destructive step is the LAST one now, with a case that makes ~/.claude/skills a regular file. TAKEN
lane:612 8 the no-profile refusal's cd <dir> was unquoted, so a recorded directory with a space made it two arguments. Quoted where it is a path, left as words where it is the placeholder. TAKEN
lane:1123 8 the no-terminal listing printed lane <name> with --switch dropped — and typing that back MOVES a live lane's window instead of switching the client. TAKEN
lane-start:706 8 the remedy was built from the REFUSED flags alone, so --dir /work/repo --estate x printed a line without the checkout the person named. It carries both now. TAKEN
lanes:424 7 DECLINED, measured: lane_next_free reads only the rows on stdin and lanes_rows' --prefix keeps every lane whose NAME carries the prefix, so an empty filtered listing IS "no lane named <repo>-<n>" and 1 is the only answer that helper could give. Routing it through the read would add a failure path in front of an answer that needs none. Four assertions hold it
lane:721 8 DECLINED: the outside-tmux attach execs, which is the contract — the launcher execs this word and an attach must replace the process, not leave a shell under the client for the session's life. What remains after round 6 is a window vanishing between this command's own refusal and the exec microseconds later, where tmux refuses the qualified target in its own words
lane:944 8 DECLINED, measured: the population does not exist. lanes) and its --lane) arm landed in ONE commit (63a74af), so every helper with the lanes subcommand takes --lane; one without it returns the contract's 2, which is the intended "take the install" refusal

origin/main is merged in twice, at b5244e2 (#44, the installer — the file
this branch also rewrites; no conflict, and the retirement stays the last act of
a run that has already placed everything) and at a954435 (#50's commit_push
and its 207-line suite section, plus #53's /restart skill fence; no conflict
either). #53 has already taken two of the six sites #58 was filed for.

Copilot round 9 — one taken, two declined

Round 9 read 619c484, the merged head whose four CI jobs are green, and opened
three threads (its first in six rounds). All three are answered and resolved.

finding what happened
openRepoTools:281 — TAKEN the retirement printed rm <path> bare, and OPENREPOTOOLS_BIN_DIR is a path a person chooses: with a space in it that line removes nothing. It is printed the way both planners in that same file already print theirs — rm -f -- "<path>", quotes in, -f because what a removal needs is the DIRECTORY's write bit
lanes-edit.sh:4870 — DECLINED a PAUSED row of ANOTHER workstation is AVAILABLE here deliberately: that is the handoff. This pull request's own refusal says it to the person reading it — "the exit is a person on <workstation> parking it — /lane-swap in that session — after which it is PARKED and lane <lane> takes it here". Routing a parked row to elsewhere would refuse the one case Addendum 2 retired restart for. The fences in front of it stand: an unread liveness read refuses EVERY state, the recorded directory must exist here by name, and a lane LIVE anywhere this host can see is live
lane:1032 — DECLINED the finding reads the loop's line as lane-groups' output; it is this function's own list, built as <repo> TAB <seq> TAB <row> — the two sort keys — so two strips is exactly right. The suite asserts the rendered columns AND what each numbered answer dispatched, and would go red on the shift described

Copilot round 10 — one case taken, the rest already answered

Round 10 read e8aa021: three suppressed comments, no threads, and two of the
three are round 9's lanes-edit.sh:4870 again — a PAUSED row of another
workstation grouped available, which is clause (c)'s handoff and is declined
on the thread. The third is the useful half of that same reading: there was no
case for it
, so a reordering of those four awk lines would have turned the
decline into a defect with nothing on screen. There is one now, fed straight to
the helper rather than seeded (a seventh row would renumber every pick below):

a PAUSED row of ANOTHER workstation is AVAILABLE   available
…while a BINDING of that same workstation is        elsewhere

Its lane:928 — "no named AVAILABLE launch case" — is coverage this branch
already has one section up: lane <name> on an AVAILABLE lane asserted through
to the launcher's argv AND its cwd (cwd=$HOME/projects/xFactory/xFactories/OpsxFactory,
argv=--lane opsXfactory-5 team-03l), with lane <name> <profile> beside it.
That is restart's own case, moved with the act under Addendum 2.

Copilot round 11 — two taken, and the last read in this file takes the rule

finding what happened
lane:499, lane:804 both refusals of the id-AND-session fence ended with tmux attach -t <session> — the bare session, which lands on whatever that session has since made current. That is the wrong-lane outcome the fence exists to prevent, offered inside the refusal that exists to prevent it. The window goes first now (tmux attach -t detsess:@32, either the lane or a refusal) and the bare session stays under it, said as whatever it now holds
lane:956 canon-lane's status: 0 is the row's spelling and 2 without the 15(d) words is the documented fall-through for a helper predating Amendment 15 — everything else was falling through to the TYPED spelling, which is a lane bound under a name nothing established. It refuses with 1 now. That read was the last one in this file without Amendment 7(d)'s rule; the row read, the grouping read and the position read have each had it since rounds 1 to 5

Copilot round 12 — three taken, and one of them is this description

finding what happened
lane:1215 pick=$((10#$answer)) WRAPS at the shell's integer width — 18446744073709551617 comes back as 1 — so an answer far outside 1-N reached the range check as a number that IS in it and would have bound a lane nobody picked. The LENGTH is compared before the conversion, against the digits of $n itself
lane:873 f's own next-free read collapsed the contract's 2 into a generic failed read, so a workstation that has not taken the install was told to run a subcommand that does not exist there. It names the install now, as the listing has since round 3
lane:234 lane "" left $name empty, every [ -n "$name" ] read it as "no lane was named", and a malformed named invocation silently became the LISTING — on a terminal, the numbered pick. The contract's 64 at the door now
openRepoTools:411 this description said EIGHTEEN artifacts while the code's invariant became NINETEEN when #52 merged in. Corrected above, and derived rather than restated

origin/main is merged in four times, never rebased

merged what it brought into the files this branch also rewrites conflicts
b5244e2 (#44) the installer's mode stamping, its planning-phase write refusal, wip init's staging none
a954435 (#50, #53) commit_push's conflict die and a 207-line suite section; the /restart skill's lread fence none
2faa883 (#52) Amendment 12's name guard, transcript-holders, lane-end --retire, the nineteenth artifact 3, all unions: the workspace exemption (session-start|guard|lane-groups|next-free), the unknown-subcommand list, the artifact paragraph
fcccbe0 (#47) Amendment 17's lane-handoff, the /handoff skill, /ctx and /swap, the twenty-sixth artifact, tests/run.sh 6, every one a list where restart leaves and lane stays — INSTALLABLES is twelve, SKILLS three, INSTALLED twelve, and the suite keeps BOTH sections with Amendment 17's first

The skills/lane-swap/SKILL.md conflict was taken WHOLE from main: #47 replaces
that skill with a 26-line alias naming /handoff, and the new
skills/handoff/SKILL.md already carries this branch's own act in main's
words — "The respawn line is lane <lane> and never restart <lane>
(Amendment 18 Addendum 2, in force)"
.

Not in this pull request

Closes #43

Lane: openrepotools-3 (openRepoTools-3)

🤖 Generated with Claude Code

Summary by Sourcery

Replace the external restart command with a unified lane interface for discovering, selecting, launching, and attaching to lanes while preserving safe failure behavior and installation compatibility.

New Features:

  • Add the lane command to list lanes, let users choose one to bind, launch available lanes, attach to live lanes, and report lanes bound elsewhere.
  • Support direct lane selection, repository-wide listings, non-interactive operation, and lane-start compatibility as an alias.

Bug Fixes:

  • Prevent unsafe launches or attachments when lane liveness, tmux identity, grouping, or next-position reads fail or are incomplete.
  • Preserve tmux session/window targeting across attach and move operations, including failures caused by races.
  • Ensure lane names use canonical register spelling and validate option and profile combinations consistently.

Enhancements:

  • Centralize lane grouping and next-free-position calculations in lanes-edit.sh for consistent behavior across commands.
  • Retire the external restart command while retaining the /restart session skill and migrating its outside behavior to lane <name>.
  • Make installation safely remove previously installed restart copies without deleting user-owned files or symlinks.

Build:

  • Update the shipped-command inventory and installer behavior to replace restart with lane.

CI:

  • Update shell syntax checks and repository hygiene coverage for the new command set.

Documentation:

  • Document lane as the primary interface for listing, selecting, launching, and attaching to lanes, and update references formerly describing restart.

Tests:

  • Add comprehensive coverage for lane grouping, numbered selection, attach and launch branches, failure handling, canonical names, installer retirement behavior, and tmux races.

Chores:

  • Remove the obsolete restart executable and update related command references and test fixtures.

brettheap and others added 4 commits September 14, 2026 19:31
…restart` deleted, and every surface re-pointed — committed unrun, so that what one agent left and what the next one changes are two diffs and not one

NOT A CLAIM THAT ANY OF IT PASSES. The predecessor of this session was killed
mid-work with fourteen files modified and none committed, and this commit is
those fourteen files exactly as they were found — `git status` and
`git diff --cached --stat` of the resume, to the byte, with nothing added,
nothing rerun and nothing fixed. It is committed BEFORE the suite is run
precisely so that the next commit on this branch is only what this session
changed: a WIP squashed together with its repairs is a diff nobody can read
against the ruling it answers to.

WHAT WAS FOUND, file by file:

* `lane` — 895 lines, new, 755. The word of Amendment 18 Addendum 1: the
  numbered pick, the three branches (available → the launcher in the lane's own
  recorded directory and profile; LIVE HERE → `move-window -a` + `select-window`,
  or `select-window` alone where the window is already in this session, or
  `tmux attach -t <session>` outside tmux, or `switch-client` under `--switch`;
  bound elsewhere → the refusal naming where), `lane <name> [<profile>]`,
  `--all`, `--dir`, `--dry-run`, and the no-terminal form that lists, suggests
  and asks nothing.
* `restart` — DELETED, 545 lines. Amendment 18 Addendum 2, in force since
  2026-09-14T16:50:32Z.
* `lanes-edit.sh` — `lane_groups` and `lane_next_free` added after `lanes_rows`,
  both reading their rows from STDIN; their two subcommands `lane-groups` and
  `next-free` added, exempted from the workspace fence beside `session-start`,
  and named in the unknown-subcommand refusal; column 10 now spells
  `lane <lane>`.
* `lanes` — its own next-free loop removed in favour of the helper's read, the
  `restart` hints re-pointed, `bind it:` in place of `restart:`, and a footer
  that says so where the helper predates the read.
* `lane-start` — the bare form `exec`s `lane` (clause (i-4)).
* `openRepoTools` — `INSTALLABLES` swaps `restart` for `lane`; ELEVEN STILL,
  because one word left as another arrived.
* `.github/workflows/tests.yml` — the macOS bash-3.2 parse list follows.
* `README.md`, `docs/README-lanes.md`, `skills/lane-swap/SKILL.md`,
  `skills/restart/SKILL.md` — the prose, including the manual's new
  "One word: `lane`" section and "Bind and list (Amendment 11, amended by
  Amendment 18)".
* `tests/test_lane_helpers.sh` — +551/-177: decision 7's section re-pointed at
  `lane <name>`, and a new section "Amendment 18 Addendum 1: the word `lane`,
  the numbered pick, the three branches" with six seeded lanes covering the
  five states, a fake tmux of its own, and a pty harness that answers the one
  question for real.
* `tests/test_openrepotools_command.py`, `tests/test_repo_hygiene.py` — the
  installed list, `SHIPPED_BASH`, `FORK_SURFACES`, the usage/parser
  parametrization and the lane-name fence test, all moved to `lane`.

The base is `main` at 92eab6c. Amendment 15 (`canon_lane`) is PR #41 and is not
on `main` yet; this branch is merged with it when it lands, and the deletion of
`restart` wins over its edits to that file.

Lane: openrepotools-3 (openRepoTools-3)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…KTICKS bash ran — `lanes` was executed mid-suite and spliced its own footer into the line a person reads

FOUND BY THE HYGIENE TEST THAT EXISTS FOR IT, and then seen in the suite's own
output. `test_the_suite_descriptions_run_no_command_of_their_own` walks every
`is`, `has`, `hasnt` and `skip` description in `tests/test_lane_helpers.sh` and
refuses an unescaped backtick, because bash reads one as a command
substitution: it was written after the `tests-macos` log of `29d3417` caught
two such lines dying on `kill <pid>` and a third silently RUNNING `forks`.

THE LINE WAS `tests/test_lane_helpers.sh:5662`, in the section Amendment 18
Addendum 1 adds, and it ran `lanes` FOR REAL in the middle of the run. What the
operator saw in this session's own measurement was the description with the
command's output in the middle of it:

    ok   …while no lane of openRepoTools is recorded.

      next free position:  1
      take it:             lane-start openRepoTools 1
      every lane:          lanes --all still carries the closed lane, because that is the READ

— five words of the description survived. The assertion itself passed and could
not have failed: a description is not compared to anything, which is exactly
why the three that came before it sat in the file unnoticed.

    python3 -m pytest tests/test_repo_hygiene.py tests/test_openrepotools_command.py -q
    before: 1 failed, 168 passed
    after:  1 passed (the named test), 123 deselected

Committed as WIP at a coordinator's swap notice, with the shell suite mid-run;
the run that proves the whole section is the next commit's evidence.

Lane: openrepotools-3 (openRepoTools-3)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…re refusal too, which is the surface that needs it most — a person's OWN lane refused by naming a machine they are sitting at, with nothing on screen to say why

THE NOTICE EXISTED AND ONE OF ITS TWO SURFACES HAD IT. With no
`$LANES_WORKSTATION` inside a container the workstation is the CONTAINER'S id,
so NO row is this workstation's — and the partition then puts every binding of
this host under BOUND ELSEWHERE. `lane`'s listing has printed
`lanes_workstation_why` beneath its rows since it was written, for exactly that
reader; `lane <name>` reaches the SAME refusal without passing through the
listing, and printed nothing. What a person met was

    lane openRepoTools-3 is bound on Eagle, window …, as of 2h ago,
    and this workstation cannot see another machine's tmux …

on Eagle. Measured in this repository on 2026-09-14, in a container with the
seam unset, which is the measurement the notice's own comment already carries.

`go_elsewhere` now asks for it, on stderr because the refusal under it is, and
`ws_notice` is SAID ONCE PER RUN rather than once per surface: the pick reaches
both — the listing prints it under the rows, then the branch the picked row
takes would print it again — and a person who picked a number out of a listing
that had already explained itself does not need the paragraph twice.

THE SENTENCE IS STILL ASKED FOR AND NEVER RESTATED: `lanes_workstation_why` is
the one wording the writers share and this adds no copy of it.

Tests, in the Amendment 18 Addendum 1 section: `lane repoPick-7` — a binding of
THIS host, which is the row an unset seam turns into somebody else's — refuses
with 2, names the workstation its row carries, carries the sentence, names the
launcher whose job the value is, never names the `workstation:` key R-A11-14
rejected, and says it ONCE; and an ordinary elsewhere refusal with the seam
answering carries no notice at all, so the notice means what it says.

Shell suite before this commit, on the two commits below it: 1595 passed,
0 failed, 0 skipped, 0 pending. This commit is WIP at a coordinator's notice
with the re-run still to make; it is made now so the `origin/main` merge that
brings Amendment 15 in lands on a clean tree.

Lane: openrepotools-3 (openRepoTools-3)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…ts conflict, and `canon-lane` comes into `lane <name>` with the act it was written for

FOUR CONFLICTS, EACH ONE A PLACE THE TWO AMENDMENTS TOUCH THE SAME LINE.

1. `restart` — modify/delete. **THE DELETION WINS** (Amendment 18 Addendum 2,
   in force 2026-09-14T16:50:32Z verbatim "ratify"). #41 had added a 38-line
   Amendment 15 block to that file; the block is not lost, it is PORTED into
   `lane` below, because Addendum 2 moves the act and not only the word.
2. `lanes-edit.sh` — the unknown-subcommand refusal. **UNION**: `lane-groups`
   and `next-free` (Addendum 1) and `canon-lane` (Amendment 15) are three new
   reads and all three are named.
3. `docs/README-lanes.md` — the reads table. Amendment 15's sentence about
   `window-lane` answering in the register row's own spelling is KEPT, with the
   word it names changed from `restart <lane>` to `lane <name>`.
4. `tests/test_lane_helpers.sh` — both branches added a section immediately
   before `== the workstation seam ==`. **UNION, Amendment 15 first**: that
   section keeps the position it landed on `main` in and therefore the state it
   was verified against, and Addendum 1's follows it, still the last section
   before the seam.

`canon-lane` IS NOW `lane <name>`'s RESOLVER, which is the whole of #41's
`restart` block moved with the act: one resolver shared by every command that
takes a `<lane>`, because four implementations of *which row is this name's* is
how the four come to disagree about it. Its `2` is two answers and they are told
apart by the refusal's own words — a helper predating Amendment 15 spends 2 on
an unknown subcommand and says nothing about any amendment, and is a silent
fall-through; `canon-lane`'s OWN 2 is the register spelling one lane two ways,
which no read below can resolve and which only a person's 15(d) merge settles,
so it is RELAYED and never reported as a read that failed. The estate-wide read
under it stops being the resolver and becomes what it always was underneath: the
fallback for a workstation that has not taken the install.

FOUR OF #41's CASES MOVE TO THE WORD THAT PERFORMS THE ACT, behaviour unchanged:
`lanes --lane repowin-1`'s column 10 is now `lane repoWin-1`; `window-lane`'s
comment names the word its three callers hand the spelling to; `repocase-1` is
resolved by `lane <name>` rather than by `restart`; and the 15(d) pair is
relayed by `lane <name>` with both spellings and the merge named.

Three more lines of #41's prose named a command that is no longer on anyone's
PATH and now name `lane`: the manual's relay sentence (`docs/README-lanes.md`)
and two comments in `lanes-edit.sh` describing what column 10 offers a reader.

Baselines measured for this merge, each a full run of `tests/test_lane_helpers.sh`
out of a clean extract of that commit:
  main 92eab6c (this branch's base)  1500 passed, 0 failed, 0 skipped, 0 pending
  this branch before the merge       1595 passed, 0 failed, 0 skipped, 0 pending
The merged run is the next commit's evidence; this one is the resolution.

Lane: openrepotools-3 (openRepoTools-3)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI lite review requested due to automatic review settings September 14, 2026 19:51

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 3 days and 6 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR introduces lane as the unified PATH command for listing and binding lanes, sharing centralized row partitioning and next-position logic with lanes; it attaches live lanes safely, launches available lanes from recorded metadata, retires restart, updates installation and aliases, and adds extensive compatibility, integration, tmux, PTY, documentation, and hygiene coverage.

Sequence diagram for binding an available or live lane

sequenceDiagram
    actor User
    participant Lane as lane
    participant Read as lanes-edit.sh
    participant Tmux as tmux
    participant Launcher as pclaude launcher

    User->>Lane: lane or lane <name>
    Lane->>Read: lanes
    Read-->>Lane: lane rows
    Lane->>Read: lane-groups
    Read-->>Lane: available, live, elsewhere
    alt available
        Lane->>Launcher: exec pclaude --lane <lane> <profile>
        Launcher-->>Lane: start lane in recorded directory
    else LIVE HERE
        Lane->>Tmux: move-window or select-window
        Tmux-->>User: attach existing lane window
    else outside tmux
        Lane->>Tmux: attach -t <session>
        Tmux-->>User: attach existing lane session
    else bound elsewhere
        Lane-->>User: refuse with workstation, window, and age
    end
Loading

Flow diagram for the lane selection and binding command

flowchart TD
    A[lane] --> B[Read lane rows]
    B --> C[lanes-edit.sh lane-groups]
    C --> D{Lane state}
    D -->|available| E[cd recorded dir]
    E --> F[exec pclaude --lane lane profile]
    D -->|LIVE HERE| G[Attach or select existing tmux window]
    D -->|bound elsewhere| H[Refuse and name workstation, window, and age]
    B --> I[Numbered listing]
    I --> J{Picker input}
    J -->|number or name| D
    J -->|f| K[lanes-edit.sh next-free]
    K --> L[lane-start at next position]
Loading

File-Level Changes

Change Details Files
Replace the PATH-facing restart command with a unified lane command that lists lanes, lets users select one, and binds it according to its recorded state.
  • Add a 953-line Bash implementation with numbered interactive selection, name-based dispatch, --all, profile overrides, canonical lane-name resolution, dry-run handling, and non-interactive listing.
  • Launch available lanes through the launcher using recorded directory/profile data.
  • Attach to LIVE HERE lanes through tmux without starting a second process; refuse lanes bound elsewhere with workstation/window/age context.
  • Hide closed or dormant lanes from the picker while retaining them in the underlying lanes read.
lane
restart
lane-start
lanes
openRepoTools
lanes-edit.sh
Centralize picker grouping and next-free-position calculation in lanes-edit.sh so lane and lanes share the same row-derived behavior.
  • Add stdin-based lane-groups and next-free subcommands with fail-closed handling for missing or failed helper reads.
  • Use canonical register spelling for all name-based lane operations and preserve ambiguity/refusal semantics.
  • Change column 10 of lane rows from restart <lane> to lane <name>.
lanes-edit.sh
lanes
Update the launcher, compatibility alias, installation manifest, and validation coverage for the command retirement and new lane workflow.
  • Make bare lane-start exec lane and update installation to ship lane instead of restart while preserving the eleven-file count.
  • Retarget Bash syntax checks, parser/usage checks, lane-name fencing, fork-surface checks, and document assertions.
  • Expand the shell suite with helper partition tests, PTY-backed picker tests, fake-tmux attach tests, fail-closed read tests, case normalization, profile/directory launch tests, and elsewhere/live-state branches.
lane-start
openRepoTools
.github/workflows/tests.yml
tests/test_lane_helpers.sh
tests/test_openrepotools_command.py
tests/test_repo_hygiene.py
Revise user-facing documentation and internal skill references to describe lane as the outside binding interface while retaining /restart for in-session use.
  • Document numbered selection, available/live/elsewhere behavior, --all, non-terminal behavior, tmux identity safeguards, and the absence of handoff implementation.
  • Replace PATH-facing restart examples and references with lane <name> while preserving /restart semantics.
README.md
docs/README-lanes.md
skills/lane-swap/SKILL.md
skills/restart/SKILL.md

Assessment against linked issues

Issue Objective Addressed Explanation
#43 Provide a PATH-installed lane command that lists eligible lanes in numbered groups, supports repository scoping and --all, hides closed or dormant lanes, avoids prompting when stdin is not a terminal, and lets users select a lane or create the next free lane. ✅
#43 Implement the lane-selection branches: launch available lanes using their recorded directory and profile, attach to LIVE-HERE lanes without starting a second process, and refuse bound-elsewhere lanes while identifying their binding; also support direct lane <name> selection and the bare lane-start alias. ✅
#43 Install, test, and document the new lane workflow, including installer artifact lists, numbered-picker and tmux behavior, the alias, and related README documentation. ✅

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved critical and moderate findings affect attachment safety, liveness handling, option forwarding, and installation upgrades.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR replaces the PATH-level restart command with a unified lane picker for launching and attaching to lanes.

Changes:

  • Adds lane selection, direct binding, tmux attachment, and canonical-name handling.
  • Centralizes grouping and next-free calculations.
  • Updates installation, tests, CI, and documentation while retiring restart.
File summaries
File Summary
tests/test_repo_hygiene.py Updates shipped-command and hygiene checks.
tests/test_openrepotools_command.py Updates installer inventory checks.
tests/test_lane_helpers.sh Adds picker, launch, attachment, and failure-path coverage.
skills/restart/SKILL.md Clarifies /restart remains the inside-session mechanism.
skills/lane-swap/SKILL.md Updates outside-session command guidance.
restart Deleted obsolete PATH command.
README.md Documents the lane workflow and retired restart.
openRepoTools Installs lane instead of restart.
Line 234 — moderate (2 votes): Existing installed restart files are not removed during upgrades; add a guarded migration and regression test.
lanes-edit.sh Adds shared grouping, next-free, and canonical-name helpers.
lanes Uses centralized next-free calculation.
Line 432 — nit (1 vote): Preserve next-free failure statuses and only show the upgrade hint for an unknown subcommand.
lane-start Delegates bare invocation to lane.
Line 657 — moderate (1 vote): Forward lane-compatible flags or explicitly reject unsupported ones instead of dropping them.
Line 657 — moderate (1 vote): Resolve the sibling lane before falling back to PATH.
lane Provides the picker, launcher, and tmux attachment workflow.
Line 710 — moderate (1 vote): Preserve --dir through the f path.
Line 610 — critical (3 votes): Refuse when select-window fails instead of attaching to the current window.
Line 700 — moderate (1 vote): Resolve sibling lane-start before PATH lookup.
Line 777 — critical (1 vote): Propagate liveness-read failures and block launching when liveness is unknown.
docs/README-lanes.md Documents lane binding and retired PATH restart.
.github/workflows/tests.yml Updates Bash syntax-check coverage.
Review details

Suppressed comments (5)

lane:710

  • The f path accepts --dir in the public parser, but this exec passes only the repository and position to lane-start. Thus lane --dir /path followed by f silently drops the override and can start in a different/default checkout; include the override in both the dry-run command and the real exec.
	exec "$gn_start" "$gn_repo" "$gn_next"

lane:701

  • The picker has the same PATH-ordering collision in its f branch: it chooses lane-start from PATH before $selfdir/lane-start. When lane is run from a checkout or alongside multiple installs, f can invoke a different version of the command than the one that supplied the rows and next-free calculation. Resolve the sibling first, then use PATH only as the fallback.
	gn_start="$(command -v lane-start 2>/dev/null || printf '')"
	if [ -z "$gn_start" ] && [ -x "$selfdir/lane-start" ]; then gn_start="$selfdir/lane-start"; fi

lane-start:661

  • The option parser consumes flags before this zero-positional branch, but the alias drops them from the exec. For example, lane-start --dry-run or --no-launch becomes a normal interactive lane, so a flag promising not to launch is silently ignored. Forward lane-compatible options and explicitly reject the remaining lane-start-only options instead of discarding them.
    lane_word="$(command -v lane 2>/dev/null || :)"
    [ -n "$lane_word" ] || { [ -x "$SCRIPT_DIR/lane" ] && lane_word="$SCRIPT_DIR/lane"; }
    if [ -n "$lane_word" ]; then
      note "no <repo> and no position: this is \`lane\`, which lists the lanes and binds the one you pick (Amendment 18 Addendum 1 clause (i-4))"
      exec "$lane_word"

lane-start:658

  • The alias resolves lane from PATH before checking the sibling next to this lane-start. If another executable named lane precedes this checkout/install directory, bare lane-start will exec that unrelated command instead of the implementation whose listing and picker it is supposed to alias. Resolve $SCRIPT_DIR/lane first, then fall back to PATH.
    lane_word="$(command -v lane 2>/dev/null || :)"
    [ -n "$lane_word" ] || { [ -x "$SCRIPT_DIR/lane" ] && lane_word="$SCRIPT_DIR/lane"; }

lanes:432

  • || : collapses every next-free status into an empty value, but the footer below then treats all such cases as an old helper missing the subcommand. A real helper failure (for example exit 1 or 64) is therefore misreported as an upgrade issue instead of a failed read; preserve the status and reserve the install hint for the unknown-subcommand case.
	next="$(printf '%s\n' "$out" | "$LANES_EDIT" next-free "$here_repo" 2>/dev/null || :)"
  • Files reviewed: 14/14 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lane Resolved
Comment thread lane Resolved
Comment thread openRepoTools Resolved
…refusal and not an attach onto another lane's window, a binding whose liveness could NOT be read is never launched, `--install` REMOVES the `restart` it once placed, and the flags the two aliases were handed are forwarded or refused rather than dropped

EIGHT FINDINGS, EIGHT TAKEN, NONE DECLINED. Copilot's first review of #45
(2026-09-14, "🟡 Changes recommended", 3 inline and 5 suppressed). Each one
below is a defect THIS pull request introduced, and each is proved by a case
that fails against the commit before it.

## The two it called critical

**`lane:610` — the select was part of the fence and was written as a
courtesy.** All four attach paths put the terminal on the lane's OWN window,
and three of them do something after it. The outside-tmux path spelled that
select `|| :` and then `exec tmux attach`: a window that closed in the half
second between the id-AND-session check and the act left the attach landing on
whatever window that session had current — ANOTHER LANE — which is precisely
what the fence above it exists to stop. One `select_window_or_refuse` now
carries all four sites, naming what had already been done (a client switched, a
window moved) so the refusal says where the person is.

**`lane:777` — an unread session record was being read as a proof.**
`lanes_rows` says on STDERR, and goes on answering, that this workstation's
session records could not be read, in which case its STATE column is *"the
LOG's verb alone: a lane that is live may show as IDLE or PAUSED here"*
(`lanes-edit.sh:4628`). This command relayed that sentence and then grouped the
row AVAILABLE and launched it — a second process on a lane that may still be
running, which is the collision clause (h) is about and the fall-through
Amendment 7(d) forbids. `read_rows` now catches the sentence out of the stderr
it is already reading, and `go_available` refuses on it — for a BINDING alone:
a PAUSED lane is parked by its own last line, needs no liveness proof, and
launches exactly as it did.

## The moderate ones

**`openRepoTools:234` — a word that left the list had not left the directory.**
Dropping `restart` from `INSTALLABLES` stops THIS run from copying it and does
nothing about the copy the last run placed, so every workstation that took the
install before Amendment 18 Addendum 2 would have kept `restart` on its PATH
for ever — against the addendum's own words, *"`restart` is no longer a command
a person is given"*. `--install` now RETIRES it, and removes only what it
wrote: the test is the header this installer puts in every command it owns, so
a person's own script of that name is NAMED, left exactly where it is, and the
`rm` that removes it is printed for them to run.

**`lane:710` — the `f` answer dropped `--dir`.** The flag is in this word's own
parser and `lane-start` takes the same one, so `lane --dir <path>` followed by
`f` opened the new lane in a checkout nobody had named — Evidence 3's silent
loss, at the one moment a lane is created.

**`lane:701` and `lane-start:658` — PATH before the sibling, against this
family's own rule.** `lane` states it fifty lines above its own `$LANES_EDIT`
lookup: *"beside this command first … then on PATH. One resolution, so a
workstation with two copies never reads one and writes the other."* Both new
lookups had it the other way round. `lane-start`'s older `lanes` lookup took
the same correction in the same commit, so the file carries ONE order rather
than two.

**`lane-start:661` — the alias dropped every flag it had been handed.** The
parser takes `--dry-run`, `--no-launch`, `--confirm`, `--yes`, `--dir` and
`--estate` before the zero-positional branch is reached, and the `exec` carried
none of them: `lane-start --no-launch`, a flag whose whole promise is that
nothing starts, became an interactive pick that launches. `--dry-run` and
`--dir` mean the same thing in `lane` and go with it; the rest are REFUSED BY
NAME, with the form that does take them filled in. A flag silently dropped is a
promise that was not kept.

**`lanes:432` — `|| :` collapsed every status of the `next-free` read.** The
footer then told a person to take the install for a read that had FAILED. `2`
is the un-upgraded workstation and still says so; anything else names the code
it got and offers no position (Amendment 7(d)) — and a `0` that comes back with
nothing a position can be made of is in that second class.

## And one this repository's own hygiene caught on top

`grep -q "<pattern>" -- <file>` puts the `--` AFTER an operand, which BSD's
`getopt` reads as a filename; `test_no_shipped_bash_ends_its_options_after_an_operand`
named it in `lane` before any of it ran on macOS. Both new greps take `-e`,
like the line above them that always had.

## Evidence

    python3 -m pytest tests/test_openrepotools_command.py \
                      tests/test_repo_hygiene.py \
                      tests/test_install_skill_and_hook.py -q
      before this commit  197 passed
      after               199 passed   (the two the retirement adds)

Shell suite on the commit BELOW this one, which is this branch merged with
`origin/main` and before any of the above:
  1781 passed, 0 failed, 0 skipped, 0 pending
and for comparison, each a full run out of a clean extract of that commit:
  main 92eab6c (this branch's base)   1500 passed
  main 8345d2f (after #41)            1678 passed
  this branch before the merge        1595 passed
The run that covers this commit is `python3 -m pytest tests -q`, in flight as
this is written; it is committed now at a coordinator's swap notice and the
footer goes in the pull request.

New cases, all in `tests/test_lane_helpers.sh`'s Amendment 18 Addendum 1
section unless said otherwise: a `select-window` that fails on the outside-tmux
path and on the move path (the section's fake tmux grows one knob, and the move
is still in its log because it happened); a binding refused where the liveness
read did not answer, with a PAUSED lane beside it still launching; `f` carrying
its `--dir`, resolved; bare `lane-start` refusing `--no-launch`, naming every
dropped flag rather than the first, and forwarding `--dry-run` through to the
act `lane` then prints instead of performing; `lanes` listing where the
`next-free` read FAILED without calling it an un-upgraded workstation. In
`tests/test_openrepotools_command.py`: `--install` removing a pre-seeded
`restart` that carries this installer's header, and leaving one that does not
while printing the `rm`.

Lane: openrepotools-3 (openRepoTools-3)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings September 14, 2026 20:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved critical and moderate findings remain in lane, lanes, and openRepoTools.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (4)

lane:666

  • Outside tmux this path selects the window with an unqualified @id before attaching. select-window has no current client in this mode, so the real tmux command can fail instead of selecting the recorded window and the subsequent attach is never reached; the dry-run output advertises the same invalid sequence. Use a session-qualified target (for example <session>:<@id>) for this branch and make the fake-tmux test require that qualification.
		select_window_or_refuse "$W_ID" ""
		exec tmux attach -t "$W_SESS"

lane:706

  • After this move succeeds, W_SESS still names the source session. If the following select races with a window change, select_window_or_refuse reports the source as the destination and suggests tmux attach -t to it, even though the window now belongs to gl_this and the source may have closed. Update the tracked session to gl_this after the move or pass the destination explicitly to the refusal helper.
	tmux move-window -a -s "$W_SESS:$gl_idx"
	select_window_or_refuse "$W_ID" "its window was moved into this session"

lane:589

  • When the record has neither a directory nor a profile, lane <name> <profile> reaches this refusal with the supplied profile still in $profile, but the printed one-run command drops it. Following that command immediately re-enters the earlier “no profile” refusal; preserve the supplied profile in this recovery command (or print the full original invocation).
      $prog --dir <the lane's checkout> $R_LANE" 2

openRepoTools:262

  • This ownership check follows symlinks: -f "$target" is true for a symlink to a regular file, so a user-owned restart link whose target contains the installer marker will be unlinked even though this installer did not create the link. plan_install_targets explicitly rejects -L targets for the same safety reason; restrict retirement to regular, non-symlink files (or leave the link for the user to remove).
		if [ -f "$target" ] && grep -qF -e 'Installed on PATH by `openRepoTools --install`' -- "$target" 2>/dev/null; then
  • Files reviewed: 14/14 changed files
  • Comments generated: 3
  • Review effort level: Lite

Comment thread lane Resolved
Comment thread lane Resolved
Comment thread lanes Resolved
… would refuse, the footer named an exit code the read had not given, and the manual still said `--install` only STOPS placing `restart`

THE ROUND THAT FIXED EIGHT THINGS INTRODUCED THREE OF ITS OWN, and every one of
them is the same class of defect this repository already holds itself to: a
refusal is a line a person TYPES, and a line they cannot type is a refusal that
sent them nowhere.

**`lane:553` — `lanes-edit.sh live-holder --lane <lane>` is not a command.**
The liveness refusal added in the commit below this one printed it. `--lane` is
`who`'s spelling (`lanes-edit.sh:who`, whose option loop takes it); `live-holder`
takes a BARE lane — `lane="${1-}"; [ -n "$lane" ] || die "usage: live-holder
<lane>"` — so what was printed would have been read as a lane named `--lane`
and refused by `check_lane_name` for its leading dash. The neighbouring line in
`go_elsewhere` is `lanes-edit.sh who --lane $R_LANE` and IS right, which is how
the wrong one got written.

**`lanes:479` — the reproduction piped the WRONG rows in.** `next-free` reads
`lanes-edit.sh lanes`'s tab-separated rows on stdin, not this command's
rendering of them, so `lanes --prefix <repo> | lanes-edit.sh next-free <repo>`
would have handed the helper a listing it cannot parse and produced a second
confusing answer on top of the first. It is the helper's own listing now:
`lanes-edit.sh lanes --prefix <repo> | lanes-edit.sh next-free <repo>`.

**`lanes:434` — the footer claimed an exit code the read had not given.** The
new branch turned a `0` that came back with nothing a position could be made of
into `next_rc=1` and then printed "exited 1" about a read that had exited 0.
The reassignment is gone and the sentence says what actually happened —
`exited <code> and gave no position` — with the 0-with-nothing case named in
the same words rather than disguised as a failure.

**And the manual now says what `--install` DOES.** `docs/README-lanes.md`'s
Addendum 2 paragraph still read "no longer places `restart`", which was the
whole truth before the round and is the smaller half of it after: the installer
REMOVES the copy an earlier install placed, printing `restart: RETIRED` beside
the file it took away, and removes ONLY what it wrote — a file of that name
carrying this installer's own header goes, one that does not is NAMED, left
exactly as it is, and the `rm` printed for the person to run.

Measured by hand on this branch, both branches of it, `--install` run out of
the checkout into a temporary HOME:

    restart: RETIRED, removed from …/.local/bin/restart (lane-collision-protocol
      Amendment 18 Addendum 2; `lane <name>` is that act now)
    $ ls …/.local/bin/restart → No such file or directory

    restart: RETIRED by lane-collision-protocol Amendment 18 Addendum 2, and
      …/instest2/restart is NOT this installer's copy — left exactly as it is.
      Remove it yourself if it is stale:  rm …/instest2/restart
    $ cat …/instest2/restart → the stranger's script, byte for byte

and in both runs the `/restart` SKILL is placed exactly as before, at both of
its two paths — Addendum 2 clause (i-7): what left the PATH is the OUTSIDE half,
and `/restart` was always the inside one.

No assertion changes and none is weakened: the two texts are named by their
distinctive words (`live-holder`, `exited`) and both still carry them. No cap
moves — `README.md` 409 (cap 409), `AGENTS.md` 224 (cap 224), both untouched;
`docs/README-lanes.md` has no cap and takes five lines.

Lane: openrepotools-3 (openRepoTools-3)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings September 14, 2026 20:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Five unresolved findings remain, including lane failure handling and installer ownership safety.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (4)

Previously missed (1) — in code that hasn't changed since the last review.

lane:960

  • The || : here discards every next-free status and the picker then silently omits the f option/footer. If the helper is missing or fails, the contract requires saying that the position could not be read (as lanes does) rather than giving the user an unexplained listing with no new-lane action; capture the status and render the corresponding unavailable/failure message.

lane:322

  • If mktemp fails, this fallback lets the helper's stderr go straight to the terminal and leaves LIVENESS_UNREAD=0. If the helper reported that session records could not be read, go_available will therefore still launch the lane and can start a second process; this path must refuse (or otherwise preserve the warning) instead of proceeding without the liveness proof.
		# NO TEMPORARY FILE, SO THE HELPER'S NOTES WENT STRAIGHT TO THE TERMINAL
		# and this command cannot read them back — the same degradation `lanes`
		# already names for its fetch line. The liveness sentence is then the
		# person's to act on rather than this command's, and it is above them.
		ROWS_OUT="$(LANES_NO_FETCH=1 "$LANES_EDIT" lanes "$@")" || rr_rc=$?

lane:751

  • The f path performs the same read again but also discards its status. If that read fails after producing numeric output, the numeric text passes the validation below and is handed to lane-start, so a failed read can allocate an unsafe position. Capture next-free's exit code and reject every nonzero result before using gn_next.
	gn_next="$(printf '%s\n' "$ROWS_OUT" | "$LANES_EDIT" next-free "$gn_repo" 2>/dev/null || :)"

tests/test_repo_hygiene.py:34

  • The introductory inventory still says SHIPPED_BASH contains only the installer, two estate verbs, and status (and calls that set “four”), while this hunk adds lane and lanes and the list now has six commands. Please update that preceding description as well; otherwise the hygiene test's own documentation contradicts the inventory it explains.
#: `lane` and `lanes` join under lane-collision-protocol Amendment 18 Addendum 1
#: and Amendment 11's ratified decision 6: each is one word a person has on
#: PATH, placed by `--install`, so each is held to the same shebang, the same
#: executable bit, the same LF index, the same bash-3.2 parse AND the same
#: `set -euo pipefail`. (`restart` was the third until Addendum 2 retired it —
#: `lane <name>` is that act, and one word a person is given rather than two.)
  • Files reviewed: 14/14 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread openRepoTools Resolved
… follows a SYMLINK a person made, the select's target names its session, a moved window's refusal names where it IS and not where it came from, and macOS's `/var` is why `tests-macos` was the only red

FOUR FINDINGS ON MY OWN FIX ROUND, AND ONE ON THE PREDECESSOR'S, and the first
of them could have deleted something somebody owns.

## Copilot round 2 (on `eb10256`), four findings, four taken

**`openRepoTools:262` — `-f` FOLLOWS THE LINK.** The retirement's ownership
test was `[ -f "$target" ] && grep -qF …`: a person's own `restart` SYMLINK
pointing at a file that happens to carry this installer's header would have
been UNLINKED by it. `plan_install_targets` refuses a `-L` target for exactly
that reason — `unplaceable_kind` names the link rather than writing through it
— and the retirement now holds to the same rule. `[ ! -L "$target" ]` first, so
a link is NAMED, left, and the `rm` printed; both it and what it points at are
still there afterwards, which is the new case.

**`lane:666` — the select's target was an `@id` alone.** tmux resolves a bare
`@id` by picking the "best" session holding that window, and PICKING is the one
thing this command's id-AND-session fence exists to stop. Every select is
`<session>:<@id>` now — in the acts and in the `--dry-run` lines that print
them — so the act is the one the record described or it is nothing.

**`lane:706` — after the move, the refusal named the SOURCE.** `move-window -a
-s <src>:<idx>` puts the window in THIS session and a detached source with no
windows left closes itself; the refusal under it still said "in session <src>"
and offered `tmux attach -t <src>`, which is a session that may be gone.
`select_window_or_refuse` takes the session it means, and after a move that is
`$gl_this`.

**`lane:589` — the no-directory recovery dropped the profile that was typed.**
`lane <name> <profile>` on a lane whose record has a profile but no directory
passes the profile check and lands on the directory refusal, whose one-run exit
was `lane --dir <path> <name>` — following which walks straight back into the
NO-PROFILE refusal. It carries `${profile:+ $profile}` now.

## And the one CI found that no review did

`tests-macos` on `fce18d5` was the only red job: **1764 passed, 2 failed**, both
in the predecessor's `--dir` case —

    FAIL …launching it under the profile that was typed, with the directory named
    FAIL …from that directory

macOS's `$TMPDIR` is under `/var`, a symlink to `/private/var`. `lane` resolves
`--dir` ONCE, where the operator typed it, because it `cd`s and then hands the
same string to a launcher that would resolve it a second time from somewhere
else — so the launcher sees `/private/var/...` while the case asserted the
sandbox's own `/var/...`. Asserting the unresolved spelling is asserting that
the resolution did NOT happen, which is the one thing that flag must do. The
suite already had `$A11_DIR_R` for the relative-`--dir` case fifty lines down;
it is computed ONCE now, beside `$A11_DIR` itself and AFTER the `mkdir` that
creates it — a `cd` into a directory that does not exist yet falls back to the
unresolved spelling and is the same defect written twice.

The other three CI jobs on that commit were green: `tests`, `tests-no-submodule`
and `tests-windows`.

## Evidence

    python3 -m pytest tests -q   on the round-1 tree: 573 passed in 1406s
    (the shell suite inside it: 1781 passed, 0 failed, 0 skipped, 0 pending)

and for the record, each a full run out of a clean extract of that commit:

    main 92eab6c (this branch's base)   1500 passed
    main 8345d2f (after #41)            1678 passed
    this branch before the merge        1595 passed

New cases: the select assertions take the session-qualified target; the move's
refusal is asserted to name the session the window is in NOW and never to send
a person back to the source; and `--install` is run against a SYMLINK of a
retired name, which must survive with what it points at. The run covering this
commit is `python3 -m pytest tests -q`, in flight as this is written.

A NOTE ON HOW THESE RUNS WERE SEQUENCED. The concurrency guard this work was
briefed with — `while pgrep -af 'python3 -m pytest' | grep -v pgrep >/dev/null`
— is a NO-OP in this harness: `grep` is a shell function from the session's zsh
snapshot and returns 1 with stdout on `/dev/null` even when it matched, so the
loop never waits. Measured: the same pipeline captured into a variable gives
rc=0 and five matching lines. Four agents were running `pytest` at once past
that guard. The form that works splits the pattern so it cannot match the
guard's own command line:
    pat='python3 -m pyt'"est"; while [ "$(pgrep -f "$pat" | wc -l)" -gt 0 ]; do sleep 20; done

Lane: openrepotools-3 (openRepoTools-3)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings September 14, 2026 20:35
…of had two, the `f` answer no longer vanishes from the question without a word, and a position printed by a read that then FAILED is not a position

FOUR FINDINGS, FOUR TAKEN, and three of them are the SAME defect the round
before fixed one file over: a read whose status was thrown away with `|| :` and
whose emptiness was then read as an answer. Amendment 7(d) is the rule and it
is one rule; taking it in `lanes` and leaving it in `lane` was taking half.

**`lane:960` — the `f` answer vanished from the question with nothing on
screen.** The picker's `next-free` read spent `|| :` on every status, so on an
un-upgraded workstation — or a read that broke — the listing simply lost its
new-lane action and the question narrowed to `[1-N, q]` with no explanation at
all. It now says which: `2` is a `lanes-edit.sh` predating Addendum 1 and names
the install; anything else names the code it got and the read to run by hand.
Neither is a position of 1.

**`lane:751` — `f`'s own read discarded its status too, and that one ALLOCATES.**
A `next-free` that printed digits and then failed handed those digits straight
past the numeric fence below it and into `lane-start`, which is a NEW LANE
opened at a position this estate may well have taken. The status is read first
now and any non-zero is a refusal naming it.

**`lane:322` — THREE STATES, because "I could not read whether the proof was
made" is not "the proof was made".** With no writable `$TMPDIR` the helper's
notes go straight to the terminal and this command cannot read them back, and
`LIVENESS_UNREAD` stayed `0` — so a binding whose liveness may never have been
established was launched anyway, which is the collision clause (h) exists for
and exactly the fall-through Amendment 7(d) forbids. `0` the proof was made ·
`1` the helper SAID it could not make it · `2` this command could not read
whether it did; `go_available` refuses on `1` and `2` alike, in each one's own
words, and a PAUSED lane — parked by its own last line — still launches under
every one of them.

**`tests/test_repo_hygiene.py:34` — the inventory's own description said
"four".** `SHIPPED_BASH` has held six since this branch added `lane` beside
`lanes`, and the paragraph above it still told a reader the macOS job parses
four. A description that contradicts the list it explains is the drift these
comments exist to prevent.

New cases, all in the Amendment 18 Addendum 1 section: the pick listing where
`next-free` is MISSING and where it FAILED, each saying why `f` is not offered
and never offering a position; `f` answered on a failed read, refusing with 1
and starting nothing; and a binding refused under a `$TMPDIR` that cannot hold
a temporary file, with a PAUSED lane launching beside it. The two `next-free`
wrappers move up to the fixtures so the pick's cases and the listing's cases
read the same two fakes rather than two spellings of them.

Measured before this commit, and the run that covers it is
`flock /tmp/claude-1000/openrepotools-pytest.lock python3 -m pytest tests -q`,
in flight as this is written:

    python3 -m pytest tests -q   round-1 tree: 573 passed, 0 failed (1406 s)
      the shell suite inside it: 1781 passed, 0 failed, 0 skipped, 0 pending
    main 92eab6c   1500 passed · main 8345d2f (after #41)   1678 passed
    this branch before the merge with #41                   1595 passed

CI on `c42d962`: `tests`, `tests-no-submodule` and `tests-windows` green,
`tests-macos` still running at the time of writing — the macOS-only `--dir`
defect that made it red on `fce18d5` was fixed in `f00229d`, one commit later.

Lane: openrepotools-3 (openRepoTools-3)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved critical and moderate issues remain in liveness safety, tmux moves, portable tests, option forwarding, and restart retirement.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (6)

Previously missed (2) — in code that hasn't changed since the last review.

lane:765

  • This discards next-free's status, so the expected exit 2 from a helper predating Addendum 1 is reported as a generic failed read with exit 1. That loses the install remediation and misclassifies an un-upgraded workstation; capture the status and handle 2 separately, as the lanes footer does below.
    lane:969
  • This collapses every next-free failure to an empty string, so a bare lane silently omits the f choice and a noninteractive run omits the new-lane act without saying whether the helper is uninstalled or failed. Preserve the status and print the same fail-closed explanation as lanes instead.

lane:322

  • When mktemp cannot create the capture file, this branch leaves LIVENESS_UNREAD=0 even though it cannot inspect the helper's warning that session records were unreadable. An IDLE binding can therefore reach go_available and launch a second process on a lane that may still be live; fail closed here (for example, set LIVENESS_UNREAD=1 before the fallback read, or capture stderr another way).
		rm -f -- "$rr_err_file"

lane:595

  • When the recorded lane has no directory and its name is not <repo>-<n> (for example browser-ui-repair), this remediation appends <n> and produces lane-start --dir ... browser-ui-repair <n>, which cannot parse as the verbatim one-argument form. Suggest the full lane as one argument so following the refusal actually records the directory.
    lane:560
  • When lanes-edit.sh lanes cannot read local session records it explicitly warns that a live lane may show as PAUSED (lanes-edit.sh:4628). This exception therefore does not prove the binding is dead: this path can start a second launcher for exactly that case. Treat an unread liveness result as refusing every launch, or have the helper provide a positive parked proof, and update the PAUSED case accordingly.
	local ga_cmd ga_why
	# A BINDING IS AVAILABLE BECAUSE THIS HOST PROVED IT DEAD, and where the
	# session records could not be read that proof was never made: the row's
	# state is the LOG's verb alone, so an `IDLE` here may be a lane that is
	# LIVE. A PAUSED lane is parked by its own last line and needs no such

lane-start:690

  • The --estate value is consumed by this parser but omitted from the alias refusal. For lane-start --estate x --yes, the suggested command becomes lane-start <repo> <n> --estate --yes, which immediately errors for a missing name; include the parsed value in ls_drop.
      [ -z "$estate" ]     || ls_drop="$ls_drop --estate"
  • Files reviewed: 14/14 changed files
  • Comments generated: 3
  • Review effort level: Lite

Comment thread lane Resolved
Comment thread tests/test_lane_helpers.sh Resolved
Comment thread openRepoTools Resolved
Copilot AI review requested due to automatic review settings September 14, 2026 20:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Unresolved behavioral issues and documentation inconsistencies remain before approval.

Review details

Suppressed comments (13)

Previously missed (2) — in code that hasn't changed since the last review.

README.md:221

  • The install inventory is now correctly documented as eleven files here, but this PR leaves later README claims that only four Bash files are shipped (README.md:333 and README.md:403). Those statements are now false—the CI list contains ten shipped Bash files—so please update the platform/CI paragraphs in the same documentation change.
    tests/test_openrepotools_command.py:58
  • INSTALLED is updated to eleven entries, but this test module still documents the old four-file install in its module docstring and several all-or-nothing docstrings (for example lines 9–11, 501–502, and 560–615). That makes the test guidance contradict the inventory it defines; update those counts and descriptions to derive from or reflect the current eleven-file install.

.github/workflows/tests.yml:226

  • The macOS job's heading still says it parses “these four files,” but this changed parse inventory now covers eleven Bash files (including the newly shipped lane and lanes). That makes the compatibility claim in the workflow inaccurate; update the heading to describe the full inventory rather than the old four-file count.
          /bin/bash -n lane

lane:728

  • A successful move changes the window's tmux session, but this read-only command does not update the session record's stored tmux target. lanes-edit.sh will therefore continue publishing the old <session>:@id; once the source session closes (which this path explicitly allows), the next lane <name> still classifies the binding as live but fails the session-name fence and cannot attach it again. Please avoid moving by default or add a supported way to persist the new binding before completing the attach.
	tmux move-window -a -s "$W_SESS:$gl_idx"

lane:1030

  • When --dir is supplied, this non-interactive suggestion drops it and prints lane-start <repo> <n> without the directory the operator selected. Copying the advertised act therefore resolves the new lane from the current checkout instead of the requested path; include the resolved, shell-quoted --dir in this suggestion as the interactive f branch does.
	if [ -n "$next_free" ]; then printf '    %-34s %s\n' "lane-start $here_repo $next_free" "a new lane at the next free position"; fi

lane:728

  • The source target is derived from window_index before the move; if another window closes or reorders between that query and this command, <session>:<index> can identify and move a different lane's window. Keep the identity fence through the mutation by targeting the validated @id, and make the dry-run command match.
	tmux move-window -a -s "$W_SESS:$gl_idx"

lane:1000

  • This validates the text of next-free's output but ignores next_free_rc whenever the helper printed digits before failing. That violates the fail-closed rule documented immediately above: a nonzero read status is not an answer, yet this path still offers f and can open the partial position. Reject any nonzero status before accepting the captured digits.
	next_free="$(printf '%s\n' "$ROWS_OUT" | "$LANES_EDIT" next-free "$here_repo" 2>/dev/null)" || next_free_rc=$?
	case "${next_free:-}" in '' | *[!0-9]*) next_free="" ;; esac
fi

lanes:441

  • As in lane, this accepts a numeric next even when next-free returned a nonzero status after emitting partial output. The footer can therefore advertise and hand out a position from a failed read, despite the fail-closed rule stated above this block. Check next_rc before accepting the captured value.
	next="$(printf '%s\n' "$out" | "$LANES_EDIT" next-free "$here_repo" 2>/dev/null)" || next_rc=$?
	case "${next:-}" in '' | *[!0-9]*) next="" ;; esac
fi

lanes-edit.sh:4829

  • lane_groups treats every non-LIVE, non-PAUSED row on this workstation as available, but lanes_rows emits IDLE for local STARTED/RESUMED rows even when session-record reading failed (and reports that uncertainty on stderr at lanes-edit.sh:4627-4628). lane then places the row in the AVAILABLE section and asks the user to pick it, only to have go_available refuse it because LIVENESS_UNREAD is set. Propagate the unknown-liveness state into the grouping/rendering or exclude these rows from AVAILABLE so the picker never advertises an unproven binding as launchable.
      if (st == "LIVE") g = "live"
      else if (st == "PAUSED") g = "available"
      else if (w == me) g = "available"
      else g = "elsewhere"

openRepoTools:261

  • retire_commands silently skips a dangling restart symlink because -e is false when the link target is missing. That leaves the retired command on PATH indefinitely, even though the installer must remove/report old copies while preserving user-owned links. Include symlinks in the existence guard (as unplaceable_kind does) and add a broken-link case so this path is named and left safely.
		[ -e "$target" ] || continue

openRepoTools:234

  • The installer list is now eleven entries, but the install flow still has stale prose saying the PATH note is “for the four of them” (openRepoTools:362). Please update that wording with the new inventory so the installer’s own documentation does not contradict the list it just changed.
INSTALLABLES=(openRepoTools park resume status lane lanes lanes-edit.sh lane-start lane-end link-estates repos.tsv)

tests/test_lane_helpers.sh:319

  • This fixture now copies six lane commands plus repos.tsv into the sandbox, but the setup comment still says the post-move installer places four commands and the alias table. Update the comment to describe the actual fixture contents; otherwise future changes can accidentally omit one of the newly added lane/lanes surfaces.
cp -p "$SRC_DIR/lane-start" "$SRC_DIR/lane-end" "$SRC_DIR/lanes-edit.sh" \
      "$SRC_DIR/link-estates" "$SRC_DIR/lane" "$SRC_DIR/lanes" \
      "$SRC_DIR/repos.tsv" "$OPENREPOTOOLS_BIN_DIR/"

tests/test_repo_hygiene.py:43

  • The new SHIPPED_BASH inventory has six PATH commands, but the module docstring and the line-ending test still say the repository has four Bash files (tests/test_repo_hygiene.py:6 and :2126). Please update those descriptions so the hygiene documentation agrees with the inventory and the CI parse list.
SHIPPED_BASH = ["openRepoTools", "park", "resume", "status", "lane", "lanes"]
  • Files reviewed: 14/14 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

brettheap added a commit to opensoft/openBenches that referenced this pull request Sep 14, 2026
… exit-8 story: it is "nothing to pick", not "the operator quit"

The picker still gates on opensoft/openRepoTools#45 landing `lane`, so this
stays draft — the point of this commit is that merging main and #45's own
contract text no longer surfaces anything for this branch to fix once it does.

The merge: one real conflict, in
devcontainer.test/test-claude-profile-lane-default.sh. Both sides touched the
scenario count; kept, at the number the corrected suite actually reports (28).
Both sides also inserted new scenarios at the same spot: this branch's own
picker-replaces-the-guess rewrite left nothing there, main's
#77/#81 live-fork-defect fix (11d/11e/11f) added three.
Keeping #81's three verbatim left them exercising a lane source this branch
retires — the workstation's newest-swap-record guess, confirmed through
`lane-start --confirm` — so they failed against the merged launcher (proved by
running them: lane-start was never invoked, argv ''). Rebased onto precedence
1 (an explicit `--lane`) instead of deleted: it is the one remaining lane
source that, like the retired guess, starts unrenamed and so still exercises
the same defect-capture tee around lane-start's bare call, which the merged
code applies unconditionally to every source now rather than only to the
guess. All three pass unchanged in every other respect. Every other file
auto-merged clean; the vendored openRepoTools bytes under
devBenches/base-image/files/openrepotools/ were already at 8a36eb3 in both
parents and moved nowhere.

Read against opensoft/openRepoTools#45's own `lane` (its script, README.md and
docs/README-lanes.md hunks): the ARGV side matches exactly — bare `lane`, no
flags, precedence 1-3's lane names all reach lane-start bare with no
`--confirm`, `go_available`'s `pclaude --lane <lane> [--dir <path>] <profile>`
parses correctly against claude-profile's own leading-options loop. The one
mismatch was in what this launcher's OWN comments and docs claimed exit 8
means. `lane`'s `q|''` case only exits 8 when its own count of pickable lanes
was already zero; declining a question that DID have a lane on it is exit 0,
the same code an acted-on pick returns (read directly out of #45's `lane`,
the `case "$(lc "$answer")" in q | '') ... if [ "$n" = 0 ]; then exit 8; fi;
exit 0` block). "exit 8 (the operator quit, or there was nothing to pick)"
was wrong on the "operator quit" half in three places — this file's two
comment blocks and docs/claude-multi-account-profiles.md's own paragraph —
and none of the three mentioned `lane`'s other two documented statuses (1, a
read failed; 64, usage, unreachable from a bare no-arg call anyway), which
this launcher's `case ... 0|8) ... esac` already sends down the same
fall-through as 2 without saying so. Corrected all three to state what `lane`
actually returns and why; behaviour is unchanged; a case that already treated
"not 0 or 8" as "not an answer" was already doing the right thing, just not
saying it accurately.

Tests: bash -n and shellcheck -S error clean on the launcher and all three
touched suites. test-claude-profile-lane-default.sh: 28 scenarios, 101
assertions passing (was 25/86 pre-merge; +3 scenarios for the rebased 11d-f,
+15 assertions). test-claude-profile-lane-start.sh: unaffected, passing.
test-claude-profile-amendment-11.sh: fails at a pre-existing, unrelated
citation audit against the VENDORED devBenches/base-image/files/openrepotools/
skills/lane-swap/SKILL.md ("A12 reconciliation" / "R-A11-27") that already
fails on origin/main alone, and already failed at this branch's own merge
base before either side's changes — confirmed by running the suite against
origin/main in isolation and against the merge-base commit's own vendored
copy. Unrelated to the picker and out of scope here; left alone. Also ran
clean post-merge: test-claude-profile-lane-start.sh,
test-claude-usage-guard-auto-swap.sh (23/100), test-claude-profile-skill-
install.sh (11/126), test-setup-estate-commands.sh and
test-setup-workspace-repo.sh (152 checks). gh pr checks 82: CodeQL only
(Analyze x3 + CodeQL), all passing; no workflow in this repository wires the
claude-profile launcher suites to CI.

Lane: openRepoTools-3 (openRepoTools-3)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m
… PAUSED row is the one an unread liveness proof is LEAST safe to launch, the move is fenced by the `@id` it checked instead of an index another window can be given, and an `-e` that skipped a DANGLING `restart` link left it on PATH

THE RED FIRST. `tests` and `tests-no-submodule` were red on `9581ac9` with ONE
case between them — `1832 passed, 1 failed` on both — and it is the round-3
commit's own prose reflow: pulling `$ga_why` out as a variable re-wrapped the
refusal so that `PROVED` ended one line and `that binding dead` began the next,
which the assertion reads as a substring of one line. The words are the fix, not
the assertion. (`tests-windows` was green on that commit; `tests-macos` had not
finished.)

**`lane:560` — THE `PAUSED` EXCEPTION WAS A HOLE IN THE FENCE AT ITS WIDEST
POINT.** Round 1 made an unread liveness read refuse a launch and let `PAUSED`
through, on the reading that a lane parked by its own last line needs no proof.
The sentence that refusal is REACTING to says otherwise, and this file already
quoted it whole: *"a lane that is live may show as IDLE or PAUSED here"*
(`lanes-edit.sh:4628`). The helper's own state machine is the second half —
*"a live record naming one of the lane's ids beats the log's own last verb …
otherwise the verb answers"* (`lanes-edit.sh:4700`) — so when the live read
fails the verb is ALL that is left, and `/lane-swap` writes the `PAUSED` line
while its session is still on screen. The row most likely to be running was the
one row passed through. Every state refuses now; the two cases that asserted the
launch assert the refusal, in each unread state's own words.

**`lane:715` — THE MOVE IS SPELLED WITH THE `@id`, AND MEASURED.** The source
was `<session>:<index>`, read one command before it was used. tmux 3.4 on a
private socket, 2026-09-14: with `w3` at `src:2`, killing it, opening another
window at that index and then `move-window -a -s src:2` MOVED THE INTRUDER into
the destination and exited 0 — the wrong window, in this session, silently —
while `move-window -a -s src:@2` refused with `can't find window: @2` and exit 1.
The `@id` is what the fence above checked, tmux resolves it inside the named
session or not at all, and the move is now a checked act: a move that failed is
a refusal and the select under it never runs. The index read and its
"tmux gave it no index" refusal are gone with it.

**`lane:687` — UNDER `--switch`, THE SELECT COMES FIRST.** `switch-client` then
`select-window` leaves a client that lost the race sitting in the target
session's current window, which is another lane and this terminal already in it.
`select-window` names the session it acts on and needs no client there, so the
lane's own window is made current BEFORE the client moves; a select that fails
now costs nothing, and a `switch-client` that fails is a refusal naming the half
that did happen.

**`lane:595` — A LANE WHOSE NAME IS NOT `<repo>-<n>` IS STARTED BY ONE
ARGUMENT.** The no-directory refusal built its remedy as `<repo> <position>`,
and a `--verbatim` lane has neither: `lane-start --dir <path> browser-ui-repair
<n>` opens `browser-ui-repair-<n>`, A DIFFERENT LANE. `lane-start:601` takes
that name as one argument beside a `--dir`, which is what the line prints now.

**`lane-start:690` — THE VALUE GOES WITH THE FLAG THAT TOOK ONE.** `lane-start
--estate x --yes` printed `lane-start <repo> <n> --estate --yes`, whose
`--estate` swallows the `--yes` and names an estate `--yes`. The `--` words were
dropped the same way. A line printed for a person to type is a line this command
has to be willing to have typed back at it.

**`openRepoTools:261` — `-e` FOLLOWS THE LINK AND IS FALSE FOR A DANGLING ONE.**
A `restart` SYMLINK whose target has since gone — and the pre-move
`link-estates` put exactly those links in a workstation's `~/.local/bin` — was
neither removed nor named by the retirement: it stayed on PATH and the one run
that was going to mention it said nothing. `-L` is the other half of "is there
anything at this path"; what happens next is what happens to any link, which is
that it is named and left.

TWO DECLINED, BOTH MEASURED RATHER THAN ARGUED, because a decline that is only
argued is one the next round makes again (the pattern this suite already uses
for `ls --`):

* **`tests/test_lane_helpers.sh:6424` — `env -C` is not a GNU-only option
  here.** The macOS job has run these very cases GREEN: job 104128188482 on
  `fce18d5` printed `ok a bare lane inside a checkout exits 0` and `ok answering
  with the number of an AVAILABLE lane exits 0`, both of them `env -C` forms,
  neither of which can exit 0 and carry a listing if `env` had refused the flag
  — and `main` has carried four more since Amendment 11. Asserted directly now,
  on every platform the suite runs on.
* **`openRepoTools:263` — the header marker is the only ownership evidence an
  installer can have about a file it wrote BEFORE it knew it would retire it.**
  Durable metadata cannot answer for the population this act exists for: no
  installer that placed `restart` wrote a receipt, so no receipt can identify
  its output. The marker is this installer's own sentence, naming itself, at
  line 12 of the file it placed; the `! -L` fence (round 2) and the `-L` guard
  above keep it off anything that is not a regular file it can read. The receipt
  idea is real for FUTURE retirements and is filed as #57.

And three of round 4's suppressed comments — `lane:765`, `lane:969` and
`lane:322` — were already fixed in `9581ac9`, one commit after the tree it
reviewed.

New cases, all in the Amendment 18 Addendum 1 section: a `move-window` that
FAILED refusing with nothing selected; `--switch` with a select that failed
never reaching `switch-client`, and a `switch-client` that failed refusing after
the select that worked; a `--verbatim` lane's no-directory refusal naming the
one-argument form and never a position; the `--estate` value in the alias
refusal; `env -C` measured on this platform; and in
`tests/test_openrepotools_command.py`, an install run against a DANGLING
`restart` symlink, which survives and is named. The fake tmux learns the two
acts that can fail after the fence has passed.

Measured: `bash tests/test_lane_helpers.sh` — 1846 passed, 9 failed, where all
nine are a concurrent writer on this workstation deleting the run's `$SANDBOX`
and SIGTERMing its liveness fixture mid-run (`expected [0], got [143]`, then
every read of a path under it): the last section and the two sentinel checks,
none of them a case this commit touches, and every case of this section passed.
The `python3 -m pytest tests -q` run under the workstation's lock is in flight
as this is written; CI is the same command.

Lane: openrepotools-3 (openRepoTools-3)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m
Copilot AI review requested due to automatic review settings September 14, 2026 21:34
Copilot AI review requested due to automatic review settings September 15, 2026 01:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved critical and moderate findings remain in tmux recovery/context handling, profile quoting, and next-free dispatch.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (7)

lane:640

  • When a lane has no recorded directory, this remediation appends the supplied profile raw. Profiles with spaces are accepted and recorded by lane-start, so the printed command turns one profile into multiple positional arguments when pasted and is rejected instead of performing the documented one-run launch. Shell-quote the optional profile here.
      $prog --dir <the lane's checkout> $R_LANE${profile:+ $profile}" 2

lane:681

  • This swap remedy is intended to be pasted, but it interpolates the requested profile as a raw word. A valid profile can contain spaces (the record writer preserves and quotes such values), so the printed lane invocation passes multiple arguments and is rejected or changes the selected profile. Render the command with the existing quoted helper.
    \`$prog $R_LANE $profile\` once it is parked. Attach as it is:

lane:804

  • After move-window, the lane window is in $gl_this, while $W_SESS is the source session that may have closed. This refusal still offers tmux attach -t $W_SESS, which can fail or attach to an unrelated current window; the recovery needs to name the current session and the moved window id.
      that session, if you want it anyway:   tmux attach -t $W_SESS" 2

lane:507

  • If $TMUX is set but display-message -p '#S' fails, this function returns an empty string and go_live treats the caller as outside tmux, entering the attach path. That converts an indeterminate tmux-context read into an attach attempt (potentially nested or against the wrong client); preserve the failure distinctly and refuse rather than falling through to the outside-tmux branch.
	tmux display-message -p '#S' 2>/dev/null || :

lane:828

  • lanes_rows emits the literal age age unknown when no timestamp is available, so this interpolation produces the malformed refusal text as of age unknown ago. Handle the unknown-age value separately so the elsewhere refusal does not claim an elapsed duration that was not read.
	die "lane $R_LANE is bound on ${R_WS:-a workstation this row does not name}${R_WIN:+, window $R_WIN}${R_AGE:+, as of $R_AGE ago},

lane:1178

  • When next-free is unavailable or failed (or the listing is outside a checkout), the prompt intentionally omits f, but this dispatch still accepts a typed f and calls go_new. In a checkout it retries the helper and can launch if a transient failure clears, bypassing the fail-closed decision; outside it emits a different no-repository error. Gate this arm on the same nonempty next_free used to render the prompt and refuse f when it was not offered.
f)
	go_new "$here_repo" ;;

lane-start:64

  • The new bare-form alias makes lane-start emit lane's listing and numbered actions on stdout, but this file's later OUTPUT contract still says that the only stdout is the --no-launch command line. That is now a false interface guarantee for callers and maintainers; update the output documentation to include the bare-alias exception.
# BARE, THIS IS `lane` (Amendment 18 Addendum 1 clause (i-4)): the lanes,
# numbered, and the one you pick is bound. It renders nothing of its own — it
# `exec`s that word, carrying `--dry-run` and `--dir`, which mean the same thing
# there, and REFUSING by name the options `lane` has nothing to apply them to
# rather than dropping them. On a workstation with no `lane` the old refusal is
# still the whole answer.
  • Files reviewed: 14/14 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread lane Resolved
…attach -t <session>`, which is the wrong-lane outcome they exist to prevent, and a `canon-lane` read that FAILED was read as "the typed spelling will do"

**`lane:499` and `lane:804` — A REFUSAL THAT OFFERS THE BARE SESSION OFFERS THE
DEFECT.** Both ended with `tmux attach -t <session>`, which lands on whatever
that session has since made current — another lane, which is the one thing the
id-AND-session fence exists to stop. The window goes first now and the bare
session stays under it, said as what it is:

      what the register says now:            lanes --all
      that window, if it is back:            tmux attach -t detsess:@32
      that session, whatever it now holds:   tmux attach -t detsess

The qualified form is either the lane or a refusal, measured on tmux 3.4 at
round 6: `attach -t dst:@2` attached AND made `@2` current in one act, and
`attach -t dst:@3` for a window of another session refused with `can't find
window: @3`. A person who wants the session anyway is still told how — knowing,
from the words beside it, what they will get.

**`lane:956` — TWO STATUSES ARE ANSWERS AND THE REST ARE A REFUSAL.** `0` is the
row's own spelling; `2` WITHOUT the 15(d) words is the unknown-subcommand code
of a helper predating Amendment 15, which is the documented fall-through to the
estate-wide read below (that read matches case-insensitively, which is what
makes the fallback work); `2` WITH them is `canon-lane`'s own two-rows refusal,
relayed one branch up. Everything else was falling through to the TYPED
spelling, which is a lane bound under a name nothing established — the defect
Amendment 15 exists to prevent, and the fall-through Amendment 7(d) forbids. It
refuses with 1 now, naming the code and the read to run by hand. `canon-lane`
was the last read in this file without that rule; the row read, the grouping
read and the position read have each had it since rounds 1 to 5.

New cases: a select that FAILED outside tmux and a move that FAILED, each
asserted to carry `tmux attach -t detsess:@32` and the "whatever it now holds"
wording; a `canon-lane` exiting 5 → exit 1 with the code named and nothing
launched; and a `canon-lane` unknown-subcommand 2 → the lane still binds through
the launcher, because an un-upgraded workstation is not a fault.

Measured on this tree (`origin/main` merged in at 2faa883):

    bash tests/test_lane_helpers.sh   2109 passed, 0 failed, 0 skipped, 0 pending

and the full `python3 -m pytest tests -q` under this workstation's lock was
**625 passed, 0 failed** in 1661 s on the tree twelve assertions ago. CI on
`03171c3`: `tests`, `tests-no-submodule` and `tests-windows` green,
`tests-macos` still running at the time of writing; all four were green on
`b8dddc1` and on `619c484`.

Lane: openrepotools-3 (openRepoTools-3)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m
Copilot AI review requested due to automatic review settings September 15, 2026 01:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Three unresolved moderate findings remain in lane, and openRepoTools has an artifact-count documentation mismatch.

Review details

Suppressed comments (4)

lane:873

  • next-free returns status 2 when the installed helper predates this subcommand (the dispatcher’s unknown-subcommand arm), and the picker already treats that status specially by directing the user to openRepoTools --install. This f path collapses status 2 into a generic exit-1 read failure, so a workstation with the older helper gets the wrong remediation instead of the required upgrade guidance. Preserve the status-2 case here before the generic failure branch.
	if [ "$gn_rc" != 0 ]; then
		die "the next free position of $gn_repo could not be read: \`lanes-edit.sh next-free\`
    exited $gn_rc. This command will not open a lane at a position it did not
    get (Amendment 7(d)) — a number printed by a read that then failed is not an
    answer. Read it:  lanes --prefix $gn_repo" 1

lane:234

  • An explicit empty selector (lane "", and likewise lane --all "") leaves name empty, so this guard is skipped and the command falls through to the bare listing/picker instead of applying lanes-edit.sh's required empty-name refusal. That silently changes a malformed named invocation into a different question; key the check off whether a positional argument was supplied rather than its contents, and add a regression case.
if [ -n "$name" ]; then

lane:1215

  • The picker accepts an unbounded digit string and converts it directly with Bash arithmetic. Values beyond the shell integer width wrap (for example, 18446744073709551617 can become 1), so a very large out-of-range answer may select an actual lane instead of being refused as outside 1-$n; normalize/compare the decimal input against n before doing this conversion, or otherwise reject values that cannot be represented.
pick=$((10#$answer))

openRepoTools:411

  • The PR description says --install produces eighteen artifacts, but the implementation's invariant is nineteen: 11 installed files + 4 skill copies + 2 command copies + 2 hook entries (tests/test_openrepotools_command.py:81-97). Please update the description to match the ratified HOOK_ENTRIES = 2 contract, or clarify which artifact category is intentionally excluded.
	say "openRepoTools: $placed of ${#INSTALLABLES[@]} placed in $dir"
  • Files reviewed: 14/14 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 15, 2026 02:30
…gers WRAPPED into a lane nobody picked, `f` told an un-upgraded workstation to read something that does not exist there, and `lane ""` answered a different question

**`lane:1215` — A DIGIT STRING TOO LONG TO BE A POSITION IS NOT A POSITION.**
`pick=$((10#$answer))` WRAPS at the shell's integer width: `18446744073709551617`
comes back as `1`, so an answer far outside `1-N` reached the range check as a
number that IS in it and would have bound a lane nobody picked. That is the
wrong-lane outcome every fence in this file exists to stop, arriving through the
one door that reads a person's typing. The LENGTH is compared before the
conversion, against the digits of `$n` itself, because that is the widest answer
the question offered.

**`lane:873` — `2` IS THE CONTRACT'S OWN CODE IN THE `f` PATH TOO.** The listing
has told the two statuses apart since round 3 — an un-upgraded workstation named
as one and sent to `openRepoTools --install`, a read that FAILED named by its
code — and this path, the same read one answer later, collapsed both into "run
it by hand". A person who typed `f` on a workstation that has not taken the
install was told to read a subcommand that does not exist there.

**`lane:234` — AN ARGUMENT THAT WAS GIVEN AND IS EMPTY IS NOT "NO ARGUMENT".**
`lane ""` left `$name` empty, every `[ -n "$name" ]` below it read that as "no
lane was named", and a malformed named invocation silently became the LISTING —
and on a terminal the numbered pick, a question the person did not ask. It is
the contract's 64 at the door now, in the same terms the helper's own
whole-string fence uses.

AND THE FOURTH IS THIS PULL REQUEST'S OWN BODY: it said `--install` makes
EIGHTEEN artifacts while the code's invariant became NINETEEN when
`origin/main`'s #52 merged Amendment 12's `UserPromptSubmit` entry in beside the
`SessionStart` one. Corrected there, and derived from `INSTALLED` and
`HOOK_ENTRIES` rather than restated.

New cases: `f` answered on a workstation whose helper has no `next-free` —
refusing with 2, naming the install and starting nothing; the pick answered
`18446744073709551617`, refused as outside `1-N` with nothing bound (it is the
wrap that would have bound something); and `lane ""` and `lane --all ""`, each
the contract's 64, neither of them the listing.

Measured on this tree (`origin/main` merged in at 2faa883):

    bash tests/test_lane_helpers.sh   2120 passed, 0 failed, 0 skipped, 0 pending

CI is green on the head this sits on — `42d243a`, all four jobs, `tests-macos`
included — as it was on `03171c3` and on `619c484` before it.

Lane: openrepotools-3 (openRepoTools-3)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Two moderate issues and one documentation nit remain unresolved.

Review details

Suppressed comments (3)

docs/README-lanes.md:1357

  • This paragraph describes all lane <name> calls as if they were the AVAILABLE launch path. LIVE HERE requires the recorded <session>:<@window> to resolve for attach/select, while AVAILABLE lanes can lack a recorded directory or profile and then require --dir or <profile>; the current sentence incorrectly says no window is needed and both values are always recorded.
`lane <name>` needs **no window, no record of a window and no guess** — only

lane:1201

  • The noninteractive f suggestion leaves here_repo unquoted. When there is no valid origin, here_repo falls back to the checkout basename, which can contain spaces; typing the printed command then passes the repository as multiple arguments instead of the single repository token used by lane-start. Quote this value with the existing quoted helper.
	if [ -n "$next_free" ]; then printf '    %-34s %s\n' "lane-start$nt_dir $here_repo $next_free" "a new lane at the next free position"; fi

lanes-edit.sh:4666

  • The new one-lane fast path does not fail closed when Amendment 15 finds two object logs differing only by case. lane_log_events returns 2 from log_path_ci, but the following pipeline discards that status (and suppresses its diagnostics), so this path renders register data as if the lane had no log; the estate-wide state_events path also merges both files without checking for the duplicate. lanes --lane and the lane picker can therefore act on an ambiguous history instead of requiring the 15(d) merge. Detect duplicate log paths before building either facts stream and propagate the refusal.
  # `--lane` READS ONE LOG, NOT THE ESTATE'S. `lane <name>` asks for one
  # lane's profile and nothing else, and `state_events` is a `git show` per log
  # file — nine seconds on the live register. The same parser over the same
  # grammar either way, so the two answers cannot differ.
  • Files reviewed: 14/14 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

…`/handoff` skill and its two command files, and the installer's TWENTY-SIX artifacts): six conflicts, and every one of them a list where `restart` leaves and `lane` stays

The fourth merge of `origin/main` into this branch, and the one that touches the
most of it: #47 adds a TWELFTH file to `INSTALLABLES`, a THIRD skill, TWO more
command files and a suite section of its own, in the same four lists Amendment
18 Addendum 2 takes `restart` out of.

THE SIX, and what each resolution is:

1. **`README.md`** — theirs, with the word changed: TWELVE files, and `lane`
   where their line says `restart`. The paragraph under it already said TWELVE.
2. **`openRepoTools`, the header inventory** — theirs, with `lane` named as
   `restart`'s replacement and Addendum 2 cited for why; their `lane-handoff`,
   three skills, three command files and twenty-six artifacts all kept.
3. **`openRepoTools`, `INSTALLABLES`** — the UNION and still TWELVE: `restart`
   out, `lane` in its place, `lane-handoff` beside it. One word left as another
   arrived, which is why the count did not move for Addendum 2 and moved by one
   for Amendment 17.
4. **`openRepoTools`, the artifact paragraph** — theirs (twenty-six, and the
   history of how it got there), with the one sentence naming `restart` as the
   second word on PATH rewritten to name both: *"`restart` then, `lane` since
   Amendment 18 Addendum 2 retired that one"*.
5. **`openRepoTools`, `SKILLS`** — theirs (`handoff lane-swap restart`), with
   the comment above it saying what the `/restart` skill is the inside half OF,
   now that the outside half is `lane <name>`.
6. **`skills/lane-swap/SKILL.md`** — THEIRS WHOLE. #47 replaces that skill's 495
   lines with a 26-line ALIAS naming `/handoff`, which is Amendment 17(a)'s own
   act; this branch's edit to the old file was one sentence about the retired
   CLI, and the file it was in no longer exists in that form. Nothing is lost:
   the new `skills/handoff/SKILL.md` already says it, in `main`'s own words —
   *"**The respawn line is `lane <lane>` and never `restart <lane>`**
   (Amendment 18 Addendum 2, in force)"*.
7. **`tests/test_openrepotools_command.py`, `INSTALLED`** — the same union as
   `INSTALLABLES`, twelve entries, with the note that `lane` is `restart`'s
   place and `lane-handoff` is what makes it twelve.
8. **`tests/test_lane_helpers.sh`** — BOTH SECTIONS, THEIRS FIRST. Amendment 17's
   935 lines and Addendum 1's 963 were inserted at the same anchor, immediately
   before `== the workstation seam ==`; the section that landed on `main` keeps
   the position it landed in, which is how the #41 merge resolved this same
   collision.

WHAT NEEDED NO RESOLUTION AND IS WORTH SAYING: the CI parse list in
`.github/workflows/tests.yml` merged to `lane` AND `lane-handoff` with no
`restart`, and `lane-start` — which both sides rewrite, this branch at its bare
form and #47 at `--agent` and the transcript move — merged clean.

Measured on the merged tree, through `tests/run.sh` (#51's runner, which is the
lock now):

    tests/run.sh   654 passed, 1 failed in 2129 s (35:29), and the shell suite
                   inside it 2345 passed, 2 failed — TWO cases, and NEITHER is
                   this merge's code:

  * `…quoted the way the shell reads it back` was THIS BRANCH'S OWN CASE pinning
    one spelling of a correct quoting. #47 replaced `lane-start`'s `quoted` — it
    was `printf '%q '`, rendering `team\ blue`, and is now a POSIX single-quote
    loop rendering `'team blue'`. Both are one word when a shell reads them
    back, which is the contract; the case asserts THAT now, accepts either
    spelling, still refuses the bare form, and proves the one-word property of
    both spellings in the same line. FIXED IN THIS COMMIT.
  * `one lane read alone is the same row the estate listing gives it` compares
    two `lanes` reads byte for byte, and one of the twelve fields is an AGE IN
    WHOLE MINUTES: `64h 49m` against `64h 48m`. It is on `main` and nothing here
    touches that read; a 35-minute run on a workstation building several lanes
    at once crossed a minute between the two. Filed as
    #75 and claimed by this lane, with the two-line fix
    named — compare the row without the column that is a function of the wall
    clock.

Lane: openrepotools-3 (openRepoTools-3)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m
Copilot AI review requested due to automatic review settings September 15, 2026 03:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Four unresolved review comments remain, including three moderate issues and one documentation nit.

Review details

Suppressed comments (4)

lane:1012

  • When canon-lane returns the legacy helper's unknown-subcommand 2, this path still invokes lanes --lane. A helper predating Amendment 15 can lack that newer --lane option too, so read_rows receives a usage 64 and exits before the documented --all compatibility fallback can match the row. Track the legacy-resolver case and read --all directly (then match the requested lane); the current canonold test delegates lanes to the new helper and does not exercise this combination.
	read_rows --lane "$name" || :

lane:118

  • This command still builds replayable commands with printf '%q' | sed, but Bash 3.2/macOS renders %q differently; the sibling launchers replaced this exact pattern with their single-quote loop (lane-start:573-608, lane-handoff:126-160). On macOS, a printed bind command can therefore be malformed or differ from the path/profile it is meant to replay. Port the shared portable quoting implementation here and update the corresponding assertion that currently expects %q.
quoted() { printf '%q ' "$@" | sed 's/ $//'; }

lane-start:749

  • --agent is a valid lane-start option, but the bare-alias handoff never adds agent_flag to ls_drop. Therefore lane-start --agent codex executes lane without the requested agent and without the promised refusal-by-name, silently discarding the option. Include the flag and its value in the refused-options line (quoted like --estate) so the alias cannot lose caller input.
      ls_drop=""
      [ "$no_launch" = 0 ] || ls_drop="$ls_drop --no-launch"
      [ "$confirm" = 0 ]   || ls_drop="$ls_drop --confirm"
      [ "$take_yes" = 0 ]  || ls_drop="$ls_drop --yes"

tests/test_repo_hygiene.py:31

  • The bare-alias documentation says macOS parses only the six SHIPPED_BASH files, but the workflow now invokes /bin/bash -n for the complete ALL_BASH inventory, including the helpers and test scripts. This makes the repository contract misleading about what the macOS compatibility gate actually covers; describe the complete inventory instead.
#: same shebang, mode bit and `set -euo pipefail` rule. The macOS job parses
#: these same SIX with `/bin/bash -n`, one command per file, which is what
#: keeps the bash-3.2 claim true. (It said "four" while the list held six,
#: which is a description contradicting the inventory it explains; Copilot
#: round 3 on #45.)
  • Files reviewed: 13/13 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

…45 assertions take 45 minutes there and the bound was 40, so `TIMEOUT_SECONDS` goes 2400 → 3600 — measured, and with the real fix filed as #77

MEASURED, `b9018c1`, this branch with Amendment 17's suite section merged
beside Amendment 18 Addendum 1's — 2102 cases to 2345:

    tests-macos   03:18:03 → 04:03:37   1 failed, 654 passed in 2722.13s (0:45:22)
                  subprocess.TimeoutExpired: Command '['bash',
                  '…/tests/test_lane_helpers.sh']' timed out after 2400 seconds
    tests         03:17:59 → 03:34:46   green, the same 655 cases (16m 47s)
    tests-no-submodule  24m 53s green · tests-windows  26s green

**EVERY OTHER CASE IN THAT macOS JOB PASSED.** What the bound caught is the
suite being long on the slowest platform it is required to pass on — macOS at
roughly 2.7× the Linux time for the same file — and not a helper hanging, which
is the thing the bound exists for and still does at 3600. A `TimeoutExpired`
says nothing about which assertion was in flight, which is exactly the
unreadable failure the paragraph above that number already warns about: it is
why the same number went 900 → 2400 one amendment ago, for the same reason, and
the comment now carries both rounds.

ONE NUMBER AND NOT A PER-PLATFORM PAIR. A bound that is different where a
person is not looking is a bound nobody can reason about, and macOS is not the
only slow place: a legitimate run of this same tree took **2129 s on this
workstation** with six sibling suites building beside it, which is inside 2400
by four minutes and outside it on a busier evening. The job has no
`timeout-minutes` in `.github/workflows/tests.yml`, so nothing under it bites
before this does — GitHub's own default is 360 minutes, ten times this.

THE CAP IS NOT THE FIX. One bash file running real `git` several thousand times
serially for 45 minutes is the fix, and it is **#77**,
filed and claimed by this lane with what to measure first — where the time
actually goes, before choosing between a per-section sandbox, parallelism the
wrapper's one-test shape would have to give up, and the cheap `git` settings in
the sandbox's own config. This commit moves the cap out of that work's way and
decides nothing about it.

No assertion is touched and no case is skipped.

Lane: openrepotools-3 (openRepoTools-3)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m
Copilot AI review requested due to automatic review settings September 15, 2026 04:07
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Final review reports one critical and several moderate unresolved issues in attachment recovery, path quoting, profile preservation, and test timing.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (5)

lane:1005

  • This recovery command has the same path-quoting problem: $LANES_EDIT is printed bare, so a helper path containing spaces is split when the person follows the refusal. Render the helper path with the existing quoted function before suggesting it.
      run it by hand to see what it says:  $LANES_EDIT canon-lane $name

lane:673

  • When the record has a directory that no longer exists, this remedy drops an explicitly supplied profile. Re-running the printed lane --dir <path> <name> falls back to the recorded profile instead of preserving the late-swap profile from the refused invocation; include the supplied profile in the suggested command (as the no-directory branch already does).
      $prog --dir <path> $R_LANE" 2

lane:118

  • This shipped command uses Bash's %q output piped through BSD sed. On macOS Bash 3.2, %q escapes multibyte characters byte-by-byte, and the UTF-8 sed pipeline can fail with illegal byte sequence (the adjacent lane-start implementation documents and avoids this exact failure). A dry-run or refusal involving a non-ASCII path can therefore exit 1 or print an unusable command; use the same POSIX single-quote loop as lane-start and update the path-quoting assertion to cover it.
quoted() { printf '%q ' "$@" | sed 's/ $//'; }

lanes:489

  • The hand-run recovery command interpolates $LANES_EDIT unquoted. If the helper is in a checkout or bin directory containing spaces, the printed pipeline splits the executable path and cannot be used to diagnose the failed read; quote the helper path when rendering this command.
	say "    $LANES_EDIT lanes --prefix $here_repo | $LANES_EDIT next-free $here_repo"

tests/test_lane_helpers_suite.py:82

  • The wrapper timeout is now 3600 seconds, but the liveness fixture in tests/test_lane_helpers.sh still runs sleep 3000 and explicitly requires that sleep to exceed this bound. If the suite takes between 3000 and 3600 seconds, later liveness assertions run after the fixture has exited; if it reaches the wrapper limit, the final liveness evidence has already expired. Raise the fixture duration above the new timeout (and update its invariant comment), or keep the timeout below 3000 seconds.
TIMEOUT_SECONDS = 3600
  • Files reviewed: 14/14 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread lane Resolved
@brettheap
brettheap merged commit f98d734 into main Sep 15, 2026
7 checks passed
@brettheap
brettheap deleted the feat/lane-the-word branch September 15, 2026 04:59
brettheap added a commit that referenced this pull request Sep 15, 2026
…eleted, lanes-edit.sh's lane_groups/lane_next_free) -- one usage-list conflict, both sides' new subcommands kept

The only real conflict was lanes-edit.sh's "unknown subcommand" usage
string: this branch had inserted `duplicate-holder` after `forks`, #45
inserted `lane-groups|next-free` after `lanes` -- two non-overlapping
insertion points in the same one-line list. Resolved by keeping both,
each where its own side put it. `docs/README-lanes.md` and
`tests/test_lane_helpers.sh` both carried non-overlapping additions
from each side and merged automatically; every other changed file
(`README.md`, `openRepoTools`, `lane` new, `lane-start`, `lanes`,
`restart` deleted, `skills/restart/SKILL.md`, the three touched
`tests/test_*.py` files, `.github/workflows/tests.yml`) was untouched
by this branch and carries #45's changes only.

Verified after merging: `duplicate_holder_pids` and this branch's own
round-11 fixes (the `--fork-session ` trailing-space matches at
lanes-edit.sh ~4829/4911, and both stale-docstring rewrites at ~2176
and ~2403) all survived intact and at one copy each; `lane_groups` and
`lane_next_free` (#45's own additions) are present and untouched; every
dispatch entry for `duplicate-holder`, `lane-groups` and `next-free`
appears exactly once.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants