Repository navigation
validate-family.py: a member row's id: that is no project id is member-id-malformed in every mode, and so is a mounted member's own project.yaml id:, with the bump that writes the row from that file (#1204) - #1273
Conversation
…git dies on read the `.gitmodules` git reads, the index's where the work tree's is gone, and every section's lines end `git add -- .gitmodules`, so a plain `git commit` after them takes the section out of HEAD (#1077) RV1069's review of #1069 (#1036) found four follow-ups, each measured on main before this change. NIT 1. `gitmodules-path-twice` read the work tree's file alone. A second section for members/IRRS staged in the index's file, the work tree's deleted, was `family ok` in every mode, and a clean clone of the commit after it failed its update and its gate. It reads the sections as git reads them now (`_sections_as_git_reads`), as `gitmodules-path-unnamed` does since #1036, and where the work tree's file is gone it names the line that puts back the file git reads first, recorded so no later finding puts it back over the hand edit. NIT 2. The value check read the work tree's file and HEAD's, never the index's. An `update = !true` staged in the index's file alone, in a named member's section, was `family ok` while git's own `submodule status` exited 128. It reads the file git reads (`_listed_as_git_reads`) and names the index's where that is the one read. Its lines put that file back, not HEAD's, and end "then stage", or "then stage and commit" where HEAD's gives the value too. Where HEAD's alone gives it, the text says to commit the index's file, with no line, so a fix staged there is kept, and `member-gitmodules-absent` then puts the file back itself (`_check_gitlinks_registered` asks `Report.put_back` alone). Git is asked in the order it was asked before, the work tree's file, then HEAD's, then the one read in its place, so `git-not-runnable` names what it named. NIT 3. Where HEAD's file held the section, `gitmodules-path-unnamed`'s lines ended "then commit .gitmodules" and staged nothing, so a plain `git commit` after them left the section in HEAD and a clone's gate failed. Every branch, in members/, outside it and in another case, prints `git add -- .gitmodules` after the keys and says "then stage and commit" there; path-twice ends "then stage and commit" too. NIT 4. A row now covers the case-variant branch where HEAD's file holds no section of the name (RV1069's probe `test_r2_stray_not_in_head`). tests/test_validate_family_index_gitmodules.py holds the new rows: each types only the printed lines, and what the text says in words, then a plain `git commit`. The older rows that pinned the old text, HEAD's put-back and #1036's control are updated to the new behaviour. Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…its own, so #1111's hygiene test passes, path-twice says "back first from" the file it puts back, and two rows pin the value's write-back and path-twice's recorded put-back (#1077) Fix round 1 on #1124, from RV1124's review at 672845c. S1. `_listed_as_git_reads` opened with a bare `os.path.lexists(root / GITMODULES)`, which #1111's `test_path_guard_hygiene.py` fails by file and line. Its one caller, `_check_gitmodules_values`, asks it only where the work tree's file is gone, and `_gitmodules_put_back`, which the function calls next, asks the same `lexists` (it is on the test's allowlist), so the guard is dropped. N3. Two behaviours had no row; mutants A and B survived all 439 rows of the PR's nine files. A row for each, from RV1124's probes P10 and P7: - the value's write-back reads the file git reads, not HEAD's (A); - path-twice records its put-back, so `gitmodules-path-unnamed` after it prints none and a plain commit keeps neither `second` nor `members/Old` in HEAD (B), where the work tree's file is deleted or its deletion is staged. N4. Path-twice said "back from HEAD's, as the index holds none first": "first" sat on the wrong phrase. It says "back first from {whose}". N5. `_gitlink_out_first`'s docstring said its text ends "then commit .gitmodules"; every branch stages now, and it says which words each branch ends with. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…s `.gitmodules` beside the work tree's and its stage remedies end `git add -- .gitmodules`, an index file git cannot parse is refused, and an unmerged one is read as none (#1150) RV1124's review of #1124 (pull/1124#issuecomment-6321372469) found three things outside #1124's fix round, each older than #1124 and measured again on main 961640c and on #1124's head 8dfa32b before this change: - N1: where the work tree's `.gitmodules` is on disk, the check never read the index's, which a plain `git commit` records. A value in both was taken out of the work tree's by a line that staged nothing, so the commit after it recorded the value in HEAD; a value in the index's alone was `family ok`. The check reads the index's too now, names the latter ("in the index's file alone"), and every remedy that says to stage the file ends with the line that does. - N2: an index's file with a line git cannot parse was read as nothing (`git config --blob` exits 128 there), so a value or a section before the line was never named. It is `gitmodules-unreadable` now, as HEAD's is. - N6: while a merge leaves `.gitmodules` unmerged in the index, git's submodule commands read no file, and the checks read the work tree's or HEAD's. They read none now; a value HEAD's gives says to resolve the merge without the key, then stage and commit. One finding changes: a value only the work tree's file gives, on disk, while unmerged, HEAD's clean, is no finding until the merge is resolved and staged, as git reads no file until then. Stacked on #1124 at 8dfa32b: every item also holds on main, but the code each fix changes (`_blob_listed`, `READ_HERE`, `_listed_as_git_reads`, the stage line) is #1124's. Closes #1150 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ules` and the work tree's give, with no index's file, is pinned to end with the line that stages it, as HEAD's value, not the index's, is what adds that line (#1150) Mutant M3 of 442615e (`if committed or staged:` cut to `if staged:` in `_value_taken_out`) survived all 170 rows of the three changed test files: in every row whose lines take out a value HEAD's file gives, the index's file gives it too, or the work tree holds no `.gitmodules`, so `staged` was true there anyway. The new row has the work tree's file and HEAD's give `update = !true`, and `git rm --cached` has taken `.gitmodules` out of the index. Under M3 the finding ends at the `--unset-all` line, and the plain `git commit` after it records `.gitmodules` gone from HEAD, and the gate then finds `member-gitmodules-absent`, exit 1. The row fails under M3, on #1124's head 8dfa32b and on main 961640c, and passes on 442615e. Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e for: templates/family-root/scripts/validate-family.py tests/test_family_gitmodules_values.py tests/test_validate_family_index_gitmodules.py Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
#1208 touches validate-family.py (a docstring) and tests/test_validate_family_index_gitmodules.py (a new row); the text merges cleanly. The new row's re-pin to this branch's stage line follows in its own commit (rv1227's M1). Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ue HEAD gives where the deletion of `.gitmodules` is staged expects the stage line last and types no `git add` by hand, since this branch's lines end with it rv1227's M1 on #1227. Main's #1208 added the row while its finding ended at the `--unset-all` line; this branch's `_value_taken_out` ends every line set that says to stage the file with `git add -- .gitmodules`. Measured on the merge (git 2.43.0): the three printed lines typed in order, then a plain `git commit`, leave HEAD without the value, the index and the work tree equal to it and `git status` clean, and the gate passes; typed without the stage line, the commit exits 1 (`no changes added to commit`) and HEAD keeps the value. Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… and the init stop ask nothing, a value the work tree alone gives after a staging line is staged again, and another index value of the key is named, not "gives it too" rv1227's review of #1227 (issuecomment-6374575208), its M2, S1, N1, N2, N3, N4 and N5, each measured on git 2.43.0 on the branch merged with main e04826d (d95308e) before this change: - M2. With `.gitmodules` at conflict stages, git reads no file: `git submodule status` and `update --init` exit 128 at every gitlink, and a plain clone of HEAD checks tools/x out. `_sections_as_git_reads`' none made `gitlink-unnamed` say no section gave tools/x and a plain clone stopped there, and `member-uninitialized` say to write back a section the file gave. `_check_gitlinks_elsewhere` and `_init_stop_said` ask nothing while unmerged now. The hand mount's reads keep reading none, as git's own `git rm` does there: its plain `git rm` of a clone dies (`could not lookup name for submodule`, exit 128), and `--cached`, the line it prints, exits 0. - S1. `_value_taken_out` takes `again`: after a finding whose lines end `git add -- .gitmodules`, a value the work tree's file alone gives ends with that line too, and says why (`STAGED_ABOVE`). - N4. Where the index's file gives the key another value, the finding names it (`INDEX_GIVES`, `_values_said`) in place of "gives it too". - N1, N5. `_blob_paths` and `_blob_sections` say they refuse an index's file git cannot parse; `GIVEN_WHERE`'s comment says `(False, False)`. tests/test_validate_family_index_value_unmerged.py: rows for M2 (e2d, two ids; e2e), S1 (e4o1, e4o2), N4 (e4c), N2 (e1b), N3 (a real modify/delete conflict, and the sections row's on-disk id). S2, the sparse checkout, is a Limit of #1227 and a follow-up issue. Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e S1 fix carries to every later finding is pinned for a third value and for a committed value the index lacks, and N4's row also for an index file giving the value and another rv1227c's independent review of #1227 (issuecomment-6722728204), its SHOULD S1, test-only. Two mutants of the S1 code survived all 181 rows of the PR's three files, and probes showed each puts a value git dies on into HEAD: K6 (`staging = committed or staged`, the stage line not carried past the next finding) and K8 (`staging = staging or staged`, a committed value's stage line not carried). The S1 row pinned only the finding right after a value that is both staged and committed. validate-family.py does not change. - test_every_later_value_the_work_tree_alone_gives_stages_again (new, rv1227c's p2a): `update = !true` staged for IRRS, then `update = !false` and `fetchRecurseSubmodules = sometimes` in IRSS's section, the work tree's file alone. The second and third findings each say `STAGED_ABOVE` and end with the stage line; typed in order, then a plain `git commit`, HEAD is as it was. K6 fails it. - test_a_committed_value_the_index_lacks_stages_the_later_ones_again (new, rv1227c's p8): IRRS `!true` committed, the index's file staged without it, the work tree's giving IRRS `!true` and IRSS `!false`. IRRS's finding is committed and not staged, and its `git add` stages IRSS's value all the same, so IRSS's ends staging again. K8 fails it. - test_another_value_the_index_s_file_gives_the_key_is_named gains an id (rv1227c's p3c, its K11): the index's file giving `!true` and `!false` beside the work tree's `!true` names both. The old id is `[another-value]` now, the new one `[this-value-and-another]`. - `staged_again` builds the later finding's text for the S1 row and the new rows, which the S1 row spelled out inline. Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…mber-id-malformed` in every mode, and so is a mounted member's own `project.yaml` `id:`, with the `bump` that writes the row from that file (#1204) `PROJECT_ID_RE` was asked of the family's own id alone. A row's `id:` met the mounted `project.yaml`, compared as text, and `_check_member_ids_unique`, and neither is a pattern: under `--no-members` a row id of "irrs\n", "irrs\r", "IRRS Capital" or "-x" was `family ok`, and the holder a pre-#1166 `add` wrote for a member whose own id read "irqs\n" was `family ok` in every mode. `_check_member_ids_well_formed` asks `_is_project_id(str(id))` of every row `_check_member_ids_unique` asks, from `_check_members` before the `--no-members` return. `_check_member_identity` asks the member's own id as `family.py add` asks it, `str(id or "")`, and says no `member-id-mismatch` where either id is malformed. Both remedies are a `bump`: to the commit the row pins, or to the commit that mends the member's own file. AGENTS.md names the code; `ID_READERS` counts the new reader. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…se own `id:` reads as the number 0 is refused, as `family.py add` refuses it, so the gate's `str(id or "")` reading of the member's own id is held (#1204) Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… line makes the branch `family.py` suggests for `bump`, `family/bump-member` for an id no branch word spells (#1204) Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… as an earlier one, its `id:` malformed, is `member-duplicate`'s alone, as `_check_member_ids_unique` skips it (#1204) Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideImplementationAdd whole-string project-ID checks for member rows in every validation mode and mounted members’ manifests, suppressing mismatches when either ID is malformed and providing
DocumentationDocument the new
TestsCover malformed row and mounted-member IDs, validation modes, existing findings, remediation commands, and agreement with
Update the reader-count check for the shared member project-ID validator.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
(lane openRepoShape-1, 2026-11-08T20:43:46Z) Independent review r1204 of #1273 at r1204: independent review of #1273 (issue #1204) at
|
| step | base ccc2c2d2 |
head d56f2084 |
merge with main 40cb8086 |
|---|---|---|---|
validate-family.py --no-members |
exit 0, family ok |
exit 1, member-id-malformed (the row's) |
exit 1, the same |
issue's remedy, family.py remove --family-root <h> --member IRRS |
exit 0; NOTE that member's object store is left behind ... <h>/.git/modules/members/IRRS and an rm -rf line; the store is still there (True) |
the same | the same |
then family.py add --family-root <h> --member InkRouter/IRRS --at <pin> |
exit 2, REFUSED member-git-dir-cached: <h>/.git/modules/members/IRRS still holds the object store of a previously removed IRRS, and git submodule add will not write over it |
the same | the same |
add without --at |
exit 2, member-git-dir-cached |
the same | the same |
| gate after that | exit 0, family ok ... 1 member(s): the member is gone and the gate passes |
the same | the same |
PR's remedy, family.py bump --family-root <h> --member IRRS --to <pin> |
typed (base prints none): exit 0, IRRS 53946f63a693 -> 53946f63a693, committed 40008eb513cc: members/IRRS, family.yaml |
as printed: exit 0, one commit, row id: 'irrs', pin and gitlink unmoved, status clean |
as printed: exit 0, committed a12158791ab0, row id: 'irrs', gitlink unmoved |
gate after bump |
exit 0 members checked; exit 0 --no-members |
the same | the same |
CI holder (fresh clone, no member checked out): printed switch + bump |
(no finding on base) | exit 2, member-uninitialized, naming git submodule update --init members/IRRS; after it, the same bump exits 0 |
the same |
Conclusions:
- The writer's account holds on all three trees. family.py: the
removethat bothmember-duplicate-idremedies name and theaddthatbump'smember-unknownnames carry--family-root <holder>, quoted for the host, so each runs as printed (#1005) #1117 changes no part of it. - The issue's two lines do not run as printed. Following them as far as
add's refusal leaves a holder that has dropped the member and still passes the gate. - Convention:
_bump_tospells the line exactly as_lockstepdoes:{PYTHON} scripts/family.py bump --family-root {shlex.quote(str(root))} --member {shlex.quote(project)} --to .... Both remedies end withBRANCH_LEFTin the same string as their_switch_line, andtests/test_family_switch_branch_exists.pypasses on the merge (call 3).- The switch word for a malformed row id is
member, matchingfamily.py's_suggested_branch. For the member's own finding it is the row id or the project (family/bump-irssine4).
- The switch word for a malformed row id is
- README "Windows, natively" sentence: still true.
validate-family.pycalls no host quoter (shlex.quoteandshlex.joinonly).tests/test_readme_windows_quoting_sentence.pypasses on the merge with main (call 3).
Values that are not strings (brief item 3)
I parsed each spelling with the repository's own parse_yaml and asked the head's _check_member_ids_well_formed (tools/values.py):
| spelled | read as | row check | add's str(v or "") |
|---|---|---|---|
2026 |
int 2026 | ok | ok |
0 |
int 0 | ok ("0") | refused ("") |
007 |
int 7 | ok ("7") | ok |
true / false |
bool | refused (True / False) |
refused |
1.5 |
float | refused | refused |
-3 |
int | refused | refused |
[irrs] / {irrs: 1} |
list / dict | refused | refused |
"" |
str '' | refused | refused |
null / ~ / no id: |
None | absent (left to member-id-absent, members checked) |
refused |
yes, on, 0x1f, 1e3, 2026-01-01 |
str (this parser keeps them as text) | ok | ok |
.inf, 1_000, +3 |
str | refused | refused |
- The row reading,
str(), is the right one. It matches the text the identity check always compared, and it matchesfamily.py's_member_id, which rewrites a row asstr(value)and whose docstring saysid: 2026passes. - The mounted path reads exactly as
adddoes. - The two readings part only at a bare
0. That case is correct at head, but no row holds it (NIT 3). nulland noid:stay withmember-id-absent: members checked, and silent under--no-members. Rows[null]and[no-id]hold this.
The pinned copy (brief item 4)
- The import list is unchanged in the diff (
git diff ccc2c2d2 d56f2084touches nofrom repo_shape importline).COMMIT_RE,PROJECT_ID_RE,PYTHONandshlexwere already imported, so an older holder'srepo_shape.pyis enough. - I did not run
tests/test_pinned_copy_text.py; the brief excludes the pin call. ID_READERSnow counts 2fullmatchreaders invalidate-family.py: the family id and_is_project_id.- Measured: every merged tree (main, bootstrap.py, validate-family.py and siblings.py: a root or holder whose
.gitthis user cannot read is refusedgit-repo-unreadable, exit 2, not a traceback ornot-a-git-repo, and the doctor'smembersrow names it once, never drift (#1148) #1172, validate-family.py: a member whose.gitfile this user cannot open, or whose git directory (its own.git, or the one its gitfile names) this user cannot search, is refusedmember-unreadablenaming that part, and no longermember-commit-unresolvable, which said the pinned commit was missing and prescribed a fetch (#1221) #1246) has 2PROJECT_ID_RE.fullmatchcalls and 0.matchcalls invalidate-family.py. tests/test_value_pattern_line_break.pypasses at head (call 1a) and on the merge with main (call 3).
- Measured: every merged tree (main, bootstrap.py, validate-family.py and siblings.py: a root or holder whose
The rows (brief item 5)
New file, base validator laid into the scratch clone at d56f2084, then written back from HEAD's blob:
laid ccc2c2d2...:templates/family-root/scripts/validate-family.py work tree 4683c3cf...- base:
27 failed, 14 passed in 32.74s laid HEAD:... work tree c9a37c41... HEAD c9a37c41... EQUAL-TO-HEAD- head:
41 passed in 37.40s
| row | base | head |
|---|---|---|
test_a_row_id_the_pattern_refuses_is_found_under_no_members[line-feed, carriage-return, space, leading-dash] |
4 failed | 4 passed |
test_with_members_checked_it_is_the_one_finding_not_a_mismatch[same four] |
4 failed | 4 passed |
test_a_row_id_whose_text_is_no_id_is_found[bool, float, negative, list, mapping] |
5 failed | 5 passed |
test_the_holder_add_wrote_before_1166_is_refused_in_every_mode |
failed | passed |
test_a_mounted_member_whose_own_id_is_malformed_is_found[equal-to-its-row, row-well-formed] |
2 failed | 2 passed |
test_the_members_own_id_is_asked_as_add_asks_it |
failed | passed |
test_the_rows_remedy_runs_as_printed_from_the_tracking_branch |
failed | passed |
test_the_members_remedy_pins_the_mended_commit_as_printed |
failed | passed |
test_add_refuses_exactly_the_ids_the_holders_own_validator_finds[8 malformed] |
8 failed | 8 passed |
CONTROLS test_add_refuses_...[zero, irrs, hyphen, digit-first] |
4 passed | 4 passed |
CONTROLS test_a_well_formed_row_id_is_family_ok_under_no_members[zero, irrs] |
2 passed | 2 passed |
CONTROLS test_the_fixture_is_family_ok_in_every_mode[members, no-members, pins] |
3 passed | 3 passed |
CONTROL test_a_well_formed_row_id_that_is_not_the_members_is_still_a_mismatch |
passed | passed |
CONTROL test_a_row_id_that_reads_as_a_number_is_its_digits |
passed | passed |
CONTROL test_a_row_spelled_as_an_earlier_one_is_member_duplicates_alone |
passed | passed |
CONTROLS test_a_row_with_no_id_is_still_member_id_absent_alone[null, no-id] |
2 passed | 2 passed |
| total | 27 failed, 14 passed | 41 passed |
Every base failure is the defect:
assert 0 == 1, with thefamily okoutput (14);(True, False) == (True, True), whereaddrefuses and the gate finds nothing (8);member-id-mismatchwhere the row's finding is wanted;IndexErrorwhere the remedy row finds no finding to type.
Cases the rows miss: the <commit> fallback and a quoted holder path (NIT 2), and a bare 0 (NIT 3). All three are correct as measured, in probes e1, e3 and e2.
Mutants (brief item 6)
- All mutants ran in the scratch clone
_lane1-scratch/r1204/cloneatd56f2084, one at a time, usingtools/mutate.py. - After each one, a
finallywrote the file back from HEAD's blob. Every restore printedrestored: work tree c9a37c41009c98cf7bdfb00093fcd6179009634d HEAD c9a37c41009c98cf7bdfb00093fcd6179009634d EQUAL. - Each ran over the new file unless the table says otherwise.
Mine: 10 of 14 killed.
| id | mutant | result |
|---|---|---|
| R1 | _is_project_id: fullmatch changed to match |
KILLED, 8 failed (every line-feed row) |
| R2 | the _check_member_ids_well_formed call removed |
KILLED, 24 failed |
| R3 | the member's own id asked of the row's id | KILLED, 8 failed |
| R4 | elif source_bad: only, so a malformed row id also gets a mismatch |
KILLED, 4 failed |
| R5 | the row's text .strip()ped before it is asked |
KILLED, 10 failed |
| R6 | row check reads str(member_id or "") |
SURVIVED, 41 passed (NIT 3) |
| R7 | _bump_to leaves the holder's path unquoted (new file + test_validate_family_branch_step.py) |
SURVIVED, 64 passed (NIT 2) |
| R8 | the row's switch line words the project, not the row id | KILLED, 1 failed (..._rows_remedy_runs_as_printed_...) |
| R9 | the member's own remedy names the row's pin, not <commit> |
KILLED, 3 failed |
| R10 | the row check made under --no-members only |
KILLED, 6 failed |
| R11 | identity check's row question reads str(recorded_id or "") |
SURVIVED, 41 passed (NIT 3) |
| R12 | the COMMIT_RE fallback to <commit> removed |
SURVIVED, 41 passed (NIT 2) |
| R13 | the row check's non-mapping guard removed (new file + test_validate_family_duplicates.py + test_family_members_not_a_list.py) |
KILLED, 7 failed, all in the two older files: a traceback on a non-mapping row |
| R15 | the member's own switch word is the project, not the row id | KILLED, 1 failed (..._members_remedy_pins_the_mended_commit_...) |
The writer's M10 (a row spelled as an earlier one is asked too) checks out:
- at
d56f2084: KILLED,1 failed, 40 passed in 38.16s, bytest_a_row_spelled_as_an_earlier_one_is_member_duplicates_alone; - with
9fc09305's test file laid in: SURVIVED,40 passed in 39.73s.
The test file was then written back from HEAD's blob (18af8751..., EQUAL-TO-HEAD). The validator blob is c9a37c41 at 0ab49ee2, f2dade54, 9fc09305 and d56f2084, so the writer's M1 to M9 ran on this head's code, as the body says.
Gate calls (brief item 7), every summary line
- Probe environment: stub
ghfirst onPATH,GH_TOKEN=bogus-r1204, emptyGH_CONFIG_DIR,GIT_CONFIG_GLOBAL=/dev/null,GIT_SSH_COMMAND=false,[email protected],env -u LANES_LANE,TMPDIRin scratch,PYTHONDONTWRITEBYTECODE=1. - Python 3.12.3, git 2.43.0 (
/usr/bin/git). - At most 2 of my pytest calls at once, each under 9 minutes;
df -h /workspace(93-100G free) anddf -i /(41-42%) checked before each.
| call | tree | result |
|---|---|---|
1a. the new file, tests/test_family.py, tests/test_family_add_member_id.py, tests/test_value_pattern_line_break.py |
head | 198 passed in 225.61s |
1b. #1227's tests/test_family_gitmodules_values.py, tests/test_validate_family_index_gitmodules.py, tests/test_validate_family_index_value_unmerged.py |
head | 184 passed in 297.69s (1a + 1b = 382, the collected count) |
2a. test_validate_family_{branch_step, duplicates, git_not_runnable, index_gitmodules, index_value_unmerged, member_id_pattern}.py |
head | 232 passed in 354.36s |
2b. test_validate_family_{member_path_glob, remedies_typed, typed_states, unnamed_mounts, unreadable, without_git}.py |
head | 189 passed in 244.84s (2a + 2b = 421, all 12 files) |
3. tests/test_readme_windows_quoting_sentence.py, tests/test_remove_add_remedies_family_root.py, tests/test_family_bump_to_checks.py, plus the new file, tests/test_value_pattern_line_break.py, tests/test_family_switch_branch_exists.py, tests/test_family_add_member_id.py, tests/test_agents_md_codes.py |
predicted merge with main 40cb8086 (bdb5ccb4, tree d0d49d5b) |
253 passed in 230.23s |
4. tests/test_scaffold_leg_path_collisions.py, tests/test_path_guard_hygiene.py, tests/test_no_auto_maintenance.py |
head | 283 passed, 2 skipped in 42.35s; both skips tests/test_no_auto_maintenance.py:222: the session began with GIT_CONFIG_GLOBAL set |
5. tests/test_agents_md_codes.py, tests/test_cli_reference.py, tests/test_repo_hygiene.py |
head | 171 passed in 47.26s |
Probes, in the scratch clone only, never committed:
test_r1204_probe_remedy.py: base3 passed in 11.81s, head3 passed in 11.75s, merge3 passed in 13.29s;test_r1204_probe_edges.py(head):4 passed in 10.91s.
The 3.14-like sitecustomize shim was not needed: the change adds no is_file, exists, is_dir or stat call. _check_member_identity's _is_a was already there, and tests/test_path_guard_hygiene.py passes (call 4).
Merges (brief item 8)
git merge-tree --write-tree d56f2084 <other>:
- current
origin/main40cb8086fb48622a1b195fc9e50ee422f036386e: exit 0, clean, treed0d49d5b0b75fdbfdb2f59ae581300c41d956c0f; - lane 1's bootstrap.py, validate-family.py and siblings.py: a root or holder whose
.gitthis user cannot read is refusedgit-repo-unreadable, exit 2, not a traceback ornot-a-git-repo, and the doctor'smembersrow names it once, never drift (#1148) #1172 headba81fd7d29ec19ab52c537d85e6e8df6178cfd30: exit 0, clean, tree4f157f26ea4a1a9520b44680b32b1d8ee7663a23; - lane 3's validate-family.py: a member whose
.gitfile this user cannot open, or whose git directory (its own.git, or the one its gitfile names) this user cannot search, is refusedmember-unreadablenaming that part, and no longermember-commit-unresolvable, which said the pinned commit was missing and prescribed a fetch (#1221) #1246 head0deac3a6581b308e5761c420456bac51f0fe5f11(fetchedrefs/pull/1246/head): exit 0, clean, treeff828224be5405aead14263bf9797aa4bd6a271c.
Further checks:
- validate-family.py: a member whose
.gitfile this user cannot open, or whose git directory (its own.git, or the one its gitfile names) this user cannot search, is refusedmember-unreadablenaming that part, and no longermember-commit-unresolvable, which said the pinned commit was missing and prescribed a fetch (#1221) #1246 changes_check_member_treeand adds gitfile readers, but not_check_member_identity. - In all three merged trees,
_check_member_identity(root, member, ...)has 1 call and_check_member_ids_well_formed(root, members, report)has 1 call. refs/pull/1256/headis absent on origin (git ls-remotelists 1172, 1227, 1246 and 1273 only).- Stacking:
ccc2c2d2has parents81eaf757and2d56c190, its tree is1e564383, andgit merge-tree --write-tree 81eaf757 2d56c190gives1e564383. validate-family.py: the check for values git dies on reads the index's.gitmodulesbeside the work tree's and its stage remedies endgit add -- .gitmodules, an index file git cannot parse is refused, and an unmerged one is read as none (#1150) #1227's head on origin is still2d56c190, so the stacking statement is right and no restack is needed today.
The body (brief item 9)
- Exactly one closing form,
Closes #1204(line 5).gh pr viewgivescloses: [1204], headd56f2084, basemain, draft. - The outside-v1.2.0 ruling is named.
- Every table I re-measured agrees with the body:
- the before and after table and its two quoted findings;
- 27/14 on base, 41 at head;
- the rejected-remedy measurement, which also holds on current main;
bump's "<sha> -> <sha>" commit message (Known limits; I measuredIRRS 53946f63a693 -> 53946f63a693);- call 1 is 381 at
9fc09305and 382 at head; call 2 is 421; - the merge-trees with bootstrap.py, validate-family.py and siblings.py: a root or holder whose
.gitthis user cannot read is refusedgit-repo-unreadable, exit 2, not a traceback ornot-a-git-repo, and the doctor'smembersrow names it once, never drift (#1148) #1172 and validate-family.py: a member whose.gitfile this user cannot open, or whose git directory (its own.git, or the one its gitfile names) this user cannot search, is refusedmember-unreadablenaming that part, and no longermember-commit-unresolvable, which said the pinned commit was missing and prescribed a fetch (#1221) #1246; - AGENTS.md at 494 lines, with line 404 at 129 characters.
- Stale or inaccurate: the main merge figure (NIT 6), and one docstring sentence that the body does not repeat (NIT 1).
What I did not cover
- The full suite, the pin call (
tests/test_pinned_copy_text.pywithtest_shape_pin_*andtest_update_shape*),tests/test_shape_doctor.py, andtests/test_template_text_placeholders.py. The brief excluded them; the writer's counts are in the body. - git 2.47.1 (no path named in my brief; NIT 7) and CPython 3.14 (bench has 3.12.3 only).
- Windows, where
PYTHONispython. - The SonarCloud and Linux CI status of the PR.
- The predicted merge with bootstrap.py, validate-family.py and siblings.py: a root or holder whose
.gitthis user cannot read is refusedgit-repo-unreadable, exit 2, not a traceback ornot-a-git-repo, and the doctor'smembersrow names it once, never drift (#1148) #1172 or validate-family.py: a member whose.gitfile this user cannot open, or whose git directory (its own.git, or the one its gitfile names) this user cannot search, is refusedmember-unreadablenaming that part, and no longermember-commit-unresolvable, which said the pinned commit was missing and prescribed a fetch (#1221) #1246 was not run, only merge-tree'd.
Lane: openreposhape-1 (openRepoShape-1)
…ember_ids_well_formed` says `member-pin-commit` refuses the run first where members are checked, and rows hold a pin that is no commit as `--to <commit>`, the holder's path quoted in the printed `bump`, and a bare `id: 0` as its digits (#1204) Answers NITs 1-3 of review r1204 on #1273. No behavior of validate-family.py changes; only the docstring does. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
(lane openRepoShape-1, 2026-11-08T21:07:50Z) Lane 1's round on r1204's review (issuecomment-6726873431):
Lane: openreposhape-1 (openRepoShape-1) |
|
(lane openRepoShape-1, 2026-11-08T21:14:54Z) Independent delta check r1204b (r1204, resumed) of #1273 at r1204: delta review of #1273 at
|
| id | mutant | d56f2084 (round 1) |
0657e396 |
|---|---|---|---|
| R6 | the row check reads str(member_id or "") |
survived, 41 passed | KILLED, 1 failed, 43 passed in 40.76s: test_a_row_id_that_reads_as_a_number_is_its_digits[zero] (assert 1 == 0 under --no-members) |
| R7 | _bump_to leaves the holder's path unquoted |
survived, 64 passed | KILLED, 1 failed, 43 passed in 41.85s: test_the_rows_remedy_runs_as_printed_from_the_tracking_branch[space-and-apostrophe] (ValueError: No closing quotation) |
| R11 | the identity check's row question reads str(recorded_id or "") |
survived, 41 passed | KILLED, 1 failed, 43 passed in 40.58s: ..._its_digits[zero] (assert 0 == 1, members checked: the mismatch was dropped) |
| R12 | the COMMIT_RE fallback to <commit> removed |
survived, 41 passed | KILLED, 1 failed, 43 passed in 40.88s: test_a_pin_that_is_no_commit_is_named_to_commit (assert ['IRRS', '--to', 'abc'] == ['IRRS', '--to', '<commit>']) |
Every restore printed restored: work tree 4e011252497e0dc276d092707b72c34117570078 HEAD 4e011252497e0dc276d092707b72c34117570078 EQUAL. With these four, my mutants stand at 14 of 14 killed.
3. The new rows assert what they claim, and the NIT 1 sentence matches probe e1.
test_a_pin_that_is_no_commit_is_named_to_commit:- Under
--no-members, the onemember-id-malformedfinding, and thebumpargv ends['IRRS', '--to', '<commit>']. - With the members checked: exit 2, stderr starts with
REFUSED member-pin-commit: IRRS:, andmember-id-malformedis absent. - That is exactly what probe
e1measured atd56f2084(exit 2,REFUSED member-pin-commit: IRRS: pin.commit is 'abc', which is not 40 hex. ..., the row's finding not printed). - It also matches the reworded docstring at
validate-family.py:1982-1984: "...--to <commit>; where members are checked,member-pin-commitrefuses the run first, and this finding follows once the pin is mended."
- Under
test_the_rows_remedy_runs_as_printed_from_the_tracking_branch[space-and-apostrophe]:- It moves the whole
on_mainholder totmp_path / "it's a holder". The members' gitfiles andcore.worktreeare relative, so the move keeps them valid. It then runs the same assertions as[plain]. - The switch's argv equals
switch_argv(holder, "bump", "irrs\n"), thebumpis typed as printed and exits 0, the row readsid: irrswith the pin unmoved, the tree is clean, and the gate is green in both modes. - R7 shows the quoting is held.
- It moves the whole
test_a_row_id_that_reads_as_a_number_is_its_digits[2026, zero]:repr(value) == str(number)proves the row parses as an int, not a string.--no-members: exit 0 and afamily ok:last line.- Members checked: exactly
FINDING member-id-mismatch: members/IRRS: project.yaml declares id 'irrs' but family.yaml records 0 for IRRS. ..., which is word for word probee2's line atd56f2084.
- Base against head for the round's rows: the base validator
4683c3cfwas laid into the clone, then HEAD's4e011252was written back (EQUAL-TO-HEAD). Base gives3 failed, 2 passed in 12.19s:- FAILED
test_a_pin_that_is_no_commit_is_named_to_commit; - FAILED
test_the_rows_remedy_runs_as_printed_from_the_tracking_branch[plain]and[space-and-apostrophe]; - PASSED
test_a_row_id_that_reads_as_a_number_is_its_digits[2026]and[zero], the controls. - At head all five pass (call D below). This matches the body's round table.
- FAILED
4. The body.
gh pr view 1273: head0657e396, draft,closes: [1204].- The live body equals
w1204/pr-body.mdminus its title line (live starts with file body: True | equal: True). The Sourcery block is gone. - Closing forms in the live body:
['Closes #1204'], the only one. - "## Review round 1 (r1204: READY, seven NITs)" against my measurements:
- the validator
3 added, 2 removedand the test file63 added, 6 removedmatch--numstat; - the blobs
c9a37c41and4e011252match; - the mutant table (R6, R11 and R12 killed by 1 row each, R7 by
[space-and-apostrophe], 43 passed beside it) matches my runs; - the base-against-head table matches check 3.
- The gate calls R1 to R5 are the writer's. I re-ran only the call below.
- the validator
- Merge-tree section ("main
27397a4b: clean, tree44248a29"; "bootstrap.py, validate-family.py and siblings.py: a root or holder whose.gitthis user cannot read is refusedgit-repo-unreadable, exit 2, not a traceback ornot-a-git-repo, and the doctor'smembersrow names it once, never drift (#1148) #1172's headbbe5b414... tree61067f7c"; "validate-family.py: a member whose.gitfile this user cannot open, or whose git directory (its own.git, or the one its gitfile names) this user cannot search, is refusedmember-unreadablenaming that part, and no longermember-commit-unresolvable, which said the pinned commit was missing and prescribed a fetch (#1221) #1246's head0deac3a6... tree7fdbfe6b") matches mine exactly (check 5). - The stacking statement still holds:
ls-remotegivesrefs/pull/1227/headat2d56c190,2d56c190is an ancestor of0657e396, and there is still norefs/pull/1256/head.
5. Merges. git merge-tree --write-tree 0657e396 <other>:
- current
origin/main27397a4b591ae70e56b11639671ade090fe5adef: exit 0, clean, tree44248a29ffb02bae8b711ba1d2feabc12d3973c4; - bootstrap.py, validate-family.py and siblings.py: a root or holder whose
.gitthis user cannot read is refusedgit-repo-unreadable, exit 2, not a traceback ornot-a-git-repo, and the doctor'smembersrow names it once, never drift (#1148) #1172's headbbe5b414eb9427ef26248bdf53fe4711ab26c3a1: exit 0, clean, tree61067f7c49d5267a34cafcea9f025b87c3fdec78; - validate-family.py: a member whose
.gitfile this user cannot open, or whose git directory (its own.git, or the one its gitfile names) this user cannot search, is refusedmember-unreadablenaming that part, and no longermember-commit-unresolvable, which said the pinned commit was missing and prescribed a fetch (#1221) #1246's head0deac3a6581b308e5761c420456bac51f0fe5f11: exit 0, clean, tree7fdbfe6bee0ab4135292b7c798028a6403e35139.
Run (probe environment, at 0657e396)
- Probe environment: stub
ghfirst onPATH,GH_TOKEN=bogus-r1204, emptyGH_CONFIG_DIR,GIT_CONFIG_GLOBAL=/dev/null,GIT_SSH_COMMAND=false,[email protected],env -u LANES_LANE,TMPDIRin scratch,PYTHONDONTWRITEBYTECODE=1. - Python 3.12.3, git 2.43.0. At most 2 of my pytest calls at once.
df -h /workspaceshowed 85-86G free anddf -i /showed 42%.
| call | result |
|---|---|
D. tests/test_validate_family_member_id_pattern.py, tests/test_validate_family_branch_step.py, tests/test_family_add_member_id.py (review checkout) |
81 passed in 84.54s |
| base rows (clone, base validator laid in) | 3 failed, 2 passed in 12.19s, as expected (check 3) |
| R6, R7, R11, R12 (clone, new file) | each 1 failed, 43 passed (check 2) |
I ran nothing wider. The validator's code is unchanged (check 1), and the test change is confined to the one new file, which call D and the mutant runs cover.
Findings
- MUST: none.
- SHOULD: none.
- NIT: none new. Round 1's NITs 4 (AGENTS.md line length and scope), 5 (no init command named under
--no-members) and 7 (git 2.47.1 not run) remain, and the body's Known limits names each one.
What I did not cover
- The writer's gate calls R1 to R5 (
test_family.py, the scans, the doc trio, the template-text scans, and the predicted merge with main27397a4b). I did not re-run them; the delta is a docstring plus rows in one test file. - git 2.47.1, CPython 3.14, Windows, and the PR's CI and SonarCloud status.
Lane: openreposhape-1 (openRepoShape-1)
…r main 4552efa, the tree that landed) Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…1138 row keeps in the root once as `plan-case-twins`, and still names each twin at the copy, above it, at the manifest and at a pin's file, and each bad link by its own finding (#1293) Follow-up to #1189 and #1170. This mends main's red `tests` run after #1189 landed. It changes rows of one test file and no code. ## Cause - #1170 (squash `40cb8086f`) added rows that keep a pair of case twins in the assembly root, where the shape writes, and count every finding `check` makes for them. - #1189 (squash `9cb156a98`) made `check` name each set of case twins a plan keeps in one repository as `plan-case-twins`: one finding per repository, or a NOTE for a set of one blob (in the root, two paths in one folder). Its H0 `472944b5` was tested before #1170 landed, so the two changes first ran together on main. - Main's push run on `9cb156a98` failed with 13 failed, 21142 passed and 405 skipped, all 13 in this file. The run on its parent `5c662f75` passed. #1273's `tests` run failed with the same 13 and no other (13 failed, 21186 passed, 405 skipped). - Every failure is `assert 3 == 2`, or `3 == 1 + 1`: one finding MORE than the row counts, not one fewer. "The second finding is lost" and "the twin is not named" are the rows' own messages for a wrong count. Nothing was lost. ## The decision, row by row I measured this at `370a23cd`. Each row's scenario was rebuilt with the file's own helpers (`planned_root`, `check_root`), and every finding was printed. In each row, every finding #1170 demands is made. The one extra line is `plan-case-twins` for the assembly root, naming exactly the row's pair. So each row should expect it, and the code stays. | Row | `plan-case-twins` names | #1170's findings, still made at main | |---|---|---| | `test_a_named_link_leaves_out_its_own_finding_and_no_other[a-case-twin-of-the-readme-copy]` | `Shape/README.md` and `shape/README.md` | `plan-bad-symlink-target` for the link `shape/README.md`, once; `plan-root-blocks-shape-copy` for the file `Shape/README.md` once case is ignored | | `...[a-case-twin-after-the-readme-copys-link]` | `shape/README.md` and `shape/readme.md` | `plan-bad-symlink-target` for `shape/README.md`, once; the copy's finding for the file `shape/readme.md` | | `test_a_case_twin_beside_a_link_git_makes_at_the_copy_is_named_too[a-twin-before-the-link]` | `Shape/README.md` and `shape/README.md` | the copy's finding for the symlink `shape/README.md`, and one for the file `Shape/README.md` | | `...[a-twin-after-the-link]` | `shape/README.md` and `shape/readme.md` | the copy's finding for the symlink `shape/README.md`, and one for the file `shape/readme.md` | | `test_a_link_twin_at_the_copy_is_named_once_by_the_copys_finding[a-link-twin-after-a-file]` | `shape/README.md` and `shape/readme.md` | the copy's finding for the file `shape/README.md`, and one for the symlink `shape/readme.md`; no `plan-root-symlink` | | `...[a-link-twin-after-a-link]` | `shape/README.md` and `shape/readme.md` | the copy's finding for each symlink; no `plan-root-symlink` | | `test_each_file_twin_above_a_place_the_shape_writes_is_named[a-file-after-a-named-link-above-the-copy]` | `SHAPE` and `Shape` | `plan-bad-symlink-target` for `SHAPE`; the copy's finding, inside the file `Shape` once case is ignored | | `...[a-file-after-a-named-link-above-the-shapes-scripts]` | `SCRIPTS` and `Scripts` | `plan-bad-symlink-target` for `SCRIPTS`; `plan-root-blocks-shape`, inside the file `Scripts` | | `test_a_case_twin_after_a_submodule_at_the_copy_is_named` | `shape/README.md` and `shape/readme.md` | the copy's finding for the file `shape/readme.md`; `plan-submodule-root` for `shape/README.md` | | `test_each_case_twin_at_the_manifest_is_named[a-file-twin-after-a-link-git-makes]` | `Project.yaml` and `project.yaml` | `plan-root-blocks-manifest` for the symlink `project.yaml`, and one for the file `Project.yaml` | | `...[a-file-twin-after-a-named-link]` | `PROJECT.yaml` and `Project.yaml` | `plan-bad-symlink-target` for `PROJECT.yaml`, with the manifest's tail; the manifest's finding for the file `Project.yaml` | | `...[a-named-link-after-a-file-twin]` | `PROJECT.yaml` and `Project.yaml` | `plan-bad-symlink-target` for `Project.yaml`, with the manifest's tail; the manifest's finding for the file `PROJECT.yaml` | | `test_a_case_twin_after_a_named_link_at_a_pin_file_is_named` | `contracts/SHAPE-pin.yaml` and `contracts/Shape-pin.yaml` | `plan-bad-symlink-target` for `contracts/SHAPE-pin.yaml`; `plan-root-holds-pin` for the file `contracts/Shape-pin.yaml` | ## Why the rows, and not the code - **A different fault.** `plan-case-twins` says that two source paths one repository keeps are one name on a disk that ignores case, and its fix is a rename in the source. The copy's, the shape's, the manifest's and the pin's findings say that a kept path stands where the shape writes, and their fix is to send it to a leg, `drop` it, or rename it. Neither finding implies the other: - `A` and `a` with their own blobs in the root are `plan-case-twins` and stand at no place of the shape's; - the control `a-link-twin-alone` is the copy's finding and keeps no pair. - **Nothing #1170 demands is lost or doubled.** Each twin is still named by the finding of the place it stands at. Each bad link is still named once, by its own finding. No `plan-root-symlink` names a link at the copy, and #908's remediation is still said once, since `plan-case-twins`'s remediation is its own. - **#1189's rules hold in these rows.** There is one `plan-case-twins` for the root, naming the pair in tree order. Two rows that passed keep two files of one blob above the copy and above `scripts/`, and get #1189's NOTE and no finding. - **#1189 did the same for rows of other files that met its finding.** It changed two params of `tests/test_adopt_make_reads_first.py`, and left trees with twins out of `tests/test_adopt_collision_make_reads.py` and `tests/test_adopt_next_make_reads_first.py`. These rows are about case twins, so they keep the pair and expect the finding. ## What changes - `apart_from_the_twins(result, *twins)` is new. It asserts one `plan-case-twins` finding for the assembly root that names the pair in tree order. Where the row keeps fewer than two such paths, it asserts that no such finding is made. It returns the other findings, which the row counts as before. - The 7 tests that meet the pair call it, over 18 ids: - the 13 that failed; - 5 that passed and now also assert that no such finding is made. 3 keep no pair, and 2 keep two files of one blob, which #1189 makes a NOTE. - The module docstring says so, and so does one row's docstring. ## Tests The tests ran under a stub `gh` with a bogus token, an empty `GH_CONFIG_DIR`, `GIT_CONFIG_GLOBAL=/dev/null` and `GIT_SSH_COMMAND=false`, on CPython 3.12. - `tests/test_adopt_symlink_target_bytes.py`: - at `370a23cd` (main), 13 failed and 137 passed, the 13 ids of the CI runs; - at `5c662f75` (before #1189), 150 passed; - at this head, 150 passed. - Mutants of `adopt-project.py`, run against the 7 tests' 18 ids, each restored and its blob checked against HEAD's: 6 of 6 killed, with the unmutated control at 18 passed. - M1, the root asked for no set: 13 of 18 fail. - M2, the finding said twice: 13 fail. - M3, every set a NOTE: 13 fail. - M4, no set a NOTE: 2 fail, the two rows with two files of one blob. The new "no such finding" assertion kills it, and the rows' counts do as well (r1293). - M5, `_kept_there` keeping the first row at a place (#1170's regression): 7 fail, so #1170's counts still bite through the helper. - M6, the pair named in reverse: 13 fail. - The gate at this head, call by call: - `tests/test_adopt_check_throwaway_repos.py`, `tests/test_adopt_collision_make_reads.py`, `tests/test_adopt_make_reads_first.py` and `tests/test_adopt_next_make_reads_first.py` (#1189's files): 294 passed, 2 skipped. - `tests/test_scaffold_leg_path_collisions.py`, `tests/test_path_guard_hygiene.py` and `tests/test_no_auto_maintenance.py`: 283 passed, 2 skipped. - `tests/test_agents_md_codes.py`, `tests/test_cli_reference.py` and `tests/test_repo_hygiene.py`: 171 passed. - #1170 changed no other test file (`git show --stat 40cb808`: `adopt-project.py` and this file). No other test file imports this one. - `adopt-project.py` is unchanged, so `tests/test_shape_doctor.py` was not run. ## The fallback, measured `git revert --no-commit 9cb156a` on `370a23cd` applies cleanly: four files auto-merge and none conflicts. `tests/test_adopt_symlink_target_bytes.py` then gives 150 passed. No other file was run on that tree. A revert would take back #1189's `plan-case-twins`; this PR keeps both changes. ## Known limits - `apart_from_the_twins` takes a pair, joined as `check` joins two paths ("`A` and `B`"). A row that keeps three twins would need the three-way join `check` prints. - The rows assert the finding's head and the pair, not its place among the findings. `_entry_findings` puts it after the source's own findings, such as `plan-bad-symlink-target`, and before the findings about the answers. ## Not in this PR - Any change to `adopt-project.py`. - Twins a kept path makes with a file the shape writes into the root (#1191), and twins the plan sends to different repositories (#1183). Both are #1189's follow-ups. This is outside v1.2.0, by Brett Heap's ruling at 2026-10-21T10:32:04Z. It lands on its own green `tests` and SonarCloud run at `d3143d84` (its H0), with every lane's landings stopped while main was red (fast-refresh rule 5, Brett Heap 2026-10-15T22:48:35Z). Lane 1's gate passed on the tree it lands: 5 pytest calls over `tests/test_adopt_symlink_target_bytes.py`, `tests/test_adopt_check_throwaway_repos.py`, `tests/test_adopt_collision_make_reads.py`, `tests/test_adopt_make_reads_first.py`, `tests/test_adopt_next_make_reads_first.py`, `tests/test_scaffold_leg_path_collisions.py`, `tests/test_path_guard_hygiene.py`, `tests/test_no_auto_maintenance.py`, `tests/test_agents_md_codes.py`, `tests/test_cli_reference.py`, `tests/test_repo_hygiene.py`: 898 passed, 4 skipped. Lane: openreposhape-1 (openRepoShape-1) 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 5 days and 10 hours by commenting |
…once, with `--upstream` passed too, and refuses a path or a value that is no `owner/repo` in the pin's name; shape-doctor.py answers as it did (#1203) (#1269) `update-shape.py` asks the shape pin's `source_repository:` once, whichever way a run reaches the upstream, and refuses a value that is no `owner/repo` in the pin's name, never in the name of a flag nobody passed (#1203, from lane 5's review of #1166, findings 3 and 9). Measured on main `be21751c3` (Python 3.12.3, git 2.43.0, a stub `gh` first on PATH, a bogus token, no network). This branch's rows ran against main's `update-shape.py` and `shape-doctor.py` in a scratch worktree, and two probes ran main's tool directly. - **No `--upstream`, run from the root.** `source_repository: "contracts"` was `REFUSED update-upstream-not-a-repo: --upstream contracts exists but is not a git repository`, exit 2. So were `scripts/repo_shape.py`, `contracts/shape-pin.yaml` and `~/notes` (a folder under `HOME`). A clone kept at `~/shape` was opened in place: `check` exit 1, the copies compared. - **The values #1166 already names in the pin** (a line feed, a trailing space, `has space/x`) still had the remedy "or pass `--upstream` a path to a clone of openRepoShape". - **`--upstream <a local clone>` passed.** The pin's value was never asked, and every value above gave `check` exit 1 with its report. `apply --yes --at <B> --branch shape/fu-lf` over `"opensoft/openRepoShape\n"` exited 0 and made this commit: `Re-sync the shape copies to opensoft/openRepoShape`, then a line feed, then ` @ 4032a512eb2e`. The `gh pr create` line it printed was split inside its `--title` quotes. - **The pin and `--upstream "opensoft/openRepoShape\n"` both bad:** the refusal named the flag. - **`update-shape.py`: a new `pin_source(pin, pin_path)`.** `prepare` asks it once, after reading the pin and before opening the upstream, with or without `--upstream`. It asks three questions, under the codes these values already had: - **Something is at the value where the command runs, and it holds no git repository:** `update-upstream-not-a-repo`. The value is looked up the way `open_upstream` looks up `--upstream`: `expanduser`, relative to the working directory. - **`REPOSITORY_RE` does not take the whole value** (`fullmatch`): `update-upstream-unresolvable`. - **`checked_value` refuses it:** `unsafe-value`. - **What each refusal says.** Each names the pin and its field, ``<root>/contracts/shape-pin.yaml: `source_repository:` ``. - Since #1166 the second one said "which is neither a path on this machine nor an `owner/repo` name". It now says "which is not an `owner/repo` name", because a path is never what the pin holds. - The remedy no longer offers `--upstream` a path, since passing one no longer gets past the question. For the name refusals it reads: "write `source_repository:` in the pin as the `owner/repo` its shape was copied from, `opensoft/openRepoShape` for this standard's. It is asked with `--upstream` passed too, because `apply` names it in its commit and its pull request; a path to a clone goes to `--upstream`." The `update-upstream-not-a-repo` refusal adds a sentence (N2, below): "The value is also looked up as a path from the directory this runs in: if it is already right, run this from a directory where nothing is at that path." - **`open_upstream(spec)` asks only about `--upstream` again.** #1166's `pin_path` and its two pin-named branches moved into `pin_source`. Both functions use `_holds_a_repository` as their one repository question. - **`prepare(args, *, ask_source=True)`.** `shape-doctor.py`'s `check_shape_currency` call passes `ask_source=False`. Its `refusals_ahead` call asks the field (S2 of the review round, below). - Why: the doctor reads any `Refusal` out of `prepare` as its own checkout being unable to answer. `update-shape.py`'s comment above `_ABSENT_ERRNOS` documents this. - Measured with the field asked there: a hand-edited `source_repository:` turned the `shape currency` row from exit 1 (behind) into CANNOT ANSWER, exit 3. Its NEXT was `git -C <standard> fetch --all`, and its `why` was "this checkout of the standard does not carry the commit the pin names". - With the opt-out at `check_shape_currency` the doctor answers as it does on main. Where the root is behind, the doctor's NEXT is `update-shape.py check`, which refuses the field in the pin's name. - **Codes:** none added, renamed or removed. - **Tests:** - `tests/test_update_shape_pin_source.py` is new, with 36 rows: 22 from the first round, 12 from the review round and 2 from the second round (NIT A, one in each route). - `tests/test_update_shape_merged_away.py`: two new rows, the doctor's `pins` row over a hand-edited source (S2) and over a source that `check` cannot read (NIT B). The S2 row's lines that edit the pin moved into a helper, `source_written_as`, which both rows use. - `tests/test_value_pattern_line_break.py`: #1166's `WRITE_THE_PIN` remedy and the unresolvable words are updated. `test_an_upstream_passed_with_a_line_feed_is_named_as_passed` now keeps the pin as scaffolded. It used to name the flag "whatever the pin says", which this change ends on purpose; the pin is now named first. - `tests/test_update_shape_unreadable.py`: the `temporaries` stand-in wraps `open_upstream(spec)`. rv1269 (opus) found this PR NOT READY at `86c1e6ea2` on two SHOULDs and six NITs (#1269 issuecomment-6725508050). It confirmed the fix, its rows, mutants, gates and merge-trees, and the writer's three choices. This round fixes the two SHOULDs and N1 to N5, keeps N6 as it was, and changes nothing else. Commits: `175d9b718` (the code and its rows) and `c792615f4` (one more row). - **S1. A pin value `~<unknown user>/...` was a Python traceback, exit 1.** - `Path(declared).expanduser()` raises `RuntimeError: Could not determine home directory.` for a user the machine does not have (measured on 3.12; rv1269 found 3.13 and 3.14 raise the same). Exit 1 is also `check`'s "behind" code. With `--upstream` passed this was new (main exited 1 with a report); with none, main crashed too. - Fix: a new `_named_here(declared)` looks the value up as `open_upstream` does and, where `expanduser` raises, keeps the bare path. Nothing is there, so the name question refuses it `update-upstream-unresolvable` in the pin's name, in both routes. The scaffolded value is unchanged. - Rows (4, each failing at `86c1e6ea2`): `test_a_tilde_user_who_is_not_there_is_refused_in_the_pins_name`, and `test_a_tilde_user_who_is_not_there_is_looked_up_as_the_bare_path` (a folder of that very name where the command runs, holding no repository, is `update-upstream-not-a-repo`), each in both routes. - **N1. A first part over 255 bytes was `update-unreadable ... (File name too long)`**, with a permissions remedy, naming neither the pin nor the field. - Fix: `_named_here` takes `ENAMETOOLONG`, and only that errno, as nothing there. Every other refused `stat` is raised as it was. - Rows (5): `"r" * 300 + "/has space"` is `update-upstream-unresolvable` and `"r" * 300 + "/x"` is `unsafe-value` (`checked_value` refuses over 255 characters), each in the pin's name and in both routes (4 rows, each failing at `86c1e6ea2`); and `test_any_other_refused_stat_of_the_pins_value_is_raised_as_it_was`, a control that passes at `86c1e6ea2` too: a `PermissionError` out of the `stat` is raised out of `pin_source`. - **S2. The doctor's `refusals_ahead` opt-out made a `pins` row sentence false.** - Over two collision copies merged away plus `source_repository: "has space/x"`, the `pins` row said "`update-shape.py check` reports them `merged-away`, and the `apply` it prints drops their pin rows", and its NEXT was that `check`, which exits 2 with `update-upstream-unresolvable` and reports nothing. - Fix: `ask_source=False` is dropped at `refusals_ahead` only. `prepare` refuses, so `refusals_ahead` returns None, as its docstring says it does where `prepare` refuses, and the `pins` row keeps the gate's finding. `check_shape_currency` keeps the opt-out. The scaffolded case, with the same two copies, is unchanged: `test_a_merged_away_copys_row_goes_and_the_project_is_green_again` still passes and still asserts `merged_away` and the `check` NEXT. rv1269's mutant R1 (`refusals_ahead` asks) is now the code. - Row: `tests/test_update_shape_merged_away.py::test_the_pins_row_keeps_the_gate_where_check_refuses_the_pins_source`, failing at `86c1e6ea2`. It also holds that `check` exits 2 `update-upstream-unresolvable`, and that the `shape currency` row still counts the two rows `merged-away`, with no CANNOT ANSWER. - **N2. The Limits bullet on a non-repository `opensoft/openRepoShape` folder is now measured** (Limits, below). The remedy of `update-upstream-not-a-repo` for a pin's value ends with "The value is also looked up as a path from the directory this runs in: if it is already right, run this from a directory where nothing is at that path." The other pinned words did not change: `WRITE_THE_PIN` stays what #1166's rows and the name refusals say. - Rows (3): the scaffolded pin run from a folder holding a non-repository `opensoft/openRepoShape`, in both routes (failing at `86c1e6ea2`: no such sentence); and the same pin with `--upstream` run from a folder where nothing is at that path, exit 1 as the scaffolded pin gives (a control). - **N3.** The comment above `REPOSITORY_RE` no longer says it is the pin's value "where no `--upstream` is passed". - **N4.** `test_the_doctor_does_not_call_a_hand_edited_source_the_standards` also asserts the `shape currency` row's status is `ok`, main's answer (measured on main's code in the scratch worktree, `ok`). Mutant D1 below is what only that assert kills. - **N5.** The Merges section below is refreshed: main and the PRs were read fresh. - **N6.** The Sourcery summary below the footer is kept exactly as it was: no closing keyword; body-guard exits 0. Rows failing at `86c1e6ea2`'s `update-shape.py` and `shape-doctor.py` (this round's tests, the scratch worktree detached at `c792615f4`): **19 failed, 34 passed** of 53 tests. The 19: 8 rows whose expected remedy gained N2's sentence (the issue's three path values in both routes, and `~/notes` in both), the 4 S1 rows, the 4 N1 rows, the 2 N2 rows, and the S2 row. The controls that pass at `86c1e6ea2` are the N1 `PermissionError` row, the N2 run-elsewhere row, and the N4 assert. rv1269b (sonnet) found this PR READY at `c792615f4`, with three NITs and no MUST or SHOULD (#1269 issuecomment-6726841735). This round fixes NITs A and B as it measured them, refreshes C, and changes nothing else. Commit: `52e5c1883` (two one-line fixes with their comments, three rows and a helper). - **NIT A. A raw NUL byte after the `~` in the pin's value was a traceback, exit 1.** - `Path('~a<NUL>b/x').expanduser()` raises `ValueError: embedded null byte`, which `_named_here` did not catch: it caught `RuntimeError` only. Plain or quoted in the pin, in both routes. It is contrived, since the pin file would be binary. With no `--upstream` main crashed the same way; with one passed, main exited 1 with a report, so there it was new. - Fix: `except (RuntimeError, ValueError)`, keeping the bare path. A NUL in the bare path is nothing there (`_mode_of` already answers a NUL in a name that way), so the name question refuses the value `update-upstream-unresolvable` in the pin's name, exit 2. rv1269b's mutant Y3 is the code now. - Row (1, in both routes, so 2 ids, each failing at `c792615f4`): `test_a_nul_byte_after_a_tilde_is_refused_in_the_pins_name`. Its NUL byte is built with `chr(0)`. - **NIT B. The doctor's `pins` row could read "could not be run" in one narrow case.** - Setup: two collision copies merged away, a pin value `locked/x`, and an unsearchable `locked` in the directory the doctor runs in. Since S2 the doctor asks the field in `refusals_ahead`, and `pin_source`'s `stat` of `locked/x` raises `PermissionError`. `refusals_ahead` caught `Refusal` only, so the row read `could not be run: [Errno 13] Permission denied: 'locked/x'`, where before S2 it kept the gate's finding. `update-shape.py check`, the row's NEXT, exits 2 `update-unreadable` there. The verdict, the exit and the `shape currency` row did not change. - Fix: `except (Refusal, OSError): return None` in `refusals_ahead`, so the row keeps the gate's finding. Its docstring and comment say so. rv1269b's mutant Z1 is the code now. - Row (1, failing at `c792615f4`): `tests/test_update_shape_merged_away.py::test_the_pins_row_keeps_the_gate_where_the_pins_source_cannot_be_read`. It uses real modes: `locked` is mode 000 and is given back in a `finally`, and the row skips on Windows and as root, as `tests/test_bump_leg_unopenable.py` does. It also holds that `check` exits 2 `update-unreadable: locked/x`, and that the `shape currency` row still counts the two rows `merged-away`, with no CANNOT ANSWER. - **NIT C.** The Merges section below is read fresh. The counts in Rows failing on main, Mutants and Runs are this round's. Rows failing at `c792615f4`'s `update-shape.py` and `shape-doctor.py` (this round's tests, the scratch worktree at `52e5c1883`): **3 failed, 53 passed** of 56 tests. The 3 are the rows above: 2 for NIT A and 1 for NIT B. **Refused.** - **Why.** The value is the name `prepare` gives the upstream in both routes. The README `Shape:` line is compared with it, and `apply` writes it into its commit subject, its pull request's title and the lines it prints. - **Cost.** No tool writes a path there: both templates hold `{{SHAPE_REPOSITORY}}`. So refusing one costs no root that a tool made. - **One answer for both routes.** The same question is asked whether or not `--upstream` is passed: - **A value that names something here holding no repository** (`contracts`, `scripts/repo_shape.py`, `~/notes`) is `update-upstream-not-a-repo`, with or without `--upstream`. - **A path not spelled `owner/repo`** (`~/shape`, `/srv/shape`) is `update-upstream-unresolvable`, even where it holds a clone. This is the one answer that changes for a run with no `--upstream`: main opened such a clone in place. - **An `owner/repo` spelling that is a repository where the command runs** is taken, as on main. An example is a checkout laid out by owner, run from the folder above `opensoft/openRepoShape`. With no `--upstream` it is opened in place. Command: this branch's `tests/test_update_shape_pin_source.py` (36 rows), five tests of `tests/test_value_pattern_line_break.py` (the selection the mutants use, 18 ids), and the S2 and NIT B rows of `tests/test_update_shape_merged_away.py` (56 tests), run against main's (`be21751c3`) `update-shape.py` and `shape-doctor.py`, in the scratch worktree detached at `52e5c1883`. Result: **36 failed, 20 passed** in 39.41s, of those 56 tests (the review round ran the whole of `tests/test_value_pattern_line_break.py`, 31 ids, and gave 33 failed, 33 passed of 66 in 47.41s; the first round's two files gave 21 failed, 32 passed). The 36 are the first round's 21, the review round's 12 (S1: 4, N1: 4, N2: 2, S2: 1, and the `PermissionError` row, which fails on main because there is no `pin_source`) and the second round's 3 (NIT A: 2, NIT B: 1). The first round's 21: - **12 rows:** `test_the_pins_source_is_asked_in_both_routes_in_the_pins_name`, the issue's six values (`a-folder`, `a-file-spelled-owner-repo`, `the-pin-itself`, `line-feed`, `trailing-space`, `a-space`) in both routes. On main: - `no-upstream`: `--upstream ... exists` for the three paths, and #1166's old remedy for the other three; - `upstream-a-clone`: exit 1 and a report. - **4 rows:** `test_a_source_under_home_is_looked_up_as_open_upstream_looks`, `~/shape` (a clone) and `~/notes` (a folder) in both routes. On main: exit 1 three times, and `--upstream ~/notes exists ...` once. - **`test_a_source_checked_value_refuses_is_refused_with_upstream_passed`:** exit 1 on main. - **`test_the_pins_source_is_named_before_a_bad_upstream`:** main named the flag. - **`test_apply_over_a_refused_source_writes_nothing`:** exit 0 and a commit on main. - **#1166's `test_a_pins_source_that_is_no_owner_repo_is_named_as_the_pins[line-feed]` and `[space]`:** main gives the old words and remedy. Four rows pass on main by design, because they hold answers this change keeps: - the scaffolded pin with no `--upstream` reaches `open_upstream` with `opensoft/openRepoShape` (in-process, with a stand-in that opens the local upstream); - the `owner/repo` clone where the command runs is opened in place; - the doctor's `shape currency` row is no `environment` row and the doctor does not exit 3, and its status is `ok`; - the scaffolded pin with `--upstream` passed, run from a folder where nothing is at `opensoft/openRepoShape`, is exit 1 over the upstream one commit on. Setup: - Each mutant was applied alone to this branch's production file (to the test file for N4) in a scratch worktree detached at `52e5c1883`. All the mutants below were run again on this head, the review round's and the first round's too, because `_named_here` and `refusals_ahead` changed. - Each ran against 56 tests: `tests/test_update_shape_pin_source.py` (36 rows), five tests of `tests/test_value_pattern_line_break.py` (#1166's three `update-shape.py` rows and the two pattern tests, 18 ids), and the S2 and NIT B rows of `tests/test_update_shape_merged_away.py`. The D1 runs are the doctor guard row alone. - After each, the four files were put back, with their sha256 checked against the commit's bytes (`restored=yes` for all 32 mutants, for the control run with no mutant, and for the two swaps of main's and `c792615f4`'s production files). At the end the worktree was clean at `52e5c1883`. - The first round's M1-M10 were run again. M4, M5 and M7 are re-aimed: the path question and `expanduser` moved into `_named_here` and `pin_source`; M7 now names the `(RuntimeError, ValueError)` guard. This round's mutants: | Mutant | Result | Killed by | |---|---|---| | NIT A the guard back to `RuntimeError` alone (the inverse of rv1269b's Y3, which is the code now) | 2 failed | the NUL rows, one per route | | NIT A `ValueError` alone | 4 failed | the S1 rows (`~<unknown user>`), both routes | | NIT B the catch back to `Refusal` alone (the inverse of rv1269b's Z1, which is the code now) | 1 failed | the NIT B row | | NIT B `OSError` alone, no `Refusal` | 1 failed | the S2 row | | NIT B `(Refusal, PermissionError)` | **survives** (56 passed) | nothing: the row's `stat` is refused `EACCES`, a `PermissionError`, so a narrower catch cannot be told from `OSError` by a real mode; `OSError` is what rv1269b's Z1 catches, and it covers any other errno | | NIT B the opt-out put back at `refusals_ahead`, the `OSError` catch kept | 2 failed | the S2 row and the NIT B row | The review round's mutants, run again: | Mutant | Result | Killed by | |---|---|---| | S1 the guard removed (`RuntimeError` and `ValueError`) | 6 failed | the S1 rows (4), both routes, and the NUL rows (2) | | S1 the bare path not kept (`return None`) | 2 failed | the bare-path row, both routes | | N1 the `ENAMETOOLONG` test removed | 4 failed | the four long-name rows | | N1 every `OSError` taken as nothing there | 2 failed | the `PermissionError` row and the NIT B row | | S2 the opt-out put back at `refusals_ahead` (the inverse of rv1269's R1, which is the code now; the `OSError` catch kept) | 2 failed | the S2 row and the NIT B row | | N2 the sentence removed from the not-a-repo remedy | 12 failed | the three path values and `~/notes` (both routes each), the two N2 rows, the bare-path rows | | N2 the sentence added to the name refusals too | 17 failed | the name refusals: the issue's three name values and `~/shape`, the tilde, NUL and long-name rows, named-first, #1166's two | | D1 the doctor's `shape currency` row asks the field and calls a refusal a plain FINDING (exit 1, no `environment`) | 1 failed | the guard row's new status assert | | D1 with N4's assert undone | **survives** (1 passed) | nothing: that assert alone kills D1 | | N4's assert undone, production as committed | 56 passed | a control: the assert holds main's answer | The first round's mutants, run again: | Mutant | Result | Killed by | |---|---|---| | M1 the question removed from the `--upstream` route | 19 failed | every `upstream-a-clone` row, checked_value, named-first, apply, the S1, N1, N2, S2 and NIT B rows, and the NUL row of that route | | M2 the question removed from the no-`--upstream` route | 20 failed | every `no-upstream` row, #1166's three pin rows, the doctor row, the S1, N1, N2, S2 and NIT B rows, and the NUL row of that route | | M3 `fullmatch` put back to `match` | **survives: equivalent** (56 passed) | `REPOSITORY_RE` ends in `\Z` since #1166, so `match` and `fullmatch` agree on every string (rv1269 checked 66,430) | | M3b `match` and `REPOSITORY_RE`'s `\Z` put back to `$` | 7 failed | the line-feed rows (both routes), named-first, apply, #1166's line-feed rows, the pattern's own row | | M4 the path question removed | 12 failed | the three path values and `~/notes`, both routes; the bare-path and N2 rows | | M5 any path refused, a repository or not | 3 failed | `~/shape` both routes, the `owner/repo` clone where it runs | | M6 `checked_value` dropped | 4 failed | the checked_value rows and the long-name `unsafe-value` rows | | M7 no `expanduser` | 2 failed | `~/notes` both routes | | M8 asked after the upstream is opened | 20 failed | every `no-upstream` row but `~/shape`, named-first, the doctor row, #1166's three, the S1, N1, N2, S2 and NIT B rows, and the NUL row of that route | | M9 the doctor's `shape currency` call asks the field | 3 failed | the doctor row, the S2 row and the NIT B row | | M10 `ask_source` defaults to False | 19 failed | as M1 | rv1269b's own mutants (its `mutate2.py`), run on this head: | Mutant | Result | Killed by | |---|---|---| | Y1 `_named_here` takes `ENOENT` where it took `ENAMETOOLONG` | 4 failed | the four long-name rows | | Y2 `EACCES` taken as nothing there too | 2 failed | the `PermissionError` row and the NIT B row | | Y4 the not-a-repo remedy's last words changed | 12 failed | the rows that pin the remedy | | Y7 `_named_here` returns the candidate where nothing is there | 26 failed | the rows that read nothing-there as a path, in both routes | | Y5 `or not args.upstream` dropped from `prepare`'s condition | **survives: unreachable** (56 passed) | nothing: the only caller that passes `ask_source=False` passes `upstream=` too (rv1269's R2) | | Y6 `.resolve()` dropped from the path question | **survives: equivalent** (56 passed) | nothing: rv1269b read it as equivalent, since both stats of `_holds_a_repository` follow a link as `resolve()` does | Gates ran on the commit `52e5c1883` (dirty=0), with a stub `gh` first on PATH, `GH_TOKEN` bogus, an empty `GH_CONFIG_DIR`, a blank git identity, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null`, Python 3.12.3 and git-filter-repo 2.47.0 (`git filter-repo --version` prints `a40bce548d2c`). A first writer ran gate A on 2.43.0 and was stopped for a workstation reboot in gate B; a second writer ran the rest, at the same head. - **git 2.43.0** (`/usr/bin/git`): - **Gate A**: the 20 `tests/test_update_shape*.py` files (this PR's new one among them), `tests/test_value_pattern_line_break.py`, the hygiene five (`test_path_guard_hygiene`, `test_repo_hygiene`, `test_agents_md_codes`, `test_cli_reference`, `test_pinned_copy_text`) and `test_no_auto_maintenance`: 1360 tests, one run. **1355 passed, 5 skipped** in 830.98s (the review round: 1352; this round adds the 3 rows). - **Gate B**, run because `shape-doctor.py` changed: `test_shape_doctor`, `test_doctor_unreadable_pin`, `test_doctor_next_is_a_command`, `test_doctor_partial_clone`, `test_doctor_pin_restore_merges`, `test_shape_pin_files_not_a_list`, `test_pin_source_env_collisions` and `test_bom_reads`: 827 tests, by node id in 10 runs of at most 90. **824 passed, 3 skipped** (1194s in all, summed over the runs; the review round: 824 passed, 3 skipped). - **git 2.47.1** (built from kernel.org's tarball, first on PATH, `git --version` printed into every log): - **Gate A**, in 16 runs of at most 90 ids each, so that no run held the slot for over 100 tests: **1355 passed, 5 skipped** (787s in all), the same count as on 2.43.0. - **Gate B**, in 10 runs of at most 90: **824 passed, 3 skipped** (1192s in all), the same count as on 2.43.0. - **The ids** of both gates were collected at this head (1360 and 827, identical to the first writer's lists, which were collected at the same head). - **The skips are the same on both gits:** 3 `test_update_shape_add_symlink.py:832` (junctions are NTFS's), 2 `test_no_auto_maintenance.py:222` (the session began with `GIT_CONFIG_GLOBAL` set) and 3 `test_shape_doctor.py:10516` (the PowerShell line is printed, and powershell.exe exists, only on a Windows host). The new NIT B row ran, as uid 1000; it skips only as root or on Windows. - **The review round's runs**, on `c792615f4`: gate A 1352 passed, 5 skipped (699s on 2.43.0) and gate B 824 passed, 3 skipped (1045s), by the writer; rv1269b re-ran both at `c792615f4` with the same counts on both gits. On 2.47.1 the writer's gate A ran as 17 runs under 100 tests. - **The first round's runs**, on `e1692c147` and `86c1e6ea2`: gate A 1339 passed, 5 skipped and gate B 824 passed, 3 skipped, on both gits. A first doctor run on 2.47.1, at `e1692c147`, had failed three rows of `test_doctor_unreadable_pin.py`: their stand-in for `prepare` took one argument and the doctor now passes `ask_source`. `86c1e6ea2` widens the stand-in. rv1269 re-ran both gates at `86c1e6ea2` with the same counts. - **The rows on main, the rows at `c792615f4` and the mutants** above ran on git 2.43.0. Run with `git merge-tree --write-tree <other> 52e5c18` (git 2.43.0) at 2026-11-09T14:14:11Z, at heads read fresh just before the push. All are clean (exit 0, no conflict line): - main `2fde6c3d0`: tree `35c270e2`. Main is 15 commits past this branch's base `be21751c3`. #1159, #1147 and #1172 have merged (#1172 at 2026-11-09T14:01Z as `2fde6c3d0`, which is main now), so they are no longer listed. #1172's change to `shape-doctor.py` lies well away from `refusals_ahead`, and its merge with this head is clean. - #1231 `aca00dfd9` (`update-shape.py`): `ba12a305`. - #1241 `ab137eb5f` (`update-shape.py`, `tests/test_update_shape_unreadable.py`): `052a989f`. - #1248 `1b747f7ab` (`shape-doctor.py`): `9c022d62`. - #1273 `0657e3964` (`tests/test_value_pattern_line_break.py`): `9da0792f`. - #1274 `e39b5d7e3` (`shape-doctor.py`): `a570550a`. Main, #1248 and #1274 touch `shape-doctor.py`. None of the added or removed lines of any of these heads, against its merge base with this head, in the seven files this PR touches (`update-shape.py`, `shape-doctor.py` and five test files) mentions `open_upstream`, `pin_path`, `prepare(`, `source_repository`, `WRITE_THE_PIN`, `REPOSITORY_RE`, `refusals_ahead`, `ask_source`, `pin_source`, `expanduser`, `ENAMETOOLONG` or this round's `_named_here`, `source_written_as` and `NUL_AFTER_TILDE` (read from `git diff` against each merge base). One name is shared: #1241 uses a `needs_a_mode` mark in `tests/test_update_shape_unreadable.py`, and this round's `needs_a_mode` is defined in `tests/test_update_shape_merged_away.py`, so each file has its own. The rows on the merged tree with current main are left to the landing gate. Lane 3 says the later lander takes the refresh. - **The doctor does not name a hand-edited `source_repository:` itself**, as on main: where the pin names the standard's commit, its row is `ok`. Naming it on the pin's side would mean teaching `pin_restore`, whose history walk reads pins with `check_pin`, the same question, and the path half of that question reads the working directory. That is a follow-up candidate, not this PR. - **The path question reads the working directory**, as `open_upstream` does for `--upstream`. So `scripts/repo_shape.py` is refused when run from the root, and taken as an `owner/repo` name when run from elsewhere. For any one directory, both routes give the same answer. - **A folder holding no repository at `opensoft/openRepoShape` where the command runs** (an unpacked archive, say) refuses the scaffolded pin with `--upstream` passed. On main only the run with no `--upstream` refused it. Measured by rv1269 and by this round's rows: the refusal is `update-upstream-not-a-repo` in the pin's name, in both routes, and its remedy now ends by saying to run it from a directory where nothing is at that path. That run answers as the scaffolded pin does (`--upstream` route: exit 1). - **The doctor's `shape currency` row, over a hand-edited source and merged-away copies,** still names `update-shape.py check` as its NEXT, and that `check` refuses in the pin's name (exit 2). The row answers as on main by design (the first bullet). The `pins` row, which states what `check` reports, asks the field since the review round. - **`--upstream ~<unknown user>/x` on the command line** is still a `RuntimeError` traceback out of `open_upstream` (measured in process), as on main, and an argv value whose first part is over 255 bytes is `update-unreadable` naming that path. Both name the value a person passed, not the pin. A follow-up candidate, not this PR. - **`REPOSITORY_RE` takes `.` and `..` as an owner**, so `../shape` is `owner/repo`-shaped. Unchanged. Review: rv1269, lane 5's independent opus reviewer, which wrote none of #1269: NOT READY at `86c1e6ea` on two SHOULDs (issuecomment-6725508050), both fixed in `c792615f`. Then rv1269b, lane 5's independent sonnet reviewer, which wrote none of it: READY at `c792615f` with NITs A-C (issuecomment-6726841735), fixed in `52e5c188`. Then rv1269c, lane 5's independent sonnet reviewer, which wrote none of it: READY at `52e5c188`, H0 of this landing (issuecomment-6745471925). CI (Brett Heap's ruling 27 and his fast-refresh ruling of 2026-10-15T22:48:35Z): H0 52e5c18 passed tests, tests-git-bash and SonarCloud; the head a31f0cf is a clean update-branch merge of main e22f295, with tests-git-bash and SonarCloud green; and the local gate passed on its predicted squash tree af35c58 over main e22f295: the doctor_unreadable_pin, update_shape_merged_away, update_shape_pin_source, update_shape_unreadable, value_pattern_line_break, adopt_execute_refusals, adopt_filter_repo_origin_url, adopt_one_byte_locale, adopt_pins, adopt_plan_and_remote_paths_spelled, adopt_plan_source_branch_shown, adopt_spelled_names, adopt_template_values, chain_link_fold, clone_url_bytes, family, non_utf8_name_helpers, pin_source_unreadable, pinned_copy_text, stdout_encoding, update_shape_apply_lines_and_headers, update_shape_header_comments, update_shape_messages, validate_pins_spelled_and_named, path_guard_hygiene, no_auto_maintenance, repo_hygiene, agents_md_codes, cli_reference sets, 1866 passed, 4 skipped. Landed on Brett Heap's word of 2026-10-23T13:10:26Z, relayed to every lane by lane 3 (#473 issuecomment-6365697123): "merge v1.2.1 PRs once reviewed and green". Closes #1203 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>



Stacked on #1227, which has landed. This branch was stacked on #1227 (
2d56c190), merged onto main81eaf757: its first commit,ccc2c2d2, is a real merge of #1227's head into main (clean; tree1e564383, the treegit merge-tree --write-tree 81eaf757 2d56c190predicted), made before any change of this PR's, as lane 3 asked #1204 to build after #1227. That merge is the BASE every "base" below names. #1227 has since landed on main as5c662f75, the squash of its final headbb4ef4d9(lane 5's update-branch merge of main4552efa6into2d56c190, with the same tree,46ddfc80). The branch was restacked by three merges, with no rebase:062f5983mergesbb4ef4d9;75b12a96merges5c662f75, taking this branch's side for #1227's four files; and2eadb5dfmerges main as it then stood,9cb156a9(#1189's squash). So the PR's diff against main is now only its own change: the same 4 files and the same 658 changed lines as the reviewed delta,git diff ccc2c2d2 0657e396(see "Restacked after #1227 landed" below). Lane 3's #1246 (head0deac3a6, still open) also changestemplates/family-root/scripts/validate-family.py; if it lands first, this PR takes the refresh (git merge-tree --write-tree 2eadb5df 0deac3a6: clean, tree733e0ec1). This PR's own change keeps out of #1227's lines (the module docstring at 64-110, the.gitmodulesreaders and_init_stop_said) and out of the loader_run_checks, where #1172, now on main as2fde6c3d, added_refuse_an_unreadable_root.Closes #1204
Outside v1.2.0 by Brett Heap's ruling of 2026-10-21T10:32:04Z ("leave the follow-ups out of v1.2.0").
What
validate-family.pyaskedPROJECT_ID_REof one id only, the family's own. A member row'sid:met two checks, and neither is a pattern: the mountedproject.yamlcompared with it as text (member-id-mismatch), and_check_member_ids_unique. So under--no-members, the run a private family's CI falls back to, an id that ends in a line feed, holds a space or opens with-wasfamily ok; and with the members checked, so was a row that spelled the same malformed text as its member's ownproject.yaml: the row afamily.py addolder than #1166 wrote for a member whose ownid:read"irqs\n".Measured on base
ccc2c2d2and headd56f2084(the head is now0657e396, whosevalidate-family.pyhas the same code: round 1 below changes a docstring), Python 3.12.3, git 2.43.0, in the probe environment (a stubgh,GH_TOKEN=bogus, an emptyGH_CONFIG_DIR,GIT_CONFIG_GLOBAL=/dev/null,GIT_SSH_COMMAND=false), ontests/test_family.py's offline family (InkRouter, membersIRRSandIRSS; table 3 rewrites IRRS'sid: irrsline). The holder row mountsIRQSfrom a copy of its remote whoseproject.yamlreadsid: "irqs\n", with its row written as pre-#1166addwrote it (id: "irqs\n", the pin and digest those of the mount), since #1166'saddnow refuses that member.id:/ holder--no-members--no-members"irrs\n"family okmember-id-mismatchmember-id-malformedmember-id-malformedalone"irrs\r"family okmember-id-mismatchmember-id-malformedmember-id-malformedalone"IRRS Capital"family okmember-id-mismatchmember-id-malformedmember-id-malformedalone"-x"family okmember-id-mismatchmember-id-malformedmember-id-malformedalone"0"(control)family okmember-id-mismatchfamily okmember-id-mismatch(unchanged)irrs(control, the fixture)family okfamily ok"irqs\n"both sidesfamily ok, 3 members--pinsexit 0); noteproject.yaml id irqsand a raw line feed--pinsthe same)The two findings at head, the holder's path written
<holder>:(
[...]isBRANCH_LEFT, word for word, as every remedy that names aswitch -cends.)Why
The decision. The issue's two checks, under one code of their own,
member-id-malformed, asmember-bad-idisadd's; and the remedy isbumpto the commit the row pins, not the issue'sremoveand thenadd.id:, in every mode._check_member_ids_well_formed, beside_check_member_ids_unique, asksPROJECT_ID_RE.fullmatchof every row that check asks (a mapping, with aproject:, not spelled exactly as an earlier row, which ismember-duplicate's), from_check_membersbefore the--no-membersreturn: it readsfamily.yamlalone. So every row_check_member_identityreaches has been asked, and--pinsand a full run ask it too.id:, asked exactly asaddasks it._check_member_identityasksPROJECT_ID_RE.fullmatch(str(id or ""))of the mountedproject.yaml,_read_member_project's question formember-bad-id, so with the members checked the gate refuses every memberaddwould refuse, and none it would pin (the rowtest_add_refuses_exactly_the_ids_the_holders_own_validator_findsholds the two to one answer). The finding names that file as the source, asmember-id-mismatchalways did.member-id-mismatchis not said as well: it named no command, and over a malformed member it told the person to copy a malformed id into the row._is_project_idis the onefullmatchboth checks call, so the two cannot drift into two questions.fullmatch, notmatch(validate-manifest.py and validate-family.py:PROJECT_ID_RE,DATE_REandQUALIFIED_REend in$, so anid:, a date or arepository:that ends in a line break passes as well formed (#1126 follow-up) #1139):PROJECT_ID_REends in$, which matches before a trailing line feed. No import is added, so an older holderrepo_shape.pyis enough (tests/test_pinned_copy_text.py's skew rule).str(), the text the identity check always compared. A number reads as its digits, so a row a holder written before templates/assembly-root/project.yaml and the two leg pins write eight text placeholders bare (id,elected_on,visibility,tracking_branch, the two legpaths andsubmodule_paths), so a checked value YAML reads as another type (007,2026,true,null) is misread by the project or refused by the tool; quoting them reads every one back exactly and lets numeric branch names adopt #259 keeps asid: 2026passes, asfamily.py's_member_iddocstring says it does;true,1.5,-3, a list and a mapping read as text no id is, and are refused, named as the reader read them (True,['irrs'], ...).id: nulland a row with noid:staymember-id-absent's, members checked, and nothing under--no-members, as before.Rejected:
family.py removeand thenadd, runnable as printed. Measured on the base, on a hand-edited rowid: "irrs\n"(committed, holder on its work branch):remove --member IRRSexits 0 and prints its NOTE that the member's object store is left under.git/modules/members/IRRSon purpose;add --member InkRouter/IRRS --at <the pinned commit>then exits 2,REFUSED member-git-dir-cached: <holder>/.git/modules/members/IRRS still holds the object store of a previously removed IRRS, andgit submodule addwill not write over it. The two lines as printed do not run in a holder with the member checked out,addclones the member again, and without--atit moves the pin to the member's tip.bump --to <the pinned commit>, measured on the same row: exit 0, one commit, the rowid: irrs, the gitlink unmoved,validate-family.pyexit 0.bumpreads the member's ownproject.yamlat that commit and asks its id asadddoes (member-bad-id), so it repairs the row from the source and refuses where the source itself is malformed.IRRS:for the row,members/IRQS/project.yaml:for the member's own), and AGENTS.md names one code._check_member_ids_uniquedoes.id: ""is no id; it is refused (mutant M6 below).How:
templates/family-root/scripts/validate-family.py:_is_project_id,_bump_to(thebumpline, POSIX-quoted as THE LOCKSTEP RULE's) and_check_member_ids_well_formed, beside_check_member_ids_unique; one call in_check_members;_check_member_identitytakesroot(its one caller,_check_member_checkout, has it) and asks the member's own id. The module docstring's WHAT IS CHECKED gains one bullet aftermember-row's, away from validate-family.py: the check for values git dies on reads the index's.gitmodulesbeside the work tree's and its stage remedies endgit add -- .gitmodules, an index file git cannot parse is refused, and an unmerged one is read as none (#1150) #1227's lines. Each remedy's prose ends withBRANCH_LEFTin the same string as its_switch_line, astests/test_family_switch_branch_exists.py's guard reads the source. The--toof the row's remedy is the row'spin.commitwhereCOMMIT_RE.fullmatchtakes it, and<commit>otherwise.AGENTS.md: item 4 of the family section namesmember-id-malformed, on its own line, so the file stays at its 494-line cap (tests/test_repo_hygiene.py), andtests/test_agents_md_codes.pyholds the code to the tool. The passagestests/test_family_docs_one_spelling.pypins are untouched.tests/test_value_pattern_line_break.py:ID_READERScounts 2fullmatchreaders invalidate-family.py, the family's id and_is_project_id.Rows
tests/test_validate_family_member_id_pattern.pyis new, 44 rows (41 atd56f2084; round 1 below adds three). It imports the family fixture and its helpers from the files that own them (test_family,test_family_tracking_branch'son_main,test_validate_family_branch_step'sBRANCH_LEFTandswitch_argv,test_value_pattern_line_break'sID_PATTERN,a_member_whose_id_is,findingsandrewritten).ccc2c2d20657e396test_a_row_id_the_pattern_refuses_is_found_under_no_members[line-feed],[carriage-return],[space],[leading-dash](table 3)test_with_members_checked_it_is_the_one_finding_not_a_mismatch[...], the same four, members checked and--pinstest_a_row_id_whose_text_is_no_id_is_found[bool],[float],[negative],[list],[mapping]test_the_holder_add_wrote_before_1166_is_refused_in_every_modetest_a_mounted_member_whose_own_id_is_malformed_is_found[equal-to-its-row],[row-well-formed]test_the_members_own_id_is_asked_as_add_asks_it(the member's ownid: 0)test_the_rows_remedy_runs_as_printed_from_the_tracking_branch[plain],[space-and-apostrophe](round 1: the holder's path holds a space and an apostrophe)test_a_pin_that_is_no_commit_is_named_to_commit(round 1: a pin ofabcis named--to <commit>)test_the_members_remedy_pins_the_mended_commit_as_printedtest_add_refuses_exactly_the_ids_the_holders_own_validator_finds[...], 8 malformed ids[zero],[irrs],[hyphen],[digit-first]test_a_well_formed_row_id_is_family_ok_under_no_members[zero],[irrs]test_the_fixture_is_family_ok_in_every_mode[members],[no-members],[pins]test_a_well_formed_row_id_that_is_not_the_members_is_still_a_mismatchtest_a_row_id_that_reads_as_a_number_is_its_digits[2026],[zero](a bareid: 0, round 1)test_a_row_spelled_as_an_earlier_one_is_member_duplicates_alonetest_a_row_with_no_id_is_still_member_id_absent_alone[null],[no-id]To get the base column, the base's
validate-family.py(blob4683c3cf) was laid into a scratch clone at0657e396, written fromgit cat-file blob. Every base failure is the defect: nomember-id-malformed(exit 0 where the row asks 1, ormember-id-mismatchwhere it asks the row's finding), and the three remedy rows find no finding to type. The clone's file was then written back from HEAD's blob, and its blob,4e011252, equals HEAD's. (Atd56f2084the count was 27 failed, 14 passed of 41, in 27.67 s and 31.42 s.)Mutants
10 mutants, 10 killed (and the four of r1204's 14 that survived
d56f2084, R6, R7, R11 and R12, killed in round 1 below). Each ran alone in the scratch clone over the new file, and after each the file was written back from HEAD's blob and proved equal to it (c9a37c41). M1 to M9 ran at9fc09305, whosevalidate-family.pyis this head's blob; M10 survived there and is killed atd56f2084by the control row added for it.--no-membersreturn (the issue's first)source_bad = False(the issue's second)fullmatchput back tomatchin_is_project_id(the issue's third)member-id-mismatchsaid as well where an id is malformedstr(id), notadd'sstr(id or "")..._asked_as_add_asks_it)_check_member_ids_uniqueskips it[empty])--to <commit>, not the pinned commit..._rows_remedy_runs_as_printed_...)id: nulland noid:asked as text ('None')family/remove-...for abump..._rows_remedy_runs_as_printed_...)d56f2084, 1 failed (..._member_duplicates_alone); survived at9fc09305Tests
The gate, call by call, Python 3.12.3, git 2.43.0, in the probe environment, one basetemp per call, at most 2 at once. Call 1 ran at
9fc09305; every other call atd56f2084, which adds one row to the new file. Round 1 re-ran the files it touches at0657e396; those calls are in the next section.tests/test_family.py,tests/test_family_add_member_id.py,tests/test_value_pattern_line_break.py, and #1227'stests/test_family_gitmodules_values.py,tests/test_validate_family_index_gitmodules.py,tests/test_validate_family_index_value_unmerged.pytests/test_validate_family_*.py, 12 files (the new one and #1227's two included)tests/test_pinned_copy_text.pywith everytests/test_shape_pin_*.pyandtests/test_update_shape*.py(22 files, 977 ids), shard 1 of 4 (245 ids)tests/test_scaffold_leg_path_collisions.py,tests/test_path_guard_hygiene.py,tests/test_no_auto_maintenance.pytests/test_agents_md_codes.py,tests/test_cli_reference.py,tests/test_repo_hygiene.pytests/test_shape_doctor.py, shard 1 of 4 (113 ids)tests/test_shape_doctor.py, shard 2 of 4 (113 ids)tests/test_shape_doctor.py, shard 3 of 4 (113 ids)tests/test_shape_doctor.py, shard 4 of 4 (110 ids)tests/test_template_text_placeholders.py(its007andtruemember ids pass the holder's gate)dff8fd4b(treec477f34d, in the scratch clone): the new file,tests/test_family_add_member_id.py,tests/test_value_pattern_line_break.py, main's newtests/test_remove_add_remedies_family_root.py,tests/test_agents_md_codes.py,tests/test_family_switch_branch_exists.py27397a4b: 256 passed)Call 5's 13 skips, listed with
-rsin a re-run (232 passed, 13 skipped in 131.55 s), are alltests/test_update_shape_merged_away.py: "git filter-repo is not installed". The other calls ran-q, so their skips are counted, not named; each is askipiforpytest.skipof the file's own (a platform, a privilege or a tool this bench lacks), and none is in a file this PR changes. Each id list was built with--collect-onlyand checked non-empty before its call.Review round 1 (r1204: READY, seven NITs)
r1204 reviewed
d56f2084and found it READY: no MUST, no SHOULD, 27 rows failing on base and 41 passing at head, and 10 of its 14 mutants killed. Round 1 is commit0657e396on top ofd56f2084. It answers NITs 1 to 3 and changes no behavior ofvalidate-family.py: the only difference between its blob atd56f2084(c9a37c41) and at0657e396(4e011252) is the docstring of_check_member_ids_well_formed(git diff --numstat d56f2084 0657e396: the validator 3 added, 2 removed; the new test file 63 added, 6 removed).NIT 1: the docstring said
member-pin-commitis printed "beside" the row's finding, but a refusal drops the finding. Reworded: "A pin that is no 40-hex commit is named--to <commit>; where members are checked,member-pin-commitrefuses the run first, and this finding follows once the pin is mended." The first row below also holds that claim: with the members checked, the same row is exit 2,REFUSED member-pin-commit: IRRS: ..., with nomember-id-malformedin stderr.NIT 2: no row held the remedy's
<commit>fallback or the holder's quoting. Two rows intests/test_validate_family_member_id_pattern.py:test_a_pin_that_is_no_commit_is_named_to_commit(new).--no-membersover a row withid: "irrs\n"andpin.commit: "abc": exit 1, the onemember-id-malformedfinding, and the remedy's--toargument is the literal<commit>. Kills R12.test_the_rows_remedy_runs_as_printed_from_the_tracking_branchis parametrized[plain]and[space-and-apostrophe]. In the second, the holder is moved totmp_path / "it's a holder"before the hand edit, astests/test_validate_family_branch_step.pygives_switch_linethe holderit's a holder; the switch and thebumpare split byshlex, typed as printed, and thebumpexits 0 with the row'sid:written, the pin where it was, the tree clean and the gate green in every mode. Kills R7: with the path unquoted,shlex.splitraisesNo closing quotation.NIT 3: no row read a bare
id: 0, the one value where the row'sstr()andadd'sstr(id or "")part.test_a_row_id_that_reads_as_a_number_is_its_digitsis parametrized[2026]and[zero]. Each: the row reads as that number; under--no-membersit is exit 0,family ok; with the members checked (IRRS's own id isirrs) it is exit 1 and exactly one finding,member-id-mismatch: members/IRRS: project.yaml declares id 'irrs' but family.yaml records 0 for IRRS. ...(2026for the first). Kills R6 (the row check would refuse a bare0) and R11 (the identity check would pass it with no finding).The new rows, base vs head (the clone's validator laid from base
ccc2c2d2, then from HEAD, as above):test_a_pin_that_is_no_commit_is_named_to_committest_the_rows_remedy_runs_as_printed_from_the_tracking_branch[space-and-apostrophe]test_a_row_id_that_reads_as_a_number_is_its_digits[zero]Mutants, r1204's own definitions (its
tools/mutate.py), each alone in a scratch clone at0657e396; after each, the file was written back from HEAD's blob and its blob,4e011252, printed EQUAL to HEAD's:d56f2084(r1204)0657e396str(member_id or "")..._its_digits[zero]), 43 passed_bump_toleaves the holder's path unquotedtest_validate_family_branch_step.py)..._rows_remedy_runs_as_printed_...[space-and-apostrophe]), 43 passed; withtest_validate_family_branch_step.py, 1 failed, 66 passedstr(recorded_id or "")..._its_digits[zero]), 43 passedCOMMIT_REfallback to<commit>removedtest_a_pin_that_is_no_commit_is_named_to_commit:['IRRS', '--to', 'abc'] == ['IRRS', '--to', '<commit>']), 43 passedThe gate at
0657e396, Python 3.12.3, git 2.43.0, in the probe environment, one basetemp per call, at most 2 at once:tests/test_family.py,tests/test_family_add_member_id.py,tests/test_value_pattern_line_break.py,tests/test_validate_family_branch_step.pytests/test_scaffold_leg_path_collisions.py,tests/test_path_guard_hygiene.py,tests/test_no_auto_maintenance.pytests/test_agents_md_codes.py,tests/test_cli_reference.py,tests/test_repo_hygiene.pytests/test_template_text_placeholders.py,tests/test_template_values_single_pass.py,tests/test_stdout_encoding.py,tests/test_refusal_default_remediation.py,tests/test_pin_pattern_line_break.py(the docstring is template text)27397a4b(commit8cfb52f6, tree44248a29, in the scratch clone): the new file,tests/test_family_add_member_id.py,tests/test_value_pattern_line_break.py,tests/test_remove_add_remedies_family_root.py,tests/test_agents_md_codes.py,tests/test_family_switch_branch_exists.py,tests/test_readme_windows_quoting_sentence.py,tests/test_family_bump_to_checks.pyNot re-run, since this round changes a docstring and the new test file and nothing else: #1227's three test files of call 1, the pin call (calls 3 to 6) and
tests/test_shape_doctor.py(calls 9 to 12). Their results above stand ford56f2084, whose code0657e396shares.NITs 4, 5 and 7 stay as named.
--no-membersthe row's remedy says "with the member checked out" and names no command for it._lockstep'sbumpbehaves the same way, andbump's ownmember-uninitializednamesgit submodule update --initandmake bootstrap. Known limits, below.NIT 6 is refreshed below: the Merge-tree section names the current main, #1172's head and #1246's head, and call 14 is re-run on the merge with main
27397a4b(R5). The "Summary by Sourcery" block GitHub appended to the live body describes #1227's change and has no closing keyword; this file carries none of it, and it stays out of the squash message.Merge-tree
git merge-tree --write-treeof head0657e396with each head fetched on 2026-11-08 (scratch clone):27397a4b: clean, tree44248a29, exit 0. Call R5 above runs the predicted merge..gitthis user cannot read is refusedgit-repo-unreadable, exit 2, not a traceback ornot-a-git-repo, and the doctor'smembersrow names it once, never drift (#1148) #1172's headbbe5b414(it wasba81fd7d): clean, tree61067f7c, exit 0..gitfile this user cannot open, or whose git directory (its own.git, or the one its gitfile names) this user cannot search, is refusedmember-unreadablenaming that part, and no longermember-commit-unresolvable, which said the pinned commit was missing and prescribed a fetch (#1221) #1246's head0deac3a6(unchanged): clean, tree7fdbfe6b, exit 0.#1256 has no
refs/pull/1256/headon origin, so it has no row here. #1227 has since landed as5c662f75, and the branch is restacked onto it and onto main9cb156a9: see "Restacked after #1227 landed" below.Restacked after #1227 landed
#1227 landed at 2026-11-09T21:16:10Z as
5c662f75on main, the squash of its final headbb4ef4d9, lane 5's update-branch merge of main4552efa6into #1227's2d56c190.5c662f75's parent is4552efa6, its tree46ddfc80isbb4ef4d9's, andgit diff bb4ef4d9 5c662f75is empty. The branch took it in three merges, with no rebase and no force-push:062f59830657e396,bb4ef4d94552efa6: clean, asgit merge-tree --write-tree 0657e396 bb4ef4d9predictedce09d66475b12a96062f5983,5c662f75templates/family-root/scripts/validate-family.py,tests/test_family_gitmodules_values.py,tests/test_validate_family_index_gitmodules.py,tests/test_validate_family_index_value_unmerged.py), aftergit diff bb4ef4d9 5c662f75over those four was empty. No path conflicted; three of the four blobs equal5c662f75's, andvalidate-family.py's differs from it by this PR's change alonece09d664, unchanged2eadb5df75b12a96,9cb156a99cb156a9, #1189's squash on5c662f75(adopt-project.pyand fourtests/test_adopt_*.pyfiles, none of this PR's): clean, as merge-tree predicted8d197589The PR's own change is unchanged. The
+and-lines (without the+++and---headers) of the reviewed delta,git diff -U0 ccc2c2d2 0657e396, and of the PR's diff now,git diff -U0 9cb156a9 2eadb5df, are 658 lines each with one sha256,ca4df1a9cf69d9b4852f147e372d9e8f441cc16223d63865e658d81a1e1ca6fa: they match (so didgit diff -U0 5c662f75 75b12a96, after merge 2).git diff --name-only 9cb156a9 2eadb5dflists exactly the 4 files of the reviewed delta,AGENTS.md,templates/family-root/scripts/validate-family.py,tests/test_validate_family_member_id_pattern.pyandtests/test_value_pattern_line_break.py(652 insertions, 6 deletions, as before). With context, the two diffs differ only in 6 hunk headers ofvalidate-family.py, each 63 lines lower, as main's42308f26and2fde6c3d(#1172) added lines above this PR's hunks. r1204's READY and r1204b's were given on these same lines.The gate at
2eadb5df, Python 3.12.3, git 2.43.0, in the probe environment, one basetemp per call, at most 2 at once:tests/test_value_pattern_line_break.pytests/test_family_gitmodules_values.py,tests/test_validate_family_index_gitmodules.py,tests/test_validate_family_index_value_unmerged.pytests/test_validate_family_*.pyfilestests/test_path_guard_hygiene.py,tests/test_no_auto_maintenance.py,tests/test_scaffold_leg_path_collisions.pytests/test_agents_md_codes.py,tests/test_cli_reference.py,tests/test_repo_hygiene.pyN1 to N3 also ran at
75b12a96, after merge 2 and before main9cb156a9was merged: 75 passed in 60.10 s, 184 passed in 313.52 s and 343 passed in 362.00 s. N1 runsadopt-project.py, which9cb156a9changes, so all five calls ran again at2eadb5df.Known limits
--no-members, a member's own malformed id behind a well-formed row is not seen: that run reads no member.addandbumprefuse such a member (member-bad-id), so only a hand edit, or anaddolder than validate-manifest.py, validate-family.py, family.py and update-shape.py: anid:, a date or arepository:ending in a line feed is refused by name, and a pin'ssource_repository:that is no path orowner/reponame is named as the pin's (#1139) #1166, leaves one.bumprefuses one that is not (member-uninitialized, naminggit submodule update --initandmake bootstrap); a CI log under--no-membersis read by a person who then runs it where the member can be checked out. Where the row'spin.commitis no 40-hex commit, the remedy says--to <commit>.member-pin-commit, exit 2) and the row's finding follows once the pin is mended; under--no-membersthe finding stands alone and names--to <commit>. That order predates this PR (r1204's NIT 1; the docstring now says it).bumpto the commit already pinned commits as "Bump IRRS to<sha>...<sha>-><sha>" (measured,committed 832d083cac1b: members/IRRS, family.yaml): its message does not say the row's id changed.id:that reads as a positive number (id: 7) is accepted, asaddaccepts it (str(7)), though the member's ownvalidate-manifest.pyrefuses it as no string. This PR asksadd's question, unchanged.project:is skipped, as_check_member_ids_uniqueskips it;member-projectnames that row only with the members checked (read, not measured; unchanged)./usr/bin/git); the issue's git 2.47.1 was not run. Python 3.12.3 only; CI runs 3.14. The change asks nois_file,existsorstat(tests/test_path_guard_hygiene.pyis in call 7).Not in this PR
name,reference,elected_by, a leg'spath,org,tracking_branch,digest_algorithm) aremanifest okorfamily okwith a trailing line feed (#1166 follow-up) #1205, the other fields' values of a member row (repository:,path:, the pin): this PR asks only a row'sid:and, on the mounted path, the member's ownproject.yamlid:.scripts/family.py.add'smember-bad-idis the question this PR's member check copies, unchanged._run_checks, which bootstrap.py, validate-family.py and siblings.py: a root or holder whose.gitthis user cannot read is refusedgit-repo-unreadable, exit 2, not a traceback ornot-a-git-repo, and the doctor'smembersrow names it once, never drift (#1148) #1172 changes.Lane: openreposhape-1 (openRepoShape-1)
🤖 Generated with Claude Code
Summary by Sourcery
Reject malformed member identifiers consistently and guide users to repair them with
family.py bump.Bug Fixes:
id:as a complete project identifier in all validation modes, including--no-members.project.yamlidentifiers consistently asmember-id-malformedand suppress misleading mismatch findings.family.py bumpremediation that repairs row identifiers from the pinned member manifest without moving the pin.Enhancements:
family.py add, including handling of non-string YAML values.Documentation:
member-id-malformedvalidation finding and its scope inAGENTS.mdand validator documentation.Tests:
addbehavior.