Repository navigation
T017: A lane whose recorded dir holds a space is no longer left out of worktrees --all and the inventory index: worktree_rows hands that dir on quoted where it holds a space (opensoft/openRepoTools#295) (part of opensoft/openRepoTools#186) - #3
Conversation
…trees --all and the inventory index: worktree_rows hands that dir to the control-root read quoted where it holds a space, as lane-start writes it T017 continuation, in opensoft/openRepoTools-code, of the opensoft/openRepoTools branch fix/dir-space-listing-295 at e0970a808af5179123a8cf7ee5b5e52ce9718402 (issue opensoft/openRepoTools#295). It carries that branch's own change against 50d05d4, with the head's merge of main 50d05d4 left out. Both of its paths, lanes-edit.sh and tests/test_dir_with_space_295.py, are code-leg paths, so the spec leg has no part of it. worktree_rows hands a lane's dir on to the control-root read quoted where it holds a space, as lane-start's quote_subfield writes it, and bare where it does not. The subjects below are quoted from the originals; a bare #N in them is opensoft/openRepoTools#N. Old-to-new receipt (the original's own non-merge commits): a90f0099b55d Test that a lane whose recorded dir holds a space keeps its trees in worktrees --all and in the inventory index, red on main until worktree_rows hands that dir on quoted (#295) d3b125919a42 worktree_rows hands a lane's dir on quoted where it holds a space, so a lane recorded under a path with a space keeps its trees in worktrees --all and in the inventory index (#295) Resolutions: none. The patch applied clean, with no offset. Lane: openRepoTools-4 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewer's GuideImplementationRe-quote the recorded directory when building the payload so a path containing spaces is read whole without truncating bare paths containing quotes.
TestsAdd regression coverage for spaced directories in worktree listings and inventory indexing, while checking plain and quote-containing directories remain intact.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…lter, with the tree unchanged (opensoft/openRepoTools#295, opensoft/openRepoTools#228) Brett Heap's ruling of 2026-11-08T12:08:48Z, option A, has SonarCloud ignore shell:S7688, shell:S131 and shell:S7679 on opensoft_openRepoTools-code. Lane openRepoTools-3 recorded it in opensoft/openRepoTools#228 comment 6721369920. An open pull request keeps its last analysis until a push, so this commit changes nothing: its tree is its parent's, 95866d3's. Lane: openRepoTools-4 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the reconstructed payload is parsed incorrectly, worktree rows could be missing or misrepresented in the listing and inventory index. The index can be rebuilt with another inventory sync, and reverting restores the previous listing behavior; the change does not alter the lane’s recorded directory or checkout.



What this is
This is the T017 continuation, in this leg (opensoft/openRepoTools-code), of the
opensoft/openRepoToolsbranchfix/dir-space-listing-295ate0970a808af5, for opensoft/openRepoTools#295 (part of opensoft/openRepoTools#186). The original tree and branch stay as the archived original (lane 4's decision, opensoft/openRepoTools#186 comment 6548343086). One commit here,95866d375199, carries it.It carries that branch's own change against
50d05d4(the head's merge of50d05d4is left out), for both of its paths:lanes-edit.sh(+15 −1) and the newtests/test_dir_with_space_295.py(+221). Both are code-leg paths, so opensoft/openRepoTools#295 has no spec-leg part and no paired spec PR.What was wrong and what changed
What was wrong
A lane whose recorded directory holds a space, such as
/Users/x/My Projects/foo, was left out ofworktrees --all, answered 8 ("none") toworktrees <lane>, and never reached the inventory index, with noUNREAD, noPARTIALand no warning.lane-startwrites adirthat holds a space quoted (quote_subfield), and every read of the lane's own log takes it whole.worktree_rowsis the read behindlanes-edit.sh worktreesandlanes-index sync --source inventory, and it does not read the log again. It takes the listing's column 7, which is thedirwith its quotes already taken off, and hands it on bare, asdir <column 7>, to the three reads that find where the lane's trees are:lane_control_root,lane_trees_listandlane_state_read.payload_subfieldreads a bare value only up to its first space, so a lane recorded withdir "/Users/x/My Projects/foo"was given the dir/Users/x/My. That path's parent is a directory, so the control root became/Users/x/.lane-state/<lane>, where notreesdirectory is, and the lane was skipped in silence:worktrees --allhad no row for it, andworktrees <lane>exited 8, "none";lane-trees <lane>listed them all the while, because it reads the lane's log itself.Found by the independent delta review r3 of opensoft/openRepoTools#289 as its SHOULD-C. The bare hand-off to
lane_control_roothas been inworktree_rowssince opensoft/openRepoTools#171 (f5444c5). opensoft/openRepoTools#289 gave the same payload to two more reads,lane_trees_listandlane_state_read, and did not change it.What changed
One
caseinworktree_rows(lanes-edit.sh, +15 −1). The dir goes back by the rulelane-start'squote_subfieldwrites it with: quoted where it holds a space, bare where it does not.The issue's one-line fix quoted every value. This does not, and Brett Heap ruled it so on 2026-10-21, logged at 13:43Z:
yes, quote only where a space is for #295(his words, byte for byte; the issue is opensoft/openRepoTools#295).payload_subfieldends a quoted value at its first", so quoting a bare dir that carries one would cut it short and drop the lane exactly as the space did.lane-startrefuses to write such a dir, but a hand-written log line can hold one. Column 7 is read bypayload_subfield's own rule, so it never holds both a space and a", and thecasehands back every value it can hold unchanged.The writer and the independent review each swept
lanes-edit.sh,lanes,lanes-indexandlane-worktreesfor the same shape.worktree_rowsis the only place that wraps a stored sub-field value back into a payload after its quotes were taken off. Every other reader gets a raw log payload, the exact line being written, a validated writer's value, or no payload, andlanes-indexbuilds its inventory fromworktrees --all, so it gets the fix too.Not in this PR
dirshifts the listing's tab-separated row, andpayload_subfieldpasses its payload throughawk -v, which expands backslash escapes. With the writer's open question onrequest-handoff's unquotedby host, Brett Heap sent all three to one issue, Three ways a stored lane sub-field is misread: a TAB in a recorded dir drops the lane from worktrees --all, payload_subfield expands backslash escapes through awk -v, and request-handoff writes its by host sub-field unquoted openRepoTools#301 (ruling logged at 15:07:51Z on 2026-10-21, "yes to all as recommended"). Its code PR is the next in this chain.Old to new: the receipt
The original's own non-merge commits in
opensoft/openRepoTools(50d05d4..e0970a8), 2 in all, are carried by one commit in this leg,95866d375199. The list is the commit's own body, and it equals the original's non-merge commits read from the chain'srefs/root/ref (checked).The subjects are the original's, byte for byte; a bare
(#N)in them names the root issue.Resolutions
None. The patch applied clean, with no offset.
The pairing
No pair: opensoft/openRepoTools#295 has no spec-leg part (both of its paths are code-leg paths), so there is no spec PR for it, and nothing in this PR waits on one.
Tests
Run by the CODE writer, in a sandbox clone, with
env -i(HOME, XDG_* and TMPDIR inside the sandbox),OPENREPOTOOLS_CODE_ROOTset andOPENREPOTOOLS_COMPOSED=0, as the leg's CI sets it. Each targeted run read this branch's own commit in its own worktree; that commit wasb6df91fc2fa4before the message amend, and the amend kept its tree, so the results stand for95866d375199.bash -nonlanes-edit.sh,laneandlanes, at every commit of the chainpy_compileon every changed.pyfile and onlanes-indexrun.sh -k test_dir_with_space_295shellcheck, over the whole chain (mainto the tip): errors 0 to 0 and warnings 108 to 108 (lane14 to 14,lanes8 to 8); notes up by 3, 2 and 2, all SC1003 on the literal'\'patterns of opensoft/openRepoTools#301's commit.The pair runs below are of the two chains' tips, so they cover this commit with every later commit of its chain; apart from the targeted run above, no run was made at this commit alone. They are lane 4's independent paired review, 2026-10-31 (the letters are the review report's own), with
OPENREPOTOOLS_SPEC_ROOTset to the spec clone shown,env -i,TMPDIR=/tmpand a 54-characterXDG_STATE_HOME.-k test_repo_hygiene5f2995d43893+ spec tip8104f2cf965c-k test_repo_hygiene, baselinemain2a057a6+ specmain9f8b21a-k lane_helpers-k test_repo_hygiene5f2995d43893+ specmain9f8b21aThe pair runs read the chains' tips as they were before the message amend (code
5f2995d43893, spec8104f2cf965c). The amend kept every tree (git difffrom each old commit to its new one is empty), so the runs stand for the amended tips, code2c15aa6613c3and spec430ea20784ac. No failure is new at the tips. Run (d), the manual-reading tests at each branch, was skipped under the review's brief, because none of the five branches' test files reads the manual.The CODE writer's first run of
-k lane_helpersat the chain's tip, with a 212-character run root, gave 5 FAILs in the shell suite (4870 ok, 5 FAIL, 3 skipped), becauserc_tree_idintests/test_lane_helpers.shlacks the 180-character cap thattree_id_forinlanes-edit.shhas, so at that length the two names differ and the planted records are never read; the chain changes neither, and run (c) above, with the 54-character state root, gave 0 FAIL.Not run: the suite at the leg's
mainfor comparison, bash 3.2, macOS and the assembly's composed check; the submodule was not initialized, so 6 tests skip.Test files this commit adds or changes:
tests/test_dir_with_space_295.py, new (+221): four cases on one estate of three lanes, started from their log lines alone, with noLANES_LANE_STATE_ROOT, so that each lane's control root is worked out from its recorded dir. repoS-1 recordsdir "<root>/My Projects/repoS", quoted aslane-startwrites it; repoP-1 records a plain dir, as the control; repoQ-1 records a bare dir that holds a"and no space. The cases: the writers file the quoted-dir lane where its dir places it (the precondition, which passes before the fix); the listing keeps its trees (worktrees --allandworktrees repoS-1); the inventory index keeps them; and the bare-quote lane keeps its trees (passes before the fix, and fails if the fix quotes every value).The original's own record, from the root repository, at the root head and not repeated in this leg: on main's
lanes-edit.sh,2 failed, 2 passed(the listing case and the index case fail); with the fix,4 passed; two mutants of the fix, each killed (the space arm bare again fails the same two cases, and quoting every value fails only the quote-mark case).Release notes (v1.2.0)
Not established: whether lane 3 accepts this line, which it has not seen. No release-notes line was ever recorded for this PR; the line below was written from the PR's own text.
A lane whose recorded directory holds a space is no longer left out of
worktrees --all, ofworktrees <lane>and of the inventory index:worktree_rowshands the directory to the control-root read quoted where it holds a space, aslane-startwrites it. (opensoft/openRepoTools#295)Review
READY, lane 4's independent paired review of both chains, 2026-10-31. It found no MUST and no SHOULD against the commits, and three NITs. Report sha256:
4ac9e5441affc6aeac48e6d73419580f6786440dc0e5dd32722cc40b8070a682. The review read the chains before the message amend (tips5f2995d43893and8104f2cf965c, the same trees as the amended tips).lanes-indexlines 1904 to 1905, docstring only:lane_generation's docstring reads as the full list oflane-state's 10s, but since A lane control root that cannot be searched reads as "no trees", so an inventory sync removes its rows (from #289's review) openRepoTools#291 there is a third, a blocked lookup; optional, and the same text would arise when the root branches land.rc_tree_idlacks the 180-character cap, so the shell suite fails when the run root is longer than about 111 characters, and the shell suite does not setXDG_STATE_HOME, so run (c) left two files outside its run root.The original's recorded review, from the root repository (no lane 3 review comment exists for it): an independent review of
e0970a8, by an Opus reviewer that wrote none of the code, is LAND, with no MUST, SHOULD or NIT. Its probe takespayload_subfield, the listing'sfield()and the fix'scasestraight from the branch, runs 28 rawdirspellings through them, and compares the result with what the writers read from the raw line; the fix agrees on every value the listing can carry, under bash 3.2.57 and 5.2.21. It re-applied both mutants and confirmed the untouchedlane-startandlane-handoff. The root's CI run 39612841509 ate0970a8was green on all four jobs.Landing
It lands only on Brett Heap's word, PR by PR; nothing in this text is a landing.
main, and nothing in this chain lands before it.fix/subfield-misreads-301, the code PR for Three ways a stored lane sub-field is misread: a TAB in a recorded dir drops the lane from worktrees --all, payload_subfield expands backslash escapes through awk -v, and request-handoff writes its by host sub-field unquoted openRepoTools#301 (T017: A dir with a TAB or a backslash is listed, indexed and reached as recorded, a stored sub-field reads back as written, and request-handoff refuses a host or container the fence rejects (opensoft/openRepoTools#301) (part of opensoft/openRepoTools#186) #4), is stacked on this branch.case; the chain's commit for A named worktree read answers "none" for a lane whose log or register could not be read (from #289's review) openRepoTools#290 carries that resolution, as its Resolutions section records.main.mainshowsMerge pull request #1). A merge commit keeps this commit's message and its receipt byte for byte, and the stacked chain lands as built, each PR after the one its base names. A PR stacked on this one is retargeted tomainbefore this PR's branch is deleted: deleting a merged base branch first closes the dependent PR.33ce26dinto the branch at open", with its push and the PR's own CI record:33ce26dis the root's frozenmain, and this leg's ownmainis the base here (the head is the commit above, with nothing merged in).[REFRESH AT PR TIME ...]and[REFRESH AT LAND TIME ...]brackets, which name the root's own CI runs and the root landing; this leg's own checks at open are recorded when the PR is opened (see Tests).Closes #Nline and itsgh pr merge --squash --match-head-commit --body-filesteps, with theland-ort4.shandland-ort3.shnotes: the commit's own message stands in, byte for byte, andCloses #Nbecomes "part of", with no closing keyword.lanes-edit.sh, equal at the base and at the head, and a call-site diff that prints nothing), on git objects only. The md5 isb0809a1e84722f1f518941b0063c926d(65 lines), lane 3's own recorded value, at the leg'smain2a057a6d84e5and at every commit of the chain, this commit95866d375199among them. The call-site diff from this PR's base (the leg'smain2a057a6d84e5) to this commit prints no line, out of 16 changed lines oflanes-edit.sh, so the check is not vacuous; frommainto this commit it prints none either, out of 16. The term holds.mainbefore this PR's branch is deleted)Lane: openRepoTools-4
Claim: opensoft/openRepoTools#295 (comment 6313854616)
🤖 Generated with Claude Code
Summary by Sourcery
Fix worktree discovery so recorded directories are reconstructed with the correct quoting before lane state and tree data are read.
Bug Fixes:
Tests: