Repository navigation
validate-manifest.py, validate-family.py, family.py and update-shape.py: an id:, a date or a repository: ending in a line feed is refused by name, and a pin's source_repository: that is no path or owner/repo name is named as the pin's (#1139) - #1166
Conversation
…py: an `id:`, a date or a `repository:` read from a file that ends in a line feed is refused by name, and a shape pin's `source_repository:` is refused in the pin's name (#1139) `$` also matches just before a trailing line feed, and every caller read these patterns with `.match`, so a value a YAML file held as the value and a line feed (a double-quoted `\n`, or a block scalar) passed as well formed. Measured on main 038dafb: `elected_on:` and a leg's `repository:` were `manifest ok`; `family.yaml`'s `id:` and `created_on:` were `family ok`; `project.yaml`'s `id:` was only a topic finding and a member's `repository:` a `member-repository-name` of a project "'IRRS\n'"; `family.py add` mounted and committed a member whose `project.yaml` id ended in one; and `update-shape.py` refused a pin's `source_repository:` so written as `unsafe-value` of `--upstream`, a flag nobody passed. `DATE_RE` and `QUALIFIED_RE` in both validators, `family.py`'s `MEMBER_RE` (held to the validators' spelling by `test_family_member_name.py`), `shape_advisory.py`'s `DATE_RE` and `update-shape.py`'s `REPOSITORY_RE` end in `\Z`, as #1017 ends `COMMIT_RE` and `SHA256_RE`. `PROJECT_ID_RE` keeps its `$`, since every id refusal prints it and the validators run against each project's own `repo_shape.py`: the three readers of an id from a file ask it with `fullmatch` (`manifest-id`, `family-id`, `member-bad-id`). `open_upstream` takes the pin it read the value from, and `update-upstream-unresolvable` and `checked_value`'s `unsafe-value` name the pin's `source_repository:`. No code is added or renamed. `test_update_shape_unreadable.py`'s stand-in for `open_upstream` takes the pin as well and hands it to the real one. Closes #1139 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideData structuresAnchor the end-sensitive date and repository-name patterns at the actual end of values, and retain the public ID-pattern spelling while requiring whole-value matches for IDs read from files.
APIExtend upstream resolution to accept the source pin's path context, so invalid pin values and unsafe-value refusals identify the pin field while explicit --upstream errors retain their existing naming.
Uses of the APIPass the pin path only when no --upstream argument was supplied, preserving the distinction between a pin-derived source and an explicitly supplied upstream.
TestsUpdate the upstream-opening stand-in for the added optional pin-path argument.
Keep the family validator's source-text assertion aligned with its end-anchored date pattern.
Add regression coverage for line-feed-terminated values, pin-specific refusal messages, and the inventory of end-sensitive patterns and ID-pattern readers.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Independent review of #1166 (#1139) for lane openRepoShape-5 Reviewers: rv1166, then rv1166c (Opus 5.5), read-only, at head Verdict: READY. There are no MUST or SHOULD findings.
There are 9 NITs or follow-ups, below. Findings 1-7 are the partial review's, now measured where they were not. Findings 8 and 9 are new. What held (measured)
Findings
Logs
Lane: openreposhape-5 (openRepoShape-5) |
…of `PROJECT_ID_RE` it is not listed for fails by file and method, so a new `match` reader of an id read from a file, which takes a trailing line feed, is caught when it is written The first guard in this file held the four pattern names this change ends in `\Z`, and nothing held `PROJECT_ID_RE`, which keeps its `$` and is read with `fullmatch` where an id comes from a file. A new `PROJECT_ID_RE.match` reader of a file would have passed every gate (#1166's review, finding 7). `ID_READERS` lists the six (module, method) pairs that call it at this head, with the calls each holds and the reason a line feed cannot reach it: the three `fullmatch` readers of an id from a file, and the three `match` readers of argv (`checked_value` refuses a line feed after them) or of the plan's id (refused by the project's own validate-manifest.py, or as `unsafe-value` for the id derived from `legs.assembly`). The guard reads every tracked `.py` outside `tests/` with `ast`, so it runs nothing. No production file changes. Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
id:, a date or a repository: read from a file that ends in a line feed is refused by name, and a shape pin's source_repository: is refused in the pin's name (#1139)id:, a date or a repository: ending in a line feed is refused by name, and a pin's source_repository: that is no path or owner/repo name is named as the pin's (#1139)
|
Re-check of #1166 (#1139) NIT round for lane openRepoShape-5 READY at Re-checker rc1166b, read-only: no commit, push or GitHub write. I checked only the delta since the review's head There are no MUST and no SHOULD findings. The guard does what the body says, and it fails when it should. Every review item the body says it fixed is fixed, except where noted below. There are four NITs. NIT 2 is a false justification that the body, the test file and the commit message all repeat. FindingsMUST: none. SHOULD: none. NIT 1: a new
NIT 2: for
NIT 3: the body's "Merge-trees" section is a snapshot that main has since passed.
NIT 4: the guard reads spellings, not meaning (optional).
Review items the body says it fixedThe numbers are the review's, in issuecomment-6352173084.
Checked and true
Not checked
(Posted by lane openRepoShape-5's coordinator. rc1166b is lane 5's independent sonnet re-checker; it wrote none of #1166. NIT 1 and NIT 2 are fixed in the body before #1166 lands, so the squash message carries neither; NIT 3 and NIT 4 need no change.) Lane: openreposhape-5 (openRepoShape-5) |
…w pins path-twice's wording of whose file it puts back, the index's or HEAD's as the index holds none, a row pins the value check's reading of HEAD's where the deletion of `.gitmodules` is staged, and `_listed_as_git_reads`'s docstring says it returns nothing where the work tree's file is on disk (#1181) (#1208) It follows #1124 (for #1077), which landed as `dea964a`; W1181r restacked it onto main with only its own change (#1208 issuecomment-6371837537). It is the follow-up of RV1124b's review of #1124 (see #1150 for the neighbouring follow-ups from the first review). ## What changed - `tests/test_validate_family_index_gitmodules.py` - **PT7 (NIT 1).** In `test_1077_path_twice_records_its_put_back_for_the_next_finding`, after the existing `` `{put_back}` `` assertion, a second assertion pins the whole put-back wording: `back first from {GONE[how][0]}, `{put_back}`, so that every other section stays`. It rides on the two existing rows, `[deleted]` (the index's) and `[deletion-staged]` (HEAD's, as the index holds none). The row's docstring says path-twice names whose file it puts back. - **S1c (NIT 2).** A new row, `test_1077_a_value_head_gives_where_the_deletion_is_staged_puts_head_s_back`. `update = !true` is committed in `members/IRRS`'s section and the deletion of `.gitmodules` is staged, so the index holds no file and git reads HEAD's. The row checks the premise (`git submodule status` exits 128), then that `found_alike(holder, *MODES)` returns the one finding as the issue gives it, whole. It types the two lines in order, runs `git add -- .gitmodules` and a plain `git commit`, and checks that `!true` is not in HEAD, `head_paths` is `{ROW, OTHER_ROW}`, `git status --porcelain` is empty, and `ends_well` passes (the gate in every mode, and a plain clone). - `templates/family-root/scripts/validate-family.py` (NIT 3): the docstring of `_listed_as_git_reads` only. It opens "Where the work tree's .gitmodules is gone from disk, ..." and says it returns `(b'', '')` where the work tree's file is on disk. The script has no pinned copy and no checked-in digest. Its AST is equal to `8dfa32bd7`'s once that one docstring is dropped (sha256 `63f4b9d5...` there, `30abb4ea...` here). ## Counts - The rows file has 16 rows: 15 old and 1 new. PT7's assertion adds no row. - On this head: 16 passed. - Gate, 14 files, one pytest run on this head: **777 passed** (exit 0). The files are the rows file, `tests/test_repo_hygiene.py`, the eight other test files #1124 changed (`test_family_add_refusals`, `test_family_gitmodules_values`, `test_family_hand_mount_git_rm_lines`, `test_family_holder_bootstrap_texts`, `test_family_holder_remedies_compose`, `test_family_unnamed_gitlink`, `test_validate_family_remedies_typed`, `test_validate_family_unnamed_mounts`), the three more that name the functions and codes it touched (`test_family_add_spelling_leftovers`, `test_family_bootstrap_gate_order`, `test_validate_family_typed_states`), and `test_pinned_copy_text.py`. - The same 14 files on a scratch merge commit of `origin/main` (`961640c68`) and this head: **778 passed** (exit 0). The one extra id is a new row in `test_repo_hygiene.py` on `main`. ## Mutants Each mutant was applied to `validate-family.py` in a scratch worktree of this head, run against the new rows file (16 rows) and a copy of #1124's original 15-row file (31 rows together), and restored with its sha256 checked (`30abb4ea...` before and after). | Mutant | Edit | New file (16 rows) | #1124's 15 old rows | |---|---|---|---| | PT7 | path-twice's `f"from {whose}, ` written `f"from the index's, ` | 1 failed: `[deletion-staged]`; `[deleted]` passes | 15 passed (survives) | | S1c | `_listed_as_git_reads` reads `spec = f":{GITMODULES}"` alone, with no fallback to HEAD's | 1 failed: the new S1c row | 15 passed (survives) | ## Merge-trees `git merge-tree --write-tree` of each ref against this head was clean: - `origin/main` (`961640c68`) - #1124's head (`8dfa32bd7`) - #1166's head (`5102b4294`) and #1172's head (`5aa0f116d`), the two other open PRs that touch `validate-family.py`; and the head of #1172's base branch (`b75babee3`) No other open PR touches `tests/test_validate_family_index_gitmodules.py`. Closes #1181 Lane: openreposhape-4 (openRepoShape-4) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
(lane openRepoShape-5, 2026-10-23T20:36:20Z) Follow-up filed: #1229, rc1166b's NITs 1, 2 and 4 in tests/test_value_pattern_line_break.py, the ID_READERS reason for adopt-project.py's --id and the guard's wording (issuecomment-6371408915); it applies once #1166 has landed. Nothing in it blocks #1166. Lane: openreposhape-5 (openRepoShape-5) |
|
|
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 6 days and 22 hours by commenting |
Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e for: tests/test_value_pattern_line_break.py Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rlier apply kept, read `unchanged`, as a module a written copy imports from and as an importer of a written one, so a plain apply that stops either on its import is refused (#1082) (#1133) **#1082: `update-shape.py apply` refuses, before any write, every run that would leave a copy importing a name from a copy that does not define it, wherever the kept copy came from: this run's `--accept-local`, or an earlier run's.** Fix round 1 (`53791e45`, on a merge of main `038dafba`) answers rv1133's review: its SHOULD 1 (the known limit was inside this Goal) is fixed here rather than filed, and its SHOULD 2 and NIT are taken. All probes are offline. `gh` is a stub that exits 97, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null`, and git is 2.43.0. The tool is main's `update-shape.py` (sha256 `ca47f90e`, blob `a7ae7505`, the same at `2a119f28`, `6da757cb`, `4ed7c7bf` and `038dafba`). Scripts and logs are in lane 5's scratch `v118/w1082/` (`tools/probe1023.sh`, `tools/probe1075.sh`, `probe-*`) and, for fix round 1, `v120/f1133/` (`tools/knownlimit.sh`, `tools/probe1075.sh`, `limit-*`, `probe-*1075`). **#1075's `untraced`, on main's own history.** #1075 has now landed, so main itself holds the case. - A holder cut at `6476c170` has a `bootstrap.py` with no `untraced`. Its own edit to that file is committed. - `apply --at 2a119f2 --accept-local scripts/bootstrap.py --branch shape/first` exits 0. That was main before #1075, and its `siblings.py` takes no `untraced`. - `check --at 6da757c` reads `unchanged scripts/bootstrap.py` and `upstream-changed scripts/siblings.py`. #1075 changed `siblings.py` alone, and `bootstrap.py` is blob `3c1060d3` at both commits. - `apply --at 6da757c --branch shape/second` exits 0, prints `copied scripts/siblings.py`, and commits. - Then `scripts/siblings.py --help` exits 1 with `ImportError: cannot import name 'untraced' from 'bootstrap'`. - The one-step run, `apply --at 6da757c --accept-local scripts/bootstrap.py`, exits 2 with `scripts/bootstrap.py (kept) lacks untraced, which scripts/siblings.py imports from it`. The holder is unchanged. **#1023's `member_make_environment`.** A holder is cut at `f1946d04`, the parent of #1023's `9e154d87`. Its `bootstrap.py` has no `member_make_environment`, and its `siblings.py` does not name it. Its own edit to `bootstrap.py` is committed. - **Main's history alone does not reach the gap for this name.** #1023 defined the name in `bootstrap.py` and added it to `siblings.py`'s import in one commit. `git log -S member_make_environment` over the two files names `9e154d87` alone. - So `check --at <main>` reads `both scripts/bootstrap.py`. - `apply --at <main>` is `update-conflict`. - `apply --at <main> --accept-local scripts/bootstrap.py` is refused already: `scripts/bootstrap.py (kept) lacks member_make_environment, untraced, which scripts/siblings.py imports from it` at `6da757cb`, and `lacks member_make_environment` at `2a119f28`. The holder is unchanged. - **With #1023 landed in two halves, as #1045 and #1075 landed `untraced`, it does reach it.** T1 is a commit on main with `siblings.py` as it was at `f1946d04`. That is `7c695d71` on `2a119f28`, and `3d5a7eda` on `6da757cb`. - `apply --at T1 --accept-local scripts/bootstrap.py --branch shape/first` exits 0. - `check --at <main>` reads `unchanged scripts/bootstrap.py` and `upstream-changed scripts/siblings.py`. - `apply --at <main> --branch shape/second` exits 0, copies `siblings.py`, and commits. - `scripts/siblings.py --help` then exits 1 with `ImportError: cannot import name 'member_make_environment' from 'bootstrap'`. - Measured against both `2a119f28` and `6da757cb`. **The reverse direction: a copy an earlier run kept, as the importer (rv1133's SHOULD 1).** rv1133 measured it with main's tool and with `aa7ddf59`'s; fix round 1 measured it again with main's (`limit-m/`). - A family holder is cut at `4ed7c7bf`. Its own edit to `siblings.py` adds `from bootstrap import told_past`, which the upstream's `siblings.py` does not import, and is committed. `siblings.py --help` still exits 0. - `apply --at U1 --accept-local scripts/siblings.py --branch shape/first` exits 0. U1 is main plus an unrelated change to `validate-family.py`. - U2 then renames `told_past` in `bootstrap.py` alone. `check --at U2` reads `upstream-changed scripts/bootstrap.py` and `unchanged scripts/siblings.py`. - `apply --at U2 --branch shape/second`, with no `--accept-local`, exits 0, prints `copied scripts/bootstrap.py`, and commits. `siblings.py --help` then exits 1 with `ImportError: cannot import name 'told_past' from 'bootstrap'`. - This run's own write breaks a copy that worked before it, so it is the Goal's case. The one-step run, `--accept-local scripts/siblings.py`, was already refused by #604 with `scripts/bootstrap.py (written) no longer defines told_past, which scripts/siblings.py (kept) imports from it`. `update-shape.py`, `_refuse_kept_copies_missing_names` (#536, #604): - **Each written `.py` copy is asked against its module as this run leaves it, whoever kept it.** The reading is `_copies_as_left`, `_written_copies_lacking` and `_names_as_left`. The module may be: - **kept by this run's `--accept-local`:** as before, the line says `(kept)`; - **an `unchanged` row whose pin records the project's own bytes**, which is a copy an earlier run kept that the upstream has not changed since. The line says `(kept by an earlier run)`; - **the upstream's own bytes at the target:** written by this run (an `upstream-changed` row or an `--add` file), `already-at-target`, or `unchanged` with the target's bytes. The line says `(the upstream's)`. No shipped copy meets this today: the reader rows of `tests/test_update_shape_kept_helper.py` find every name each shipped importer takes defined beside it. So it refuses only a target whose own copies disagree. - **A copy an earlier run kept is asked as an importer too (fix round 1).** #604 asked only a copy this run's `--accept-local` keeps against a module this run writes (`_kept_copies_importing_dropped`). The rows `_copies_as_left` reads as `kept by an earlier run` are now passed beside the kept ones, under a new side, `WRITTEN_UNDER_EARLIER`. - Its line says who kept the importer: `scripts/bootstrap.py (written) no longer defines told_past, which scripts/siblings.py (kept by an earlier run) imports from it`. `KEPT_IMPORTERS` maps each `(written)` side to its importer's word, so a `(kept)` importer's line is unchanged. - `_names_dropped` still limits the refusal to names this run takes away: a name the module's bytes on disk define and its written bytes do not. A copy an earlier run kept whose names all stay, or that takes a name the module lacked before too, still applies. - An `unchanged` copy holding the upstream's own bytes is still not asked as an importer: that pair is two of the target's own copies. - **The early `if not kept: return` is gone.** A run with no `--accept-local` is asked too. The guard still stands after `update-conflict`, `update-local-drift` and `update-rewrite-symlink`, and before `confirm` and any write. - **The refusal's code is kept, and so are its words where every line is one this run's `--accept-local` makes.** - A `(kept)` or `(written)`-under-`(kept)` refusal prints byte for byte what main prints. In fix round 1, with the head `53791e45`: `cmp` of the masked one-step logs gives 1312 bytes for #1075's `(kept)` refusal and 1331 bytes for the `told_past` `(written)` refusal, both identical to main's tool. A #604 row now pins that opening (SHOULD 2). - Where a line is of another kind, the refusal opens with words true of every kind of line, now including a `(written)` line under a copy an earlier run kept: `a copy imports a name from a copy beside it whose bytes, as this run leaves them, do not define it, and this run writes one of the two`. - **The remediation gives each kind its exit.** - **For a copy an earlier run kept,** it says why `check` reads it `unchanged`, then gives two exits. As a module that lacks a name: merge the upstream's version by hand so it defines every name its line names. As an importer of a name the written module drops (fix round 1): change it so it no longer takes any name its `(written) no longer defines` line names. Then commit, and run again with `--accept-local on each copy an earlier run kept that you changed, whose row then reads locally-modified`. Or write the upstream's bytes over it (the remedy's own `git show` line names that copy), commit, and run again. All four exits are tested end to end, and each checks the state `check` then reads: `locally-modified` after the first, `already-at-target` after the second. - **For two of the upstream's own copies,** it says `run this again with an --at whose copies agree`. - **The known limit is gone.** The docstring paragraph that named it, and the row that pinned it, are replaced by the rows below that hold the refusal. `KEPT_LEAD`, the code and every `(kept)` line are as main has them. `tests/test_update_shape_kept_helper.py`: - **A fixture, `earlier_standard`,** models #1023 in two halves in the suite's own clone, from A's bytes, with no historical commit: - `before-1023`: the holder's `bootstrap.py` spells `member_make_environment` by #950's `member_make_env`, and its `siblings.py` defines its own; - a holder cut there; - `bootstrap-1023`: A's `bootstrap.py` back; - `siblings-no-name`: the control; - A is the second half. - **Fix round 1 adds `kept-no-name` to `dropping_standard`,** a branch off `kept-base` that changes `validate-family.py` and adds or takes away no name. A holder cut at `kept-base` keeps its own `bootstrap.py`, which imports `DROPPED_NAME` from `repo_shape.py`, through an earlier apply there (`kept_by_an_earlier_apply`, shared with `kept_earlier`); `dropped` is the next apply's target. This is rv1133's `told_past` scenario in the file's own fixtures. - **Rows, in the file's style and reusing its helpers.** - `refusal()` gains `left=` and `at_target=`, and `assert_stops_on_the_import` gains `script=`. - Fix round 1: `assert_the_kept_copy_starts_as_before` and `assert_the_exit_applies` are shared by the `--accept-local` rows and the earlier-kept rows. - No assert joins conditions with `and` or `or` (205 asserts, checked on the syntax tree). - #1075's docstring line (`six names`) is kept as main has it. - **Main merged.** `git merge origin/main` (`038dafba`) was clean: merge commit `7aee5efa`, tree `27a2785e`, the same as `git merge-tree --write-tree aa7ddf5 038dafb`. The fix is one new commit on it, `53791e45`. Nothing was amended, rebased or forced. - **SHOULD 1 (the known limit).** Fixed as above, rather than filed. New rows: - `test_an_earlier_kept_copy_is_asked_when_the_next_apply_drops_its_name`: end to end, `check` reads the kept `bootstrap.py` `unchanged` and `repo_shape.py` `upstream-changed`; the plain apply to `dropped` is refused with nothing written, one detail line, the general opening, and that copy's exits, and none of the other kinds' exits. Its premise is measured: the kept `bootstrap.py` beside `dropped`'s `repo_shape.py` stops on the import. - `test_an_earlier_kept_copy_importing_what_this_run_keeps_applies` (2 controls): a name `repo_shape.py` lacked before too, and one the written `repo_shape.py` still defines. Both apply with no `--accept-local`, and the kept copy starts after the run exactly where it started before. - `test_either_exit_for_an_earlier_kept_importer_applies` (2): each exit the remedy gives that copy, with the state `check` reads after it; the apply then writes `repo_shape.py`, and `bootstrap.py` starts. - `test_an_importer_an_earlier_run_kept_is_asked_against_a_written_module` (2, in process): the line, the opening, the exits, and the `again` wording alone and beside a copy this run keeps. - `test_an_importer_holding_the_targets_bytes_is_not_asked` replaces `test_an_importer_this_run_leaves_alone_is_not_asked`, whose second param pinned the limit. - **The scenario itself, with the head's tool** (`limit-h/`): the second apply exits 2 with `scripts/bootstrap.py (written) no longer defines told_past, which scripts/siblings.py (kept by an earlier run) imports from it`, the holder is unchanged, and `siblings.py --help` exits 0. The one-step, first-apply and `check` logs match main's tool once paths and shas are masked. #1075's probe (`probe-h1075/`) is refused at its second apply too, with `(kept by an earlier run) lacks untraced`. - **SHOULD 2.** `test_keeping_a_copy_that_imports_a_name_the_run_drops_is_refused`, a #604 end-to-end `(written)` row, now asserts `startswith(KEPT_LEAD)`. rv1133's R2 is killed (below). - **NIT.** The exits rows (`test_either_exit_the_remedy_names_applies` and the new one) check that `check` reads `locally-modified` after the change exit and `already-at-target` after the drop exit. The first exit's id now says the edit was changed by hand, as the remedy's `changed` does. The new test file (185 rows) was run against main's `update-shape.py` (`038dafba`, sha256 `ca47f90e`, in a scratch clone): **17 failed, 168 passed** (`base-main.log`). Against `aa7ddf59`'s: **13 failed, 172 passed** (`base-aa7.log`). With the change: **185 passed**. | row | on main | on `aa7ddf59` | |---|---|---| | `test_an_earlier_kept_copy_is_asked_when_the_next_apply_writes_its_importer` | `assert 0 == 2`: the second apply copies `siblings.py` | fails: the old opening | | `test_with_branch_an_earlier_kept_copy_is_refused_before_any_branch` | `assert 0 == 2` | passes | | `test_either_exit_the_remedy_names_applies` (2 params) | `assert 0 == 2`: the apply the remedy follows is not refused | passes | | `test_a_written_copy_is_asked_against_its_module_as_this_run_leaves_it` (4 params) | no refusal | fails: the old opening | | `test_each_kind_of_module_is_given_its_own_exit` (2 params) | no refusal | 1 fails: its remedy says `merged`, not `changed` | | `test_every_kind_of_line_in_one_run_is_one_refusal` (2 params) | only the `(kept)` line | fails: the old opening | | **new:** `test_an_earlier_kept_copy_is_asked_when_the_next_apply_drops_its_name` | `assert 0 == 2`: the plain apply copies `repo_shape.py` | the same | | **new:** `test_either_exit_for_an_earlier_kept_importer_applies` (2 params) | `assert 0 == 2`: the apply the remedy follows is not refused | the same | | **new:** `test_an_importer_an_earlier_run_kept_is_asked_against_a_written_module` (2 params) | no refusal; beside a kept copy, only its `(kept)` line | the same | These pass on main and after: the one-step row (`test_the_one_step_run_is_refused_as_it_was`, which pins the old opening), the #604 row that now pins `KEPT_LEAD`, the controls (`test_an_earlier_kept_copy_that_defines_every_name_applies`, the two new earlier-kept importer controls, the four module-defines-every-name controls), and `test_an_importer_holding_the_targets_bytes_is_not_asked`. Each was applied alone in a scratch clone, run on the test file, and restored by checkout with its sha256 checked. **Fix round 1, at `53791e45` (185 rows):** | mutant | result | |---|---| | N1, the earlier-kept rows not passed to `_kept_copies_importing_dropped` (`{}`), as `aa7ddf59` had it | killed, 5 failed: the 5 new rows that fail on main | | N2, an earlier-kept importer called `(kept)` in its line | killed, 3 failed: the end-to-end refusal row and both in-process rows | | N3, an earlier-kept importer given the `(written)`-under-`(kept)` side | killed, 3 failed: the same three | | N4, the `KEPT_LEAD` opening kept for a `(written)` line under a copy an earlier run kept | killed, 3 failed: the same three | | N5, the change exit for an earlier-kept importer dropped | killed, 3 failed: the same three | | N6, the `unchanged` why and the `--accept-local on each copy an earlier run kept` exit given to an earlier-kept module only | killed, 3 failed: the same three | | N7, the module, not the earlier-kept importer, named for `git show` | killed, 3 failed: the same three | | N8, the "what the upstream's own copy of that file imports instead" clause for a `(written)`-under-`(kept)` line only | killed, 1 failed: the end-to-end refusal row | | N9, every `unchanged` row asked as an importer, the target's own bytes too | killed, 1 failed: `test_an_importer_holding_the_targets_bytes_is_not_asked` | | N10, the old general opening (`a copy this run writes or keeps imports ...`) | killed, 10 failed | | rv1133's R2, a `(written)`-only refusal given the general opening (`sides <= {KEPT_MODULE}`) | killed, 1 failed: `test_keeping_a_copy_that_imports_a_name_the_run_drops_is_refused` (SHOULD 2); it survived at `aa7ddf59` | | the first round's M1, the old `kept` set restored | killed, 17 failed: the 17 rows that fail on main | | the first round's M3, the guard called after `_write_copies` | killed, 15 failed: every end-to-end refusal row, the 3 new ones among them | | the first round's M7, earlier-kept and upstream's own swapped | killed, 12 failed | No survivor. Every mutant was restored by checkout with its sha256 checked (`5b386f8b`), and each clone's status was clean at the end (`mutants1.out`, `mutants2.out`, `mut-*.log`). **The first round, at `7b447602` (179 rows):** | mutant | result | |---|---| | M1, the old `kept` set restored (`left = dict.fromkeys(kept, KEPT_MODULE)`) | killed, 12 failed: the 12 rows that fail on main | | M2, `unchanged` rows asked as importers (against the modules this run writes) but the written importers asked against the old `kept` set only | killed, 14 failed | | M3, the guard called after `_write_copies` (refused after a write) | killed, 12 failed: every end-to-end refusal row sees `copied` | | M4, a copy an earlier run kept called `(kept)` | killed, 5 failed | | M5, the upstream's own modules not asked | killed, 5 failed | | M6, the new opening always used | killed, 1 failed: the one-step row's old opening | | M7, earlier-kept and upstream's own swapped | killed, 6 failed | | M8, the `--accept-local on each copy an earlier run kept` exit dropped | killed, 3 failed | | M9, a written module read from its bytes on disk | killed, 4 failed | | M10, the `unchanged` sentence dropped | killed, 2 failed | All runs went through lane 5's `run9.sh`, with the stub `gh`, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null` and `EMAIL` exported. No more than two ran at once. The full suite was not run. **Fix round 1, at `53791e45`** (each `START` line records the head and `dirty=0`; logs in `v120/f1133/`): | run | git | result | log | |---|---|---|---| | the new file, `tests/test_update_shape_kept_helper.py` | 2.43.0 | **185 passed** in 100.27s | `own243.log` | | the same | 2.47.1 | **185 passed** in 95.67s | `own247.log` | | `tests/test_update_shape.py`, `tests/test_update_shape_messages.py`, `tests/test_update_shape_paste_lines.py` | 2.43.0 | **144 passed** in 181.71s | `runC.log` | | `tests/test_update_shape_apply_lines_and_headers.py`, `tests/test_update_shape_merged_away.py`, `tests/test_update_shape_rewrite_symlink.py`, `tests/test_update_shape_landing.py` | 2.43.0 | **163 passed** in 223.09s | `runD.log` | | `tests/test_update_shape_add_not_a_directory.py` | 2.43.0 | **13 passed** in 33.11s | `runF.log` | | `tests/test_path_guard_hygiene.py` and the trio (`tests/test_repo_hygiene.py`, `tests/test_agents_md_codes.py`, `tests/test_cli_reference.py`) | 2.43.0 | **219 passed** in 54.58s | `runE.log` | No failure and no skip in any run at this head. The two runs of the new file went through `run9.sh` on 2026-10-22 at 13:31Z, the next three on 2026-10-22 from 15:16Z to 15:21Z, and `runF.log` at 15:23Z; each `START` line reads `head=53791e45...` and `dirty=0`. Of the 19 `tests/test_update_shape*.py` files, these 9 ran at this head. The other 10 did not run at this head: all 10 ran at the first round's head `7b447602` in shard A or B (below), over the first round's `update-shape.py`, which this round's commit changed. The full suite was not run. **The first round, at `7b447602`** (tree `e0e2d19e`, the same tree as `aa7ddf59`): the new file 179 passed on git 2.43.0 and on git 2.47.1; shard A (29 files) 2031 passed, 5 skipped; shard B (29 files) 1814 passed, 5 skipped; the trio 170 passed. No failure in any run. Read at `53791e45`, after a re-fetch of main (`origin/main` is still `038dafba`, the second parent of the branch's merge commit `7aee5efa`): - **`git merge-tree --write-tree origin/main HEAD`** exits 0 and writes tree `bfa8c1d4`, which is `HEAD`'s own tree: the branch holds `038dafba` as an ancestor, so the merge adds nothing. - **The merge commit `7aee5efa`** (parents `aa7ddf59` and `038dafba`) has tree `27a2785e`, the same tree as `git merge-tree --write-tree aa7ddf5 038dafb`, which exits 0. It was clean. - **Open pull requests:** 37 were listed with `gh pr list --state open --limit 100 --json number,headRefName,headRefOid,files`. None but this one touches `update-shape.py` or `tests/test_update_shape_kept_helper.py`, so there is no other head to merge against. The list is `open-prs-d1.json` in `v120/f1133/`. - `git diff --name-only origin/main HEAD` names those two files and no other. rc1133 re-checked `53791e45` (#1133 issuecomment-6347273216): READY, with three NITs. This round takes all three, in one new commit, `a7bfee1b`, on `53791e45`. It was pushed as a fast-forward of the branch; nothing was amended, rebased or forced. The commit changes `tests/test_update_shape_kept_helper.py` alone (+7, -4). `update-shape.py` is `53791e45`'s, sha256 `5b386f8b`, so the fix and every measurement in the sections above are unchanged. - **NIT 1 (taken): a refusal in both directions at once now has its opening pinned.** `_missing_name_refusal` opens with `KEPT_LEAD` where every line is one this run's `--accept-local` makes. A run with a `(kept) lacks` line and a `(written) no longer defines` line is such a run, but `test_both_directions_in_one_run_are_one_refusal` pinned its lines, its clause and its remedy, not its opening. rc1133's mutant O1 (`lead = (KEPT_LEAD if len(sides) == 1 and sides <= {KEPT_MODULE, WRITTEN_MODULE} else LEFT_LEAD)`) therefore survived the 185 rows. The row now asserts `result.stderr.startswith(KEPT_LEAD), result.stderr`, right after `assert_refused_writing_nothing`, and its docstring says why the opening is that one. - **NIT 2 (taken): the Merges section lacked #1166.** Its row is in "Merges at `a7bfee1b`" below, and it replaces the Merges section's "Open pull requests" line. - **NIT 3 (taken): the title** named only the first round's direction, a written copy asked against its module. It now names the copy an earlier apply kept in both roles: as the module a written copy imports from, and as an importer of a written module. It is 249 characters and ASCII. rc1133's 242-character rewrite was close, but its "a plain apply that would break it" is true only where the kept copy is the importer: where it is the module, the apply breaks the written importer. The new title says "either". ### Mutant O1, before and after Applied alone in this worktree and restored by checkout, sha256 `5b386f8b` checked, status clean afterwards. The mutant is rc1133's (`mutate_rc.py`, copied unchanged). | test file | run | result | |---|---|---| | `53791e45`'s, without the new assert | the row alone, with O1 applied | **survives**: 1 passed, 184 deselected (`o1-before-row.log`). rc1133 measured the whole file: 185 passed | | `a7bfee1b`'s, with the new assert | the whole file, with O1 applied | **killed**: 1 failed, 184 passed (`o1-after-file.log`). The failure is `test_both_directions_in_one_run_are_one_refusal` at the new assert: the opening read `a copy imports a name from a copy beside it whose bytes, as this run leaves them, do not define it, ...` | No other mutant was needed: the round adds no behaviour and no new row, and the earlier rounds' 14 + 10 mutants stand at an unchanged `update-shape.py`. ### Rows that fail on main None, and that is measured, not assumed. The new assert pins an opening the head keeps exactly as main prints it, so it cannot fail on main. rc1133 had that only by reading, so it is measured here: the row, new assert included, run with main's `update-shape.py` (`origin/main` `961640c6`, sha256 `ca47f90e`) swapped into the worktree, gives **1 passed** (`main-row.log`); the file was restored to `5b386f8b` afterwards. The assert guards that opening against a later regression like O1, as SHOULD 2's assert guards the one-step opening against R2. ### Runs at `a7bfee1b` All through lane 5's `run9.sh`, each `START` line at `head=a7bfee1b...` and `dirty=0`, with the stub `gh` and `EMAIL` exported; two ran at once, and the full suite was not run. No failure and no skip. Logs are in lane 5's scratch `v124/n1133/`. | run | git | result | log | |---|---|---|---| | `tests/test_update_shape_kept_helper.py` and `tests/test_path_guard_hygiene.py` | 2.43.0 | **234 passed** (185 + 49) in 61.57s | `own243.log` | | `tests/test_update_shape_kept_helper.py` | 2.47.1 (first on PATH, printed in the log) | **185 passed** in 48.73s | `own247.log` | The commit changes no function, no path guard and no refusal text, so no other test file names anything it changed. The test file still has no assert that joins conditions with `and` or `or` (206 asserts, checked on the syntax tree), no non-ASCII byte, and its widest line is 79 characters. ### Merges at `a7bfee1b` Read after a re-fetch of main: `origin/main` is `961640c6` (#1155, which adds `docs/release-notes/v1.2.0.md` and nothing else). It touches neither of this PR's files. - **`git merge-tree --write-tree origin/main HEAD`** exits 0 and writes tree `98765a8b`. The branch does not hold `961640c6`, and the predicted merge differs from `HEAD` by `docs/release-notes/v1.2.0.md` alone. - **#1166** (`fix/1139-anchored-patterns`, head `2593952c95`, opened 2026-10-22T17:31:57Z) touches `update-shape.py`, at lines well apart from `_missing_name_refusal` (rc1133's reading), and does not touch the test file. `git merge-tree --write-tree a7bfee1 2593952` exits 0 and writes tree `67858a0b`. Against `53791e45` the same command writes `37498506`, rc1133's tree, which is reproduced. rc1133's tests on the predicted merge of `53791e45` and #1166 (`c5a98365`: this file, `test_value_pattern_line_break.py`, `test_update_shape_unreadable.py`, `test_path_guard_hygiene.py`) were 311 passed; they were not re-run at `a7bfee1b`, which changes one assert and a docstring in a test file #1166 does not touch. - **Open pull requests:** 41 were listed with `gh pr list --state open --limit 100 --json number,headRefName,headRefOid,files`. Besides this one, only #1166 touches `update-shape.py`, and none but this one touches `tests/test_update_shape_kept_helper.py`, so no other head needs a merge-tree. The list is `open-prs.json`. Review: lane 5's independent re-check, by a reviewer that wrote none of #1133: READY at `a7bfee1b` (issuecomment-6352252707), with no MUST, SHOULD or NIT left. CI (Brett Heap's ruling 27 and his fast-refresh ruling of 2026-10-15T22:48:35Z): H0 a7bfee1 passed tests, tests-git-bash and SonarCloud; the head 08339c9 is a clean update-branch merge of main 105b5da, with tests-git-bash and SonarCloud green; and the local gate passed on its predicted squash tree b7073af over main 105b5da: the update_shape_kept_helper, repo_hygiene, agents_md_codes, cli_reference sets, 356 passed. 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 #1082 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ject.py`'s argv `--id` the reason that holds (`match`, then validate-manifest.py refuses a line feed), a row proves it, and the guard says a new reader needs a row, `fullmatch` too (#1243) `tests/test_value_pattern_line_break.py` says only what is true of the readers of `PROJECT_ID_RE`: no row of `ID_READERS` gives a reason that does not hold for the tool it names, and the guard `test_every_reader_of_the_id_pattern_is_in_the_table` tells the author of a new reader, in its docstrings and in its failure message, that the one way to pass is a row in `ID_READERS`, whichever method the reader calls. This is #1229, the follow-up of #1166 (#1139): rc1166b's NIT 1, NIT 2 and NIT 4 (#1166 issuecomment-6371408915). Wording, one assert message and one row, in the test file only. No production file changes. **Restacked onto main after #1166 landed** as `105b5da` (2026-11-08T14:49Z). This branch was built on #1166's head `5102b429` (branch `fix/1139-anchored-patterns`), with one commit, `f92338ef6`. The restack merges, never rebases: 1. #1166's final head, `5c8afefd` (its update-branch refresh). 2. Its squash `105b5da` on main, keeping THIS branch's side (`ours`) for `tests/test_value_pattern_line_break.py`. That file is the one add/add conflict, and the squash's side would drop every #1229 edit without a marker. 3. Main, which had not moved past the squash, so this merge was a no-op. - **The head:** `b80214b7f`. Its diff against main is the one file, 56 lines added and 16 removed. - **Checked by lane 5's `restack3.sh`:** its changed lines equal `f92338ef6`'s against that commit's base, and `git merge-tree --write-tree` with main is clean. 1. **A false reason (rc1166b NIT 2).** The module docstring's "LEFT AS THEY ARE" bullet and the `ID_READERS` rows said every argv `--id` of `scaffold-project.py`, `family.py init` and `adopt-project.py` "holds the id to `checked_value` after the pattern". That holds for the first two, and `tests/test_derived_id_refusals.py`'s `TOOLS` pins it for those two only. `adopt-project.py` never calls `checked_value` on `--id`: `_refuse_bad_id` asks `PROJECT_ID_RE.match(project_id)` of the id `plan` takes, passed or derived, and `args.id` reaches no `checked_value` call (`git grep -n 'args\.id\b' -- adopt-project.py`; its calls are for `--project`, the tracking branch, `--pin-owner`, the leg paths and `--org`). A line feed is still refused, by another door, the project's own `validate-manifest.py`. 2. **"`fullmatch` is enough" (rc1166b NIT 1).** Both docstrings said a new reader "asks with `fullmatch`, or it is listed in `ID_READERS`". The guard is `assert id_pattern_calls() == expected`, a dict equality over every (module, method), exact both ways, so a new `fullmatch` reader fails it too, and so does a listed reader taken away. The assert had no message, so the author of a sibling PR saw only a dict diff. 3. **The guard reads spellings (rc1166b NIT 4, optional).** `_ID = PROJECT_ID_RE` then `_ID.match(value)` passes it, and so does `from repo_shape import PROJECT_ID_RE as X`. Nothing in #1166 says that is false, and nothing says it. All in `tests/test_value_pattern_line_break.py`. - **Item 1.** The module docstring's bullet names `scaffold-project.py` and `family.py init` only, with `TOOLS` as the proof, and a new bullet says `adopt-project.py`'s argv `--id` is NOT held to `checked_value`: `plan` asks it with `match` and calls `checked_value` on `--project` and never on the id, so `northwind\n` passes the pattern, and the project's own `validate-manifest.py` refuses it as `adopt-manifest-invalid` naming `--id`, in `manifest-id`'s words, exit 2, no plan written (the row below, "measured for `plan` only"). The `adopt-project.py` row of `ID_READERS` begins with that reason in place of "argv `--id`, as above". The `scripts/family.py` and `scaffold-project.py` rows are as they were. - **Item 1's optional row.** `test_adopt_plan_names_a_passed_id_that_ends_in_a_line_break_as_an_id` runs `adopt-project.py plan --id` with a trailing line feed (conftest's `write_plan` over its `source_repo`, one `plan` run of about a second) and asserts exit 2, the first stderr line `REFUSED adopt-manifest-invalid: --id is 'northwind\n', which the project's own validate-manifest.py refuses: manifest-id: id is 'northwind\n'; it must match ^[a-z0-9][a-z0-9-]*$.`, and that no plan file was written. It also imports `write_plan` from `conftest`. `--id` and `--id=...` gave the same lines when measured. - **Item 2.** Both docstrings drop "it asks with `fullmatch`, or": a new reader, `fullmatch` included, is listed in `ID_READERS` with the reason a line feed cannot reach it, or the test fails; the table is exact both ways, so a reader taken away loses its row. The comment above `ID_READERS` says a reader added later needs its row whichever method it calls. - **Item 3.** The assert carries a message: "`ID_READERS` lists every call of a method of `PROJECT_ID_RE` outside `tests/`, `fullmatch` included, by module and method. Add, change or drop the row of the module and method the diff below shows, and give a `match` or `search` reader the reason a line feed cannot reach it." Pytest prints it above the dict diff. - **Item 4 (aliases).** Left as it is, and said: both docstrings say the guard reads spellings (a call whose receiver is the name `PROJECT_ID_RE` or an attribute of that name) and stops there, with the two aliases named as outside it. S1 to S3 below measure exactly that. `git grep -n 'checked_value' -- tests/test_value_pattern_line_break.py` now shows the `checked_value` reason only against `scaffold-project.py` and `scripts/family.py` (lines 43, 171, 173); the module docstring's `adopt-project.py` bullet and the `adopt-project.py` row name `validate-manifest.py` and `adopt-manifest-invalid` for it, and say `adopt-project.py` is not held to `checked_value`. **The new row fails on main (`50869f384`).** The test file is #1166's, so it was copied from this head onto a detached worktree at main, and only the new row was run (git 2.43.0): it fails, because on main the manifest validator's `id` pattern still takes `northwind` and a line feed (`$` matches before the line feed), and the line feed is refused only through the topic: ``` E AssertionError: REFUSED adopt-manifest-invalid: --id is 'northwind\n', which the project's own validate-manifest.py refuses: manifest-topic: topic is 'xf-project-northwind', expected 'xf-project-northwind\n' derived from id 'northwind\n'. E - manifest-id: id is 'northwind\n'; it must match ^[a-z0-9][a-z0-9-]*$. E + manifest-topic: topic is 'xf-project-northwind', expected 'xf-project-northwind\n' derived from id 'northwind\n'. ``` So the row holds the claim that `manifest-id` is the refusal, which is #1166's own change to `validate-manifest.py`, and it passes at #1166's head plus this commit (31 passed below). That is why this PR was stacked on #1166 until #1166 landed. Each applied alone to a scratch worktree (detached at `f92338ef6`), run, restored by writing the original bytes back, and the sha256 compared (`restored=True` each time, `git status` clean after each). Production files only; the test file is not touched by a plant. Node ids: the guard is `test_every_reader_of_the_id_pattern_is_in_the_table`, the row is the new one above. Baseline before any plant: both pass (2 passed). | plant | file | what | result | | --- | --- | --- | --- | | G1 | `update-shape.py` | `def _rc_probe(value): return PROJECT_ID_RE.fullmatch(value)` appended | guard fails, its message names `ID_READERS`; `Left contains 1 more item: {('update-shape.py', 'fullmatch'): 1}` | | G2 | `update-shape.py` | the same with `.match` | guard fails, message names `ID_READERS` | | G3 | `update-shape.py` | the same with `.search` | guard fails, message names `ID_READERS` | | G4 | `adopt-project.py` | `if False:` in place of the plan-`id:` test at line 6791 | guard fails, message names `ID_READERS`; `{('adopt-project.py', 'match'): 2} != {('adopt-project.py', 'match'): 3}` | | R1 | `adopt-project.py` | `fullmatch` in place of `match` at line 5140 (`_refuse_bad_id`) | guard fails (names `ID_READERS`) and the row fails: `REFUSED adopt-bad-id: --id 'northwind\n' must match ^[a-z0-9][a-z0-9-]*$` | | R2 | `adopt-project.py` | `checked_value('--id', project_id)` added before line 5140 | row fails: `REFUSED unsafe-value: --id is 'northwind\n', which is not a value this tool will put on a git or gh command line` | | R3 | `adopt-project.py` | `if False:` in place of `if values is not None:` in `_refuse_unholdable_values`, so no manifest check | row fails: the plan is written, exit 0 | | S1 | `update-shape.py` | `_ID = PROJECT_ID_RE` then `_ID.match(value)` | guard PASSES (1 passed): an alias is outside it, as the docstrings now say | | S2 | `update-shape.py` | `from repo_shape import PROJECT_ID_RE as X` then `X.match(value)` | guard PASSES (1 passed) | | S3 | `update-shape.py` | `PROJECT_ID_RE.match(value)` in a comment and in a string | guard PASSES (1 passed): not counted, as intended | No mutant survives: G1 to G4 and R1 to R3 each fail where they should. R2 shows the new row also fails if `adopt-project.py` ever does hold the id to `checked_value`, which makes the module docstring's sentence false, so whoever adds that call is sent to the wording. All through the lane's runner `run9.sh` (stub `gh` first on PATH, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null`, `EMAIL` exported), on the committed head `f92338ef6` with `dirty=0`, Python 3.12.3, `git --version` printed into each log. - `tests/test_value_pattern_line_break.py`: 31 passed on git 2.43.0 (25.78 s) and 31 passed on git 2.47.1 (31.21 s), the 30 of #1166's head plus the new row. - The file plus the hygiene five (`test_pinned_copy_text.py`, `test_path_guard_hygiene.py`, `test_repo_hygiene.py`, `test_agents_md_codes.py`, `test_cli_reference.py`): 337 passed on git 2.43.0 (111.39 s) and 337 passed on git 2.47.1 (264.87 s), that is 31 and the five's 306. - `git diff --check` is clean. The diff touches only the test file, adds no line over 79 columns (the file's own width) and no non-ASCII line, and the file has no `assert` that joins conditions with `and` or `or` (an `ast` scan for a `BoolOp` in any assert: none). **At the restack (2026-11-08):** main is `105b5daf9`, #1166's squash, and the head is `b80214b7f`. `git merge-tree --write-tree origin/main HEAD` is clean, and the diff against main is the test file alone. The rest of this section is from the first push. Main `50869f384` (re-fetched just before the push), this head `f92338ef6`: - `git merge-tree --write-tree origin/main HEAD`: clean (exit 0). - `git merge-tree --write-tree 5102b42 HEAD` (#1166's head): clean (exit 0). - For the stack as a whole, `git merge-tree --write-tree origin/main 5102b42` (#1166 alone with main): clean (exit 0). The merge base of main and #1166's head is `038dafba9`. Of the 51 open PRs (`gh pr list --json number,headRefName,headRefOid,files`), only #1166 touches `tests/test_value_pattern_line_break.py`. Not checked: whether a PR that touches `adopt-project.py` (26 do) adds or removes a call of a method of `PROJECT_ID_RE`; that is the guard's own job once #1166 lands, and #1166's body found none among the open PRs. A PR that makes `plan` hold `--id` to `checked_value` would fail the new row (R2), which is the row doing its work. Review: rv1243, lane 5's independent sonnet reviewer, which wrote none of #1243: READY at `f92338ef`, H0 of this landing before its restack (issuecomment-6385593825), with no MUST; its one SHOULD (the body's restack sentence) is fixed in the body, and its four NITs are optional. The restack's changed lines equal the reviewed ones, and lane 3 placed it on v1.2.1 right after #1131 (#473 issuecomment-6723002632). CI (Brett Heap's ruling 27): H0 f92338e passed tests, tests-git-bash and SonarCloud; the head b80214b merges #1166's final head, then #1166's squash 105b5da (the branch's own side for #1166's files), then main, with tests, tests-git-bash and SonarCloud green; and the local gate passed on its predicted squash tree 372f767 over main 5926ccc: the value_pattern_line_break, repo_hygiene, agents_md_codes, cli_reference sets, 202 passed. 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 #1229 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 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) (#1227) **#1150: after this PR the family gate's check for values git dies on (`gitmodules-value-refused`) reads the index's `.gitmodules` beside the work tree's, so each remedy that says to stage the file ends with the line that stages it (a later value the work tree alone gives too, once a line above stages the file) and a value only the index gives is named; an index file git cannot parse is refused as `gitmodules-unreadable` instead of read as nothing; and while a merge leaves `.gitmodules` unmerged the checks read no file git would read (neither the index's nor the work tree's), as git reads none then, so `gitlink-unnamed` and the init stop ask nothing in that state. The checks that ask about HEAD, which a clone reads, still read HEAD's file, and the staged-removal check can read the work tree's, as the Limits say.** This is a DRAFT on `main`. It is the follow-up lane 4 filed as #1150 from RV1124's review of #1124 (pull/1124#issuecomment-6321372469): the review's N1, N2 and N6 were outside #1124's own review round, each is older than #1124, and each was measured again before this change. #1124 has landed as `dea964aa1`, and this branch was restacked onto it (see "The restack"). Fix round 1 answers rv1227's review (issuecomment-6374575208) and merges main `e04826db4` (#1208). Fix round 2 answers rv1227b's and rv1227c's review (issuecomment-6722728204): one SHOULD, test-only (see "Fix round 2"). The one script is `templates/family-root/scripts/validate-family.py`; with its tests the change is four files, +1128 and -78 lines (`git diff --shortstat origin/main...HEAD -- <the four files>`, against the merge base `e04826db4` with main `0d5704b3d`). rv1227's independent review (issuecomment-6374575208, PARTIAL at `b031f4938`, NOT READY) found M1, M2, S1, S2 and N1 to N6. Each was measured again before the change: git 2.43.0, offline through lane 5's `run9.sh`, on the branch merged with main `e04826db4` (`d95308e95`). The probe is `v124/n1150/d/probes/test_n1150d_probe.py` in lane 5's scratch, never committed; its logs are in `v124/n1150/d/probes-out/merged-d95308e/`. - **M1, the merge of main.** `d95308e95` merges main `e04826db4` (#1208); its tree is `a151d1110`, the one `git merge-tree` predicted. #1208's new row `test_1077_a_value_head_gives_where_the_deletion_is_staged_puts_head_s_back` pinned the finding's lines ending at `--unset-all` and typed `git add` by hand. - **Measured** (`m1-*.log`): `update = !true` committed, the deletion of `.gitmodules` staged. The three printed lines (`git checkout HEAD -- .gitmodules`, the `--unset-all`, `git add -- .gitmodules`) typed in order, then a plain `git commit`: exit 0, HEAD holds no value, the index and the work tree equal it, `git status` is clean, and the gate passes. Typed without the stage line, the commit exits 1 (`no changes added to commit`) and HEAD keeps `!true`. The merged answer is right. - **Change** (`8938d17df`): the row expects `git add -- .gitmodules` last and types no `git add` by hand. - **M2, the reads that turn on "no section" while `.gitmodules` is unmerged.** - **Measured** (`m2-*.log`): with `.gitmodules` at stages 1 to 3, git reads no file. `git submodule status` and `git submodule update --init` exit 128 at every gitlink (`no submodule mapping found`, `No url found for submodule path 'tools/x'`, and `'members/IRRS'` for the whole update), and a plain clone of HEAD checks `tools/x` out (exit 0). The head said `gitlink-unnamed` of `tools/x` (no section gives it, a plain clone stops there) and, for a member not checked out, `member-uninitialized` said to write back a section the file gave. The family bootstrap, in the second state, says ``NOT CHECKED OUT, and not for want of a credential: members/IRRS (git reads no .gitmodules while a merge leaves it unmerged). Resolve the merge in .gitmodules and `git add .gitmodules`, then run this again.`` - **Change:** `_check_gitlinks_elsewhere` (`gitlink-unnamed`) and `_init_stop_said` ask nothing while `.gitmodules` is unmerged, as no section is read then. `gitlink-unnamed` says what a clone does, and which section the commit after the merge records is the merge's to say; resolved and staged, the gitlink is asked about again. `member-uninitialized` gives the plain update, whose `make bootstrap` names the cure. - **The hand mount's two reads keep reading none**, since that is what git's own `git rm` reads there (measured): a plain `git rm` of a clone whose `.git` is a directory, at a path a section gives, dies (`could not lookup name for submodule 'members/IRQS'`, exit 128), and `git rm --cached`, the line `_hand_cached` prints because it reads none, exits 0 (main read the work tree's file and printed the plain line, which dies). With the work tree's file deleted, the plain `git rm` exits 0 and takes no section, so `_plain_rm_said` puts nothing back; HEAD's put back would resolve the merge to HEAD's side. `_given_as_git_reads`' docstring says so. - **S1, a value the work tree alone gives after a staging line.** - **Change:** `_value_taken_out` takes `again`, set by `_check_gitmodules_values` once a finding before it ends with the stage line: a later finding whose value the work tree's file alone gives then ends with `git add -- .gitmodules` too, and says why (`STAGED_ABOVE`: "A line above stages the work tree's .gitmodules, this value with it, so the lines below end staging it again."). - **S2, a sparse checkout that leaves `.gitmodules` out: kept out of this PR, as a Limit and the follow-up #1242.** - **Measured** (`s2-*.log`): `git checkout --ignore-skip-worktree-bits -- .gitmodules` puts the index's file back (exit 0, the bit cleared), the `--unset-all` then exits 0, but `git add -- .gitmodules` still exits 1 (`outside of your sparse-checkout definition`); `git add --sparse -- .gitmodules` exits 0, and the lines so typed end well. - **Why not here:** the fix is a sparse-aware put-back and a sparse-aware stage line, and the stage line is one constant (`STAGE_LINE`) that about ten findings print, most of them not this PR's. Fixing only this PR's two findings would leave the others failing in the same state. - **N1.** `_blob_paths` and `_blob_sections` say they refuse an index's file git cannot parse (`gitmodules-unreadable`, through `_blob_listed`) and read none for no `spec`. - **N2.** A row for the refusal with the work tree's file on disk and clean (rv1227's e1b). - **N3.** A row for a real modify/delete conflict (stages 1 and 2), and an `[on-disk]` id for the sections row (rv1227's e2f). A value git dies on cannot stand in for the section in the modify/delete row: with one in the work tree's file, `git merge` itself dies (`invalid value`, exit 128, measured: `n3-*.log`). - **N4.** Where the index's file gives the key another value than the work tree's, the finding names it (``The index's file, which a plain `git commit` records, gives it the value `!false`.``, `INDEX_GIVES`, `_values_said`) in place of "gives it too". - **N5.** `GIVEN_WHERE`'s comment says what `(False, False)` is. - **N6.** In Limits. The independent review (issuecomment-6722728204, at `0d65ea80c`, NOT READY) found no MUST and one SHOULD, S1, which needs a test and no change to the script. `validate-family.py` is byte for byte `0d65ea80c`'s (blob `18a0942d4`, sha256 `30dc80fe29de`). The one commit, `2d56c1906`, changes `tests/test_validate_family_index_value_unmerged.py` alone (109 insertions and 13 deletions), and the branch is a fast-forward of `0d65ea80c`. Git 2.43.0 unless a line says 2.47.1, offline through lane 5's `run10.sh` (stub `gh`, `GH_TOKEN=bogus-l5`, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null`); the logs are in lane 5's folder `work/n1150g/`. - **S1, the stage line carried to every later finding (test-only).** The code is `staging = staging or committed or staged` in `_check_gitmodules_values`. rv1227c's mutants K6 (`staging = committed or staged`: the stage line is not carried past the next finding) and K8 (`staging = staging or staged`: a committed value's stage line does not carry) each passed all 181 rows of the three files, and its probes showed that each puts a value git dies on into HEAD (p2m: `fetchRecurseSubmodules = sometimes`; p8: `update = !false`). The S1 row pinned only the finding right after a value that is both staged and committed. Two rows are added, and one id; `staged_again` builds the later finding's text for the S1 row and the new rows, which the S1 row spelled out inline. - `test_every_later_value_the_work_tree_alone_gives_stages_again` (rv1227c's p2a, a third value). `update = !true` is staged for IRRS, then `update = !false` and `fetchRecurseSubmodules = sometimes` are given in IRSS's section, in the work tree's file alone. The gate gives three findings, and the second and third each carry `STAGED_ABOVE` and end with the stage line. The printed lines are typed in order and a plain `git commit` follows: HEAD is as it was, `git status` is clean, the gate passes in every mode and a plain clone checks both members out. K6 fails it. - `test_a_committed_value_the_index_lacks_stages_the_later_ones_again` (rv1227c's p8, a `[committed-not-staged]` id). `update = !true` is committed for IRRS, the index's file is then staged without it, and the work tree's file gives IRRS `!true` again and IRSS `update = !false`. IRRS's finding is committed and not staged, and its `git add -- .gitmodules` stages IRSS's value all the same, so IRSS's finding ends staging the file again. The same typed lines and checks. K8 fails it. - `test_another_value_the_index_s_file_gives_the_key_is_named[this-value-and-another]` (rv1227c's p3c, the optional id). The index's file gives IRRS `update` both `!true` and `!false` beside the work tree's `!true`, and the finding names both ("gives it the value `!true` and the value `!false`"). The N4 row is one parametrized row of two ids now: `[another-value]`, the old row, and this one. K11 fails it. - **The review's NITs.** NIT 7 is the Goal above, and NIT 1 and NIT 2 are in Limits. NIT 1 and NIT 3 are follow-up issues #1254 and #1255, not changes here; the Limits below name NIT 1's. NIT 4 (a gitlink outside `members/` that no file gives gets no question while unmerged; true on main) is the existing Limit's. K1 and K5 (NIT 5) are not touched by this round and were not run again. NIT 6 is optional and unchanged. **Rows that fail on main (fix round 2).** Run at `2d56c1906` with `validate-family.py` as main held it from `e04826db4` to `11560eb9f` (blob `172647b3e`, sha256 `30abb4ea28e6`), and again with the script as main `0d5704b3d` holds it (blob `ee26aede6`, sha256 `07f843df31b7`, which differs by `105b5daf9`'s 12 added and 3 removed lines). Each was written into the worktree, then the head's script was restored and its sha256 `30dc80fe29de` checked, `git status` clean after (`mut/MAIN.log` and `mut/summary.log`; `mut/MAIN2.log` and `mut/summary2.log`). - **The three test files in full: 42 failed, 142 passed** in 157.36s with the first, and 42 failed, 142 passed in 158.42s with the second, the same 42 ids in both, of 184 rows (147 + 16 + 21). Fix round 1's run on the same script gave 39 failed and 142 passed of 181; the 42 are those 39 and the 3 ids this round adds (the two new rows and `[this-value-and-another]`), and the 142 that pass are the same 142. - **The new and changed ids all fail:** `test_every_later_value_the_work_tree_alone_gives_stages_again`, `test_a_committed_value_the_index_lacks_stages_the_later_ones_again` and `test_another_value_the_index_s_file_gives_the_key_is_named[this-value-and-another]`; the old N4 id, `[another-value]`, and the S1 row's `[staged]` and `[committed]` fail as before. Each new id fails at its first assertion, `found == [...]`, at index 0: main's first finding ends at its `--unset-all` line, where the row expects `git add -- .gitmodules` last. **Mutants (fix round 2).** Each was applied alone in a detached worktree at `2d56c1906` (`work/n1150g/mut/mutants.py`: rv1227c's file, one exact replacement checked to occur once), the three test files were run in full through `run10.sh`, the head's script was restored and its sha256 `30dc80fe29de` checked, and `git status` was clean after each (`mut/summary.log`, one log per mutant beside it). No other run used the worktree while a mutant was applied. | mutant | what it changes | result | |---|---|---| | K6 | S1: `staging = committed or staged` (the stage line is not carried past the next finding) | **killed**, 1 failed, 183 passed (247.87s): `test_every_later_value_the_work_tree_alone_gives_stages_again` (new) | | K8 | S1: `staging = staging or staged` (a committed value's stage line does not carry) | **killed**, 1 failed, 183 passed (241.32s): `test_a_committed_value_the_index_lacks_stages_the_later_ones_again` (new) | | K11 | N4: `set(staged) >= set(values)` (the index's file giving the work tree's value and another says "gives it too") | **killed**, 1 failed, 183 passed (256.51s): `test_another_value_the_index_s_file_gives_the_key_is_named[this-value-and-another]` (new id) | | K2 | M2: `gitlink-unnamed` asks while unmerged where the work tree's file is on disk | killed, 1 failed, 183 passed (225.47s): `test_no_gitlink_outside_members_is_asked_about_while_unmerged[on-disk]` | | K3 | M2: the init stop asks while unmerged where the file is on disk | killed, 1 failed, 183 passed (231.77s): `test_a_member_not_checked_out_while_unmerged_is_told_the_plain_update` | | K7 | S1: `again` is not cleared for a finding that stages anyway (`again = again`) | killed, 1 failed, 183 passed (227.21s): `test_two_keys_with_no_gitmodules_in_the_work_tree_put_it_back_once` | | K13 | N4: `INDEX_GIVES` names the work tree's values | killed, 2 failed, 182 passed (235.91s): both ids of `test_another_value_the_index_s_file_gives_the_key_is_named` | All seven are killed. K6, K8 and K11 survived the 181 rows of the first run (rv1227c); K2, K3, K7 and K13 were killed then and still are, by the same rows. **Runs (fix round 2).** All through `run10.sh`, each `START` line recording the head and `dirty=0`; the full suite was not run. | run | git | filter-repo | result | log | |---|---|---|---|---| | the three test files | 2.43.0 | 2.47.0 | **184 passed** in 234.10s | `logs/g243-f3.log` | | the three test files | 2.47.1 | 2.47.0 | **184 passed** in 243.42s | `logs/g247-f3.log` | | `tests/test_path_guard_hygiene.py`, `tests/test_repo_hygiene.py`, `tests/test_agents_md_codes.py`, `tests/test_cli_reference.py`, `tests/test_pinned_copy_text.py` | 2.43.0 | 2.47.0 | **379 passed** in 60.45s | `logs/hyg243.log` | | the three test files and the same five, on the scratch merge `804213b71` of the head with main `b66d8f0cc` | 2.43.0 | 2.47.0 | **563 passed** in 318.46s | `logs/merged243c.log` | | the same, on `875f5aee3` with main `105b5daf9` | 2.43.0 | 2.47.0 | 563 passed in 287.58s | `logs/merged243b.log` | | the same, on `fda589e96` with main `11560eb9f` | 2.43.0 | 2.47.0 | 563 passed in 309.07s | `logs/merged243.log` | All probes are offline: `run9.sh` puts a stub `gh` first on PATH and sets `GIT_SSH_COMMAND=false` and `GIT_CONFIG_GLOBAL=/dev/null`, and git is 2.43.0. The probe is `tests/test_n1150_probe.py`, a scratch file that is not committed; its logs are `probe-main.log` (main `961640c6`, 2026-10-22T20:08Z) and `probe-parent.log` (#1124's head `8dfa32bd`, 20:09Z), in lane 5's scratch `v124/n1150/`. The scratch families have gitlinks at `members/IRRS` and `members/IRSS`. Paths such as `mut/...`, `logs/...` and `probe-*.log` below are in that scratch folder. **#1124's script was main's script in the first round.** `validate-family.py` is blob `dfb50769f` at `8dfa32bd`, at `dea964aa1` and at `origin/main` (`50ce8ab15`), and `git diff 8dfa32bd dea964aa1` over `validate-family.py` and the two older test files this PR changes is empty. So the column "on #1124's head" below is main's script as it stands. **N1, the index's file beside the work tree's on disk.** - **P1.** `update = !true` is in IRRS's section, in the work tree's file on disk and staged; HEAD's file is clean. - Main and #1124's head both give `gitmodules-value-refused` (exit 1, in `--no-members` and in members mode), and its one line is `git config -f .gitmodules --unset-all submodule.members/IRRS.update`, with no stage line. - A plain `git commit` after that line exits 0 and HEAD then gives `!true` (`P1 HEAD gives !true after: True`). The next gate run names it "in HEAD". - **P1b.** `update = !true` is in the index's file alone; the work tree's file is clean on disk, and so is HEAD's. - Git's `submodule status` exits 0. The gate is `family ok`, exit 0, in `--no-members` and in members mode, on main and on #1124's head. - A plain `git commit` records `!true` in HEAD (`P1b HEAD gives !true after: True`). **N2, an index file with a line git cannot parse.** - **P9.** The index's file is HEAD's plus `update = !true` in IRRS's section, then the line `this is no config line`; the work tree's file is deleted. - Git's `submodule status` exits 128 (`fatal: invalid value for 'submodule.members/IRRS.update'`). `git config --blob` on that file exits 128 too, after it printed the value. - The gate is `family ok`, exit 0, in both modes. On main the value check never reads the index's file at all (#1077's cause). On #1124's head `_blob_listed` returns nothing on that exit 128. - **P9t.** The same file with a stale `members/Old` section in place of the value, then the bad line. Git's `submodule status` exits 0 (`error: bad config line 10 in blob`: git reads up to the line). The gate is `family ok` in both modes, on main and on #1124's head: the sections read nothing on the 128. - **P9h (reference).** The same file committed, its deletion staged: `gitmodules-unreadable` for HEAD's, exit 2, on main and on #1124's head. **N6, an unmerged `.gitmodules`** (stages 1 to 3 in the index, none at stage 0). - **P6a.** The work tree's file is deleted and HEAD's gives `!true`. Git's `submodule status` exits 128 (`no submodule mapping found in .gitmodules for path 'members/IRRS'`): git reads no file. - The gate is `gitmodules-value-refused`, exit 1. Main says "in HEAD ... not in the work tree" and puts HEAD's file back with `git checkout HEAD -- .gitmodules`; #1124's head says "here and in HEAD" and "puts back HEAD's, as the index holds none", but the index does hold the file, at its conflict stages. - **P6b.** The work tree's file is on disk and gives `!true`; HEAD's is clean. Git reads no file (exit 128). The gate, on main and on #1124's head, reads the work tree's file and says "in the work tree, not in HEAD", exit 1. - **P6c (reference).** The work tree's file is deleted and HEAD's is clean: `family ok` on main and on #1124's head, and git reads nothing (exit 128). **Why the branch was cut on #1124.** Every item above holds on main `961640c6` too, but the code each change touches (`_blob_listed`, `READ_HERE`, `_listed_as_git_reads`, the "then stage" ending) was #1124's, and a branch on main would have rewritten the hunks #1124 rewrites. `templates/family-root/scripts/validate-family.py` (+195 and -33 lines against `dea964aa1`): - **N1: the index's file is read beside the work tree's.** - `_index_listed` reads the index's file at stage 0 (`rev-parse --verify --quiet :.gitmodules`, then `_blob_listed`), and `_check_gitmodules_values` asks it where the work tree's file is on disk. Where that file is gone, git already reads the index's (#1124). - A value only the index's file gives is named, with a new `GIVEN_WHERE` entry: "in the index's file alone, which a plain `git commit` records, not in the work tree or in HEAD". `VALUE_DIES` says how git dies there: in a clone of the commit that records it. - Where the work tree's file and the index's both give the value and HEAD's does not, the finding adds "The index's file, which a plain `git commit` records, gives it too." (`INDEX_TOO`). - **Every remedy of this check that says to stage the file ends with the line that does, `git add -- .gitmodules`** (`STAGE_LINE`): `_value_taken_out` where HEAD's file or the index's gives the value, or the work tree's file is gone, and the new `_value_not_here` where the work tree's file does not give it ("Stage [and commit] the work tree's .gitmodules, which does not give it:" and the line). - **N2: an index file git cannot parse is `gitmodules-unreadable`.** `_blob_listed` refuses with that code, as `_head_listed` does for HEAD's, naming the index's file and git's own `bad config line` text, and its remediation says to mend the file, stage it with `git add -- .gitmodules`, and run again. `git config --blob` prints the entries before such a line and then exits 128; the old read returned nothing on that 128 and so dropped them. This is the second of the two options #1150 names (the refusal), not the first (reading up to the line as bootstrap does); it is the same code HEAD's file already gets (P9h). - **N6: no file is read while a merge leaves `.gitmodules` unmerged.** `_gitmodules_unmerged` (`git ls-files -s`, no stage 0) is the test, as bootstrap's `gitmodules_source` reads it. - The value check reads nothing then (`UNMERGED_HERE`: "the file git reads here, which is none while a merge leaves .gitmodules unmerged") and keeps HEAD's, which a clone reads. Its remedy is "Resolve the merge in .gitmodules by hand, leaving that key out, then stage and commit .gitmodules:" and the stage line, with no put-back line. - `_sections_as_git_reads` returns no section while unmerged, so `gitmodules-path-twice` and `gitmodules-path-unnamed` read none and print no `git checkout HEAD -- .gitmodules`. - **One finding changes: P6b.** A value only the work tree's file gives, on disk, while `.gitmodules` is unmerged and HEAD's is clean, was `gitmodules-value-refused` and is `family ok` now, until the merge is resolved and staged. Git reads no file there either, so the value is no finding yet. After `git add`, it is named as N1's. See Limits. - The module docstring's `WHAT IS CHECKED` bullets and the docstrings of the functions above say all of this. `tests/test_validate_family_index_value_unmerged.py` (new, +410 lines, 9 rows in 7 functions). Every row types only the printed `git` lines, in order, and does by hand only what the text says in words; then a plain `git commit` is made, and the row asserts that HEAD is as it should be, that the gate passes in every mode, and that a plain clone checks both members out (`ends_well`). The premises are measured in each row: git's own exit code, and a plain clone of the commit that records the staged file. - **P1:** `test_a_value_the_work_tree_s_file_and_the_index_s_give_ends_staging_it`. - **P1b:** `test_a_value_the_index_s_file_alone_gives_is_named_beside_a_clean_one` (a plain clone of the commit that records it dies, exit 128). - **The M3 row:** `test_a_value_here_and_in_head_ends_staging_it_with_no_index_s_file`. HEAD's file and the work tree's give `update = !true`, and `git rm --cached` has taken `.gitmodules` out of the index. See "Mutants". - **P9 and P9t:** `test_an_index_s_file_git_cannot_parse_is_refused_unreadable` (`[a-value]`, `[a-section]`): git's `submodule status` exits 128 and 0, the gate refuses with exit 2 in all three modes, the remediation's `git checkout` and `git add` lines are typed, and then the finding the file gave before the bad line is the one left. - **P6a:** `test_a_value_head_gives_while_a_merge_leaves_the_file_unmerged` (`[deleted]`, `[on-disk]`). - **P6b:** `test_a_value_the_work_tree_alone_gives_while_unmerged_waits_for_git`: every mode exits 0 while unmerged; after `git add`, the finding is N1's and its lines, typed, end well. - **Sections:** `test_no_section_is_read_while_a_merge_leaves_the_file_unmerged`: no finding and no `git checkout HEAD` while unmerged; resolved to HEAD's side and staged, `gitmodules-path-unnamed` names the stale section. `tests/test_family_gitmodules_values.py` (+27 and -14 lines) and `tests/test_validate_family_index_gitmodules.py` (+11 and -12 lines): older rows re-pinned to the stage line and the refusal. - `taken_out`, the expected finding every row of the first file builds, ends with `STAGE` wherever HEAD's file gives the value, and `WHERE["head-only"]` ends ":" and the stage line. - `test_the_index_s_file_cut_short_is_put_back_from_the_index` had as its premise that the gate cannot name the cut line, because it read the index's file as nothing. The premise is now the refusal: exit 2, `REFUSED gitmodules-unreadable: the index's .gitmodules could not be read as git reads it: `, and `bad config line` named. The row's cure is unchanged. - Two `test_1077_` rows (the index alone gives a value; a url git dies on is written back) expect the stage line last and no longer type `git add` by hand. Run on 2026-10-24 at this head, `0d65ea80c`, with `validate-family.py` as main `50869f384` holds it (blob `172647b3e`, sha256 `30abb4ea28e6`, unchanged since `e04826db4`) written into the worktree, then the head's script (blob `18a0942d4`, sha256 `30dc80fe29de`) restored and its sha256 checked, `git status` clean after. The logs are in lane 5's scratch `v124/n1150/d/mut/` (`summary.log` holds the runner's lines). **The three test files in full: 39 failed, 142 passed** (`main-full.log`, 218.81s; the failed ids are listed in `main-full-failed.txt`). They are the 29 rows that failed in the first round's comparison, with main's script then (blob `dfb50769f`, see below), plus the 10 ids this round adds or re-pins. The 142 that pass are rows that name nothing this PR changes, as many as in the first round's comparison. **The 10 ids of the fix round, run on their own: all fail** (`main.log`, 11 ids, 11 failed in 26.01s; the 11th is the sections row's `[deleted]` id, which the first round added). | row (fix round item) | on main's script | |---|---| | `test_1077_a_value_head_gives_where_the_deletion_is_staged_puts_head_s_back` (M1, #1208's row re-pinned) | the lines end at the `--unset-all`; the row expects `git add -- .gitmodules` last | | `test_a_value_the_work_tree_alone_gives_after_a_staging_one_stages_again[staged]`, `[committed]` (S1) | the second finding has no `STAGED_ABOVE` sentence and ends at its `--unset-all`, with no stage line | | `test_another_value_the_index_s_file_gives_the_key_is_named` (N4) | the finding ends at its `--unset-all`; the row expects the index's value `!false` named and the stage line last | | `test_an_index_s_file_git_cannot_parse_beside_a_clean_one_is_refused` (N2) | `family ok`, exit 0, where the row expects exit 2 and `gitmodules-unreadable` | | `test_no_section_is_read_while_a_merge_leaves_the_file_unmerged[on-disk]` and `test_no_section_is_read_in_a_modify_delete_conflict` (N3) | one finding, exit 1, whose lines take the stale `members/Old` section out, where the row expects every mode to pass while unmerged | | `test_no_gitlink_outside_members_is_asked_about_while_unmerged[deleted]`, `[on-disk]` (M2) | one finding, exit 1, whose lines end with `--unset-all submodule.tools/x.url` and the stage line, where the row expects every mode to pass while unmerged | | `test_a_member_not_checked_out_while_unmerged_is_told_the_plain_update` (M2) | `member-uninitialized`'s remediation says to write the section for `members/IRRS` back, where the row expects the plain update | The three test files at the first round's head, `b031f4938`, were run against `validate-family.py` as main holds it (blob `dfb50769f`, #1124's script, written into the worktree and restored, sha256 `844c1bee1d62` checked; the run is at `4b70f2ec6`, whose four files are byte-identical to `b031f4938`'s): **29 failed, 142 passed** (`mut/parent-full-4b70f2e.log`). The 142 are rows that do not name anything this PR changes. | rows | count | on main | |---|---|---| | `test_a_value_git_dies_on_fails_bootstrap_and_every_mode_of_the_gate` (8 ids), `test_a_holder_with_every_member_checked_out_fails_on_it_too`, `test_a_value_git_dies_on_in_the_index_s_file_is_named_and_mended`, `test_two_keys_with_no_gitmodules_in_the_work_tree_put_it_back_once`, `test_a_url_no_row_gives_one_for_is_written_back_as_a_placeholder`, `test_a_url_or_path_left_with_no_value_is_written_back_as_add_writes_it` (3 ids) | 15 | the finding ends at its last key line; the row expects `git add -- .gitmodules` after it | | `test_the_gate_says_which_file_gives_it[head-only]` | 1 | "Stage and commit the work tree's .gitmodules, which does not give it." with no line | | `test_the_index_s_file_cut_short_is_put_back_from_the_index` (2 ids) | 2 | `family ok`, exit 0, where the row expects exit 2 and `gitmodules-unreadable` | | the two `test_1077_` rows | 2 | the lines end with the `--unset-all` or the url line, and no stage line | | **new:** all 9 rows of `tests/test_validate_family_index_value_unmerged.py` | 9 | P1 and the M3 row: the finding has no stage line (P1's also lacks the "gives it too" sentence). P1b, P9 and P9t: the gate passes, exit 0, where the row expects a finding or a refusal. P6b and the sections row: the gate gives a finding where the row expects exit 0. P6a (2 ids): the finding says "here and in HEAD", says nothing of the merge, and with the file deleted puts HEAD's back | At the first fold (`442615eb3`), the same comparison over the 15-row selection the mutant runner uses gave 14 failed, 1 passed (`mut/parent.log`). The M3 row alone, run on the tree before it was committed: 1 passed on the head's script, 1 failed with #1124's script and 1 failed with main's script `961640c6` (`mut/row1-head.log`, `row1-parent.log`, `row1-main.log`). Run on 2026-10-24 at this head, `0d65ea80c`, with git 2.43.0. Each of the 10 was applied alone to `validate-family.py` in the worktree (`v124/n1150/d/mut/mutants.py` in lane 5's scratch: one exact replacement, checked to occur once in the committed script), its rows were run through `run9.sh`, and the head's script was restored with sha256 `30dc80fe29de` checked; `git status` was clean after each (`d/mut/summary.log`, one log per mutant beside it). No other test run or gate used the worktree while a mutant was applied. R1 to R5 are rv1227's own (`v129/rv1227/probes/mutants.py`): R1, R2, R4 and R5 byte for byte, and R3 the same change moved to the line N4 rewrote. D1 to D5 are one for each new behaviour of this round. **10 of 10 are killed.** Each ran over its own rows (the `-k` selections in `d/mut/run-mut.sh`), not the full files. | mutant | what it changes | result | |---|---|---| | R1 | `_gitmodules_unmerged` is true only with all three of stages 1 to 3, so not in a modify/delete conflict's two | killed, 1 failed: `test_no_section_is_read_in_a_modify_delete_conflict` | | R2 | `_sections_as_git_reads` reads the work tree's file on disk before it asks whether `.gitmodules` is unmerged | killed, 2 failed: the sections row's `[on-disk]` id and the modify/delete row (the `[deleted]` id passes) | | R3 | the `INDEX_TOO` sentence is said wherever the work tree's file gives the value, where HEAD's gives it too (`where[0]` for `where == (True, False)`) | killed, 1 failed: `test_a_value_the_work_tree_alone_gives_after_a_staging_one_stages_again[committed]` | | R4 | where the work tree's file does not give a value HEAD's gives, the remedy ends "Stage and commit the work tree's .gitmodules, which does not give it." with no stage line | killed, 1 failed: `test_the_gate_says_which_file_gives_it[head-only]` | | R5 | `_index_listed` reads an index file git cannot parse as nothing where the work tree's file is on disk: the refusal is swallowed | killed, 1 failed: `test_an_index_s_file_git_cannot_parse_beside_a_clean_one_is_refused` (N2) | | D1 | S1: `again` is never passed (`again=False`), so no later finding stages the file again | killed, 2 failed: the S1 row, `[staged]` and `[committed]` | | D2 | S1: `staging` is carried only by a value HEAD's file gives (`committed`), not by a staged one | killed, 1 failed: the S1 row's `[staged]` id | | D3 | N4: "gives it too" (`INDEX_TOO`) for any value the index's file gives the key, not only the same value | killed, 1 failed: `test_another_value_the_index_s_file_gives_the_key_is_named` | | D4 | M2: `_check_gitlinks_elsewhere` (`gitlink-unnamed`) asks while `.gitmodules` is unmerged | killed, 2 failed: `test_no_gitlink_outside_members_is_asked_about_while_unmerged`, `[deleted]` and `[on-disk]` | | D5 | M2: `_init_stop_said` asks while `.gitmodules` is unmerged | killed, 1 failed: `test_a_member_not_checked_out_while_unmerged_is_told_the_plain_update` | Each of the 13 was applied alone in the worktree (`mut/mutants.py`: one exact replacement, checked to apply once), the rows run through `run9.sh`, and the script restored with sha256 `844c1bee1d62` checked; `git status` was clean after (`dirty after: 0`). **13 of 13 are killed.** Twelve of them (all but M3) ran at `442615eb3` over a 15-row selection: the 8 rows the new file had then, plus the 7 older rows the change re-pinned (`test_a_value_git_dies_on_fails_bootstrap_and_every_mode_of_the_gate[update-command]`, both ids of `test_the_gate_says_which_file_gives_it`, both of `test_the_index_s_file_cut_short_is_put_back_from_the_index`, and the two `test_1077_` rows). No later commit of the first round changed the script (blob `b81da47ad` at `442615eb3`, `4b70f2ec6` and `b031f4938`). | mutant | what it changes | result | |---|---|---| | M1 | `_index_listed` returns nothing: the index's file is never read beside the work tree's | killed, 4 failed: P1, P1b, P9 `[a-value]`, P6b | | M2 | `staged=not present or (name, key) in in_index` cut to `staged=not present` | killed, 3 failed: P1, P9 `[a-value]`, P6b | | M3 | `if committed or staged:` cut to `if staged:` in `_value_taken_out` | **survived at `442615eb3`**: 15 passed over the selection, and 170 passed over the three full files. **Killed at `4b70f2ec6`**: 1 failed (the M3 row), 170 passed, over the three full files | | M4 | the loop over the keys leaves out the index's | killed, 1 failed: P1b | | M5 | the `INDEX_TOO` sentence is not said | killed, 2 failed: P1, P6b | | M6 | "Stage and commit" for every case | killed, 1 failed: P1b | | M7 | `_value_not_here` ends with a full stop, no stage line | killed, 2 failed: P1b, `test_the_gate_says_which_file_gives_it[head-only]` | | M8 | `_blob_listed` returns nothing on the 128, as #1124's did | killed, 4 failed: P9 `[a-value]` and `[a-section]`, both ids of the cut-short row | | M9 | `_gitmodules_unmerged` is never true | killed, 4 failed: P6a (2 ids), P6b, the sections row | | M10 | `_gitmodules_unmerged` is true with a stage 0 entry too (`bool(stages)`) | killed, 13 failed | | M11 | `_sections_as_git_reads` still reads a section while unmerged | killed, 1 failed: the sections row | | M12 | the value check still reads its file while unmerged | killed, 3 failed: P6a (2 ids), P6b | | M13 | `_index_listed` reads the blob without first asking whether the index holds one at stage 0 | killed, 2 failed: P6a `[on-disk]`, P6b | **M3, why it survived and what kills it.** M3 differs from the head only where the work tree's file is on disk and gives the value, HEAD's gives it, and the index's does not. Every existing row with HEAD's value also had it in the index, or no work tree file, so `staged` was true anyway. The M3 row has that state. Under M3 the finding ends at the `--unset-all` line, a plain `git commit` after it records `.gitmodules` gone from HEAD (`ls-tree HEAD .gitmodules` is empty, `?? .gitmodules`), and the gate then finds `member-gitmodules-absent`, exit 1 (`mut/probe-M3.log`). On the head, HEAD keeps `.gitmodules`, `git status` is clean and the gate is `family ok` (`mut/probe-head.log`). The row is the only change of content added since the fold (`4b70f2ec6`, +30 lines). All through lane 5's `run9.sh`, each `START` line recording the head and `dirty=0`, with the stub `gh`, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null` and `EMAIL` exported. The logs are in lane 5's scratch `v124/n1150/d/logs/`. The full suite was not run. The runs with main's script and with the mutants are in their own sections above. **At this head, `0d65ea80c`** (2026-10-23T22:03Z to 22:16Z): | run | git | result | log | |---|---|---|---| | the three test files, `tests/test_path_guard_hygiene.py`, `tests/test_repo_hygiene.py`, `tests/test_agents_md_codes.py`, `tests/test_cli_reference.py`, `tests/test_pinned_copy_text.py` | 2.43.0 | **560 passed** in 329.42s | `gate243-e-0d65ea8.log` | | the three test files | 2.47.1 | **181 passed** in 267.16s | `gate247-e-0d65ea8.log` | | nine files that pin the script's texts elsewhere, in four runs of under 100 rows: `tests/test_family_holder_remedies_compose.py`, `tests/test_family_unnamed_gitlink.py` and `tests/test_validate_family_remedies_typed.py`; `tests/test_family_holder_bootstrap_texts.py` and `tests/test_family_hand_mount_git_rm_lines.py`; `tests/test_validate_family_typed_states.py` and `tests/test_validate_family_unnamed_mounts.py`; `tests/test_family_bootstrap_gate_order.py` and `tests/test_family_head_lost_gitmodules.py` | 2.43.0 | **330 passed** (89, 86, 83 and 72) | `disc9-A.log` to `disc9-D.log` | **At `8938d17df`**, the M1 commit (2026-10-23T21:41Z to 21:52Z): | run | git | result | log | |---|---|---|---| | the three test files and the same five hygiene files | 2.43.0 | **551 passed** in 417.67s | `gate243-m1-8938d17.log` | | the three test files | 2.47.1 | **172 passed** in 264.09s | `gate247-m1-8938d17.log` | Before `0d65ea80c` was committed, its tree ran on the work tree it was then committed from, byte for byte (`dirty=2`, so these are not gates): the new test file, 18 passed in 85.45s (`disc-new-e.log`); the two older test files, 163 passed in 203.44s (`disc-old2-e.log`). No row failed in any of these runs. All through lane 5's `run9.sh`, each `START` line recording the head and `dirty=0`, with the stub `gh`, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null` and `EMAIL` exported. The full suite was not run. **At the first round's head, `b031f4938`** (2026-10-23T18:24Z to 18:34Z; logs in lane 5's scratch `v129/g1150/`): | run | git | result | log | |---|---|---|---| | the three test files, `tests/test_pinned_copy_text.py`, `tests/test_template_text_placeholders.py`, `tests/test_repo_hygiene.py`, `tests/test_agents_md_codes.py`, `tests/test_cli_reference.py` | 2.43.0 | **571 passed** in 360.06s | `gate243.log` | | the three test files | 2.47.1 | **171 passed** in 232.96s | `gate247.log` | **At `4b70f2ec6`** (2026-10-23T12:10Z to 12:15Z; its four files are `b031f4938`'s byte for byte; `v124/n1150/logs/`): | run | git | result | log | |---|---|---|---| | the three test files and `tests/test_repo_hygiene.py` | 2.43.0 | **271 passed** in 271.14s | `gate243-4b70f2e.log` | | the three test files | 2.47.1 | **171 passed** in 269.78s | `gate247-4b70f2e.log` | **At `f78107c38`**, a local WIP commit that was folded into `442615eb3` before any push (its tree equals the fold's; 2026-10-22T22:18Z): the three test files, 2.43.0, **170 passed** in 230.25s (`upd-f78107c.log`). **At `442615eb3`, the fold** (2026-10-22T22:24Z to 22:54Z; same script and same two older test files, the new file one row shorter; these ran on #1124's head as the base, before the restack): | run | git | result | log | |---|---|---|---| | the 60 files of `tests/test_family*.py` and `tests/test_validate_family*.py`, shard A (30 files) | 2.43.0 | **1164 passed, 4 skipped** in 1275.69s (the 4 are `tests/test_family_operation_reftable.py` rows, which need git 2.45 or later) | `gate-shardA.log` | | the same, shard B (30 files) | 2.43.0 | **1480 passed, 20 skipped** in 1588.90s (16 and 3 in `tests/test_family_init_values.py`, 1 in `tests/test_family_member_make_jobserver.py`) | `gate-shardB.log` | | the three test files | 2.47.1 | **170 passed** in 182.05s | `gate247.log` | | `tests/test_path_guard_hygiene.py`, `tests/test_repo_hygiene.py`, `tests/test_agents_md_codes.py`, `tests/test_cli_reference.py`, `tests/test_pinned_copy_text.py`, on a scratch merge `7aefff483` of the fold and main `961640c68` (the stack lacked the first file) | 2.43.0 | **307 passed** in 45.99s | `hyg.log` | No failure in any run. The branch was cut on #1124's head `8dfa32bd`. After #1124 landed, lane 5's `restack3.sh` restacked it with three merges; nothing was amended, rebased or forced. First #1124's final head `2d3bea2df` (merge `1004b6a73`). Then its squash `dea964aa1449b62d9c2bbafc972bbc344631e0b2`, taking the branch's side for the three files that conflicted, `validate-family.py`, `tests/test_family_gitmodules_values.py` and `tests/test_validate_family_index_gitmodules.py` (merge `b031f4938fa8604969e523a093da2735d7fb3523`). Then main, which was `dea964aa1` itself when the restack ran at 18:22Z (that commit is dated 18:16Z and the next main commit 18:32Z), so the third merge found nothing to add and made no commit. The push was a fast-forward from `4b70f2ec6`, and `git ls-remote` reads `b031f4938` on `fix/1150-index-gitmodules-stacked`. The four files at `b031f4938` are byte-identical to `4b70f2ec6`'s (an empty `git diff 4b70f2ec6 b031f4938` over them), and against `dea964aa1` the three older ones differ by this PR's lines alone, so the mutants, the rows on #1124's script and the runs at `4b70f2ec6` describe `b031f4938`'s bytes. **Read again at 2026-11-08T15:50Z by rv1227d:** - `origin/main` is `dffc42265`. - `git merge-tree --write-tree origin/main HEAD` exits 0 with tree `c010514b5`, which differs from main by the four files alone (+1128/-78). - The predicted merge `7317354ef` passed the three test files and the five hygiene files on git 2.43.0 (563). - Merge-trees against it are clean for #1246 (`0deac3a658`) and #1172 (`2eabec8e05`). #1166 has landed, as `105b5daf9`. The rest of this section was read at 2026-11-08T15:07:43Z with git 2.43.0: `origin/main` at `0d5704b3d` and the branch at `2d56c1906` (`work/n1150g/logs/merge-trees-final.log` in lane 5's folder). The branch holds main up to `e04826db4` (#1208, merged in fix round 1 as `d95308e95`). Main has moved three times while this round ran, and is at `0d5704b3d`, 11 commits past `e04826db4`; one of the 11 touches this PR's four files: `105b5daf9` (#1166, landed) changes `validate-family.py` (the date and repository patterns end in `\Z`, an id is matched with `fullmatch`), at hunks away from this PR's, and merges clean. So main is not merged again. - **`git merge-tree --write-tree origin/main HEAD`** exits 0 and writes tree `d0180654c`, which differs from main by this PR's four files alone (`git diff --name-only`, +1128 and -78 lines). `git diff --name-only origin/main...HEAD` names the same four. Main moved while the gates ran, so the three test files and the five hygiene files ran on git 2.43.0 on a scratch merge commit of the head with each of three mains (two parents, no ref), 563 passed each time: with `11560eb9f` (`fda589e96`), with `105b5daf9` (`875f5aee3`) and with `b66d8f0cc` (`804213b71`; `update-shape.py` and one test). The merge with the main read last, `0d5704b3d` (a docstring in `scripts/shape_materialize.py`), was merge-treed, not gated. - **Open pull requests:** 51 were listed at 2026-11-08T14:44Z with `gh pr list --state open --limit 100 --json number,headRefName,headRefOid,isDraft,files`; none lists more than 9 files, so no list was cut short. Besides this one, three touched any of the four files, all `validate-family.py` alone. Each `git merge-tree --write-tree <head> HEAD` exits 0, with heads read fresh with `gh pr view N --json headRefOid`: - #1172 (`fix/1148-pinned-find-repo-root-refuses`, on `fix/1146-root-git-unreadable-not-drift`, head `2eabec8e05`): tree `b371a126a`; - #1166 (`fix/1139-anchored-patterns`, head `5c8afefd44`): tree `557564bce`. It has landed since, as `105b5daf9`, which the gated merges above include from the second on; - #1246 (`l3-1221-member-git-unreadable`, head `0deac3a658`): tree `ffaedee72`. - The merges with the three open pull requests were merge-treed, not tested. - **P6b changes a finding.** Unmerged, the work tree's file on disk giving a value HEAD's does not, was `gitmodules-value-refused` on main and on #1124's head and is `family ok` (exit 0, every mode) now, until the merge is resolved and staged; the row holds it, and lane 5's coordinator accepted it. Git reads no file in that state either (`submodule status` exits 128, `no submodule mapping found`): it dies at the first gitlink, not on the value. After `git add`, the finding comes back, with N1's lines. - **An unmerged `.gitmodules` is still no finding of its own.** The gate is `family ok` while git's `submodule status` exits 128, and since the fix round (M2) it also asks no question of a gitlink outside `members/` and says no init stop while the file is unmerged: `member-uninitialized` gives the plain update, which exits 128 until the merge is resolved, and its `make bootstrap` names that cure. #1150 cites v1.1.1's release notes, which list the unmerged case as a known limit; this PR makes the checks agree with git on which file is read and adds no finding for the state. No documentation file is changed by this PR, and whether a page that describes the limit should change was not checked. - **A line set that ends in a commit cannot be committed while a merge leaves `.gitmodules` unmerged:** git refuses any commit then (`Committing is not possible because you have unmerged files`, exit 128). The value check's own remedy there says to resolve the merge first; the others say nothing of it. - **While any merge is in progress, the hand mount's first line, `git switch -c`, exits 128 (rv1227c's P5, measured; main is the same).** Git says `fatal: cannot switch branch while merging`, in a modify/delete conflict on `.gitmodules`, in a conflict in another file, and after a clean `git merge --no-commit`. With `.gitmodules` unmerged its plain `git rm` exits 128 too (`Cannot change unmerged .gitmodules`), as the next bullet says. A line set that ends in a commit is not the only one that cannot be typed in a merge. Not changed here. - **A hand mount's plain `git rm` dies while `.gitmodules` is unmerged and on disk** (measured, git 2.43.0, `m2-hand-checkout-section-unmerged-on-disk.log`): `Cannot change unmerged .gitmodules, resolve merge conflicts first`, exit 128, after git removed the checkout from disk; the gitlink stays in the index, and its store under `.git/modules` is kept. Main prints the same plain `git rm` in that state, and `_hand_cached` asks no question of the merge. Not changed here. - **A sparse checkout that leaves `.gitmodules` out (rv1227's S2), measured:** the put-back `git checkout -- .gitmodules` exits 1 (`did not match any file(s)`), so the `--unset-all` after it exits 5, and `git add -- .gitmodules` exits 1 (`outside of your sparse-checkout definition`) even once the file is back; a plain `git commit` after the lines records what the index held. `--ignore-skip-worktree-bits` and `git add --sparse` work there. This holds for every finding that prints a put-back or a stage line, as on main. The follow-up is #1242. - **A real content conflict never reaches the unmerged code (rv1227's N6).** It leaves conflict markers in the work tree's file, so the gate refuses `gitmodules-unreadable` on that file first, as main does (rv1227's e2b). The unmerged path is reached by a merge resolved by hand and not yet staged (the rows' synthetic stages 1 to 3), or by a modify/delete conflict (stages 1 and 2, or 1 and 3). - **`member-gitlink-removal-staged` while `.gitmodules` is unmerged (rv1227c's P4, measured; main is the same).** Where the work tree's file is deleted, its put-back (`_section_back`, through `_gitmodules_put_back`) finds no index entry at stage 0, so it falls to HEAD's file and prints `git checkout HEAD -- .gitmodules`, "from HEAD's, as the index holds none". Where the file is on disk and gives no section for the member, `_section_back` prints the same line itself, in its on-disk branch, with the `SECTION_TAKEN` words ("putting that file back as HEAD has it and dropping any other change to it"), and never calls `_gitmodules_put_back`. So a fix must guard both places (rv1227d's NIT 2). That reading is wrong while the index holds the file at its conflict stages, and the line does more than put a file back. - `git checkout HEAD -- .gitmodules` resolves the conflict to HEAD's side: it writes HEAD's blob at stage 0 and drops the other side's stage, and the merge reads as resolved (`git status` clean, the gate `family ok`). - With the file on disk and no section for the member, it also overwrites the file, a hand resolution included (`branch = resolved-by-hand` was lost). With a hand resolution on disk that still gives the path, only `git reset -q -- <path>` is printed and `.gitmodules` stays unmerged. - The text and lines are the same on main's script in all three forms. Tracked by #1254. Not changed here. - **The checks that ask about HEAD still read HEAD's file while `.gitmodules` is unmerged,** as the Goal says, since HEAD's is what a clone reads (rv1227d's NIT 1, issuecomment-6723609032): - the value check's HEAD side: a value HEAD gives is still named, "in HEAD, which a clone reads, not in the file git reads here" (`test_a_value_head_gives_while_a_merge_leaves_the_file_unmerged` pins it); - `member-gitmodules-absent` and `member-gitmodules-url-absent` (`_check_gitlinks_registered`); - the hand mount (`member-gitlink-unnamed`), which asks HEAD's sections whether a clone fetches the gitlink (`_gitlink_unnamed_said`), with its helpers `_section_then`, `_gitlink_put_back` and `_move_section`; - the staged-removal check, above, which also reads the work tree's file in its on-disk form. The script's unmerged guards read nothing from any file. This PR changes none of these reads. - **What ran where.** At this head (`2d56c1906`), the three test files (184) and the five hygiene files (379) ran on git 2.43.0, together on the scratch merges with main named under Merges (563), and the three test files ran on 2.47.1 (184). The script is byte for byte `0d65ea80c`'s, where the nine files that pin the script's texts elsewhere ran on 2.43.0 (330 passed); no file imports the changed test file, so they were not run again. The 60 files of `tests/test_family*.py` and `tests/test_validate_family*.py` ran at `442615eb3` alone, before the restack and fix round 1, on git 2.43.0, and the 4 reftable rows they skip there ran on no git. Fix round 2's mutants ran over the three files in full, and fix round 1's over their own rows. Main's commits since `e04826db4` are not merged: the one that touches `validate-family.py` (`105b5daf9`) merges clean and the scratch merges ran, and no gate ran on the predicted merge with an open pull request's head: those were merge-treed only. The full suite was not run. Review: rv1227b and rv1227c, lane 5's independent opus reviewers, which wrote none of #1227: NOT READY at `0d65ea80` on one test-only SHOULD (issuecomment-6722728204); then rv1227d, lane 5's independent sonnet reviewer, which wrote none of it: READY at `2d56c190`, H0 of this landing, after fix round 2 (issuecomment-6723609032), with no MUST or SHOULD; its NITs 1, 2 and 4 are corrected in the body and in #1254, and its NIT 3 is optional. CI (Brett Heap's ruling 27 and his fast-refresh ruling of 2026-10-15T22:48:35Z): H0 2d56c190 passed tests, tests-git-bash and SonarCloud; the head bb4ef4d9 is a clean update-branch merge of main 4552efa6, with tests-git-bash and SonarCloud green; and the local gate passed on its predicted squash tree 46ddfc80 over main 4552efa6: the family_gitmodules_values, validate_family_index_gitmodules, validate_family_index_value_unmerged, repo_hygiene, agents_md_codes, cli_reference sets, 355 passed. 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 #1150 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…in with the interpreter and the script's path, quote the row's name, fill in the family's org, say the branch they run on, and `member-already-present` prints its `remove` (#1127) (#1201) **#1127: the `add`, `bump` and `remove` lines that `family.py`'s remedies name are one spelling, `_family_line`, and each line a real `add`, `bump` or `remove` prints runs as printed, including from the branch a fresh clone stands on, as do the dry runs' `member-unknown` and `member-already-present` lines (three other lines are in Limits). A line begins with the interpreter and the script's path, quotes the row's name, names the family's org where it is known, and says which branch it runs on, and `member-already-present` prints its `remove` beside its `bump`.** **Was stacked on #1117 at `10dc011c9`, and is restacked after #1117 landed as `9252ef20`** (see "Restacked after #1117 landed"). Before that, its base was #1117's branch, `fix/1005-family-remove-add-family-root`, and it showed one commit, `eac177af9`: 9 files, 638 insertions and 74 deletions (`git diff --stat 10dc011 eac177a`). It answers the seven follow-ups of RV1117's review of #1117 (#1005), N1 to N7 of #1127, and one more that measuring found, N1b. Main is `961640c6` and #1117's head is `10dc011c9`. The probe is `tests/test_zz_probe1127.py`, run untracked through `run9.sh` (stub `gh`, bogus token, no global git config, no ssh) on each, from 20:13Z to 20:16Z on 2026-10-22. Its scripts and logs are in lane 5's scratch `v124/n1127/` (`probe/`, `logs/probe-main.log`, `logs/probe-parent.log`, `logs/n5-measure-main.log`, `logs/n5-measure-parent.log`). | item | on main | on #1117's head | |---|---|---| | **N1** `member-unknown`'s `add`, typed on the tracking branch | not in that form: the line has no `--family-root`, so typed from a holder it exits 2 with argparse's `the following arguments are required: --family-root`, on any branch | holds: `add --family-root <holder> --member <org>/IRQS` from a holder on `main` exits 2 `family-on-tracking-branch` | | **N1b** (found by measuring) `member-already-present`'s `bump`, typed on the tracking branch | holds | holds: `add --member InkRouter/IRRS` on `main` is refused `member-already-present`; its `bump` line, with a real commit, exits 2 `family-on-tracking-branch`. `add` asks `_checked_add_target` before `_checked_branch` | | **N2** a bare `family.py` | holds: the `member-unknown` and `member-already-present` lines start `family.py` | holds, and so do #1117's two `remove` lines | | **N3** `<org>` left blank | holds: `family.yaml` says `org: InkRouter`, the line says `<org>/IRQS` | holds | | **N4** `--member` printed raw | holds: with the row's project hand-edited to `IR RS`, the `bump` line reads `--member IR RS`, which `shlex` splits into `IR` and `RS` | holds | | **N5** the README sentence's verbs tied to nothing | holds: dropping `bump` from README and the handbook leaves `tests/test_readme_windows_quoting_sentence.py` at 44 passed | holds: dropping `remove` leaves it at 44 passed | | **N6** a backtick in the holder's path | holds: the first backticked span of the remedy is `family.py bump --family-root '<...>/a`, cut at the path's backtick | holds | | **N7** `remove` takes it out, with no line | holds: the `member-already-present` remedy says "`remove` takes it out" and prints no `remove` line | holds, the same text | So both kinds are present. N1 exists only in #1117's `add` line, since main's has no `--family-root` to be refused for. The other seven (N1b and N2 to N7) hold on both, and #1117 rewrites three of the lines they concern. That is why this is stacked on #1117. Item by item, with the row that pins it and the mutants aimed at it (the results are in the Mutants section; each run stopped at its first failing row): | item | what holds now | pinned by | mutants | |---|---|---|---| | N1 | `member-unknown`'s remedy opens with the branch clause and the `git switch -c`; typed in order from the tracking branch, the `switch -c` then the `add` exit 0 | `test_member_unknowns_add_runs_as_printed_from_the_tracking_branch` | M5, M11, M13, M15 | | N1b | the same for `member-already-present`'s `bump` and `remove` | `test_member_already_presents_lines_run_as_printed_from_the_tracking_branch` (`bump`, `remove`) | M14 | | N2 | every line begins with the interpreter and the script's path | the new file's rows, and the rows of five existing files that now read that lead | M1, M12 | | N3 | the owner is the typed one, else `family.yaml`'s `org:`, else the blank | `test_member_unknowns_add_names_the_owner_where_it_is_known` (7 params) | M6, M7, M8, M9 | | N4 | the row's name is one quoted word | `test_a_rows_name_with_a_space_is_one_word_in_both_lines` | M2, M16 | | N5 | the README sentence's verbs are tied to `NAMED` and to the verbs `_family_line` is called with | `test_the_kinds_of_family_lines_are_the_ones_the_sentence_lists` | D1, D2, D3 | | N6 | a command holding a backtick is printed bare | `test_a_command_holding_a_backtick_is_printed_bare` | M3, M4 | | N7 | `member-already-present` prints the `remove` line | the `[remove]` param of the N1b row | M10 | The code, in `scripts/family.py`: - **One spelling for the lines, `_family_line(verb, holder, *words)` (N2, N4).** It prints `<python> <this file's path from where the run stood> <verb> --family-root <holder> <words>`, every word spelled by `shell_quoted` for the reader's shell. That is how `init`'s NEXT STEPS' `add` was already printed (`_add_command`, #486), now shared. `_add_command` is built on it and prints the same bytes. - It is called for `bump`'s `member-unknown` (its `add`), `add`'s `member-already-present` (its `bump` and `remove`), `add`'s `member-duplicate-id` (its `remove` and `bump`) and `bump`'s `member-duplicate-id` (its `remove`). - The row's `project:` is passed as a word, so a row `IR RS` prints `'IR RS'`, one word (N4). - A placeholder (`<commit>`, `<org>/...`) is added after the line, bare: quoted, it would read as a value. - **The branch the line runs on, `_off_the_tracking_branch` (N1, N1b).** `member-unknown` and `member-already-present` are refused before `_checked_branch` reads the branch, so a person on the tracking branch, where `init` and a fresh clone leave them, typed a line that was refused. Each remedy now opens with `on a branch other than the holder's tracking branch, which <verb> refuse(s) (<git -C holder switch -c branch> makes one), `, and ends with `BRANCH_LEFT` (#607). - `member-unknown`: `` `add` refuses ``, branch `family/add-<project>`. - `member-already-present`: `` `bump` and `remove` refuse ``, branch `family/bump-<id>`. The issue named only the `add` (N1); this is N1b. - The words are true on any branch: the refusal is said before the branch is read, and reading it there could refuse in its place. The two `member-duplicate-id` remedies name no branch: a real `add` or `bump` asks them after `_checked_branch`. - **The owner of `member-unknown`'s `add`, `_unknown_members_repository` (N3).** The owner `--member` was typed with (`<org>/<project>`), else `family.yaml`'s `org:`, else the blank `<org>`. Each is used only where `MEMBER_RE.fullmatch("<owner>/<project>")`, so an empty org or an org holding a space leaves the blank, and a typed owner `add` refuses falls through to the family's org. The value is one word for the shell. - **A command holding a backtick is printed bare, `_cited` (N6).** Every shell reads the line the same either way. - **`member-already-present` prints the `remove` line beside the `bump` line (N7).** `` `<bump line> --to <commit>` moves an existing member and `<remove line>` takes it out. `` The remedy of `bump --member IRQS` on a family whose `org:` is InkRouter, before and after. The "after" is from the working tree's probe before the commit (`logs/probe-wip.log`), and the tests pin it on the head. `BRANCH_LEFT` follows it. ``` before (#1117's head): Remediation: `family.py add --family-root <holder> --member <org>/IRQS` puts it in the family first. after: Remediation: on a branch other than the holder's tracking branch, which `add` refuses (`git -C <holder> switch -c family/add-irqs` makes one), `python3 <path to family.py> add --family-root <holder> --member InkRouter/IRQS` puts it in the family first. ``` Tests: - **`tests/test_family_remedy_lines.py` (new, 12 rows) types each line as printed.** The holder is the suite's family, copied and put back on its tracking branch, as `tests/test_family_tracking_branch.py` does, and the lines are typed from a folder with a space in its name, by the interpreter and the script path they print. - `member-unknown`: the exact remediation; the `add` typed alone is refused `family-on-tracking-branch`; its `switch -c` then the `add` exit 0, pin IRQS on `family/add-irqs`, leave the holder clean and `validate-family.py` green (N1, N2). - `member-already-present`, for `bump` and for `remove`: the same, with the pin moved to `main~1` or the row gone (N1b, N7). - The owner, 7 params (the family's org; a typed owner; a typed owner `add` refuses; no org; an empty org; an org holding a space; no org but a typed owner), each pinned to the exact line (N3). - A row `IR RS`: both lines carry `'IR RS'` as one word (N4). - A holder under a folder `a`b`: both remediations print bare commands, and the `add` runs (N6). - **`tests/test_readme_windows_quoting_sentence.py` ties the sentence's verbs to the code (N5).** `NAMED` is re-counted for the new helpers (`_family_line` 3, `_add_command` 1, `_unknown_members_repository` 2). A new `FAMILY_LINES` says what each function prints, and a new `family_line_verbs` reads each `_family_line` call's verb from the source. `test_the_kinds_of_family_lines_are_the_ones_the_sentence_lists` checks those kinds against the verbs README lists for `family.py` (`NEXT`, `switch -c`, `add`, `cd`, `git rm -r --cached`, `bump`, `remove`), no more and no fewer, and refuses a verb that is not a string constant. A second test checks the reader on a small source. README and the handbook are not touched. - **Five existing test files read the new lead.** `family_lead(cwd=None)` is a new helper in `tests/test_family_printed_quoting.py`: the interpreter and the path to `family.py` from where the refused run stood. `tests/test_bump_remedies_family_root.py`, `tests/test_family.py`, `tests/test_family_add_member_id.py`, `tests/test_family_bump_to_checks.py` and `tests/test_remove_add_remedies_family_root.py` expect it where they expected a bare `family.py`; that last file's `bump-member-unknown` case now expects the org filled in. - **No assert joins conditions with `and` or `or`.** Read on the syntax tree: the new file has 43 asserts and the sentence file gains 7, none of them composite. The diff adds no non-ASCII byte. `10dc011c9`'s `family.py` was put under the committed tests of `eac177af9` (`git show 10dc011:scripts/family.py > scripts/family.py`), with `tests/test_family.py` narrowed to its one changed test, and the 8 changed or new files run through `run9.sh` with `-rA`: **90 failed, 142 passed** in 148.64s (`logs/rows-parent.log`; the failing ids are in `logs/rows-parent-failed.txt`). `family.py` was restored and its sha256 checked afterwards. The same 232 rows pass on the head, inside the gates below. The rows were not run against main's `family.py`: this PR's base is #1117's branch. | file | failed of run | the rows | |---|---|---| | `tests/test_remove_add_remedies_family_root.py` | 45 of 45 | `test_the_line_a_remedy_names_carries_the_holder_whole`, `..._parses` and `..._runs_as_printed_and_does_what_it_says`, 15 each: 5 holders (`plain`, `my work`, `Dana's work`, `relative`, `symlink`) x the cases `add-member-duplicate-id`, `bump-member-duplicate-id`, `bump-member-unknown` | | `tests/test_bump_remedies_family_root.py` | 18 of 21 | `test_the_bump_a_remedy_names_carries_the_holder_whole`, `..._parses` and `..._runs_as_printed`, 6 each: 3 holders (`plain`, `my work`, `Dana's work`) x `member-already-present`, `member-duplicate-id` | | `tests/test_family_remedy_lines.py` (new) | 12 of 12 | `test_member_unknowns_add_runs_as_printed_from_the_tracking_branch`; `test_member_already_presents_lines_run_as_printed_from_the_tracking_branch[bump]` and `[remove]`; `test_member_unknowns_add_names_the_owner_where_it_is_known` (all 7 params); `test_a_rows_name_with_a_space_is_one_word_in_both_lines`; `test_a_command_holding_a_backtick_is_printed_bare` | | `tests/test_family_add_member_id.py` | 6 of 14 | `test_a_linked_manifest_with_a_pinned_id_is_refused_by_the_mount_unwound`, `test_a_member_whose_id_changes_between_the_probe_and_the_mount_is_unwound`, `test_a_renamed_repository_is_refused_before_anything_is_mounted`, `test_a_section_already_at_the_mount_path_is_refused_first_then_the_id`, and `test_each_command_the_refusal_names_runs_on_the_row_it_names[bump]` and `[remove]` | | `tests/test_family.py` | 4 of 4 | `test_add_refuses_a_spelling_of_a_member_the_family_already_pins[INKROUTER/IRRS]`, `[InkRouter/irrs]`, `[OtherOrg/Irrs]`, `[inkrouter/irrs]` | | `tests/test_family_bump_to_checks.py` | 3 of 6 | `test_a_duplicate_id_behind_a_tag_is_refused_after_the_peel_line`, `test_a_duplicate_id_read_through_a_linked_manifest_is_put_back`, `test_bump_to_a_commit_recording_another_rows_id_is_refused_alike` | | `tests/test_readme_windows_quoting_sentence.py` | 2 of 46 | `test_the_functions_that_quote_for_the_host_are_the_ones_the_sentence_names[scripts/family.py]` (`NAMED` no longer matches #1117's `family.py`: `_add_command` is counted 3 there, where `NAMED` now says 1, and four more functions are counted) and the new `test_the_kinds_of_family_lines_are_the_ones_the_sentence_lists` | | `tests/test_family_printed_quoting.py` | 0 of 84 | gains the `family_lead` helper only | 19 of 19 killed. Each was applied alone to the committed tree with `mut/mutants1127.py` (lane 5's scratch `v124/n1127/mut/`), run through `run9.sh` with `-x -q` on the named file, and restored byte for byte, with the sha256 checked by an assert in the driver. `git status --porcelain --untracked-files=no` was empty after the last one (`logs/mutants.log`). With `-x` a run stops at its first failing row, so the table names that row, not every row that would fail. Every failure is an `AssertionError` at an assert of the named file, read in `logs/mut-<id>.log`, never an import or syntax error. No survivor. | mutant | what it does | result | first failing row | |---|---|---|---| | M1 | `_family_line` drops the interpreter and the script | killed, rc 1 | `test_member_unknowns_add_runs_as_printed_from_the_tracking_branch` | | M2 | words unquoted in `_family_line` | killed, rc 1 | `test_a_rows_name_with_a_space_is_one_word_in_both_lines` | | M3 | holder unquoted in `_family_line` | killed, rc 1 | `test_a_command_holding_a_backtick_is_printed_bare` | | M4 | `_cited` always backticks | killed, rc 1 | `test_a_command_holding_a_backtick_is_printed_bare` | | M5 | no branch clause | killed, rc 1 | `test_member_unknowns_add_runs_as_printed_from_the_tracking_branch` | | M6 | org blank always | killed, rc 1 | `test_member_unknowns_add_runs_as_printed_from_the_tracking_branch` | | M7 | typed owner ignored | killed, rc 1 | `test_member_unknowns_add_names_the_owner_where_it_is_known[the-typed-owner]` | | M8 | owner not checked against `MEMBER_RE` | killed, rc 1 | `...owner_where_it_is_known[a-typed-owner-add-refuses]` | | M9 | typed owner after the family's org | killed, rc 1 | `...owner_where_it_is_known[the-typed-owner]` | | M10 | no `remove` line in `member-already-present` (#1117's words) | killed, rc 1 | `test_member_already_presents_lines_run_as_printed_from_the_tracking_branch[bump]` | | M11 | `BRANCH_LEFT` dropped from `member-unknown` | killed, rc 1 | `test_member_unknowns_add_runs_as_printed_from_the_tracking_branch` | | M12 | script named bare (#1117's `family.py`) | killed, rc 1 | `test_member_unknowns_add_runs_as_printed_from_the_tracking_branch` | | M13 | `member-unknown`'s `switch -c` suggests `bump`'s branch | killed, rc 1 | `test_member_unknowns_add_runs_as_printed_from_the_tracking_branch` | | M14 | `member-already-present`'s `switch -c` suggests `add`'s branch | killed, rc 1 | `test_member_already_presents_lines_run_as_printed_from_the_tracking_branch[bump]` | | M15 | `member-unknown`'s clause names the wrong verb | killed, rc 1 | `test_member_unknowns_add_runs_as_printed_from_the_tracking_branch` | | M16 | `member-already-present`'s row name raw in its lines | killed, rc 1 | `test_a_rows_name_with_a_space_is_one_word_in_both_lines` | | D1 | README and the handbook drop `remove` from the sentence (N5) | killed, rc 1 | `test_the_kinds_of_family_lines_are_the_ones_the_sentence_lists` | | D2 | a `_family_line` call of a verb the sentence does not list (N5) | killed, rc 1 | `test_the_kinds_of_family_lines_are_the_ones_the_sentence_lists` | | D3 | a `_family_line` call whose verb is not a constant (N5) | killed, rc 1 | `test_the_kinds_of_family_lines_are_the_ones_the_sentence_lists` | M1 to M16 ran on `tests/test_family_remedy_lines.py`, D1 to D3 on `tests/test_readme_windows_quoting_sentence.py`. D1 is the N5 measurement made into a mutant: on #1117's head the same documentation edit left that file at 44 passed. All through lane 5's `run9.sh` with `EMAIL` exported, run by `gate-n1127.sh` from the main loop. Every `START` line reads `head=eac177af934b9606db83e5a31e62cd5a98b5270c` and `dirty=0`, or, for the hygiene run, the scratch commit below. The 17 files: `tests/test_family_remedy_lines.py`, `tests/test_bump_remedies_family_root.py`, `tests/test_family_add_member_id.py`, `tests/test_family_bump_to_checks.py`, `tests/test_family_printed_quoting.py`, `tests/test_readme_windows_quoting_sentence.py`, `tests/test_remove_add_remedies_family_root.py`, `tests/test_family.py` (the 8 this commit changes or adds), and `tests/test_family_init_landing.py`, `tests/test_git_bash_dialect.py`, `tests/test_validate_family_branch_step.py`, `tests/test_validate_family_remedies_typed.py`, `tests/test_validate_family_duplicates.py`, `tests/test_family_dry_run.py`, `tests/test_family_members_not_a_list.py`, `tests/test_family_switch_branch_exists.py`, `tests/test_family_tracking_branch.py` (the 9 that name the changed functions or codes). | run | git | result | log | |---|---|---|---| | the 17 files and the trio (`tests/test_repo_hygiene.py`, `tests/test_agents_md_codes.py`, `tests/test_cli_reference.py`) | 2.43 | **953 passed** in 656.46s | `logs/gate243.log` | | the 17 files | 2.47.1 (`git version 2.47.1` is the log's first line) | **783 passed** in 613.17s | `logs/gate247.log` | | `tests/test_path_guard_hygiene.py`, in the scratch worktree `n1127-hyg-scratch`: main `961640c68` with this `family.py` committed there as `ea72f4b98` (blob `ab41b42ec`, the same as `eac177af9`'s) | 2.43 | **49 passed** in 16.91s | `logs/hyg243.log` | The hygiene run is on a scratch commit because #1117's base, `6da757cbe`, predates #1111's `tests/test_path_guard_hygiene.py`: the file is not in `eac177af9`, and it is in main. No failure and no skip in any run. The full suite was not run. Read again on 2026-10-23 at about 11:10Z, with git 2.43.0 and no global git config, after `git ls-remote` read main at `961640c68`, #1117's branch at `10dc011c9` and this branch at `eac177af9`: | `git merge-tree --write-tree <other> eac177a` | exit | result | |---|---|---| | `origin/main` (`961640c68`) | 1 | one conflict, `docs/handbook.html` | | #1117, `10dc011c9` | 0 | clean, tree `0abd5f5d4fc2` | | #1098, `dad7961a98` | 0 | clean, tree `4ef018a9b508` | | #1166, `2593952c95` | 1 | one conflict, `docs/handbook.html` | | #1164, `74096eb47833` | 1 | one conflict, `docs/handbook.html` | - **The one conflict is #1117's own, and this commit does not touch the handbook.** #1117 alone (`git merge-tree --write-tree <other> 10dc011`) conflicts in `docs/handbook.html` and nowhere else against main, #1166 and #1164, and is clean against #1098. `git diff --name-only 10dc011 eac177a` names no file under `docs/`. - **#1164's head moved to `74096eb47833`, from `3162b523be`, after the gate run.** The gate run's merge-tree was at `3162b523be` and read the same: one conflict, `docs/handbook.html`. - **Open PRs.** 54 were listed with `gh pr list --state open --limit 100 --json number,headRefName,headRefOid,files`. Four touch `scripts/family.py`: #1166, #1164, #1117 and #1098. Of this commit's 9 files, #1117 touches 5 (`scripts/family.py` and four test files); no other PR touches a test file of this commit's. Every one of those heads is above. #1117 landed on 2026-11-08 at 19:15:56Z as `9252ef208`, from its final head `8cb9c729a` (a merge of main into its branch after `219e57c28`). Lane 5's pilot restacked this branch at 19:31Z with two real merges and no rebase: 1. `85909e973` merges #1117's final head `8cb9c729a`. 2. `24b6a0af6` merges #1117's squash `9252ef208`, taking this branch's side for the five files the squash and the branch both carry: `scripts/family.py`, `tests/test_family_add_member_id.py`, `tests/test_family_bump_to_checks.py`, `tests/test_readme_windows_quoting_sentence.py` and `tests/test_remove_add_remedies_family_root.py`. No third merge was needed: main was still `9252ef208`. The new head `24b6a0af6` differs from main in exactly this PR's 9 files, 638 insertions and 74 deletions. That change is byte for byte the one rv1201 found READY: `git diff 10dc011 eac177a` and `git diff 9252ef2 24b6a0a` have the same `+` and `-` lines and the same patch-id, `ceddd1c4ddae`. Its tree, `85563cdb`, is the one the pilot's dry run predicted. - **The `init` remedies are left as follow-ups.** `scripts/family.py` lines 558 (`Family.open`'s `family-root-missing`) and 10386 (`cmd_siblings`'s `family-root-missing`) say `` `family.py init --org <org> --family <Name>` `` with a bare `family.py`. `_family_line` always prints `--family-root`, which `init` does not take, so they need a spelling of their own. - **`member-ambiguous`'s remedy is left as a follow-up.** It is raised at line 607 and says "`remove` takes the extra one out" with no line to type, the shape N7 had in `member-already-present`. It is not in the issue. - **Three printed lines name no branch, so typed on the tracking branch they are refused** (rv1201's review, issuecomment-6372152028, SHOULD-1). (a) `add --dry-run`'s `member-duplicate-id`: under `--dry-run`, `cmd_add` skips `_checked_branch` but still asks `_checked_member_id`, and the `remove` line its remedy prints, typed on the tracking branch, is `REFUSED family-on-tracking-branch`. (b) `bump --dry-run`'s `member-duplicate-id`, the same way through `_bump_dry_run`. (c) `init`'s `family-holder-already-here` prints `_add_command`'s line between plain backticks, with no branch clause and not through `_cited`, so it is refused typed on the holder `init` just made, and a folder name that holds a backtick ends the span early. Each chain still ends in a refusal that prints its own `switch -c`. They are left as follow-ups, with rv1201's three NITs. - **The family's `org:` is the likeliest owner, not a certain one.** A member may live in another organisation (`MEMBER_RE`), and the `add` of a repository that is not there is refused before it touches the holder. `<org>` stays blank where no owner is a `--member` that `add` takes. - **The clause says "a branch other than the tracking branch".** It is worded to be true on any branch, since the refusal is said before the branch is read, so a person already off the tracking branch reads a clause that does not apply to them. - **#1117's head is expected to move before it lands** (its handbook conflict with main is its own to mend). When it does, this branch takes a merge of the new head, never a rebase, and the gates run again. It did: see "Restacked after #1117 landed". - **The runs are on the bench's Python 3.12; CI runs 3.14.** No test line this commit adds uses `ast.dump`, `repr(` or `sys.version`, so no assert reads text that depends on the Python version. - **A post-tag DRAFT.** Brett Heap ruled on 2026-10-21T10:32:04Z to leave the follow-ups out of v1.2.0. It is on the v1.2.1 milestone, and it lands after its base #1117, under his v1.2.1 merge word of 2026-10-23T13:10:26Z. Review: rv1201, lane 5's independent opus reviewer, which wrote none of #1201: READY at `eac177af`, H0 of this landing before its restack (issuecomment-6372152028), with no MUST; its one SHOULD (the Goal's claim) is fixed in the body, and its three NITs go to a follow-up. CI (Brett Heap's ruling 27 and his fast-refresh ruling of 2026-10-15T22:48:35Z): H0 24b6a0a (the restack of the branch onto main after #1117 landed) passed tests, tests-git-bash and SonarCloud; the head d1ecf81 is a clean update-branch merge of main 3ee5bb4, with tests-git-bash and SonarCloud green; and the local gate passed on its predicted squash tree 4daf6ff over main 3ee5bb4: the bump_remedies_family_root, family, family_add_member_id, family_bump_to_checks, family_printed_quoting, family_remedy_lines, readme_windows_quoting_sentence, remove_add_remedies_family_root, repo_hygiene, agents_md_codes, cli_reference sets, 512 passed. 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 #1127 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 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) (#1273) `validate-family.py` asked `PROJECT_ID_RE` of one id only, the family's own. A member row's `id:` met two checks, and neither is a pattern: the mounted `project.yaml` compared 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 `-` was `family ok`; and with the members checked, so was a row that spelled the same malformed text as its member's own `project.yaml`: the row a `family.py add` older than #1166 wrote for a member whose own `id:` read `"irqs\n"`. - `_check_member_ids_well_formed`, beside `_check_member_ids_unique`, asks `PROJECT_ID_RE.fullmatch` of every row that check asks, from `_check_members` before the `--no-members` return (it reads `family.yaml` alone). So `--no-members`, `--pins` and a full run all ask it, and a malformed row id is `member-id-malformed`, exit 1. - `_check_member_identity` takes `root` and asks the mounted `project.yaml`'s own `id:` as `add` asks it, `PROJECT_ID_RE.fullmatch(str(id or ""))`, so with the members checked the gate refuses every member `add` would refuse (`member-bad-id`) and none it would pin. The finding names that file, `members/IRQS/project.yaml:`, as the source. - One finding for one fault: where either id is malformed, `member-id-mismatch` is not said as well, since it named no command and over a malformed member told the person to copy a malformed id into the row. `_is_project_id` is the one reader both checks call, and it uses `fullmatch`, not `match` (#1139), because `PROJECT_ID_RE` ends in `$`, which matches before a trailing line feed. No import is added. - A value that is not a string is asked as its text: a number reads as its digits, so a row a holder wrote before #259 as `id: 2026` still passes; `true`, `1.5`, `-3`, a list and a mapping are refused. `id: null` and a row with no `id:` stay `member-id-absent`'s, with the members checked, and nothing under `--no-members`. - The remedy is `bump`, not the issue's `remove` and then `add`: `bump --to <the row's pinned commit>` writes the row's `id:` from the member's own `project.yaml` at that commit and leaves the pin (measured: exit 0, one commit, gitlink unmoved, `validate-family.py` exit 0), and refuses with `member-bad-id` where that file is malformed too, so it is mended in the member's repository first. The issue's `remove` and `add` do not run as it prints them: measured on a hand-edited row, `add --at <the pinned commit>` after `remove` exits 2 as `member-git-dir-cached`, and without `--at` it moves the pin to the member's tip. `--to` is the row's `pin.commit` where `COMMIT_RE.fullmatch` takes it, and `<commit>` otherwise; the holder's path is POSIX-quoted in `_bump_to`. - `AGENTS.md` item 4 of the family section names `member-id-malformed` on its own line, so the file stays at its 494-line cap, and `ID_READERS` in `tests/test_value_pattern_line_break.py` counts 2 `fullmatch` readers in `validate-family.py`. The new `tests/test_validate_family_member_id_pattern.py` holds 44 rows. - Measured with git 2.43.0 on Python 3.12.3, in the probe environment, base `ccc2c2d2` against head: a row `id:` of `"irrs\n"`, `"irrs\r"`, `"IRRS Capital"` or `"-x"` was exit 0, `family ok`, under `--no-members` and `member-id-mismatch`, exit 1, with the members checked; it is now `member-id-malformed`, exit 1, under both, alone. The controls (`"0"`, and `irrs`) are as before. The pre-#1166 holder, IRQS `"irqs\n"` on both sides, went from exit 0, `family ok` with 3 members, to exit 1 with the row's finding, and with the members checked the member's own as well. - The new file at base: 29 failed and 15 passed; at `0657e396`, 44 passed. Mutants: 10 of 10 killed, and the four of r1204's 14 that had survived (R6, R7, R11, R12) are killed by the three rows round 1 added. - It was built after #1227 (lane 5's), which changes the same `validate-family.py`, and restacked by three merges once #1227 landed; its own lines keep out of #1227's. - Known limits: - Under `--no-members`, a member's own malformed id behind a well-formed row is not seen, since that run reads no member. `add` and `bump` refuse such a member, so only a hand edit, or an `add` older than #1166, leaves one. - The row's remedy needs the member checked out (`bump` refuses one that is not, as `member-uninitialized`). Where the pin is no commit and the members are checked, `member-pin-commit` refuses the run first, as it did before this PR, and the row's finding follows once the pin is mended; under `--no-members` the finding stands alone and names `--to <commit>`. - `bump` to the commit already pinned commits as "Bump IRRS to `<sha>`", which does not say the row's id changed. - A member's own `id:` that reads as a positive number (`id: 7`) is accepted, as `add` accepts it, though the member's own `validate-manifest.py` refuses it as no string. A row with no `project:` is skipped, as `_check_member_ids_unique` skips it. - Measured with git 2.43.0 and Python 3.12.3 only: the issue's git 2.47.1 was not run, and CI runs 3.14. `AGENTS.md`'s item 4 line is 129 characters, to name the code without a 495th line. - Not in this PR: #1205, the other values of a member row (`repository:`, `path:`, the pin); any change to `scripts/family.py`, whose `add` gives the `member-bad-id` this check copies; and the loader `_run_checks`, which #1172 changes. Review: lane 1's independent reviewers reviewed each round. r1204 found `d56f2084` READY, with no MUST, no SHOULD and seven NITs (#1273 issuecomment-6726873431). Round 1, `0657e396`, answers NITs 1 to 3 (a docstring, and rows for the `<commit>` fallback, a quoted holder path and a bare `id: 0`) and changes no behavior of `validate-family.py` (issuecomment-6727138789). NITs 4, 5 and 7 stay as the Known limits above. r1204b found the round READY, with no MUST, SHOULD or NIT (issuecomment-6727217672). After #1227 landed as `5c662f75`, the branch was restacked by three merges with no rebase, `062f5983`, `75b12a96` and `2eadb5df`, and its changed lines equal the reviewed delta: 658 `+`/`-` lines over the same 4 files, sha256 `ca4df1a9`. Tests, under a stub `gh` with a bogus token, on Python 3.12.3 and git 2.43.0: the restack's gate at `2eadb5df` gave 75 passed for the PR's two test files (`tests/test_validate_family_member_id_pattern.py` and `tests/test_value_pattern_line_break.py`), 184 passed for #1227's three (`tests/test_family_gitmodules_values.py`, `tests/test_validate_family_index_gitmodules.py` and `tests/test_validate_family_index_value_unmerged.py`), 343 passed for the other nine `tests/test_validate_family_*.py` files, 283 passed and 2 skipped for `tests/test_path_guard_hygiene.py` and `tests/test_no_auto_maintenance.py` with `tests/test_scaffold_leg_path_collisions.py`, and 171 passed for the doc trio. The first three calls had passed at `75b12a96` too, with the same counts, before main's last merge; all five ran again at `2eadb5df`, since that merge changes `adopt-project.py`, which the first call runs. It lands by fast refresh (Brett Heap, 2026-10-15T22:48:35Z). Its `tests` run at the restacked head `2eadb5df` failed only on main's 13 red rows, which #1293 mended; the branch was then refreshed over #1293, and that head, `5fbb9c3d`, is its H0. Its H0 `5fbb9c3d` is green on Linux and SonarCloud. The branch was never rebased. Any commit after H0 is update-branch's clean merge of main, and the head that lands, 5fbb9c3, is green on SonarCloud and Git Bash. Lane 1's gate passed on its tree: 5 pytest calls over `tests/test_validate_family_member_id_pattern.py`, `tests/test_value_pattern_line_break.py`, `tests/test_family_gitmodules_values.py`, `tests/test_validate_family_index_gitmodules.py`, `tests/test_validate_family_index_value_unmerged.py`, `tests/test_validate_family_branch_step.py`, `tests/test_validate_family_duplicates.py`, `tests/test_validate_family_git_not_runnable.py`, `tests/test_validate_family_member_path_glob.py`, `tests/test_validate_family_remedies_typed.py`, `tests/test_validate_family_typed_states.py`, `tests/test_validate_family_unnamed_mounts.py`, `tests/test_validate_family_unreadable.py`, `tests/test_validate_family_without_git.py`, `tests/test_scaffold_leg_path_collisions.py`, `tests/test_path_guard_hygiene.py`, `tests/test_no_auto_maintenance.py`, `tests/test_pinned_copy_text.py`, `tests/test_agents_md_codes.py`, `tests/test_cli_reference.py`, `tests/test_repo_hygiene.py`: 1,143 passed, 2 skipped. Closes #1204 Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t four sites, so a name that ends in a line feed matches no family and `validate-repository-naming.py` refuses it, and `repository-naming.yaml` says a pattern is read whole (#1202) (#1266) **#1202: a repository name that ends in a line feed is the name of no family of the naming policy, and `validate-repository-naming.py` refuses it as `naming-unclassified`, by name, over a manifest's leg `repository:` and over an argument, where main classified `Atlas\n` as `Atlas` and exited 0.** This is a DRAFT on `main` (`be21751c3`, the landing for #1243). It is the follow-up lane 5 filed as #1202 from its independent review of #1166 (#1139), finding 1 (pull/1166 issuecomment-6352173084). #1166 ended the seven module-level patterns of the validators in `\Z` and read the three ids with `fullmatch`, and left `NamingPolicy`, whose patterns come from `contracts/repository-naming.yaml`, every one `^...$`, read with `.match`. The change is one commit, `09697e9c5`: 3 files, +255 and -4 (`git diff --shortstat origin/main...HEAD`): `scripts/repo_shape.py` (+5 -4), `contracts/repository-naming.yaml` (+8), and the new `tests/test_naming_policy_line_break.py` (+242, 77 rows). Measured on main `be21751c3` (production code equal to `5926cccab`, where the branch was cut), Python 3.12.3, git 2.43.0, a stub `gh` and no network. `NamingPolicy` read a name with `.match` at four sites of `scripts/repo_shape.py`: `descendant_referents` (the family's `_re`, then its `_split_re`) and `matches` (a role's `_re`, then a family's). In Python `$` also matches just before a trailing line feed, and the YAML reader reads a double-quoted `"...\n"` as the text and a line feed. So `matches`, `classify` and `descendant_referents` gave a name with a trailing line feed the answers of the name without it (`NamingPolicy.load(contracts/repository-naming.yaml)`, in process): | Name, with and without `\n` | `classify` on main | On this branch, with `\n` | |---|---|---| | `Atlas`, `Atlas-spec`, `Atlas-code` | `('project-leg', 'assembly' / 'spec' / 'code')` | `matches == []`, `classify is None` | | `openFoo` | `('neutral-product', None)`, also `project-leg/assembly` | `matches == []`, `classify is None` | | `Thing-Install` | `('install', None)` | `matches == []`, `classify is None` | | `user-wip` | `('workspace', None)` | `matches == []`, `classify is None` | | `InkxRouter`, `MedxScribe` | `('project-leg', 'assembly')`, with `descendant_referents` `('openRouter', 'openxRouter')` and `('openScribe', 'openxScribe')` | `matches == []`, `classify is None`, and `descendant_referents == ()` | `Atlas-Spec` (a capital S) is `None` with and without the line feed, on both. `topic_pattern.match('xf-project-atlas\n')` is a match on main; no tool reads `topic_pattern` (see Limits). The gate (`validate-repository-naming.py`, run by the root template at `Makefile:48` and `validate.yml:310`), measured by the new rows run on main's code: - `--project project.yaml` over a scaffolded root whose leg `repository:` is written `"testorg/Atlas\n"` (and likewise `-spec` and `-code`): **exit 0**, the table naming the leg and its family on two lines (`' Atlas'`, then `' project-leg/assembly'`). - The same name as an argument (`Atlas\n`, `Atlas-spec\n`, `Atlas-code\n`): exit 0, the same split. A name read from stdin is stripped (`line.strip()`), and is untouched. - The issue also measured that `validate-manifest.py` has refused such a leg since #1166 (`manifest-leg-repository`, `QUALIFIED_RE` ending in `\Z`), so the root's gate as a whole already failed; the naming step passed. I did not re-run that measurement. - **`scripts/repo_shape.py`:** the four sites read `fullmatch`. `NamingPolicy` is the only code that matches a name against the data's patterns (`grep` of the tracked `*.py`; `scaffold-project.py:1535` prints the neutral-product pattern's text in a remedy and matches nothing). A one-line note beside `topic_pattern` says that a reader must use `fullmatch`, because `$` takes a final line feed. - **`contracts/repository-naming.yaml`:** a paragraph at the end of the header, "A PATTERN IS READ AGAINST THE WHOLE NAME", for a fork's pattern. A pattern with no `$` was read as a prefix under `.match` and is read as the whole name now, so a fork writes the pattern for the entire name. I took this of the two ways the issue offers (the other is to keep `.match` and refuse a name that holds a line feed at the entry of `matches`, `classify` and `descendant_referents`) as the shorter. Every shipped pattern begins with `^` and ends with `$`, and the measured sweep below shows `fullmatch` changes no answer except a trailing line feed. - **`tests/test_naming_policy_line_break.py` (new, 77 rows):** - the names are read from the data (`families[].examples`, `roles[].examples`, the descendant family's `claim_without_referent_examples`), so a family or a role added to the contract is covered without a line here; a `declared_only` family is asked under its own id; - a baseline row per name (the name without the line feed is matched as it was) and, per name with the line feed, `matches == []`, `classify is None` and `descendant_referents == ()`; - rows over a fork's policy (`NamingPolicy` built from the shipped data with ONE pattern written without `$`) for each of the four sites; - the gate rows: `validate-repository-naming.py --project` over a scaffolded root for each of the three roles, a double-quoted baseline, and an argv name for each, with its baseline. - **Nothing else.** No refusal code is added, changed or renamed, no sentence of a refusal changes, no command or flag is added, so `AGENTS.md`, `README.md`, `docs/` and the handbook mirror stay as they are. Before the change I grepped `tests/`, `README.md`, `docs/` (the handbook), `AGENTS.md` and `contracts/` for text that pins the header's wording or a prefix reading of a policy pattern: nothing reads the contract's comments, and the only patterns a test writes into a policy are `tests/test_naming_policy.py:2498`'s fork form `^~[a-z]+$`, which has a `$`, and `tests/test_doctor_validator_verdicts.py:324`'s corrupted `(^open(?:`, which does not compile. - **What pins `scripts/repo_shape.py`.** This repository holds no copy of it and no digest of it. A project's copy is pinned by the shape pin's tree digest (`sorted-ls-tree-r-v1`, computed over the shape's tree at the pinned commit), and `update-shape.py` reaches it as an `upstream-changed scripts/repo_shape.py` row; `contracts/repository-naming.yaml` is in the copy lists of `scripts/shape_materialize.py` (lines 444 and 652) and reaches a project the same way. `fullmatch` needs no import, so no pinned script meets a name it lacks; `tests/test_pinned_copy_text.py` passes (hygiene five below). `tests/test_naming_policy_line_break.py` run on main's production code (`n1202-mut`, a detached tree at `be21751c3` with the new file copied in; sha256 of the file equal to the branch's): **40 failed, 37 passed** (`run-new-main-be21751c3.log`). The 37 that pass are the baselines (21 family names, 6 role names, 6 descendant names, the double-quoted leg, 3 argv names). The 40 that fail, and why: | Row (function) | Failing on main | Because | |---|---|---| | `test_a_name_that_ends_in_a_line_feed_matches_no_family` | 24: `neutral-product-` `openxFactory`, `openXwallet`, `openChart`, `openDox`, `openXdox`; `install-` `xFactory-Hermes-Install`, `Hermes-Install`, `Keycloak-Install`; `domain-descendant-` `MedxChart`, `LedgerxWallet`, `codexFactory`, `MedxGlass`, `codexDox`; `project-leg-` `Atlas`, `Atlas-spec`, `Atlas-code`, `Northwind`, `Northwind-spec`, `Northwind-code`; `family-` `InkRouter`, `Northwind`; `workspace-` `brett-wip`, `scott-wip`, `a1-wip` | `matches(name + "\n")` was the answer for the name | | `test_a_descendant_name_that_ends_in_a_line_feed_has_no_referent` | 6: `MedxChart`, `LedgerxWallet`, `codexFactory`, `MedxGlass`, `codexDox`, `MedxScribe` | `descendant_referents` gave `openChart` and `openxChart`, and so on | | `test_a_forks_descendant_pattern_with_no_dollar_is_read_as_the_whole_name` | 2: `family-pattern`, `split-pattern` | a prefix pattern took `MedxScribe` | | `test_a_forks_leg_pattern_with_no_dollar_is_read_as_the_whole_name` | 2: `role-pattern`, `family-pattern` | a prefix pattern took `Atlas_x` | | `test_the_naming_gate_refuses_a_leg_repository_that_ends_in_a_line_feed` | 3: `assembly`, `spec`, `code` | exit 0 where 1 is expected | | `test_the_naming_gate_refuses_an_argv_name_that_ends_in_a_line_feed` | 3: `Atlas`, `Atlas-spec`, `Atlas-code` | exit 0 where 1 is expected | On the branch all 77 pass. The refusal is, for each: exit 1 and the line `FINDING naming-unclassified: <name>`. **No name without a line feed changes its answer** (measured, not argued): `matches`, `classify` and `descendant_referents` over 66,688 names (every string of up to 5 characters over `A a x X - 1 _`, a space and a line feed, and 11 stems with 12 suffixes, with and without `open`) under 5 declared roles (none, `assembly`, `spec`, `code`, `family`), on main and on the branch: 333,440 rows, **3,225 differ and every one is a name that ends in a line feed; none that does not**; and no name that ends in a line feed matches anything on the branch (`probe_inproc.py` and `sweep.py` in lane 5's `work/n1202/`). `tests/test_naming_policy.py` passes unchanged. Each applied alone to `scripts/repo_shape.py` on the branch's copy in `n1202-mut`, run against the new file, and restored with a sha256 check (`restored True`, and at the end the file is main's bytes again, blob `00759f1e6`): | Mutant | Result | Killed by | |---|---|---| | M1: `descendant_referents`, the family's `_re.fullmatch` put back to `.match` | 1 failed, 76 passed | `test_a_forks_descendant_pattern...[family-pattern]` | | M2: `descendant_referents`, `_split_re.fullmatch` put back to `.match` | 1 failed, 76 passed | `test_a_forks_descendant_pattern...[split-pattern]` | | M3: `matches`, a role's `_re.fullmatch` put back to `.match` | 25 failed, 52 passed | 18 of the every-name rows, `test_a_forks_leg_pattern...[role-pattern]`, and the 3 leg and 3 argv gate rows | | M4: `matches`, a family's `_re.fullmatch` put back to `.match` | 31 failed, 46 passed | all 24 every-name rows, `test_a_forks_leg_pattern...[family-pattern]`, and the 3 leg and 3 argv gate rows | | M5: M1 and M2 together | 14 failed, 63 passed | 6 every-name rows, the 6 descendant rows, both fork descendant rows | | M6: all four sites | 40 failed, 37 passed | the same 40 as on main | No survivor. **M1 and M2 are killed only by the fork rows, and that is the shape of the code, not a gap in the rows:** the two sites of `descendant_referents` stand in series, and the shipped `split_pattern` takes the family pattern's language, so on the shipped data either alone makes the other redundant (M5 is what the shipped-data rows kill). A fork's policy whose one pattern has no `$` is what asks each by itself; it is also the case the contract's new paragraph is written for. Python 3.12.3 (CI runs 3.14; the rows assert lists, tuples and finding lines, nothing that depends on a `repr` or an `ast.dump`), through lane 5's `run10.sh` (gh stub first on PATH, bogus token, empty `GH_CONFIG_DIR`, blank git identity, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null`), git-filter-repo 2.47.0 (CI's pin; `git filter-repo --version` prints `a40bce548d2c`), at head `09697e9c5`, dirty=0: | Run | git | Result | |---|---|---| | the new file, `tests/test_value_pattern_line_break.py` (the sibling it imports two helpers from), `tests/test_naming_policy.py`, and the hygiene five: `test_path_guard_hygiene`, `test_repo_hygiene`, `test_agents_md_codes`, `test_cli_reference`, `test_pinned_copy_text` | 2.43.0 | **751 passed** in 131.18s | | the same files | 2.47.1 (`tools/git247/bin/git`, built from kernel.org's tarball) | **751 passed** in 120.02s | | the neighbours that name `NamingPolicy` or run the naming gate: `test_manifest_validator`, `test_scaffold_referent_chain_links`, `test_chain_pin_sources`, `test_github_name_limits`, `test_adopt_manifest_values`, `test_scaffold_manifest_values`, `test_reader_refusals_named`, `test_pin_source_env_collisions`, `test_family_init_values` | 2.43.0 | **750 passed, 19 skipped** in 383.95s (all 19 are template skips in `tests/test_family_init_values.py`: 16 at `:229`, "this template quotes the placeholder", and 3 at `:301`, "this template quotes `id:`", as rv1266 printed them with `-rs`) | Before the rebase onto `be21751c3` the same files (without the sibling) passed at the then head `f552017f1`: 720 on 2.43.0 and 720 on 2.47.1. **Not run:** the full suite, a real Windows host and macOS, and `test_shape_doctor.py` (it reads the naming validator through the doctor and no name in it ends in a line feed). **Read again by rv1266 at 2026-11-08T17:10Z:** main `46fe6ac19` gives tree `251537e4`, clean, and main `12122952b` gives `c46cbe55`, clean. The new file, `test_value_pattern_line_break`, `test_naming_policy` and the hygiene five passed on that predicted merge (751, git 2.43.0), since `12122952b` changed `tests/test_pinned_copy_text.py`. `git merge-tree --write-tree <other> 09697e9` (git 2.43.0) at 2026-11-08T16:29Z, against main and every open PR that touches one of this PR's files (50 open): | Against | Head | Tree | |---|---|---| | main | `be21751c3` | `836cb7fec` (clean) | | #1249 (`scripts/repo_shape.py`) | `3146c3ca5` | `f41cf1dca` (clean) | | #1171 (`scripts/repo_shape.py`) | `8162b874e` | `29eee887f` (clean) | | #1236 (`scripts/validate-repository-naming.py`, which the new rows run) | `352dcbc96` | `64990151d` (clean) | The later lander takes the refresh. - **`topic_pattern` has no row.** Nothing outside `tests/test_naming_policy.py:422` reads it at main, and the data's `topic.pattern` and `topic.id_pattern` are read by no tool, so a row cannot fail on main for it. The note beside it, and the contract's paragraph, say a reader must use `fullmatch`. - **A project's own copy reaches this through `update-shape.py`.** Until a project takes the new `scripts/repo_shape.py` its `validate-repository-naming.py` and `validate-manifest.py` run the old `.match`. The root's `validate-manifest.py` already refuses a leg `repository:` that ends in a line feed since #1166. - **The refusal prints the name raw.** `naming-unclassified` names the name as typed, so `Atlas\n` ends the finding's first line and the existing text ("These names match none of the families ...") follows after a blank line; a name holding an ESC prints raw there on main too. Not changed: the issue asks that the name be refused by name, and no wording or code moves. - **A fork's data that relied on a prefix reading.** A fork's pattern with no `$` is read as the whole name now, as the contract's header says. The shipped data has none, and no test writes one. - Not touched, read at their call sites: `scaffold-project.py`, `setup-project.py`, `family.py` and `shape_materialize.py` take a name from argv, which `checked_value` refuses first; `validate-family.py` strips it. Review: rv1266, lane 5's independent opus reviewer, which wrote none of #1266: READY at `09697e9c`, H0 of this landing (issuecomment-6724498649), with no MUST or SHOULD; its NIT 2 is #1267, fixed by the stacked #1271. CI (Brett Heap's ruling 27): H0 is the head 09697e9 itself, which passed tests, tests-git-bash and SonarCloud; main has touched none of its files since its base be21751; and the local gate passed on its predicted squash tree 8af5516 over main 3027202: the naming_policy_line_break, adopt_check_throwaway_repos, adopt_e2e, adopt_pins, chain_link_fold, doctor_unsearchable_links, family, path_guard_hygiene, pinned_copy_columns, pinned_copy_text, update_shape_unreadable, validate_family_unreadable, no_auto_maintenance, repo_hygiene, agents_md_codes, cli_reference sets, 1263 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 #1202 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…`family-holder-already-here` say the branch their lines run on, and that `add` line is `_cited`, so each runs as printed from the tracking branch (#1228) (#1264) **#1228: every `add`, `bump` and `remove` line that a `family.py` remedy prints says the branch it runs on, whichever route reached the refusal. The dry runs of `add` and `bump` that end in `member-duplicate-id`, and the `family-holder-already-here` that `init` ends in, now say it as #1201 makes `member-unknown` and `member-already-present` say it, and that `add` line is `_cited`. rv1201's one surviving mutant of #1201's rows, R5, is killed.** **Built on #1201 at `eac177af` (itself on #1117 at `219e57c2`). Both have landed, and this PR is restacked on `main`** (#1117 as `9252ef208`, #1201 as `8cf6477fe`; see "Restacked after #1201 landed"). Its change is two commits: `b54520cea` (5 files, 442 insertions and 57 deletions) and the review round's `43d2e8b26`, 5 files, 503 insertions and 64 deletions in all (`git diff --stat eac177a 43d2e8b`). Against main `370a23cd2`, the restacked head `54b9cb20a` gives the same 5 files, the same lines and the same patch-id. It answers lane 5's review of #1201 (issuecomment-6372152028): SHOULD-1's optional code fix, and NIT-1 to NIT-3. At `eac177af9`, as rv1201 measured it (probes p6, p7, p9) and as this PR's rows show failing there (below), three printed lines were reached with no branch read, named none, and were refused `family-on-tracking-branch` when typed where a fresh clone stands: - **(a) `add --dry-run`'s `member-duplicate-id`.** Under `--dry-run`, `cmd_add` skips `_checked_branch` and still asks `_checked_member_id`. Its remedy printed a `remove` line and a `bump` line and no branch. - **(b) `bump --dry-run`'s `member-duplicate-id`.** `_bump_dry_run` asks `_checked_bumped_id` before anything reads the branch. Its remedy printed a `remove` line and no branch. - **(c) `init`'s `family-holder-already-here`.** Its remedy printed `_add_command`'s line between plain backticks: no branch clause, and not through `_cited`, so under a folder named with a backtick the first span ended at the path's backtick (RV1117's N6 shape). - **`scripts/family.py`, (a) and (b).** `_checked_member_id` and `_checked_bumped_id` take a keyword-only `dry_run`, false by default. `cmd_add` passes `args.dry_run`, and `_bump_dry_run` passes true. The real runs' calls (`_mount_and_pin`, and `cmd_bump`'s) are unchanged, and so are their words. Set, the remedy puts `_off_the_tracking_branch` before its line or lines and ends with `BRANCH_LEFT`, as `member-already-present` does. The clause names "`bump` and `remove` refuse" for (a), whose remedy names both lines, and "`remove` refuses" for (b). Its `switch -c` names `family/remove-<id>`, the branch the `remove` line's own refusal names, so the clause and the refusal after it agree. - **`scripts/family.py`, (c).** The remedy now says the clause with `init`'s own `git -C <holder> switch -c family/add-<Project>`, then the `add` through `_cited`, then `BRANCH_LEFT`. The issue left the branch word to the owner. This PR takes `family/add-<Project>`, bare, as the NEXT STEPS block prints it: quoted, it would read as a value. - Two helpers carry it. `_add_branch_switch` spells that `switch -c` line, and NEXT STEPS now calls it too, with the same bytes as before. `_branch_clause` holds the clause's words around a `switch -c` line already spelled, and `_off_the_tracking_branch` now calls it. - The code comments at the two `member-duplicate-id` asks and `_off_the_tracking_branch`'s docstring now say that a dry run states the refusal before the branch is read, and a real run after it. - **`tests/test_readme_windows_quoting_sentence.py`.** `NAMED` moves one host-quoter call from `_print_next_steps` to `_add_branch_switch`, and `FAMILY_LINES` moves the `switch -c` kind with it. README's sentence already lists `switch -c`, so README.md and `docs/handbook.html` are unchanged. The changed remedies' words appear in no doc. The release notes name `member-duplicate-id` as a code (v1.0.0) and the `family/add-<Project>` spelling (v1.1.0). AGENTS.md and `templates/family-root/` show `git -C <path> switch -c family/add-<Project>` as NEXT STEPS print it. None of that changes. - **`tests/test_family_remedy_lines.py`.** The new rows type each line as printed from the tracking branch. Typed alone, each line is refused `family-on-tracking-branch`. Typed after the clause's `switch -c`, it exits 0, and the holder is clean and its gate green: - (a): `test_add_dry_runs_duplicate_id_lines_run_from_the_tracking_branch`, `[remove]` and `[bump]`; - (b): `test_bump_dry_runs_duplicate_id_remove_runs_from_the_tracking_branch`; - (c): `test_init_holder_already_heres_add_runs_as_printed_after_its_switch`, `[plain]` and ``[a`b]``. - **NIT-1:** `test_a_rows_name_with_a_space_is_one_word_in_both_lines` now asserts the `switch -c` line, `family/bump-irrs`, which is built from the row's `id:`. That kills R5, which builds it from the name and gets `family/bump-member`. - **NIT-2:** `typed()`'s docstring says that it asserts the interpreter's name and does not look it up on PATH. - **`tests/test_family_bump_to_checks.py`.** Its two `member-duplicate-id` rows used to assert that both runs print the same words. They now pin the real run's words as at `eac177af9` and the dry run's with the clause (`both_refused`, `duplicate_id_refusal(dry_run=True)`). - **`tests/test_family_dry_run.py`.** `duplicate-id` leaves the parametrized "same under `--dry-run`" row and gets a row of its own, `test_add_dry_runs_duplicate_id_names_the_branch_the_real_run_has_read`. It pins the same code, detail, stdout and exit for both runs, and the dry run's remedy as the real one with the clause added and `BRANCH_LEFT` at the end. - **NIT-3 is left.** `member-already-present` still suggests `family/bump-<id>` for both of its lines. (a)'s clause likewise names one branch, `family/remove-<id>`, for both its `remove` and its `bump`. Either branch works for both verbs, since anything but the tracking branch does. rv1264 (opus) found this PR READY at `b54520cea` with two NITs (issuecomment-6724775227). The round's commit, `43d2e8b26`, is the PR's second: 2 files, 67 insertions and 13 deletions (`git diff --stat b54520c 43d2e8b`), `scripts/family.py` and `tests/test_family_remedy_lines.py`. With both commits the change is 5 files, 503 insertions and 64 deletions (`git diff --stat eac177a 43d2e8b`). The Goal, `What held on #1201's head`, `What changed` and `Rows that fail on #1201's head` describe `b54520cea`, the first commit. Mutants, Runs, Merge-trees and one bullet of Limits are read again at `43d2e8b26`. - **NIT-1: the fourth bare `"Remediation: "`.** SonarCloud reported it on this PR as python:S1192 (key `AaG7-FM2kL7yTWvgodeV`): the (c) hunk's `"Remediation: "` at `scripts/family.py:2530` was a fourth copy of that literal after #1201's three (`:1713`, `:6577`, `:9497`). `_landing` now builds the clause first, ``clause = _branch_clause(_add_branch_switch(into / family), "`add` refuses")``, and the third argument of the `Refusal` starts `f"Remediation: {clause}"`. #1201's three are untouched, and `grep -n '"Remediation: "' scripts/family.py` lists exactly those three. SonarCloud's analysis of `43d2e8b26` is not read here. - **The refusal's words are byte for byte what they were.** A probe (`probe/remedy.sh`) ran `init` over a family folder that already holds its holder, once with `b54520cea`'s `family.py` and once with this commit's, swapped into the same detached tree, from the same working directory and by the same script path, for a plain folder and for one named ``a`b``. The two refusal lines (the `REFUSED` line and the remediation) are identical under `cmp`: plain 1156 bytes, ``a`b`` 1148 bytes, each with exit 2 and an empty stdout. The swapped run printed one `WARNING ... DIRTY` line before them, which the swap itself caused (it dirtied that tree); the file was restored with its sha256 checked (`88ad8766f4e2...`) and `git status` clean. - **The rows that pin the text pass.** `test_init_holder_already_heres_add_runs_as_printed_after_its_switch[plain]` and ``[a`b]`` compare the remediation with the expected words and pass at `43d2e8b26` (gate A, below), on git 2.43.0 and 2.47.1. - **NIT-2: M10a and M10b are killed.** They survived because every fixture row's `id:` is its name lowercased, so a branch built from the name is the same word. Two rows in `tests/test_family_remedy_lines.py`, after (a) and (b)'s dry-run rows, rename a row by hand to a valid name that is not its id, and assert the clause's `switch -c` line as printed: - `test_add_dry_runs_clause_branch_is_made_from_the_rows_id`: `IRRS` renamed `Orrs`. `add --dry-run` of `IRRS2` is refused `member-duplicate-id`, and the clause names `family/remove-irrs`, not `family/remove-orrs`. - `test_bump_dry_runs_clause_branch_is_made_from_the_other_rows_id`: `IRSS` renamed `Osss`. `bump --dry-run` of `IRRS` to the commit whose `project.yaml` records `irss` is refused the same way, and the clause names `family/remove-irss`, not `family/remove-osss`. - The hand edit of the row's `project:` line is a helper, `renamed_by_hand(holder, project, name)`, which the ``IR RS`` row (RV1201's NIT-1) now calls too, so it is written once. That row's asserts are unchanged. - **Each row fails on its mutant and passes at the head.** M10a alone fails the first row and only that row (`family/remove-orrs` against `family/remove-irrs`), and M10b alone fails the second row and only that row (`family/remove-osss` against `family/remove-irss`): 1 failed, 18 passed in each run of the file's 19 ids. `scripts/family.py` came back to sha256 `b7f0d8c5f2db...` after each, with `git status` clean. - **Both rows fail on #1201's production code.** With `eac177af9`'s `family.py` (sha256 `b8199379c23f...`) swapped in under this commit's tests, in the same detached tree: 2 failed, each on `[] == [the switch line]`, since #1201's dry runs print no clause. Restored (sha256 `b7f0d8c5f2db...`), `git status` clean. #1201 landed as the squash `8cf6477fe`. Its final head was `d1ecf815`, a fast refresh of `24b6a0af`. #1117 had landed before it, as `9252ef208`, and #1201's head already carried #1117's final head, its squash and main (`85909e973`, `24b6a0af6`, `d1ecf8159`), so the first step of the restack plan this body named on 2026-11-08 was #1201's own. Once #1201's branch was deleted, GitHub retargeted this PR to `main`, where it was CONFLICTING. The restack is three merges on top of `43d2e8b26`, with no rebase, amend or force: | step | merged | commit | result | |---|---|---|---| | 1 | #1201's final head `d1ecf815` | `5b5e652a9` | clean; tree `913e2e4b5`, as `git merge-tree` predicted | | 2 | #1201's squash `8cf6477fe` | `db82ce1d4` | 21 blocks in 4 files, all #1201's own, each resolved to this branch's side; the tree stays `913e2e4b5` | | 3 | main `370a23cd2` (#1164) | `54b9cb20a` | clean, no block to resolve; tree `245b4d057`, as `git merge-tree` predicted on git 2.43.0 and 2.47.1 | - **Step 2's resolutions.** The 21 blocks are 7 in `scripts/family.py`, 2 in `tests/test_family_bump_to_checks.py`, 10 in `tests/test_family_remedy_lines.py` (add/add) and 2 in `tests/test_readme_windows_quoting_sentence.py`. All four are files of #1201's squash. Each block takes this branch's side, because that side already holds all of #1201: step 1 merged `d1ecf815`, and the squash's tree is `d1ecf815`'s tree (`4daf6ffbc` both). So the merge changed no file (`git diff 5b5e652 db82ce1` is empty). The blocks arise only because the squash has another history, so git meets #1201's lines from both parents. - **Step 3.** Main was still the squash itself when steps 1 and 2 were made, so step 3 was first a no-op. #1164 (for #1110, lane 1's) landed after, as `370a23cd2`. It changes `scripts/family.py` (121 insertions, 19 deletions), `templates/family-root/scripts/siblings.py`, `tests/test_family_gitmodules_unreadable.py` (new) and `tests/test_path_guard_hygiene.py`. Git merged `scripts/family.py` by itself, and no block needed a resolution: - #1164's hunks are the `.gitmodules` readers (`_gitmodules_on_disk`, `_gitmodules_names`, `_sections_giving`, `_stages_as`), `PinRollback`, and two new constants. None is one of this PR's functions. - #1164 gives `_stages_as` a third argument, and nothing in this PR calls it. - `gitmodules-unreadable`'s remedy names no `add`, `bump` or `remove` line, so #1228's rule does not reach it. - Main's side arrives whole: `git diff db82ce1 54b9cb2` has #1164's own patch-id (`6e4840bd5eb9` stable, `f7efc1a3949e` verbatim, as `git diff 8cf6477 370a23c` has). - **The diff is the reviewed one.** The PR's diff against main is rv1264b's reviewed change, `eac177af9..43d2e8b`, line for line: | diff | files | lines | `git patch-id --stable` | `--verbatim` | |---|---|---|---|---| | reviewed, `git diff eac177a 43d2e8b` | 5 | +503/-64 | `1b6607fb4fb6` | `cd18d2c2923a` | | restacked, `git diff 370a23c 54b9cb2` | 5 | +503/-64 | `1b6607fb4fb6` | `cd18d2c2923a` | - Per file, both ids match for each of the five: `scripts/family.py` `c7ba1df7d359`/`5493f2e74dc9`, `tests/test_family_bump_to_checks.py` `aae56e7a6cc6`/`1f54d542931a`, `tests/test_family_dry_run.py` `b616211c203d`/`9e7124f21c75`, `tests/test_family_remedy_lines.py` `1820a6895cf4`/`9f3e05c13738`, `tests/test_readme_windows_quoting_sentence.py` `dc8eb3e39264`/`1d81e0e45ca9`. The same ids come out of git 2.43.0 and 2.47.1. - The four test files have the same blobs on both sides of both diffs. - `scripts/family.py`'s pre-image is main's, so its hunks start later by the lines main added above them: 6 lines (#1166's `105b5daf9`, for #1139) up to `cmd_add`, and 89 from `_checked_bumped_id` on (46 more from #1098's `ac5f28d2a`, for #1086, 37 from #1164). With the `index` lines and the hunk line numbers masked, the two diffs are byte-identical (888 lines); unmasked, they differ in 34 lines, all `index` and `@@` lines. - No hunk differs, so no file's patch-id changed, and no resolution in the three merges touched this PR's lines. - **The PR lists 12 commits now.** A squash does not carry its branch's commits by ancestry, so GitHub also lists #1117's and #1201's own commits (`10dc011c9`, `eac177af9`, `219e57c28`, `8cb9c729a`, `85909e973`, `24b6a0af6`, `d1ecf8159`) beside this PR's two and its three merges. Its diff is the 5 files above. The commit's new and changed rows (73 ids: the 5 new `test_family_remedy_lines.py` ids and the NIT-1 row, the 2 `test_family_bump_to_checks.py` rows, `test_family_dry_run.py`'s new row and the 18 ids of its parametrized row, and the 46 ids of `test_readme_windows_quoting_sentence.py`) were run with `eac177af9`'s `scripts/family.py` (sha256 `b8199379c23f...`) swapped in under this commit's tests, in a second worktree. The file was restored after the run and its sha256 checked: `88ad8766f4e2...`, matching, with `git status` clean. Result: **9 failed, 64 passed**, every failure an `AssertionError` on the remedy text: | row | on `eac177af9`'s `family.py` | |---|---| | (a) `[remove]`, `[bump]` | fail: the remedy ends "...not in the family." with no clause and no `BRANCH_LEFT` | | (b) | fail, the same way | | (c) `[plain]`, ``[a`b]`` | fail: the remedy ends "There is no --force." with no clause | | `test_family_dry_run.py`'s new row | fail, as (a) | | the 2 `test_family_bump_to_checks.py` rows | fail on the dry run's assert; the real run's assert just before it passes, so the real run's words are unchanged | | `NAMED[scripts/family.py]` | fail: there is no `_add_branch_switch` | | the NIT-1 row, the 18 parametrized ids, the other 45 sentence ids | pass, as they should: #1201 already builds the branch from the `id:` (the assert kills R5, below), and the rest pin unchanged behaviour | Each was applied alone in the second worktree at `b54520cea` (clean), run through lane 5's runner, and restored, with the sha256 of every touched file checked and `git status` clean after each. The #1228 mutants ran against all 73 ids above (84 with the rest of `test_family_remedy_lines.py`); M8 also ran against `tests/test_git_bash_dialect.py` and `tests/test_family_switch_branch_exists.py`, which read NEXT STEPS. | id | mutation | result | |---|---|---| | M1 | (a)'s clause dropped | killed, 3: (a) `[remove]`, `[bump]`, `test_family_dry_run.py`'s new row | | M2 | (b)'s clause dropped | killed, 3: (b), the 2 `test_family_bump_to_checks.py` rows | | M3 | (c)'s clause dropped | killed, 2: (c) `[plain]`, ``[a`b]`` | | M4a | `dry_run` ignored in `add` (always false) | killed, 3, as M1 | | M4b | `dry_run` ignored in `bump` (always false) | killed, 3, as M2 | | M5 | (c) without `_cited`: the `add` between plain backticks | killed, 1: (c) ``[a`b]`` | | M6 | (a)'s branch is `bump`'s, not `remove`'s | killed, 3, as M1 | | M7 | (a) without `BRANCH_LEFT` | killed, 3, as M1 | | M8 | (c)'s placeholder branch quoted for the shell | killed, 2: (c) both; the two NEXT STEPS files pass (the shell reads the quoted word the same) | | M9 | (c) without `BRANCH_LEFT` | killed, 2: (c) both | | M10a | (a)'s branch from the row's name, not its `id:` | **killed**, 1: `test_add_dry_runs_clause_branch_is_made_from_the_rows_id` (it survived at `b54520cea`, 84 passed) | | M10b | (b)'s branch from the row's name, not its `id:` | **killed**, 1: `test_bump_dry_runs_clause_branch_is_made_from_the_other_rows_id` (it survived at `b54520cea`, 84 passed) | | M11 | (a)'s `dry_run` inverted: the real run gets the clause | killed, 3, as M1 | | M12 | (c)'s `switch -c` names `--into`, not the holder | killed, 2: (c) both | | M14 | (a)'s clause names one verb, "`remove` refuses" | killed, 3, as M1 | | M15 | `_branch_clause` prints its `switch -c` bare | killed, 11, across every clause row | | M3b | NIT-1's `f"Remediation: {clause}"` without its clause | killed, 2: (c) `[plain]`, ``[a`b]`` | | R1 | rv1201's: `_cited` always prints the command bare | killed, 15 of the file's 17 | | R2 | rv1201's: the typed owner is the first path segment | killed, 6 | | R3 | rv1201's: `_family_line` quotes for `sh` on every host | killed, `NAMED[scripts/family.py]` | | R4 | rv1201's: `member-already-present` loses its clause | killed, 4 | | R5 | rv1201's: `member-already-present`'s branch from the name | **killed** by NIT-1's assert, `test_a_rows_name_with_a_space_is_one_word_in_both_lines` (it survived at `eac177af9`) | | R6 | rv1201's: `member-already-present` names the typed project | killed, 4 (3 in `test_family.py`) | | R7 | rv1201's: README and the handbook drop `cd` from the sentence | killed, `test_the_kinds_of_family_lines_are_the_ones_the_sentence_lists` | M1 to M9 are n1228's, and they cover the issue's list: the clause dropped from each of (a), (b) and (c), `dry_run` ignored, and `_cited` dropped from (c). M10a to M15 are the first commit's own, and M3b the second's. R1 to R7 are rv1201's again: R1 to R6 against `test_family_remedy_lines.py`, with R6 also against `test_family.py`'s spelling row, and R3 and R7 against the sentence file. `scripts/family.py` came back to sha256 `88ad8766f4e2...` after each run, README.md to `71d9fecafbd6...` and `docs/handbook.html` to `1d01f0823e60...` after R7, and `git status` was clean after the last one. At `43d2e8b26`, M10a, M10b and M3b each ran alone in the same detached tree, clean at that commit, over `tests/test_family_remedy_lines.py`'s 19 ids (1 failed and 18 passed, 1 failed and 18 passed, 2 failed and 17 passed), with `scripts/family.py` back to sha256 `b7f0d8c5f2db...` after each and `git status` clean after the last. The other rows' results are those of `b54520cea`, which rv1264 re-ran and matched. ### At the restacked head `54b9cb20a` (after #1201 landed) All through lane 5's `run10.sh`, in the environment the next section names. Every `START` line reads `head=54b9cb20ac18be672fedad4f69e648f97a85e4e8` and `dirty=0`, on Python 3.12.3, with git-filter-repo 2.47.0 (CI's pin) on PATH. Each run held at most 100 ids, taken from a fresh collect at the head. The 2.47.1 runs put lane 5's git 2.47.1 first on PATH, and each log's first line reads `git version 2.47.1`. - **The gate** (32 files, 1712 ids, 18 runs on each git): - this PR's four test files; - every file that names `family.py`'s remedy lines or the codes and functions this PR changes, and `test_windows_paths.py` for the family landing: `test_bump_remedies_family_root.py`, `test_remove_add_remedies_family_root.py`, `test_family.py`, `test_family_add_member_id.py`, `test_family_printed_quoting.py`, `test_family_init_landing.py`, `test_family_init_values.py`, `test_family_members_not_a_list.py`, `test_family_bump_to_a_tag.py`, `test_family_switch_branch_exists.py`, `test_family_tracking_branch.py`, `test_git_bash_dialect.py`, `test_branch_left_bump_leg_setup.py`, `test_bump_leg_paste_lines.py`, `test_dry_run_parity.py`, `test_windows_paths.py`, and the `test_validate_family_*` five (`branch_step`, `duplicates`, `remedies_typed`, `typed_states`, `unnamed_mounts`); - the hygiene five (`test_repo_hygiene.py`, `test_agents_md_codes.py`, `test_cli_reference.py`, `test_pinned_copy_text.py`, `test_path_guard_hygiene.py`) and `tests/test_no_auto_maintenance.py`; - and #1164's new `tests/test_family_gitmodules_unreadable.py`. - **#1164's `family.py` files** (2 files, 106 ids, 2 runs on each git): `tests/test_family_py_unreadable.py` and `tests/test_family_bump_remove_rollback.py`. #1164's own gate ran them for the `family.py` code it changes, so main's side is shown to hold on the merged tree. | run | git | result | logs | |---|---|---|---| | the gate, 1712 ids in 18 runs | 2.43.0 | **1691 passed, 21 skipped**, none failed (1056.2s in all) | `work/n1228g/logs/g243-gate-part-00.log` to `-17.log` | | the gate, 1712 ids in 18 runs | 2.47.1 | **1691 passed, 21 skipped**, none failed (1047.2s in all) | `work/n1228g/logs/g2471-gate-part-00.log` to `-17.log` | | #1164's two `family.py` files, 106 ids in 2 runs | 2.43.0 | **106 passed** (99.6s) | `work/n1228g/logs/g243-extra-part-00.log`, `-01.log` | | #1164's two `family.py` files, 106 ids in 2 runs | 2.47.1 | **106 passed** (98.1s) | `work/n1228g/logs/g2471-extra-part-00.log`, `-01.log` | - **The 21 skips are the same on both gits:** - 16 at `tests/test_family_init_values.py:229`: "this template quotes the placeholder: the run is fine, and test_a_quoted_value_is_held_as_typed runs it"; - 3 at `tests/test_family_init_values.py:301`: "this template quotes `id:`: the derived id reads back"; - 2 at `tests/test_no_auto_maintenance.py:222`: "the session began with GIT_CONFIG_GLOBAL set, and its file includes that one" (the runner sets `GIT_CONFIG_GLOBAL=/dev/null`). - **No run failed, and none was run again.** `tests/test_family_dry_run.py::test_bump_dry_run_of_a_repair_to_the_pinned_commit_is_a_move[digest]`, which failed once before the restack (see Limits), passed on both gits. The full suite was not run. ### Before the restack (`b54520cea` and `43d2e8b26`) All through lane 5's `run10.sh`: a `gh` stub first on PATH, `GH_TOKEN` bogus, an empty `GH_CONFIG_DIR`, a blank git identity, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null`, `EMAIL` exported, and git-filter-repo 2.47.0 (CI's pin) on PATH. Every `START` line reads `head=b54520cea716b44df1a95139a46901a478d616fd` and `dirty=0`, with three exceptions. The swapped run and each mutant read `dirty=1`, the one file changed, except R7, which changes two and reads `dirty=2`. The predicted merge's run names its own head. Python 3.12. The second commit's runs, marked in the table, read `head=43d2e8b26...` and `dirty=0`, except the mutants' and the swapped runs, which read `dirty=1`, and the pre-commit run of the new rows, which read `head=b54520cea...` and `dirty=2`. - **Gate A** (13 files): the issue's eight (`test_family_remedy_lines.py`, `test_readme_windows_quoting_sentence.py`, `test_remove_add_remedies_family_root.py`, `test_bump_remedies_family_root.py`, `test_family.py`, `test_family_add_member_id.py`, `test_family_bump_to_checks.py`, `test_family_printed_quoting.py`), `test_family_dry_run.py`, which this commit changes, and four of the hygiene five (`test_repo_hygiene.py`, `test_agents_md_codes.py`, `test_cli_reference.py`, `test_pinned_copy_text.py`). The fifth, `test_path_guard_hygiene.py`, is not at this head. #1201 sits on #1117's older head `10dc011c9`, whose base `6da757cbe` predates #1111. #1117's current head, `219e57c28`, has it from its merge of main. It runs on the predicted merge instead. - **Gate B** (9 files), which name the changed functions and codes: `test_family_init_landing.py`, `test_git_bash_dialect.py`, `test_family_switch_branch_exists.py`, `test_family_tracking_branch.py`, `test_validate_family_branch_step.py`, `test_validate_family_remedies_typed.py`, `test_validate_family_duplicates.py`, `test_family_members_not_a_list.py`, `test_family_bump_to_a_tag.py`. | run | git | result | log | |---|---|---|---| | the commit's new and changed rows (73 ids) | 2.43.0 | **73 passed** in 69.23s | `logs/rows.log` | | the same 73 ids, `eac177af9`'s `family.py` swapped in | 2.43.0 | **9 failed, 64 passed** (above) | `logs/baserows.log` | | gate A | 2.43.0 | 1 failed, 662 passed in 413.56s (the one failure is in Limits) | `logs/gateA243.log` | | gate A again | 2.43.0 | **663 passed** in 509.19s | `logs/gateA243b.log` | | gate A | 2.47.1 | **663 passed** in 421.81s | `logs/gateA247.log` | | gate B | 2.43.0 | **389 passed** in 261.02s | `logs/gateB243.log` | | gate B | 2.47.1 | **389 passed** in 340.68s | `logs/gateB247.log` | | gate A, gate B and `test_path_guard_hygiene.py` (23 files) on the predicted merge, scratch commit `e22074def` (below), `head=e22074def...` | 2.43.0 | **1174 passed** in 790.16s | `logs/merged243.log` | | the row that failed once, alone, 10 runs of its 2 ids | 2.43.0 | **20 of 20 passed** | `logs/rep-head243-*.log` | | *The review round, `43d2e8b26`:* the two new rows and the ``IR RS`` row, before the commit (tree dirty) | 2.43.0 | **3 passed**, 16 deselected in 7.50s | `work/n1228e/logs/newrows-head.log` | | the two new rows, `eac177af9`'s `family.py` swapped in | 2.43.0 | **2 failed**, 17 deselected | `work/n1228e/logs/newrows-on-eac177af9.log` | | M10a, M10b, M3b, each alone, over `tests/test_family_remedy_lines.py` | 2.43.0 | 1 failed 18 passed; 1 failed 18 passed; 2 failed 17 passed | `work/n1228e/logs/mut-*.log` | | gate A (13 files), the head | 2.43.0 | **665 passed in 379.55s** | `work/n1228e/logs/gateA243.log` | | gate A (13 files), the head | 2.47.1 | **665 passed in 372.06s** | `work/n1228e/logs/gateA247.log` | | gate A and `tests/test_path_guard_hygiene.py` (14 files) on the predicted restack, scratch commit `f168938c4`, `head=f168938c4...` | 2.43.0 | **787 passed in 401.58s** | `work/n1228e/logs/restack243.log` | | `tests/test_family_init_landing.py`, the file of `family-holder-already-here`'s detail | 2.43.0 | **19 passed in 8.34s** | `work/n1228e/logs/init-landing243.log` | The 2.47.1 runs put lane 5's git 2.47.1 first on PATH, and each log's first line reads `git version 2.47.1`. No run had a skip. The full suite was not run. Gate A of the second commit is 665 ids, the first commit's 663 and the two new rows; git-filter-repo 2.47.0 (CI's pin) was on PATH in every run. `tests/test_path_guard_hygiene.py` is still not at this head (see Gate A above), so gate B (the first commit's 9 files) was not run on the second commit, which the brief did not ask for. It changes `_landing`'s remedy and one test file only. Read on 2026-11-09 at 23:00:17Z, after fetching main at `370a23cd2`, with every open PR's head read from `gh pr list` (38 open). Of them, one other touches this PR's five files: #1274 (`scripts/family.py`). The results are the same on git 2.43.0 and 2.47.1. | `git merge-tree --write-tree <other> 54b9cb2` | exit | result | |---|---|---| | main, `370a23cd2` | 0 | clean, tree `245b4d057fef`: the restacked head's own tree, since main is its parent | | #1274, `136b38d12` | 0 | clean, tree `907bfe588d05` (with main: clean, `cdbdd63151f0`) | - **The other 36 open PRs merge with this head as they merge with main.** Each head was merged with `54b9cb20a` and with `370a23cd2`. 34 are clean both ways. #1209 conflicts both ways in `tests/test_adopt_plan_paths_spelled.py`, and #1237 in `adopt-project.py` and `tests/test_adopt_check_throwaway_repos.py`. Neither is one of this PR's files, so neither conflict is this PR's. - **The restack plan this body named on 2026-11-08 is done.** #1117 landed as `9252ef208` and #1201 as `8cf6477fe`, and #1201's head had taken #1117's three merges. This branch took #1201's three ("Restacked after #1201 landed"). Read from `gh pr view` after the push, at 23:21:05Z: the base is `main`, GitHub gives the PR as MERGEABLE with 5 files and 12 commits, and `closingIssuesReferences` lists #1228 only. - **Before the restack,** on 2026-11-08 at about 17:55Z, `43d2e8b26` merged cleanly with #1201's and #1117's heads, and conflicted with main and with #1164's head only in `docs/handbook.html`, the stack's conflict, which #1117's head mended (`work/n1228e/logs/merge-trees-2.log`). The predicted restack on main `9729315f1` (scratch commit `f168938c4`) was clean, and its gate passed (787 passed, in Runs). - **The clause's branch is built from the row's `id:`, and two rows now tell it from the name** (mutants M10a and M10b, killed since `43d2e8b26`; see the review round). Every other fixture row's id is its project lowercased, so only a row renamed by hand tells them apart. The old gap was harmless in effect, as rv1201 found for R5: the clause's `switch -c` need only leave the tracking branch. - **NIT-3 is left** (above). It is the same question as (a)'s one branch for two verbs. - **The interpreter is asserted, not looked up** (NIT-2). The docstring says so. rv1201 typed the lines through bash, dash and zsh with `python3` from PATH, 12 of 12. - **The clause says "a branch other than the tracking branch".** It is worded to be true on any branch, as #1201's is, since a dry run says the refusal before the branch is read. A person already off the tracking branch reads a clause that does not apply to them. - **`init`'s `<Project>` stays a placeholder** in the clause's `switch -c`, as NEXT STEPS print it. `add`'s own refusal names the branch lowercased; any spelling works. - **One row failed once, in code this commit does not touch.** In the first gate A on 2.43, `tests/test_family_dry_run.py::test_bump_dry_run_of_a_repair_to_the_pinned_commit_is_a_move[digest]` failed: - **What it saw.** The dry run said it would commit the repair. The real run then said `nothing to do: InkRouter/IRRS is already pinned at ab0fea7e32a2 and every fact agrees.` and exited 1. - **Where that is decided.** The real run's answer comes from `_nothing_to_record`, a `git diff --quiet HEAD` made after `write_lf` rewrites `family.yaml` in place. The row's hand edit keeps the file's size. - **The commit leaves that path alone.** It changes no code of `_nothing_to_record`, `_rewrite_members`, `force_stage` or `tree_digest`. Its only `tree_digest` lines are one sentence of `_bump_dry_run`'s docstring, rewrapped. The row has no duplicate id, so the `dry_run` flag in `_checked_bumped_id` never shows. - **Every other run passed it:** the second gate A on 2.43, gate A on 2.47.1, the predicted merge's run, and 20 of 20 runs alone. - **The cause is not found.** A probe of the plain race (a same-size, in-place rewrite right after `git add` and `git commit`, then `git diff --quiet HEAD`) missed none of 200 rewrites on 2.43.0 and none of 200 on 2.47.1. The failure's log is `logs/gateA243.log`, and the probe is `probe/racy.py`. - **`tests/test_path_guard_hygiene.py` runs at the head now.** Before the restack it was not at the PR's head and ran on the predicted merges only (see Runs). This PR adds no file-system guard: its `family.py` hunks add no `is_file`, `is_dir`, `exists`, `is_symlink` or `os.path` call. - **The runs are on the bench's Python 3.12; CI runs 3.14.** No test line this commit adds uses `ast.dump`, `repr(`, `sys.version` or `!r`. The 442 added lines are ASCII and at most 79 columns. None of the commit's new asserts joins conditions with `and` or `or`. The one such assert in `test_family_dry_run.py` (line 1431) is `eac177af9`'s line 1394, moved down. - **Not run:** the full suite, a real Windows host, and macOS. - **#1117 and #1201 have landed,** and the restack plan this body named is done ("Restacked after #1201 landed"). Review: rv1264, lane 5's independent opus reviewer, which wrote none of #1264: READY at `b54520ce` (issuecomment-6724775227), with no MUST or SHOULD and two NITs; the review round `43d2e8b2` fixes both. Then rv1264b, lane 5's independent sonnet reviewer, which wrote none of it: READY at `43d2e8b2` (issuecomment-6725329517); its NIT-A (the Goal paragraph) is corrected in the body. Then rv1264c, lane 5's independent sonnet reviewer, which wrote none of it: READY at `54b9cb20`, the restack onto main, with no MUST or SHOULD (issuecomment-6754554921); the PR's diff is the reviewed change by patch-id. `tests` at `54b9cb20` failed only on the 13 rows of tests/test_adopt_symlink_target_bytes.py that #1189 broke on main and #1293 fixed, so the head was refreshed onto the fixed main as `2c72492e` (a merge only), H0 of this landing once its own checks pass. CI (Brett Heap's ruling 27): H0 is the head 2c72492 itself, which passed tests, tests-git-bash and SonarCloud; main has touched none of its files since its base a20d4bd; and the local gate passed on its predicted squash tree 597f402 over main f981468: the family_bump_to_checks, family_dry_run, family_remedy_lines, readme_windows_quoting_sentence, validate_family_unreadable, path_guard_hygiene, pinned_copy_text, no_auto_maintenance, repo_hygiene, agents_md_codes, cli_reference sets, 653 passed, 2 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 #1228 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…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]>
…ter that does not print, in a value no pattern reads is refused by that key's code where it was `manifest ok` or `family ok`, and the five keys a person types keep #255's rule (#1205) (#1282) A double-quoted `"...\n"` in a key no pattern reads was `manifest ok` or `family ok`, exit 0, in `validate-manifest.py` and `validate-family.py`. A `name` so written split the ok line in two (`manifest ok: Atlas`, then ` (atlas), 3 legs`; `InkRouter` for a family, then `: family (declared by family.yaml)`), and a leg's `path` so written passed this step and failed `make validate` two steps later, at `validate-pins.py`'s `pin-gitlink-absent`. It was so for `name`, `reference`, `elected_by`, a spec or code leg's `path`, `shape.repository` and `shape.digest_algorithm` in `project.yaml`, and for `name`, `org`, `repository`, `created_by`, `tracking_branch`, `shape.repository` and `shape.digest_algorithm` in `family.yaml`. Each such key now gives one finding under its own code, naming the key, the value, the character and the way through: for a leg's `path` of `'spec\n'` it says the value holds U+000A, a line break, and ends `Write it on one line.`, where any character that is not a line break ends `Write it without that character.` A line break is named first in a value, wherever it is, as #255 names it. The rule is the ruling made on the issue, not `isprintable()` in every key. The free-text keys, `name`, `elected_by` and `reference` in `project.yaml` and `name` and `created_by` in `family.yaml`, refuse what #255's `unwritable_reason` refuses (`scripts/shape_materialize.py`): a line break (CR, U+0085 and U+2028 among them), a lone surrogate, a byte that is not UTF-8, a bidi control or another control character. They keep U+00A0 and U+200C, which the tools write (`name: "Atlas\xa0One"`, `elected_by: "Ali\u200cReza"`, a Persian name joined by U+200C), so a project already scaffolded does not fail after `update-shape.py` brings in the new validator, and refusing them would overturn #255. Every other key the issue lists refuses what `str.isprintable()` refuses: a spec or code leg's `path`, `shape.repository` and `shape.digest_algorithm`, and in `family.yaml` `org`, the holder's own `repository`, `tracking_branch`, `shape.repository`, `shape.digest_algorithm` and each member pin's `digest_algorithm`. The adoption records' `path` and `resolution` are exempt, since `adopt-project.py` writes them with control characters and no-break spaces on purpose, and a key whose own check already refuses such a value (`id`, the dates, the `repository` patterns, `tracking_branch` and a leg's `branch` in `project.yaml`, a `name` surrogate, `neutral_product_pins` and `referent_chain`) is not asked again. A leg's `path` finding and a family `name` finding are said alone, so a `name` is not then classified as well (`naming-unclassified`). Each key keeps its code, so the scaffold's, adoption's and `family.py init`'s refusals still name the flag: `manifest-name`, `manifest-reference`, `manifest-elected-by`, `manifest-leg-path`, `manifest-shape-repository`, `family-name`, `family-org` and `family-created-by`. Six keys had no code and get one: `manifest-shape-digest-algorithm`, `family-repository`, `family-tracking-branch`, `family-shape-repository`, `family-shape-digest-algorithm` and `member-pin-digest-algorithm`; AGENTS.md names none of the codes beside them, so it does not change. In `validate-family.py` the rule is in `_check_envelope` (a new `_check_characters`, and the `name`, `org` and `created_by` checks), which is all `family.py init` asks, so `--no-members` asks it too and `--pins` does not. Each validator keeps its own copy of the rule (#610), standard library only, as data (`UNWRITABLE`, `LINE_BREAK` and `UNPRINTABLE`) read by `_held_kind`, `_first_held` and `_held_character`. Not changed: `digest_algorithm == sha256` (`banana` is still `manifest ok`, since no tool reads the value) and the issue's other optional items, an alphabet for a leg's `path`, `org` or the holder's `repository` and a white-space rule for `tracking_branch`; the other keys of a member row under `--no-members`, which reads `family.yaml`'s envelope alone and asks of a member row only the pin's `digest_algorithm`; a member row's `id:` (#1204); `id`, the dates and the `repository:` patterns (#1166); and `family.py`'s `FINDING_PLACEHOLDER`, which has no row for the six new codes, so a finding under one is refused in the validator's words without a flag to point at. `tests/test_manifest_validator.py` and `tests/test_family.py` pin each key at a line feed and a carriage return (one finding of that key's code, naming the code point), the keys held to `isprintable()` at U+00A0 and at a character that does not print, and the free-text keys at what the rule of #255 refuses and keeps, with a guard in each that rewrites every scalar line of a scaffolded `project.yaml` or a holder's `family.yaml` as `"<value>\n"` and fails any line not refused by name, and `test_each_copy_of_the_rule_answers_as_255_does`, which asks each validator's copy every code point against `unwritable_reason` and `str.isprintable`, and each mutant run on the rule, its call sites, its remedy, the line break named first and a `name` finding said alone is killed. Closes #1205 Lane: openreposhape-3 (openRepoShape-3) Co-Authored-By: Claude Opus 5.5 <[email protected]>



Goal
The value patterns the issue names refuse a value that ends in a line feed, by name, as #1126 (#1017) makes
COMMIT_RE,SHA256_REandCOMMIT_40do:DATE_REandQUALIFIED_REinvalidate-manifest.pyandvalidate-family.py,MEMBER_REinscripts/family.py,DATE_REinscripts/shape_advisory.pyandREPOSITORY_REinupdate-shape.py;PROJECT_ID_RE, read withfullmatchwhere the two validators andfamily.py addread an id from a file.A shape pin's
source_repository:that is neither a path on this machine nor anowner/reponame is refused in the pin's name, not--upstream's. Values without a line feed keep their outcome, and no refusal code is added or renamed. Two inputs do move from one existing code to another (see "Behaviour changed", below).What this PR does not cover, and the title does not claim:
scripts/repo_shape.pyreads fromcontracts/repository-naming.yaml, whichvalidate-repository-naming.pystill reads with.match;update-upstream-not-a-repo, which still says--upstreamwhen a pin names a folder that exists and is not a repository.Both are follow-ups, with the other findings of the independent review, under "Follow-ups (not in this PR)".
This does not need #1126 and does not touch its files or its test file.
What held on main
Measured on main
038dafba(Python 3.12.3, git 2.43.0) by a probe of each tool, before any change. Each value is written in the file as a YAML double-quoted"...\n", which the reader takes as the value and a line feed.project.yaml(validate-manifest.py)id: "atlas\n"FINDING manifest-topic: topic is 'xf-project-atlas', expected 'xf-project-atlas\n' derived from id 'atlas\n', exit 1project.yamlelected_on: "2026-09-02\n"manifest ok, exit 0project.yamlrepository: "testorg/Atlas-spec\n"manifest ok, exit 0family.yaml(validate-family.py)id: "inkrouter\n"family ok: InkRouter (inkrouterand a line break, exit 0family.yamlcreated_on: "2026-09-04\n"family ok, exit 0family.yamlrepository: "InkRouter/IRRS\n"FINDING member-repository-name: ... whose name is 'IRRS\n', exit 1project.yaml, read byfamily.py addid: "irqs\n"id: "irqs\n"; the holder's gate then saidfamily okcontracts/shape-pin.yaml,update-shape.py checkwith no--upstreamsource_repository: "opensoft/openRepoShape\n"REFUSED unsafe-value: --upstream is 'opensoft/openRepoShape\n', exit 2source_repository: "opensoft/open Repo"REFUSED update-upstream-unresolvable: --upstream 'opensoft/open Repo' is neither ..., exit 2source_repository: "-opensoft/openRepoShape"REFUSED unsafe-value: --upstream is '-opensoft/openRepoShape', exit 2adopt-project.py check)id: "northwind\n"FINDING plan-manifest-invalid: id is 'northwind\n', which the project's own validate-manifest.py refuses: manifest-topic: ..., exit 1;executerefused it, exit 2, before any legIn-process on the same main:
repo_shape.PROJECT_ID_RE.match('atlas\n'),shape_advisory.DATE_RE.match('2026-09-02\n')andREPOSITORY_RE.match('a/b\n')each matched, anddate.fromisoformat('2026-09-02\n')raisedValueError.What changed
DATE_REandQUALIFIED_REintemplates/assembly-root/scripts/validate-manifest.pyandtemplates/family-root/scripts/validate-family.pyend in\Z. So doMEMBER_REinscripts/family.py(the third spellingtests/test_family_member_name.pyholds equal to the twoQUALIFIED_RE),DATE_REinscripts/shape_advisory.pyandREPOSITORY_REinupdate-shape.py.PROJECT_ID_REkeeps its$. Every id refusal prints its text (must match ^[a-z0-9][a-z0-9-]*$, pinned in six test files), the validators run against each project's own copy ofrepo_shape.py, and its definition sits inside repo_shape.py and bootstrap.py:COMMIT_RE,SHA256_REandCOMMIT_40end in\Z, not$, so a pin'scommit:ortree_sha256:that ends in a line break is refused as not 40 or 64 hex by every validator andadopt-project.py(#1017) #1126's hunk. The three callers that read an id from a file ask it withfullmatchinstead:validate-manifest.py(manifest-id),validate-family.py(family-id) andfamily.py's reading of a member'sproject.yaml(member-bad-id, whichaddnow says before anything is mounted).update-shape.py.open_upstream(spec, pin_path=None)takes the pin the value was read from, whichpreparepasses when no--upstreamwas given. Thenupdate-upstream-unresolvablesays<root>/contracts/shape-pin.yaml: `source_repository:` is '...', which is neither a path on this machine nor an `owner/repo` name, with a remedy to write the pin's field or pass--upstream, andchecked_valuenames the same field. Code kept:update-upstream-unresolvable, the existing code for a value that is not anowner/reponame. A line feed now reaches it, since the pattern no longer takes one. Before,checked_valuerefused it asunsafe-value.One existing test line:
tests/test_family_init_values.pyfinds validate-family'sDATE_REline by its text, which now ends\Z.One existing stand-in: the
temporariesfixture intests/test_update_shape_unreadable.pystands in foropen_upstreamwithdef opening(spec), which the new two-argument call refused withTypeError: ... takes 1 positional argument but 2 were given. It now takespin_path=Noneand hands it on to the realopen_upstream, sotest_a_read_refused_in_prepare_closes_the_upstream[check|apply]asks what it asked before.The rows are in a new file of their own,
tests/test_value_pattern_line_break.py.A second guard, in a second commit (
5102b4294, a test only, no production file). The first guard holds the four pattern names this PR ends in\Z, and nothing heldPROJECT_ID_RE, which keeps its$.test_every_reader_of_the_id_pattern_is_in_the_tablereads every tracked.pyoutsidetests/withast(it runs none) and holds each call of a method ofPROJECT_ID_RE(PROJECT_ID_RE.x(...)orrepo_shape.PROJECT_ID_RE.x(...)) to the tableID_READERS:fullmatchreaders of an id from a file (validate-manifest.py,validate-family.py,scripts/family.py);matchit, each with its reason: argv--idinscaffold-project.pyandscripts/family.py, wherechecked_valuerefuses a line feed after the pattern; argv--idinadopt-project.py, which the project's ownvalidate-manifest.pyrefuses (adopt-manifest-invalid, below;ID_READERSstill gives it thechecked_valuereason); andadopt-project.py's twoplan-bad-idreaders, of the plan'sid:and of the id derived fromlegs.assembly, which a line feed never passes (below).A new reader of
PROJECT_ID_RE,fullmatchincluded, fails it by file and method until it is listed inID_READERSwith its reason. The table is exact both ways, so a reader taken away fails it too.Left as they are, and why:
PROJECT_ID_RE(--idinscaffold-project.py,family.py initandadopt-project.py). The first two hold the id tochecked_valueafter the pattern, which refuses a line feed asunsafe-valuenaming--id, andtests/test_derived_id_refusals.pypins that answer for them.adopt-project.pynever callschecked_valueon--id:planwith--idset tonorthwindand a line feed exits 2 withadopt-manifest-invalid, in the words of the project's ownvalidate-manifest.py(manifest-id), and writes no plan (lane 5's re-check, issuecomment-6371408915, NIT 2; measured onplanonly);adopt-project.py's reading of a plan'sid::checkandexecutehold it to the project's ownvalidate-manifest.py, which refused it on main (above) and now names it inmanifest-id's words. It is the same value, refused under the same code,plan-manifest-invalid, before any leg exists. The id derived fromlegs.assemblyis read with.matchtoo, and a line feed inlegs.assemblyisunsafe-valuebefore that id is asked (the review measured both, on main and here alike). This keeps the open PRs onadopt-project.py(24 at 12:02Z) clear;PIN_ARG_RE, andNAME_RE/REF_RE/PATH_REinsetup-project.py, as the issue says;update-upstream-not-a-repostill says--upstream. A pin's value reaches it only when it names a path that exists, not through the pattern.Behaviour changed, stated plainly, and what the issue's Verify means by "No refusal code changes": the issue's Verify line reads as no code added or renamed, and none is. Two inputs do move from one existing code to another, exit 2 both before and after:
update-shape.py --upstream "opensoft/openRepoShape<LF>"wasunsafe-valueand is nowupdate-upstream-unresolvable, still naming--upstream;source_repository:that ends in a line feed, with no--upstream, wasunsafe-valuenaming--upstreamand is nowupdate-upstream-unresolvablenaming the pin's field.No test pinned either old answer: every gate below passed.
family.py add --memberis stripped beforeMEMBER_RE, soaddanswers as before.Not changed, seen while measuring: with
--upstreampassed,update-shape.pydoes not read the pin'ssource_repository:throughREPOSITORY_REat all, and it keeps the value as the upstream's repository name.validate-family.pydoes not hold a member row'sid:toPROJECT_ID_RE; it compares the row with the member's manifest. Neither is a$question. Both are under "Follow-ups (not in this PR)".Rows failing on main
All in
tests/test_value_pattern_line_break.py, run against main's production code: the five production files swapped in place fromorigin/main(961640c68), then put back with their sha256 matching (dirty=5in the run's START line is those five files). On the head5102b4294(30 rows) the result is 20 failed, 10 passed in 23.12s, git 2.43.0. The 10 that pass are baselines: the seventest_a_pattern_takes_its_valuerows, the spelling-table guard and the two double-quoted-without-a-line-feed rows.The first 19 are the first commit's rows (19 failed, 10 passed in 22.12s on its 29 rows at
038dafba). The independent review reproduced them from main's bytes of the same five files (19 failed, 10 passed in 26.78s, the same 19 ids). The 20th,test_every_reader_of_the_id_pattern_is_in_the_table, is the second commit's: it fails on main because the three readers of an id from a file are.matchthere, not.fullmatch.test_a_pattern_refuses_its_value_and_a_line_feed[manifest-DATE_RE]test_a_pattern_refuses_its_value_and_a_line_feed[manifest-QUALIFIED_RE]test_a_pattern_refuses_its_value_and_a_line_feed[family-DATE_RE]test_a_pattern_refuses_its_value_and_a_line_feed[family-QUALIFIED_RE]test_a_pattern_refuses_its_value_and_a_line_feed[family.py-MEMBER_RE]test_a_pattern_refuses_its_value_and_a_line_feed[shape_advisory-DATE_RE]test_a_pattern_refuses_its_value_and_a_line_feed[update-shape-REPOSITORY_RE]test_a_manifest_value_that_ends_in_a_line_break_is_a_finding[id]test_a_manifest_value_that_ends_in_a_line_break_is_a_finding[elected_on]test_a_manifest_value_that_ends_in_a_line_break_is_a_finding[leg-repository]test_adopt_check_names_a_plan_id_that_ends_in_a_line_break_as_an_idtest_a_family_value_that_ends_in_a_line_break_is_a_finding[id]test_a_family_value_that_ends_in_a_line_break_is_a_finding[created_on]test_a_family_value_that_ends_in_a_line_break_is_a_finding[member-repository]test_add_refuses_a_member_whose_id_ends_in_a_line_breaktest_a_pins_source_that_is_no_owner_repo_is_named_as_the_pins[line-feed]test_a_pins_source_that_is_no_owner_repo_is_named_as_the_pins[space]test_a_pins_source_checked_value_refuses_is_named_as_the_pinstest_an_upstream_passed_with_a_line_feed_is_named_as_passedtest_every_reader_of_the_id_pattern_is_in_the_tableMutants
13 of 13 killed. Each mutant was applied alone to one file of the branch's production bytes (the same bytes as the first commit and as the head, which adds a test only), the rows were run, and the file was put back with its sha256 checked (
restored=yesfor all 13). Each run istests/test_value_pattern_line_break.pyplustests/test_family_member_name.py::test_every_spelling_of_the_member_name_rule_is_the_same_pattern, git 2.43.0.DATE_REback to$validate-manifest.pytest_a_pattern_refuses_its_value_and_a_line_feed[manifest-DATE_RE],test_a_manifest_value_that_ends_in_a_line_break_is_a_finding[elected_on]QUALIFIED_REback to$validate-manifest.py...[manifest-QUALIFIED_RE],...[leg-repository],test_every_spelling_of_the_member_name_rule_is_the_same_pattern.matchvalidate-manifest.pytest_a_manifest_value_that_ends_in_a_line_break_is_a_finding[id],test_adopt_check_names_a_plan_id_that_ends_in_a_line_break_as_an_idDATE_REback to$validate-family.py...[family-DATE_RE],test_a_family_value_that_ends_in_a_line_break_is_a_finding[created_on]QUALIFIED_REback to$validate-family.py...[family-QUALIFIED_RE],...[member-repository],test_every_spelling_of_the_member_name_rule_is_the_same_pattern.matchvalidate-family.pytest_a_family_value_that_ends_in_a_line_break_is_a_finding[id]MEMBER_REback to$scripts/family.py...[family.py-MEMBER_RE],test_every_spelling_of_the_member_name_rule_is_the_same_pattern.matchscripts/family.pytest_add_refuses_a_member_whose_id_ends_in_a_line_breakDATE_REback to$scripts/shape_advisory.py...[shape_advisory-DATE_RE](its pattern row alone:date.fromisoformatrefuses the line feed after the pattern, so no tool row sees it)REPOSITORY_REback to$update-shape.py...[update-shape-REPOSITORY_RE],test_a_pins_source_that_is_no_owner_repo_is_named_as_the_pins[line-feed],test_an_upstream_passed_with_a_line_feed_is_named_as_passedpreparepasses no pinupdate-shape.pytest_a_pins_source_that_is_no_owner_repo_is_named_as_the_pins[line-feed]and[space],test_a_pins_source_checked_value_refuses_is_named_as_the_pinschecked_valuenames--upstreamagainupdate-shape.pytest_a_pins_source_checked_value_refuses_is_named_as_the_pinsupdate-shape.pytest_a_pins_source_that_is_no_owner_repo_is_named_as_the_pins[line-feed]and[space]No mutant is added for the stand-in in
tests/test_update_shape_unreadable.py: it is a test change.The independent review re-ran M3, M8, M11 and M12, and one mutant of its own (X1:
preparenames the pin even when--upstreamis passed). All five were killed, and each file was put back with its sha256 checked. The other nine of the 13 are this writer's runs alone.The second commit's guard: 6 of 6 probes caught. Each was applied alone to one tracked file at
5102b4294,test_every_reader_of_the_id_pattern_is_in_the_tablewas run, and the file was put back with its sha256 checked (restored=yesfor all six). The first commit's guard,test_every_spelling_of_a_value_pattern_is_in_the_table, was run with each plant too: it passes every one of them, which is the gap the second guard closes.PROJECT_ID_RE.match(value)reader appendedupdate-shape.py('update-shape.py', 'match'): 1is more than the table holdsrepo_shape.PROJECT_ID_RE.search(value)reader appendedscripts/shape_advisory.pyfullmatchback tomatchtemplates/assembly-root/scripts/validate-manifest.pyfullmatchback tomatchtemplates/family-root/scripts/validate-family.pyfullmatchback tomatchscripts/family.pyRuns
The second commit
5102b4294(dirty=0), Python 3.12.3, with the same stubgh, bogus token and no global git config:tests/test_value_pattern_line_break.pytests/test_value_pattern_line_break.pytests/test_pinned_copy_text.py,tests/test_path_guard_hygiene.py,tests/test_repo_hygiene.py,tests/test_agents_md_codes.py,tests/test_cli_reference.pyThat commit changes only the test file (62 lines added, no assert that joins conditions with
andoror, ASCII), so the first commit's runs below are not repeated: they hold the production files and every other test file, and those are unchanged. CI on5102b4294, and an independent look at the second commit, were not done when this was written.The independent review of the first commit (rv1166c, READY, read-only) reports these gates on
2593952c9, all passing: the stand-in gate's 6 files (298 passed), the new file on 2.47.1 (29 passed), the five hygiene files (306 passed), 15 more test files that name a changed function, pattern or code (1611 passed, 19 skipped) andtests/test_shape_doctor.py(445 passed, 3 skipped). It also read CI on that head at about 20:04Z:tests(the full suite on 3.14),tests-git-bash,packageand SonarCloud all passed.The first commit's gates ran on
2593952c(dirty=0), Python 3.12.3, with the realghunreachable (a stub first onPATH, a bogus token) and no global git config:tests/test_family.py,tests/test_update_shape_pr_base.py,tests/test_update_shape_unreadable.py,tests/test_update_shape_header_comments.py,tests/test_update_shape_messages.pyand the newtests/test_value_pattern_line_break.pytests/test_value_pattern_line_break.pytests/test_pinned_copy_text.py,tests/test_path_guard_hygiene.py,tests/test_repo_hygiene.py,tests/test_agents_md_codes.py,tests/test_cli_reference.pyThe two shards, on the uncommitted tree holding the same production bytes as the first commit (the 7 files' sha256 checked before and after), git 2.43.0: the validators' test files, the
REPOSITORY_RE/source_repositoryfiles and theupdate-shape.py,shape_advisory.pyandfamily.pyfiles, 125 in all.Every failure and setup error is in the five existing files of the first row of the table above, which all pass on the first commit:
test_a_read_refused_in_prepare_closes_the_upstream[check|apply], theopening(spec)stand-in under the two-argument call. The stand-in is fixed in the first commit.update-conflictonscripts/validate-family.py("not a verbatim copy ... at the pinned commit"). This is an artifact of an uncommitted tree:tests/test_family.py'supstream_clonecommits the working tree into its clone, whilefamily.py initpins the holder at the realHEAD, so an uncommittedtemplates/family-root/file is never verbatim at its pin. On the first commit they pass.Every other file of the two shards passed on these production bytes, so the shards were not re-run.
Merge-trees
git merge-tree --write-tree <other> 5102b4294(git 2.43.0) at 2026-10-23T12:08Z, after re-fetching main (still961640c6; read again at 12:10Z, just before the push) and re-listing the open PRs at 12:02Z (55 open). Main has moved from the038dafbathat this body measured to961640c6by one file,docs/release-notes/v1.2.0.md. Each open PR that touches one of this PR's 8 paths, at its current head, plus #1126:961640c64613729516ffdad7961ascripts/family.py4d1ff951758810dc011cscripts/family.pyscripts/family.pymerges clean; conflict indocs/handbook.htmlonly, which this PR does not touch (see below)8dfa32bdvalidate-family.pycb2ec10736464c1f80cfscripts/repo_shape.pyand tests)e82c8945ac37a7bfee1bupdate-shape.pya710870d1ffc89486f69scripts/shape_advisory.py2d3e3e1ef43db75babeevalidate-manifest.pya82ac3b47a3f66e68f94scripts/shape_advisory.py4abeb7b3866574096eb4scripts/family.pyee285e1cb8cf5aa0f116validate-family.pyaa32d41e6e2ccc8a87eeupdate-shape.py,tests/test_update_shape_unreadable.py25711eb1cac4eac177afscripts/family.pyscripts/family.pymerges clean; conflict indocs/handbook.htmlonly (see below)removethat bothmember-duplicate-idremedies name and theaddthatbump'smember-unknownnames carry--family-root <holder>, quoted for the host, so each runs as printed (#1005) #1117 and family.py: theadd,bumpandremovelines its remedies name begin with the interpreter and the script's path, quote the row's name, fill in the family's org, say the branch they run on, andmember-already-presentprints itsremove(#1127) #1201 conflict indocs/handbook.htmlalone. family.py: theadd,bumpandremovelines its remedies name begin with the interpreter and the script's path, quote the row's name, fill in the family's org, say the branch they run on, andmember-already-presentprints itsremove(#1127) #1201 is stacked on family.py: theremovethat bothmember-duplicate-idremedies name and theaddthatbump'smember-unknownnames carry--family-root <holder>, quoted for the host, so each runs as printed (#1005) #1117 (their merge-base is family.py: theremovethat bothmember-duplicate-idremedies name and theaddthatbump'smember-unknownnames carry--family-root <holder>, quoted for the host, so each runs as printed (#1005) #1117's head10dc011c). Each of them against origin/main alone gives the same conflict in the same file, so it is theirs: family.py: theremovethat bothmember-duplicate-idremedies name and theaddthatbump'smember-unknownnames carry--family-root <holder>, quoted for the host, so each runs as printed (#1005) #1117's, from its older base6da757cb, which family.py: theadd,bumpandremovelines its remedies name begin with the interpreter and the script's path, quote the row's name, fill in the family's org, say the branch they run on, andmember-already-presentprints itsremove(#1127) #1201 inherits.applyputs every byte back under anyOSErrorafter its first write, says what it put back on stderr, and raises the error as it was, so a file gone between itsstatand its read, a broken pipe or anEIOno longer leaves the tree half-written behind a traceback (#1173) #1187 and family.py: theadd,bumpandremovelines its remedies name begin with the interpreter and the script's path, quote the row's name, fill in the family's org, say the branch they run on, andmember-already-presentprints itsremove(#1127) #1201 are new since the first merge-trees. update-shape.py:applyputs every byte back under anyOSErrorafter its first write, says what it put back on stderr, and raises the error as it was, so a file gone between itsstatand its read, a broken pipe or anEIOno longer leaves the tree half-written behind a traceback (#1173) #1187 sharestests/test_update_shape_unreadable.pywith this PR; its diff adds or removes no line that namesopen_upstream,def openingorREPOSITORY_RE, so it brings no one-argument stand-in for the two-argument call. That was read for all 55 open heads at 12:12Z; only this PR's own lines name them.PROJECT_ID_RE, which the second guard counts: the lines each of the 55 open heads adds or removes outsidetests/,docs/and*.mdwere read at 12:04Z. Only this PR's own name it, and family.py: theadd,bumpandremovelines its remedies name begin with the interpreter and the script's path, quote the row's name, fill in the family's org, say the branch they run on, andmember-already-presentprints itsremove(#1127) #1201's one newMEMBER_RE.fullmatchis another pattern. So a sibling landing first does not move the guard's table.Follow-ups (not in this PR)
Each is a candidate for its own issue. They come from the independent review (rv1166c, READY at
2593952c9, issuecomment-6352173084), which measured each of them on main and at the head unless the item says it did not. The review's finding numbers are in brackets.The naming-policy patterns [1].
scripts/repo_shape.pyreads the families, the roles and the topic pattern ofcontracts/repository-naming.yamlwith.match(family["_re"].match(name),family["_split_re"].match(name),role["_re"].match(name), andtopic_pattern, which defaults to^xf-project-[a-z0-9-]+$).validate-repository-naming.py --project project.yamlruns in the root template'sMakefileandvalidate.yml. At the head, and on main, it exits 0 on a legrepository: "testorg/Atlas\n"and prints the line feed inside its table;-specand-codethe same. The project's gate as a whole still fails, becausevalidate-manifest.pynow refuses that manifest.update-upstream-not-a-repowith a pin [3]. With no--upstream, a pin whosesource_repository:names a folder that exists and is no repository (the review measuredcontractsandscripts/repo_shape.py) isREFUSED update-upstream-not-a-repo: --upstream contracts exists but is not a git repository, exit 2, on main and here.pin_pathis in scope atupdate-shape.py:686-687, so that refusal can name the pin asupdate-upstream-unresolvablenow does.A pin's line feed when
--upstreamis passed [9].update-shape.py check --upstream <clone>over a pin whosesource_repository:ends in a line feed exits 0,nothing to do. The value is kept asupstream.repository, which reaches the README shape line's check,apply's commit subject and the pull request words (update-shape.py:2525,3017and5121). The review measuredcheck, notapply. It belongs with the previous item.A member row's
id:[4]. On main,addof a member whoseproject.yamlreadsid: "irqs\n"commits the rowid: "irqs\n", and the holder'svalidate-family.pythen saysfamily ok. Under mutant M8 (this branch with main's.matchinadd) the same row is written, and the gate still saysfamily ok. By code reading, not measured end to end:validate-family.pycompares a row's id with the member manifest's bystrequality (member-id-mismatch,validate-family.py:1608), and_check_member_ids_uniquedoes the same, so neither asksPROJECT_ID_REof a row. This PR makesaddrefuse such a member, so no new holder gets such a row.Values that no pattern reads [8]. The review's sweep found these
manifest okorfamily ok, exit 0, with a trailing line feed, at the head and on main alike:project.yaml:name, a spec or code leg'spath,shape.repositoryandshape.digests.digest_algorithm;family.yaml:org, the family's ownrepository,tracking_branch, and the shape's and each member pin'sdigest_algorithm.No
^...$pattern reads them, so they are not this PR's. A leg'spathis checked only by_leg_path_findings, which asks no pattern, and the family'stracking_branchis refused inproject.yaml(manifest-tracking-branch, U+000A) but not infamily.yaml.shape.commitandtree_sha256with a line feed are alsomanifest ok; that is repo_shape.py and bootstrap.py:COMMIT_RE,SHA256_REandCOMMIT_40end in\Z, not$, so a pin'scommit:ortree_sha256:that ends in a line break is refused as not 40 or 64 hex by every validator andadopt-project.py(#1017) #1126's.The first commit's message, and what the review measured
The first commit's message says "the three readers of an id from a file ask it with
fullmatch(manifest-id,family-id,member-bad-id)". That is true of those three, but it reads as if there were no others [2]. What the review measured instead:adopt-project.pystill reads the id derived fromlegs.assembly(:6780) and the plan'sid:(:6791), bothplan-bad-id, with.match;id: "northwind\n"isplan-manifest-invalid, now inmanifest-id's words. A plan with noid:andlegs.assembly: "NorthWind\n"isREFUSED unsafe-value: legs.assembly is 'NorthWind\n', exit 2, before the derived id is asked, on main and here alike.So it is the wording alone that overstates. The second commit's
ID_READERSlists both readers with that reason.The title's pin clause is the narrower one (the pin's name only where the value is no path and no
owner/reponame), and two inputs change fromunsafe-valuetoupdate-upstream-unresolvable(see "Behaviour changed", above).Closes #1139
Lane: openreposhape-5 (openRepoShape-5)
🤖 Generated with Claude Code
Summary by Sourcery
Reject trailing line feeds in validated identifiers and repository-related values, and attribute invalid shape-pin sources to the pin that supplied them.
Bug Fixes:
source_repository:values against the pin field rather than the absent--upstreamoption.Enhancements:
Tests: