Repository navigation
next-free counts the alias table's keys as taken positions, and a table it cannot read offers no position (batch 8 Q47 on opensoft/openRepoTools#165) - #33
Conversation
…le it cannot read offers no position (batch 8 Q47 on opensoft/openRepoTools#165) `lanes-edit.sh rename-lane A B` appends `A<TAB>B<TAB><UTC>` to `lanes/aliases.tsv`, and Amendment 16(e) says the old name resolves for ever. `rename-lane` already refuses a `<new>` that is an alias key, because a row under a former name takes precedence over the alias. But `lane_next_free` counted only rows, current and retired, so it offered the position `A` freed: `lane` printed "f = a new lane at the next free position" for it, and `lane-start` then resolved `A` to the renamed lane `B` rather than starting a new one. Lane 3's ruling, batch 8 Q47 (opensoft/openRepoTools#165, comment 6780753157): `lane_next_free` treats each alias key of the repository as a taken position, and a table it cannot read is its 1, as a register or an archive it cannot read is (Amendment 7(d)). - `lane_next_free` reads `lane_alias_keys` after `lane_position_rows`. On a failed read it notes the table and `lane_alias_err`'s reason and returns 1 with nothing on stdout. Otherwise each key joins the names it counts, under the rows' own rule: the whole name before the last hyphen is the repository, compared case-insensitively, and the position is the digits after it, a trailing letter dropped. Its stdin rows and `lane_position_rows` are unchanged. - Five comments that said `lane_next_free` hands a former name's position out, or called a row minted there legitimate, keep their history and now say the row-wins rule is the defence for such rows minted in the past, or by hand or by `add-row`, which reads no alias key: LOG_AWK's file rule, `lane_alias_hop`, `lane_alias_keys` (which now names all three of its callers), `rows_named_ci_alias` and `rename-lane`'s alias-key refusal. - No operator text on main tells anyone to take a former name's position, and `sr_known_die` is not on main. Tests, seven cases in tests/test_register_scan_hardening_138.py: a key `repoA-3`, `REPOA-3` or `repoA-3b` makes `next-free repoA` answer 4 over rows `repoA-1` and `repoA-2`; a key `repoA-foo-3` leaves it 3; an absent table leaves it 3; an unreadable local table, and a published one git cannot show, give exit 1, the note and no number. With fbda9d1's lanes-edit.sh the five key and unreadable cases fail (3, exit 0) and the other two pass. Lane: openRepoTools-3 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideImplementationUpdate
TestsAdd coverage for alias keys occupying positions under the rows’ matching rules, absent tables leaving results unchanged, and unreadable tables producing no position.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
|
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 21 hours by commenting |
…eeping both test blocks, #27's first The merge brings #28, #29, #31 and #33 onto this branch, on top of the #27 that lane 3 checked at 10799a5. One conflict, at the end of tests/test_a23_lane_handoff.py: #27 appended its test_the_no_tmux_refusal_names_its_mode_not_both_words block there, and this branch appended the #118 block (the _closed and _held helpers and the three test_118 cases) at the same place. Resolved by keeping both, unchanged and with two blank lines between them: code#27's block first, then this branch's. No other file conflicted; lane-handoff merged by itself. The resolved tests/test_a23_lane_handoff.py is blob 3927b53, the blob lane 3 computed on 10799a5. No commit after 10799a5 on code main touches that file or lane-handoff (git diff 10799a5 749e969 -- tests/test_a23_lane_handoff.py is empty), so the blob is the same. Checked before this commit: bash -n lane-handoff passes; each of the five test ids of the two blocks passes, run one at a time (2 for code#27's block, 3 for this branch's). Lane: openRepoTools-5 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>



Lane: openRepoTools-3
Claim: none (lane 3's own lane-tooling fix; opensoft/openRepoTools#165 6780753157, batch 8 Q47)
What and why
lanes-edit.sh rename-lane A BappendsA,Band the UTC tolanes/aliases.tsv, and Amendment 16(e) says the old name resolves for ever.rename-lanealready refuses a<new>that is an alias key, because a row under a former name takes precedence over the alias and would end that name's resolution.lane_next_freewas the one reader that disagreed. It counted only rows, current and retired, so it offered the positionAfreed.lanethen offeredffor it, andlane-startresolvedAthroughcanon-laneto the renamed laneBrather than starting a new one. A probe on a throwaway register, with rowsrepoX-1torepoX-3andrepoX-4renamed torepoX-3, shows both halves on fbda9d1:next-free repoXanswers 4, andcanon-lane repoX-4answersrepoX-3with "'repoX-4' is a FORMER name of lane repoX-3". On this branchnext-free repoXanswers 5.Lane 3's ruling is batch 8 Q47 (opensoft/openRepoTools#165, comment 6780753157):
lane_next_freereadslane_alias_keysafterlane_position_rows, and each key joins the names it counts under the rows' own rule. The whole name before the last hyphen is the repository, compared case-insensitively, and the position is the digits after it, a trailing letter dropped.lanes/aliases.tsvandlane_alias_err's reason, and nothing goes to stdout. An absent table changes nothing.lane_position_rowsare unchanged.Five comments said
lane_next_freehands a former name's position out, or called a row minted there legitimate. Each keeps its history and now says the row-wins rule is the defence for such rows minted in the past, or by hand or byadd-row, which reads no alias key:lane_alias_hop;lane_alias_keys, which now names all three callers (rename-lane,lane_checkout_oldandlane_next_free);rows_named_ci_alias;rename-lane's alias-key refusal.No operator text on main tells anyone to take a former name's position, and
sr_known_dieis not on main.Tests
Seven cases in
tests/test_register_scan_hardening_138.py, beside the existingnext-freecases and on the sameRegisterfixture. The stdin rows arerepoA-1andrepoA-2, so the answer is 3 until a former name holds that position.repoA-3: answers 4REPOA-3: answers 4repoA-3b: answers 4repoA-foo-3(another repository): answers 3The bite was shown by copying fbda9d1's
lanes-edit.shover the branch's, running the seven cases (5 failed, 2 passed), and restoring it withgit checkout. Its sha256 matched the fix's afterwards, and the seven passed again. Only these cases were run, by node id. The shell suite and the rest of the pytest suite were not run, so CI is owed.Selectors: the seven new ids are in
tests/test_register_scan_hardening_138.py, so any-kword that selects that module, orregister_scan, now selects seven more. No id is renamed or removed.🤖 Generated with Claude Code