Repository navigation
lane-end --retire passes over a helper too old for duplicate-holder and never reads a skipped read as nothing; duplicate-holder drops the lane's own tree; the suite's pgrep and ps can fail - #25
Conversation
…nd never reads a skipped read as nothing; duplicate-holder drops the lane's own tree; the suite's pgrep and ps can fail opensoft/openRepoTools#109: lane-end --retire read every exit 2 from `lanes-edit.sh duplicate-holder` as a process table that failed, so a helper that predates the verb (it answers "unknown subcommand 'duplicate-holder'", exit 2) stopped the act before the older transcript-holders read, which could still prove a duplicate. The read's stderr is now kept, and only those words are the old helper: the skip is noted, marked (dh_skipped), and the act goes on. Any other 2 is still a failure: lanes-edit.sh's own contract for these reads tells its two kinds of 2 apart by its words. opensoft/openRepoTools#110: a transcript-holders exit 2 was noted and then fell through to "nothing of any kind is live" (8). With dh_skipped and thh_skipped, a target that none of the reads that ran proved is refused with 1 ("A read that did not run is not 'nothing'"), and the "either" notes are not printed for a read that did not run. opensoft/openRepoTools#111: duplicate_holder_pids fenced the lane's own live pid only as a candidate, so the lane's pid as a wrapper's CHILD came back as a duplicate pair. The companion loop now drops a pair whose child is the lane's own live pid, as it drops a companion's host. opensoft/openRepoTools#112: the suite's fake pgrep and ps could only miss. FAKE_PGREP_F_RC, FAKE_PGREP_P_RC and FAKE_PS_FAIL_PID make them fail the way a read fails; unset, nothing changes. Tests: five failure cases beside the duplicate-holder baseline (#112), the own-pid-as-child case beside the companion cases (#111), and repoLV-1's retire act over an `oldhelper` wrapper beside the thfail cases (#109, #110). Lane: openRepoTools-3 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideImplementationMake
Exclude the lane’s own process tree from duplicate-holder results, but fail the read when that tree also contains another verified holder that cannot safely be retired.
TestsExtend the process-inspection fakes and cover failing
Cover wrappers containing the lane’s own live session, both alone and alongside a second holder of the same transcript.
Exercise retirement with helpers that lack holder-reading verbs, and verify that skipped reads are not treated as proof that no holder exists.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…econd holder; the child ps case reaches the child check (opensoft/openRepoTools#111, opensoft/openRepoTools#112) Fixes from the review of 73c9caf (READY AFTER FIXES). opensoft/openRepoTools#111 (S3): the first fix dropped every pair whose child is the lane's own live pid. So a wrapper over the lane's own session AND a second verified holder of the same transcript answered 8, and `lane-end --retire <second holder>` said "nothing of any kind is live" while that holder ran. duplicate_holder_pids now drops such a pair only when no other child verified; otherwise it returns 1, naming the wrapper, the lane's pid and the second holder, which no retire act can end without ending the lane's own session through its wrapper. The new W/L/D case sits beside the first opensoft/openRepoTools#111 case. opensoft/openRepoTools#112 (S1): the "ps fails on the child" case failed every ps of $DUP_CHILD, which is a pgrep -f candidate too, so it stopped at that pid's own candidate read (lanes-edit.sh:8934) and never reached the child check (:9039): with :9039's `return 1` turned into `continue` it still passed. FAKE_PS_FAIL_ARGS_PID fails only that pid's `ps -o args=` read, and the case now uses it. opensoft/openRepoTools#109 (review NIT): lane-end's die arm for a failed duplicate-holder read relays the helper's captured words, as lane_register_follow does. A comment records that the skip path is defensive: no lanes-edit.sh that has shipped reaches it, because seam_refuse asks managed-projection (ec12254) first and dies 1 on a helper that lacks it. Lane: openRepoTools-3 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
|
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 4 days and 8 hours by commenting |



Lane: openRepoTools-3
Claim: opensoft/openRepoTools#109 (comment), opensoft/openRepoTools#110 (comment), opensoft/openRepoTools#111 (comment), opensoft/openRepoTools#112 (comment)
Two commits:
73c9caf, the four fixes, and7e1d13a, the fixes from the review of73c9caf(READY AFTER FIXES: S1, S3 and the NIT on the die arm; S2 is answered in this text).main: this branch starts at86d635b. Three commits have landed onmainsince:3460f5etouches the release workflow and its test.9a219edtoucheslanes-edit.shandtests/test_lane_helpers.sh, well away from these hunks.b4b6b15touchestests/test_lanes_index.py.git merge-tree --write-tree b4b6b15 7e1d13ais clean (tree38ca7ad).The four defects
lane-end --retireread every exit 2 fromlanes-edit.sh duplicate-holderas a process table that failed (lane-end:3120-3123on86d635b). A helper that predates the verb answers it with "unknown subcommand 'duplicate-holder'", exit 2. The helper's own contract (lanes-edit.sh:20142-20149on86d635b) says a caller falls to its next rung on that 2, and that its two kinds of 2 are told apart by its words.transcript-holdersexit 2 was noted (lane-end:3496-3500on86d635b). It then fell through to "nothing of any kind is live", exit 8 (:3691-3692), though the session records were never read.duplicate_holder_pidsfenced the lane's own live pid only as a candidate (lanes-edit.sh:8923). With that pid as a wrapper's child, the read reported the lane's own process tree as a duplicate pair, andlane-endsent the person to "the OTHER pid", which was the wrapper.pgrepandps(tests/test_lane_helpers.sh:575-606on86d635b) could only miss, so no case reached the branches that read a failingpgrep -f,pgrep -Porps -pas a read that failed.opensoft/openRepoTools#109 and opensoft/openRepoTools#110 cannot be reached by any
lanes-edit.shthat has shipped. The change for them is defensive:lane-end's seam check runs first (seam_refuse,lane-end:3068). It asksmanaged-projectionand dies 1 on any exit but 0 or 8.managed-projectioncame inec12254(2026-10-04).duplicate-holdercame inf0b891b(2026-10-03) andtranscript-holdersin285b551(2026-09-14).f0b891bis an ancestor ofec12254, and counting the dispatcher arms at each commit confirms the order.managed-projection, and dies 1 at the seam before either read.oldhelperwrapper passesmanaged-projectionthrough to the current helper. It therefore imitates a helper that never shipped.lane-end:3132-3135now says the path is defensive.The fixes (line numbers on
7e1d13a)lane-end:3118-3154(lane-end:715 — duplicate-holder's exit-2 compat signal (helper predates the subcommand) is treated as a process-table failure, blocking the transcript-holders fallback (#61 round, suppressed) openRepoTools#109): theduplicate-holderread keeps its stderr inLE_TMP, whichcleanupremoves on every exit.case "$dh_rc:$dh_err"takes only2:*"unknown subcommand 'duplicate-holder'"*as the old helper: it notes the skip, setsdh_skipped=1anddh_rc=8, and goes on to the session-record read. Any other exit (a 2 in other words, or a 2 whose words could not be captured) dies 1 as before. Since7e1d13athat die first relays the helper's captured words (:3151), aslane_register_followdoes.lane-end:3531(lane-end:1021 — a predates-transcript-holders (exit 2) note lets the later dup_other check fall through to a clean 'no duplicate' verdict instead of refusing (#61 round, suppressed) openRepoTools#110): thetranscript-holders2 arm also setsthh_skipped=1.lane-end:3701and:3710(lane-end:1021 — a predates-transcript-holders (exit 2) note lets the later dup_other check fall through to a clean 'no duplicate' verdict instead of refusing (#61 round, suppressed) openRepoTools#110): the two "either" notes are not printed for a read that was skipped.lane-end:3733-3738(lane-end:1021 — a predates-transcript-holders (exit 2) note lets the later dup_other check fall through to a clean 'no duplicate' verdict instead of refusing (#61 round, suppressed) openRepoTools#110): before the 8 and 2 refusals, a skipped read dies 1. The message names the read that went unread and says "A read that did not run is not 'nothing'".lanes-edit.sh:9061-9087(lanes-edit.sh:5069 — duplicate_holder_pids excludes dhp_legit only as a parent, so the lane's own fork-session process as a candidate's CHILD can be reported as a duplicate pair (#61 round, suppressed) openRepoTools#111): in the companion loop, a pair whose child isdhp_legitis dropped only when no OTHER child of that wrapper verified for the same transcript. If one did, the read returns 1 and names the wrapper, the lane's own pid and the second holder (since7e1d13a; review S3). The first fix dropped such a pair, which answered 8 while the second holder ran. That holder cannot be retired without ending the lane's own session through its wrapper.tests/test_lane_helpers.sh:575-632(tests/test_lane_helpers.sh:385 — fake pgrep/ps only simulate clean absence, never a genuine process-table read failure, so the PR's fail-closed branches are untested (#61 round, suppressed) openRepoTools#112): the fakes gain four variables. Unset, they behave as before.FAKE_PGREP_F_RCandFAKE_PGREP_P_RCexit with that status and a stderr line.FAKE_PS_FAIL_PIDprints that pid's record, then exits 3.FAKE_PS_FAIL_ARGS_PID(since7e1d13a; review S1) does the same, but only for that pid'sps -o args=read.The new cases
tests/test_lane_helpers.sh:5570-5603(tests/test_lane_helpers.sh:385 — fake pgrep/ps only simulate clean absence, never a genuine process-table read failure, so the PR's fail-closed branches are untested (#61 round, suppressed) openRepoTools#112), beside theduplicate-holderbaseline. Each of these gives 1 and lists nothing:pgrep -fexits 3;pgrep -Pexits 3;psfails on the parent;ps -o args=read fails. This one usesFAKE_PS_FAIL_ARGS_PID, so it reaches the child check atlanes-edit.sh:9039. Failing everypsof$DUP_CHILDstopped at that pid's own candidate read (:8934) first.The fifth case is
lane-end --retirewithpgrep -fexiting 3: it gives 1, and nothing is termed.:5639-5660(lanes-edit.sh:5069 — duplicate_holder_pids excludes dhp_legit only as a parent, so the lane's own fork-session process as a candidate's CHILD can be reported as a duplicate pair (#61 round, suppressed) openRepoTools#111):$LIVE_PIDis$DUP_PARENT's child.duplicate-holdergives 8, andlane-end --retire $DUP_PARENTgives 8 and terms nothing.:5661-5685(lanes-edit.sh:5069 — duplicate_holder_pids excludes dhp_legit only as a parent, so the lane's own fork-session process as a candidate's CHILD can be reported as a duplicate pair (#61 round, suppressed) openRepoTools#111, the review's W/L/D case):$DUP_PARENT(W) wraps$LIVE_PID(L) and$DUP_CHILD(D).duplicate-holdergives 1 naming all three.lane-end --retire $DUP_CHILDgives 1, relays the helper's words, never says "nothing of any kind is live", and all three keep running.:11578-11633(lane-end:715 — duplicate-holder's exit-2 compat signal (helper predates the subcommand) is treated as a process-table failure, blocking the transcript-holders fallback (#61 round, suppressed) openRepoTools#109, lane-end:1021 — a predates-transcript-holders (exit 2) note lets the later dup_other check fall through to a clean 'no duplicate' verdict instead of refusing (#61 round, suppressed) openRepoTools#110), beside thethfailcases. This is repoLV-1's retire act over anoldhelperwrapper: noduplicate-holder; aduplicate-holderrefusing 2 in other words; notranscript-holders; and neither.No existing case's expectation changes. Only
lane-endcallsduplicate-holder. No existing fixture puts the lane's own pid under a wrapper, and no existing case makes either read exit 2 underlane-end --retire.Probes:
86d635b,73c9cafand7e1d13aTriage A's probe, adapted. It runs under
env -ion copies of each tree's tools, with the faketmux,pgrepandpsextracted verbatim from that tree's own test file.86d635b73c9caf7e1d13aduplicate-holder: the lane's own pid L as wrapper W's childlane-end --retire Wlane-end --retire Lduplicate-holder: W over L and a second holder Dlane-end --retire DFAKE_PGREP_F_RC,FAKE_PGREP_P_RC,FAKE_PS_FAIL_PIDon the parent, then on the childFAKE_PS_FAIL_ARGS_PIDon the childlane-end --retire WwithFAKE_PGREP_F_RC=3--retire DUP2duplicate-holdertranscript-holdersApart from S5 on
86d635b, every probe process was still alive after each act. All of them were gone after each run, and nolane-end-*temp file was left.The new test blocks, run verbatim. The three blocks were extracted from
7e1d13a's test file and run in a fixture of the same shape, with the suite's ownrun,is,hasandhasntand7e1d13a's fakes. Results by tools:7e1d13a: 44 passed, 0 failed, both withFAKE_TMUX_WINDOWSunset and with the suite's GD window table.73c9caf: 39 passed, 5 failed. All five are the W/L/D case.86d635b: 26 passed, 18 failed (8 in the lanes-edit.sh:5069 — duplicate_holder_pids excludes dhp_legit only as a parent, so the lane's own fork-session process as a candidate's CHILD can be reported as a duplicate pair (#61 round, suppressed) openRepoTools#111 block, 10 in the lane-end:715 — duplicate-holder's exit-2 compat signal (helper predates the subcommand) is treated as a process-table failure, blocking the transcript-holders fallback (#61 round, suppressed) openRepoTools#109 and lane-end:1021 — a predates-transcript-holders (exit 2) note lets the later dup_other check fall through to a clean 'no duplicate' verdict instead of refusing (#61 round, suppressed) openRepoTools#110 block). The tests/test_lane_helpers.sh:385 — fake pgrep/ps only simulate clean absence, never a genuine process-table read failure, so the PR's fail-closed branches are untested (#61 round, suppressed) openRepoTools#112 block passes on every tree, because that fix is in the tests only.The review's S1 mutant. On
7e1d13a's tools,lanes-edit.sh:9039'sreturn 1was turned intocontinue:7e1d13a's blocks: 42 passed, 2 failed. Both failures are the child case: rc 0 where 1 was expected, and a row listed.73c9caf's blocks: 37 passed, 0 failed, which reproduces the review's finding.What ran, and what CI must run
bash -nonlane-end,lanes-edit.shandtests/test_lane_helpers.shis clean under bash 5.2.21.git diff --checkis clean, and the new assertion descriptions pass the hygiene rule on backticks (SUITE_ASSERT_DESC).tests/test_lane_helpers.shhas no section selector or env filter (it does not honourOPENREPOTOOLS_SHELL_SECTIONS).tests/run.sh -kcan select onlytest_the_lane_helper_suite_passes, which is the whole suite.testsandtests-no-submodule, including both shell shards, plusguard-launch-modeandpackage.Fixes opensoft/openRepoTools#109
Fixes opensoft/openRepoTools#110
Fixes opensoft/openRepoTools#111
Fixes opensoft/openRepoTools#112
🤖 Generated with Claude Code