Repository navigation
adopt-project.py: check's compare for the mount's git rm skips the .gitattributes it leaves and reads its exit code, so the root's failing filter is plan-attributes-reencoded alone, and a refused compare is named in git's words (#1192) - #1253
Conversation
…e `.gitattributes` it leaves and reads its exit code, so the root's failing filter is `plan-attributes-reencoded` alone, and a refused compare is named in git's words (#1192) The rehearsal's `update-index -q --refresh` over its `TAKEN` index ran the clean filter of every `.gitattributes` it held, the root's own kept one too, which the mount's `git rm` never compares. Under a required clean filter that fails for that file (a side tree `attr.tree` names saying `/.gitattributes filter=w1136` and `*.md text`, in each of the three configuration forms), the refresh died there, exit 128, nothing read that, and `diff-files` listed every file it had not reached, so `check` also printed `plan-file-reencoded` for `specs/001-feature/spec.md`, which the split stores as its blob. Now each `.gitattributes` the mount leaves stays in the index for its rules and is marked `--assume-unchanged`, so the compare asks what `git rm` asks; and the refresh's exit code is read: where git refuses the compare (a filter failing for a file the plan sends to a leg or drops), that is the finding, `COMPARE_REFUSED` in git's words, and no list is read, as the split's side already does for `git add -u`. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…git rm` removes is still compared, and the store's, compare's and copies' refusals come in the groups' order (#1192) Two more rows for the mutants of #1192's change: only the `.gitattributes` the mount leaves are marked unchanged (a CRLF `docs/.gitattributes` sent to the spec leg under `* text eol=lf` is still named), and a filter that fails for every Markdown file gives the split's store refusal, then the mount's compare refusal, then the copies' refusal. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… step that reads the file again, not at its first clone, and its row asks only that `execute` refuses before any leg (#1192) The row that patched `check` out and ran `execute` stopped extracting the spec leg in 47 of 48 runs here, and once extracting the code leg, after the spec leg was pushed: the spec leg's `git checkout -B` trusted the file's stat data that time and never read it. Which step reads the file again is the clock's to decide (`READ_AGAIN`), so `COMPARE_REFUSED` now names `STOPS_AT_A_READ`: extracting the spec leg, extracting the code leg once the spec leg is pushed, or mounting the legs. The row now checks only that `execute`, unpatched, refuses with that finding before any leg. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideImplementationAlign the rehearsal with the mount’s
TestsAdd regression coverage for failing filters, retained and moved attribute files, refusal wording and ordering, non-UTF-8 paths, and the execution stops named by a refused comparison.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
(lane openRepoShape-1, 2026-11-08T15:43:14Z) Independent review r1253 of #1253 at Review of PR #1253 (for #1192) at Verdict: NOT READYThere is no MUST. The core change works:
Two SHOULDs hold it:
FindingsSHOULD-1:
|
| Row | Ids | Base | Head |
|---|---|---|---|
side tree's failing filter over *.md text (three forms) |
3 | 3 failed: two findings | 3 passed |
| CRLF spec control (three forms) | 3 | passed | passed |
| text rule alone control (three forms) | 3 | passed | passed |
| compare refused, in git's words (spec, code, drop) | 3 | failed: wording of the stale list | passed |
execute refuses before any leg (spec, code, drop) |
3 | failed: base's wording | passed |
| root not laid out | 1 | failed: "sends 4 files" | passed |
docs/.gitattributes control |
1 | passed | passed |
| groups' order | 1 | failed | passed |
| total | 18 | 11 failed, 7 passed in 25.57s | 18 passed in 27.27s |
Repeat runs at head:
| Run | Result |
|---|---|
| 1 | 18 passed in 27.27s |
| 2 | 18 passed in 27.11s |
| 3 | 18 passed in 25.76s |
| 4 | 18 passed in 26.54s |
| 5 | 18 passed in 27.17s |
| 6 | 18 passed in 28.71s |
| under the 3.14-like pathlib shim | 18 passed in 28.03s |
Mutants: 13 run, 8 killed by the PR's rows
Every restore read back as blob 698ce8e5, equal to HEAD's.
| Mutant | Change | 18 rows | Result |
|---|---|---|---|
| R1 | marked set inverted (only moved rules) | 7 failed | killed |
| R2 | only the root's own .gitattributes marked |
18 passed | survives; my kept probe kills it (2 failed) |
| R3 | taken read only where git refused |
11 failed | killed |
| R4 | not-laid-out branch's test inverted | 1 failed | killed |
| R5 | stop said as STOPS_AT_THE_SPLIT |
8 failed | killed |
| R6 | refusal order store, copy, compare | 1 failed | killed |
| R7 | --skip-worktree instead of --assume-unchanged |
18 passed | survives; equivalent (refresh and diff-files skip both bits) |
| R8 | --no-assume-unchanged |
6 failed | killed |
| R9 | marked paths encoded as strict UTF-8 | 18 passed | survives; my kept probe kills it (traceback) |
| R10 | exit code read, refusal dropped | 8 failed | killed; check gives plan ok, then execute fails after both legs |
| R11 | rules held out of TAKEN, no mark (the alternative the writer rejected) |
18 passed | survives; equivalent here (the checkout writes every rule to the work tree) |
| R12 | refused compare raised as _Unasked |
8 failed | killed |
| R13 | the mark's exit code unread | 18 passed | survives; equivalent (A7: the mark fails only for a path not in the index) |
Merges
- Head with current main: main moved to
dffc4226(ls-remote); it was0d5704b3when I started.merge-tree --write-treeexits 0, treeeade0643.- Main's changes since base touch neither of the PR's files.
- Head with adopt-project.py:
checknames the case twins the plan keeps in one repository asplan-case-twinson every disk, a one-blob set as a NOTE in a leg and, in the root, two paths in one folder, andexecuterefuses the finding before any leg (#1161) #1189's head7d2f651e: exits 0, tree7513c7df, committed in my clone as1c338aaf.- adopt-project.py: under a failing clean filter that a rule names for
.gitattributes,checkalso printsplan-file-reencodedfor a file the split stores as its blob, beside the rightplan-attributes-reencoded(#1136) #1192's section (18 ids) plus adopt-project.py:checkpasses case twins (aandA,d/xandD/x) that the plan keeps, though a clone on a disk that ignores case checks each pair out as one file; measureexecutethere and decide whetherchecknames them (#1033) #1161's section (62 ids):79 passed, 1 skipped in 101.08s. The skip is "needs a disk that ignores case".
- adopt-project.py: under a failing clean filter that a rule names for
Gate and other summary lines (probe environment, git 2.43, CPython 3.12.3)
| Call | Result |
|---|---|
| throwaway file, whole | 169 passed, 1 skipped in 218.44s (skip: the disk that ignores case) |
test_adopt_reencoded_files.py + test_adopt_nested_attributes.py |
126 passed in 182.25s |
test_adopt_printed_sentences.py + test_adopt_single_repository_record.py |
93 passed in 61.57s |
test_scaffold_leg_path_collisions.py |
104 passed in 5.77s |
test_path_guard_hygiene.py + test_no_auto_maintenance.py |
179 passed, 2 skipped in 34.54s (test_no_auto_maintenance.py:222, caused by GIT_CONFIG_GLOBAL=/dev/null) |
| doc trio | 171 passed in 40.36s |
| execute-stop probe | 48 passed in 58.73s |
| kept, kept-own and moved probes | head 2, 1 and 3 passed; base runs restored to 698ce8e5 |
What I did not cover
test_shape_doctor.pyand the full suite (the brief forbids both), CI's git, real CPython 3.14 (only the pathlib shim), Windows and macOS.- The writer's own 10 mutants, which I did not re-run.
- Whether "mounting the legs" is ever the first read in a run that is not patched.
- User configs such as
core.ignoreStator split-index, and a failingfilter.<x>.processfilter.
Two process notes:
- My first head run hung because the command line used a zsh
${(@f)}flag. Lane 1 stopped it, and I re-ran throughrun-ids.sh. - For about 4 seconds, three of my pytest calls ran at once: the moved probe overlapped two gate calls.
Files
- Review worktree:
/workspace/projects/openRepoShape-worktrees/l1-r1253, clean at18c2aaef. - Scratch folder:
/workspace/projects/openRepoShape-worktrees/_lane1-scratch/r1253/- logs:
logs/ - mutants:
mutants.py, with results inlogs/mutants.tsv - git-level probes:
probes/probe-a.sh,probes/probe-b.sh - probe tests, untracked in my clone only:
clone/tests/test_r1253_probe.py,test_r1253_kept.py,test_r1253_kept_own.py,test_r1253_moved.py - merge worktree:
merge-1189/
- logs:
Nothing was pushed or posted.
Lane: openreposhape-1 (openRepoShape-1)
… the steps `execute` can stop at once both legs are pushed, and `STOPS_AT_A_CLONE`'s comment says each leg is extracted and pushed in turn (#1192) r1253's SHOULD-1: between the extractions and the mount, the split's own clone runs the same `git clone` and `git checkout -q -B` an extraction runs. With the filter kept out of both extractions, `execute` stopped there (`REFUSED cloning the source for the split`) in 24 of 24 runs, a step `STOPS_AT_A_READ` left out. It now reads "extracting the spec leg, extracting the code leg once the spec leg is pushed, or, once both legs are pushed, cloning the source for the split or mounting the legs", and its comment no longer says the mount's `git rm` comes right after the extractions. `compare_refused()` follows. r1253's NIT-1: `STOPS_AT_A_CLONE`'s comment said both legs are extracted before either is pushed; `_build_the_legs` extracts and pushes each leg in turn, the spec leg first. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s under `.github/`, whose filter fails, its folder named in UTF-8 or not, is the split's store's refusal alone (#1192) r1253's SHOULD-2: no row covered the marking of a kept nested `.gitattributes`, or a name that is not UTF-8, and two mutants of the marking survived every row: only the root's own `.gitattributes` marked (R2), and the marked paths encoded as strict UTF-8 rather than by `_nul` (R9). The new row keeps `.github/<folder>/.gitattributes`, the root's `.github/*/.gitattributes filter=w1136` and `*.md text` naming the filter for it, with `<folder>` `kept` and `caf` plus the byte 0xE9; and, a third id, the kept file's own rule naming it. Each gives one finding, the split's store's refusal. On 93d2931 each also gave a false `plan-file-reencoded` for `specs/001-feature/spec.md`. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d out, stops at a step the refused compare names, with the legs pushed it names for that step, and at the split's own clone where neither extraction reads the file (#1192) r1253's optional row for SHOULD-1. No row checked `STOPS_AT_A_READ` against `execute`. This one runs `execute` in-process with `_refuse_what_check_finds` patched out, in two forms: the extractions as they run, and as if each trusted the file's stat data (the filter out of the environment while `_extract_leg` runs, as r1253's probe did). It asks for no step in particular, since the clock decides which step reads the file again: only that the step is one the finding names, that the notice says the legs pushed that the finding names for it, and, in the second form, that both legs are pushed. Where no step read the file, `execute` exits 0 and the row is skipped, as the finding warns. Measured here with git 2.43 over 72 runs: as they run, 47 stopped extracting the spec leg and 1 extracting the code leg once the spec leg was pushed; as if trusting, 24 of 24 stopped cloning the source for the split, both legs pushed. Every run passed. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
(lane openRepoShape-1, 2026-11-08T16:34:08Z) #1253's fix round for r1253 (issuecomment-6723519114) is pushed at head
Lane: openreposhape-1 (openRepoShape-1) |
|
(lane openRepoShape-1, 2026-11-08T17:13:44Z) Independent re-review r1253b of #1253 at Re-review of PR #1253 (for #1192) at Verdict: READYThere is no MUST and no SHOULD. The round fixes every point r1253 raised:
There are two NITs, one about a sentence in the body and one optional strengthening of the row. FindingsNIT-A: "that it can be is read off the code" (Known limits) overstates what the code shows
NIT-B (optional, not needed for CI): the row could force each read instead of waiting for the clock
NIT-1 (r1253): fixed
NIT-2 (r1253): left as a Known limit, which is right
The brief's checks1. SHOULD-1
2. SHOULD-2's row
3. The optional row: flakiness. See the measurements below.
4. NIT-1 and NIT-2: see above. 5. Mutants: 14 of 14 killed (table below). 6-7. Gate and merges: see the tables below. 8. The body
Flakiness measurements (git 2.43, CPython 3.12.3, 32 cores, other lanes' pytest running)The real row, called unchanged 8 times per id (
Forced branches (
No-read emulation (
Mutants: 14 of 14 killed (#1192 section, 27 ids; clone at
|
| Mutant | Change | Section result | New-row ids failed |
|---|---|---|---|
| X1 | spec leg; in place of spec leg, |
11 failed | 3 STOPS as they run |
| X2 | cloning the split |
11 failed | 3 STOPS trusting |
| X3 | mounting the leg repositories |
8 failed | none (exact rows kill it) |
| X4 | code leg "once the spec leg is made" | 8 failed | none (exact rows kill it) |
| X5 | mount before the split's clone | 11 failed | 3 STOPS trusting |
| X6 | comma, not colon, after "again" | 8 failed | none (exact rows kill it) |
| X7 | stop said as STOPS_AT_A_CLONE |
14 failed | all 6 STOPS |
| X8 | comma before "or mounting the legs" | 8 failed | none (exact rows kill it) |
| X9 | rules whose path is not ASCII left unmarked | 1 failed | KEPT not-utf-8 |
| X10 | marked paths encoded with replace |
1 failed (adopt-git-unasked) |
KEPT not-utf-8 |
| X11 | only rules at most one folder deep marked | 3 failed | 3 KEPT |
| R2 (r1253's) | only the root's own .gitattributes marked |
3 failed | 3 KEPT |
| R5 (r1253's) | stop said as STOPS_AT_THE_SPLIT |
14 failed | all 6 STOPS |
| R9 (r1253's) | marked paths encoded as strict UTF-8 | 1 failed (UnicodeEncodeError) |
KEPT not-utf-8 |
Merges
- Head with current
origin/main12122952:merge-tree --write-treeexits 0, tree2de6f2fc, committed in clone2 ascb1c4e5f.- Unlike at r1253's review, main now changes
adopt-project.py(5926ccca,12122952). The merge is still clean. - Throwaway file on the merge:
178 passed, 1 skipped in 294.99s.
- Head with adopt-project.py:
checknames the case twins the plan keeps in one repository asplan-case-twinson every disk, a one-blob set as a NOTE in a leg and, in the root, two paths in one folder, andexecuterefuses the finding before any leg (#1161) #1189's head:- The branch moved during this review, from
7d2f651eto47478d51("Merge main into adopt-project.py:checkpasses case twins (aandA,d/xandD/x) that the plan keeps, though a clone on a disk that ignores case checks each pair out as one file; measureexecutethere and decide whetherchecknames them (#1033) #1161's branch"). - With
47478d51: exits 0, tree92d3b476, committed asc434aebd. Throwaway file on the merge:221 passed, 2 skipped in 329.76s. Both skips are "needs a disk that ignores case". - With
7d2f651e: exits 0, tree77191828.
- The branch moved during this review, from
Summary lines (probe environment, git 2.43, CPython 3.12.3, at most 2 calls of mine at once)
| Call | Result |
|---|---|
| #1192 section (27 ids) | 27 passed in 49.67s |
| throwaway file, whole | 178 passed, 1 skipped in 246.01s (:493, disk that ignores case) |
test_adopt_reencoded_files.py + test_adopt_nested_attributes.py |
126 passed in 223.60s |
test_adopt_printed_sentences.py + test_adopt_single_repository_record.py |
93 passed in 79.28s |
test_scaffold_leg_path_collisions.py |
104 passed in 6.26s |
test_path_guard_hygiene.py + test_no_auto_maintenance.py |
179 passed, 2 skipped in 38.04s (test_no_auto_maintenance.py:222, caused by GIT_CONFIG_GLOBAL=/dev/null) |
| doc trio | 171 passed in 47.12s |
| section under the 3.14-like pathlib shim | 27 passed in 65.53s |
9 new ids, base 93d29314 (blob 5e8cfd75) |
9 failed in 31.41s |
9 new ids, 18c2aaef (blob 698ce8e5) |
3 failed, 6 passed in 26.77s (the trusting ids) |
| 9 new ids, head | 9 passed in 21.77s |
| repeats A / B / C | 48 / 48 / 48 passed |
| forced branches | real row 30 of 30 passed |
| no-read emulation | 6 skipped in 42.18s |
| merge with main | 178 passed, 1 skipped in 294.99s |
merge with #1189 47478d51 |
221 passed, 2 skipped in 329.76s |
What I did not cover
tests/test_shape_doctor.pyand the full suite (the brief forbids both), CI's own git build, real CPython 3.14 (only the pathlib shim), Windows and macOS.- The writer's T1-T7 and K1, which I did not re-run; I wrote my own X1-X11 instead.
- A file system with whole-second mtimes, or a git built with
USE_NSEC. By reading the code, there the row would always skip, never fail.
Process note: I had two watches running on the #1189 run for a short time. They were read-only, and I stopped the extras.
Files
- Review worktree:
/workspace/projects/openRepoShape-worktrees/l1-r1253b, clean atad70474d. - Scratch folder:
/workspace/projects/openRepoShape-worktrees/_lane1-scratch/r1253b/- logs:
logs/ - mutants:
mutants.py, with results inlogs/mutants.out - repeat records:
logs/repeat-{A,B,C}.rec - branch records:
logs/branches.rec(final),logs/branches-v1.rec - no-read records:
logs/noread.rec
- logs:
- Probe tests, untracked in my clones only:
clone/tests/test_r1253b_branches.py,clone/tests/test_r1253b_noread.py,clone2/tests/test_r1253b_repeat.py. - Merge worktrees:
merge-main/(cb1c4e5f) andmerge-1189/(c434aebd). Both clones' tools are at blob5778d0e3.
Nothing was pushed or posted.
Lane: openreposhape-1 (openRepoShape-1)
…: a kept `GNUmakefile/` is a directory GNU make stops at, `python3 scripts/bootstrap.py` names `python` on Windows, and the template says what to run where `make` reads another file (#1207) **#1132, the parts that hold on main: the assembly-root template says what to run where GNU make reads a kept `GNUmakefile` or `makefile` first; a kept DIRECTORY of either name is named as one GNU make stops at, in the `CONTRACTS_DIR` line and in `execute`'s NEXT; every sentence that names `python3 scripts/bootstrap.py` for a person to run names `python` on Windows too; and two follow-up texts no longer say more than is true (RV1105b's NIT-2 and NIT-3a).** This PR was built on main `961640c6`. Lane 4's #1121 (#1047) landed as `0ed3e57f8` at 21:37Z, and this round merged it in (`6fa1edd56`): NEXT now words a kept file (#1121's) and a kept directory (this PR's) through one lookup and one clause. #1105 landed as `12122952b` on 2026-11-08, and this PR merges it in (see "Main merge after #1105"). The items that live only in #1105's code, and the parts of #1121's that this merge does not do, are in their own issue, #1240 (see "Left"). Item 5 is #1206. Lane 4's #1105 (#1048) landed as `12122952b` at 16:45Z. This round merges main into the branch with `git merge origin/main`, never a rebase, and does it twice: - main `46fe6ac19` as merge `7b0192bde`; - then NIT-A in its own commit, `e5e077940`; - then main `9729315f1` as merge `01e93b6d1`, the head. Lane 1's #1123 had landed meanwhile, and one of its rows meets this PR's directory line (see "The second merge, after #1123"). The first merge conflicted in `scripts/shape_materialize.py` only: 3 hunks, all in `collision_follow_up`, as "Landing order" said. `adopt-project.py` and `templates/assembly-root/AGENTS-shape.md` merged with no conflict. Both sides' behaviour stays: #1105's second `GNU_MAKE_READS`, its `_predict_collisions` lookup and its collision line, and this PR's `_make_reads_first`, `_make_reads_first_clause` and NEXT. None of #1240's unification is done here (one tuple, one lookup). ### The three hunks | hunk | this PR (`6fa1edd56`) | main (`46fe6ac19`, #1105) | resolution | |---|---|---|---| | 1. The docstring's NIT-4 sentence | "This said "both callers say it", and `execute` calls it nowhere" | "`Materialized.follow_ups()` would say this of them, and nothing calls it" | **Main's.** Both sides rewrote the same sentence for the same finding. Main's also names `Materialized.follow_ups()`, which #1240's item G changes. So this PR no longer touches that sentence, and the last `scripts/shape_materialize.py` bullet under "What changed" is #1105's text now. | | 2. The docstring's Makefile paragraphs | the `BOOTSTRAP_COMMAND` sentence and NIT-2's tail | the heading "WHERE `make` READS THE MERGED FILE", and the "BUT GNU MAKE READS" paragraph | **Both.** Main's heading and both paragraphs. This PR's sentences on `BOOTSTRAP_COMMAND` and on NIT-2's tail go in the first paragraph, and one new sentence goes in the second: "Both name that command as `BOOTSTRAP_COMMAND` does, `python` on Windows as well (#1132)." | | 3. The returns | two `return`s, each one sentence | `arrive`, `joint`, `meanwhile` and `until` set per branch, then one pair of `return`s | **#1105's structure, with a per-branch `then` in place of `until`.** With no `reads_first`, the line is this PR's, byte for byte. With one, it is #1105's, byte for byte, except that the command a person runs is `BOOTSTRAP_COMMAND`, both in `meanwhile` and in "and then ... runs it". | - **Hunks 1 and 2 carry no code.** In the merged file they sit at lines 1022-1023 and 1032-1070, inside `collision_follow_up`'s docstring (lines 1014-1084). - **The rendered lines.** I loaded the function from `6fa1edd56`, from main, and from the merge, and rendered each `reads_first` (none, `GNUmakefile`, `makefile`) with and without `scripts/bootstrap.py` aside. - With no `reads_first`, the merge equals `6fa1edd56` (2 of 2). - With one, it equals main with " (`python` on Windows)" after `python3 scripts/bootstrap.py` in those two places (4 of 4). For a root that keeps `Makefile` and `GNUmakefile`, the line now ends "...; until then `python3 scripts/bootstrap.py` (`python` on Windows) is what the shape's `make bootstrap` runs". - **NIT-2's tail where `make` reads another file** stays #1105's own: "neither `make bootstrap` nor `python3 scripts/bootstrap.py` runs the shape's bootstrap until then, and then `python3 scripts/bootstrap.py` (`python` on Windows) runs it". #1105's review fixed that branch for the same finding, so it needs nothing more. - **Of #1240's list,** this round does item C for #1105's collision line, as #1240 asks a resolution to say. So the "with `python3`" part of "Left"'s second bullet is done. Item B, the kept directory, stays: #1105's lookup asks `_root_keeps`, so a root that keeps `Makefile` and `GNUmakefile/` is told GNU make "reads the source's `GNUmakefile`". Mutant U3 below shows that no row pins this line for a directory. ### #1105's test pins `tests/test_adopt_collision_make_reads.py` is #1105's file, and it pins the texts this PR changes, as "Landing order" expected. - **Four pins move.** `MERGE_IS_ENOUGH` and `BOTH_MERGES` (no `reads_first`) move to this PR's words. `MEANWHILE` and `SCRIPT_MERGED` (with one) move to `python` on Windows. All four go through a new `COMMAND`. - **One comment changes.** The comment on the `Makefile+scripts` row now says what NIT-2's tail says. - **Measured:** before the move, the six adopt and pin files gave 11 failed and 242 passed, and the 11 are exactly the rows that use those four pins. After the move, 253 passed. - **On main's code:** main `46fe6ac19`'s four production files (`adopt-project.py`, `scripts/shape_materialize.py`, `templates/assembly-root/AGENTS-shape.md` and `README.md`) were swapped into the mutant worktree at `e5e077940`. 64 of the three files' 106 rows fail: - in this file, exactly those 11 rows, and the other 20 pass; - in the new file, 34 of 35, as before (NIT-4's row passes); - in `tests/test_adopt_next_make_reads_first.py`, 19 of 40, as before. The four files were then restored, each matched the head by sha256 (4 of 4), and the tree was clean. ### NIT-A `tests/test_adopt_next_make_reads_first.py:64` called #480's NOTE "unchanged", but the merge of #1121 moved that pin to `python` on Windows. The comment now says the NOTE "names `python` on Windows too since #1132". The change is a comment only, in its own commit. ### The second merge, after #1123 Lane 1's #1118 and #1123 landed while the first merge was being gated: `9ec0dc79c` at 17:30Z and `9729315f1` at 17:47Z. Both merge with `e5e077940` with no conflict in the text. The predicted merge with `9ec0dc79c` passed (gate P below). The predicted merge with `9729315f1` failed 1 row of 254 (gate P2): - **The row:** #1123 adds `test_a_name_only_a_disk_that_ignores_case_takes_for_makefile[makefile-directory]` to `tests/test_adopt_make_reads_first.py`. For a kept DIRECTORY `makefile/`, it expects the `CONTRACTS_DIR` line a kept `makefile` FILE gets ("only once `makefile` does"). #1123's own message says that line is not true for a directory, and that the row works as a crash guard for `twins` in `_makefile_follow_up`. This PR changes exactly that line: a kept directory is one GNU make stops at. - **The fix, in the merge `01e93b6d1`:** the row now expects `SHAPES + written_as("makefile")`, as #1123 wrote it, which is the part that guards `twins`. This PR's directory clause follows, through a new `stops_at` helper beside `reads`. The comment above `ANSWERED` and the row's docstring now say so. Nothing else changes in the merge. - **Mutants on the row.** Each ran alone in the mutant worktree at `01e93b6d1` against `tests/test_adopt_make_reads_first.py` (34 rows). Each was restored with `git checkout` and matched by sha256 (`adopt-project.py` `3c2cb5f5bea5`), and the tree was clean after each. | id | mutant | rows failing | result | |---|---|---|---| | D1 | `_make_reads_first` drops a directory's `/`, so the line is the one #1123's row pinned | 1 of 34, the row | killed | | D2 | #1123's R10: `twins` reads the entry with its slash | 1 of 34, the row, with `IndexError` | killed | ### Mutants on the resolution H3a-H3g and U1-U3b are the first merge's. All ran in the mutant worktree at `e5e077940`. - **Method:** each mutant was applied alone, then restored with `git checkout`. Each restore matched by sha256 (`shape_materialize.py` `b18f09d7c396`, `adopt-project.py` `2055a81acdc6`), and the tree was clean after each. - **Rows:** H3a-H3g, U3 and U3b ran against 93 rows: `tests/test_adopt_collision_make_reads.py` (31), the new file (35) and `tests/test_adopt_e2e.py` (27). U1 ran against the new file, `tests/test_adopt_make_reads_first.py` (33) and `tests/test_adopt_collision_make_reads.py`, 99 rows. U2 ran against the new file and `tests/test_adopt_next_make_reads_first.py` (40), 75 rows. - **Unmutated,** every row passes (gate A below). | id | mutant | rows failing | result | |---|---|---|---| | H3a | hunk 3, no `reads_first`: `meanwhile` back to main's plain `python3` | 4 of 93 | killed | | H3b | hunk 3, no `reads_first`: the script tail back to main's "before both merges are made" | 4 of 93 | killed | | H3c | hunk 3, with `reads_first`: `meanwhile` without `BOOTSTRAP_COMMAND` (main's) | 5 of 93 | killed | | H3d | hunk 3, with `reads_first`: "and then ... runs it" without `BOOTSTRAP_COMMAND` (main's) | 3 of 93 | killed | | H3e | hunk 3, with `reads_first`: this PR's tail in place of #1105's | 3 of 93 | killed | | H3f | hunk 3: `reads_first` ignored, so the resolution is this PR's side whole | 15 of 93 | killed | | H3g | hunk 3, with `reads_first`: #1105's `joint` ("; and") lost | 3 of 93 | killed | | U1 | `_makefile_follow_up` drops `_make_reads_first` (`first = None`) | 31 of 99 | killed | | U2 | `_next_steps` drops `_make_reads_first` (`first = None`) | 35 of 75 | killed | | U3 | `_predict_collisions` asks `_make_reads_first` in place of #1105's lookup | 0 of 93 | **survived** | | U3b | `_predict_collisions` passes no `reads_first`, so #1105's lookup is lost in the merge | 15 of 93 | killed | - **H3c and H3d** are killed only by rows that use the moved `MEANWHILE` and `SCRIPT_MERGED`. Those pins are what hold `BOOTSTRAP_COMMAND` in #1105's branch. - **U3 survives,** and that is #1240's item B. For a kept file, both lookups give the same name. They differ only for a kept directory, where `_make_reads_first` adds the `/`, and no row runs `_predict_collisions` on a root that keeps `Makefile` and `GNUmakefile/`. A row now would pin the line #1240 is to correct, so this round adds none. ### Runs Each run went through the lane's runner, with git-filter-repo 2.47.0 (CI's pin) on PATH, on a commit with a clean tree. | run | git | files | passed | failed | skipped | |---|---|---|---|---|---| | gate A2 | 2.43.0 | `01e93b6d1`, the head: the 12 files below | 1096 | 0 | 3: the PowerShell rows (`test_shape_doctor.py:10516`), which run only on a Windows host | | gate B2 | 2.47.1 | `01e93b6d1`: the same 12 files | 1096 | 0 | 3: the same | | gate A | 2.43.0 | `e5e077940`, after the first merge: the 12 files below | 1095 | 0 | 3: the same | | gate B | 2.47.1 | `e5e077940`: the same 12 files | 1095 | 0 | 3: the same | | gate P | 2.43.0 | the predicted merge of `e5e077940` with main `9ec0dc79c` (#1118; tree `ba3f3c1f3`, a local commit object, not pushed): the six adopt and pin files, plus #1118's `tests/test_adopt_root_shape_paths.py` and `tests/test_adopt_symlink_target_bytes.py` | 509 | 0 | 0 | | gate P2 | 2.43.0 | the predicted merge of `e5e077940` with main `9729315f1` (#1123; tree `0eb290ae2`, a local commit object): the six adopt and pin files | 253 | 1: #1123's `makefile-directory` row, which the second merge moves | 0 | | gate P4 | 2.43.0 | the predicted merge of `01e93b6d1` with main `801a7d6d0` (#1106; tree `25bc27d39`, a local commit object): the six adopt and pin files, plus #1106's `tests/test_adopt_one_byte_locale.py` and `tests/test_adopt_unenterable_source_and_locale.py` | 277 | 0 | 0 | The files are the six adopt and pin files (`tests/test_adopt_collision_make_reads.py`, `tests/test_pinned_copy_text.py`, the new file, `tests/test_adopt_next_make_reads_first.py`, `tests/test_adopt_e2e.py` and `tests/test_adopt_make_reads_first.py`, 253 rows), plus `tests/test_shape_doctor.py` and `tests/test_scaffold_leg_path_collisions.py`, which adopt changes need, plus the hygiene five (`test_path_guard_hygiene.py`, `test_repo_hygiene.py`, `test_agents_md_codes.py`, `test_cli_reference.py` and `test_pinned_copy_text.py`). That is 1098 rows in one run at `e5e077940`, and 1099 at `01e93b6d1`, where #1123 adds one row. All of this was measured on main `961640c68` with GNU make 4.3, offline. | item | on main | |---|---| | 1, the template | `AGENTS-shape.md` (the "Work from here" paragraph and the five-commands table) and `README.md` (Get started, and the parking steps) give `make bootstrap` with no caveat. With the template's own `Makefile` beside a plain `GNUmakefile` or `makefile`, `make -n bootstrap` exits 2, `No rule to make target 'bootstrap'`. | | 2, a kept directory | With `GNUmakefile/` or `makefile/` beside `Makefile`, `make bootstrap` exits 2 with `make: *** GNUmakefile: Is a directory. Stop.`, or the same with `makefile`. It does this for every target, and for each directory alone too. Main's `CONTRACTS_DIR` line says "`make` there exports `CONTRACTS_DIR` only once `GNUmakefile` does". NEXT prints `make bootstrap` for a root that keeps only `GNUmakefile/`. Beside a kept `Makefile`, it prints #480's NOTE that the targets "arrive only once the follow-up merges the two". Rendered by the lane's `probe_texts.py` on main. | | 3, `python3` | The template's `scripts/bootstrap.py` says `python3 scripts/bootstrap.py (python on Windows)`. #480's NOTE and the Makefile collision follow-up's "until then" name `python3` alone. | | NIT-2 | The no-`reads_first` script-aside tail says "neither `make bootstrap` nor `python3 scripts/bootstrap.py` runs the shape's bootstrap before both merges are made". In a root that keeps its own `Makefile` and `scripts/bootstrap.py`, merging the script alone makes `python3 scripts/bootstrap.py` print the shape's `SHAPE-BOOT`, while `make bootstrap` still exits 2. Measured again by a row below. | | NIT-3a | `_predict_collisions` says the wording comes from "the same function `execute` reports its actual collisions through", and `collision_follow_up` says "Both callers say it". `execute` never calls `collision_follow_up`: it carries the plan's stored `follow_ups:` into the split message. | `adopt-project.py`: - **`_make_reads_first(surviving)`** gives the first of `GNUmakefile` and `makefile` the root keeps. It reads `GNU_MAKE_READS`' order, asks the way `_root_keeps` asks, and adds a `/` for a DIRECTORY. **`_make_reads_first_clause`** words the clause. For a file, the words are main's, byte for byte. For a directory, it says: "GNU make at the root stops at the source's directory `GNUmakefile/`, the first of `GNUmakefile`, `makefile` and `Makefile` it finds (`GNUmakefile: Is a directory.`), so ... only once the root keeps no directory of that name". - **`_makefile_follow_up`** (the `CONTRACTS_DIR` line) asks both. A kept file's line is unchanged: `tests/test_adopt_make_reads_first.py` passes as it is. - **`_next_steps`** takes `surviving=`, the plan's root paths, which `cmd_execute` passes as `paths_for["root"]`, as #1121 does. - Where a kept DIRECTORY stops make, the command is `python3 scripts/bootstrap.py`. The NOTE says GNU make stops there. Beside a kept `Makefile`, it also says the targets run there once the follow-up merges the two, and only once the directory is gone. Where the script went aside too, alone or with the `Makefile`, the NOTE names that command after the merges. - Since the merge of #1121, a kept FILE goes through the same lookup and the same clause. For a file the clause gives #1121's words byte for byte, and its NOTEs end in `BOOTSTRAP_COMMAND` too. - **`BOOTSTRAP_COMMAND`** is in every NOTE: #480's, #1121's and the directory's. Each command line a person pastes stays `python3 scripts/bootstrap.py`. - **`_predict_collisions`' docstring** says what the plan stores and what `execute` carries (NIT-3a). `scripts/shape_materialize.py`: - **`BOOTSTRAP_COMMAND`** = "`python3 scripts/bootstrap.py` (`python` on Windows)", as the template's script names it. - **The Makefile collision follow-up** says "until then `python3 scripts/bootstrap.py` (`python` on Windows) is what `make bootstrap` runs". - **Where the script went aside too,** the follow-up says "so `python3 scripts/bootstrap.py` (`python` on Windows) runs the shape's bootstrap once the script is merged, and `make bootstrap` once both merges are made" (NIT-2). - **The docstring's "Both callers say it"** paragraph says what is true (NIT-3a's twin, #1105's review NIT-4). #1105 made the same fix, and the merge keeps main's text (see "Main merge after #1105"). `templates/assembly-root/`: - **`AGENTS-shape.md`:** the "Work from here" paragraph adds "; where the root keeps a `GNUmakefile` or a `makefile`, which GNU make reads before `Makefile`, run `python3 scripts/bootstrap.py` (`python` on Windows), which is what the shape's `make bootstrap` runs." A sentence after the five-commands table says they are the shape's Makefile's targets, which `make` at the root reaches only where the file it reads first holds them, or includes a Makefile that does. - **`README.md`:** one sentence after Get started covers `make bootstrap` "here and below". A second says `make park` and `make resume` below work there only where that file holds them, or includes a Makefile that does. - **This is a template byte change, so every project re-pins.** No digest of either file is stored in this repository. `tests/` was grepped for every changed line, and only this PR's own rows pin them (see "Template pins"). Tests: - **`tests/test_adopt_e2e.py`:** two pins move to the new words, at :312 (the "until then" sentence) and at :447-450 (NIT-2's tail). - **`tests/test_adopt_next_make_reads_first.py`** (#1121's): the merge moves three pins, `OWN_MAKEFILE_NOTE`, `RUNS` and `script_aside`, to `python` on Windows. #480's NOTE merged with no textual conflict, so without them its rows fail. - **The new file `tests/test_adopt_make_bootstrap_followups.py`** has 35 rows: - the template's sentences, held to its `Makefile` (`PYTHON ?= python3`, `bootstrap:` runs `$(PYTHON) scripts/bootstrap.py`) and to `scripts/bootstrap.py`'s own words; - `make -n bootstrap` against the template's `Makefile` beside each kept name, each row asserting the `AGENTS-shape.md` caveat that measurement backs; - `_make_reads_first` (10 roots); - the `CONTRACTS_DIR` line for 4 directory roots; - NEXT for a directory, beside a kept `Makefile` (both names), after both merges, and after the script's merge alone; - #480's NOTE, called both as main's signature allows and with `surviving=`; - the collision follow-up's two sentences; - NIT-2 measured with the template's `Makefile` and stand-in scripts, and tied to the follow-up's new tail; - three real adoptions of a source holding `GNUmakefile/rules.mk`. One is kept by a `--path-policy` rule, so `plan` writes the line, `check` prints it and the split message carries it. One is answered `root`. In both, NEXT is asserted, `make -n bootstrap` in the pasted clone exits 2 with `GNUmakefile: Is a directory.`, and the printed command exits 0. In the third, the question is answered `code`: NEXT names `make bootstrap`, and that command runs in the pasted clone. ### This round (#1207's review, issuecomment-6374516382) | finding | what changed | |---|---| | SHOULD-1 | A row pins NEXT where only `scripts/bootstrap.py` went aside beside a kept `GNUmakefile/` (`test_next_after_the_script_merge_names_python3_where_make_stops`). It fails under the review's mutant X1. | | SHOULD-2 | The "Left" list is one issue, #1240. | | SHOULD-3 | "Landing order", below. #1121 landed while this round ran, and is merged and resolved here. | | NIT-1 | `AGENTS-shape.md`'s sentence after the table loses "(above)": nothing above names a Makefile that includes another. | | NIT-2 | `README.md` names `make park` and `make resume`. | | NIT-3 | Beside a kept `Makefile`, the directory NOTE names the merge as well as the directory. Its row is parametrized over `GNUmakefile/` and `makefile/`. | | NIT-4 | An adoption sends `GNUmakefile/` to the code leg, and NEXT names `make bootstrap`. It fails under the review's mutant X6. | | NIT-5 | The notes for the squash message at landing, below. | Measured at the merge head `6fa1edd56`, in a scratch worktree: - main `0ed3e57f8`'s bytes of the four production files (`adopt-project.py`, `scripts/shape_materialize.py`, `templates/assembly-root/AGENTS-shape.md`, `templates/assembly-root/README.md`) were checked out over the head; - the new file (35 rows) and `tests/test_adopt_next_make_reads_first.py` (40 rows) ran through the lane's runner; - the four files were restored with `git checkout`, and each matched the head by sha256 (`c94bd19b`, `12555f39`, `8660bafb`, `b3f9409b`). | file | fail on main | pass on main | |---|---|---| | the new file | 34 | 1: `test_an_adoption_sending_a_gnumakefile_directory_to_a_leg` | | `tests/test_adopt_next_make_reads_first.py` | 19 | 21 | Main now has #1121, so its `_next_steps` takes `surviving=`. The NEXT rows for a kept directory therefore fail on their words, not on a `TypeError`. Main reads `GNUmakefile/` as a file: "then run `python3 scripts/bootstrap.py`; GNU make at the root reads the source's `GNUmakefile`, ...". This is the case for the SHOULD-1 row, the after-the-merges row, both directory rows, and NIT-3's `makefile/` row. The new file's other rows fail on main for these reasons: - the template rows: main's `AGENTS-shape.md` and `README.md` lack the sentences; - `_make_reads_first`: main has no such helper; - the `CONTRACTS_DIR` line: "only once `GNUmakefile` does"; - the NOTE and collision rows: plain `python3`, and NIT-2's old tail; - the two adoptions that keep the directory. The one new row that passes on main is NIT-4's. It sends `GNUmakefile/` to the code leg, and there main's NEXT is already `make bootstrap`. It guards what main has: under the review's mutant X6, which hands NEXT every leg's paths, it is the row that fails. The 19 rows of #1121's file that fail on main are exactly the rows that use the three pins this merge moved (`OWN_MAKEFILE_NOTE`, `RUNS`, `script_aside`). The 21 that pass use none of them. Earlier heads, on main `961640c68` and with the same method: `1c7ca5c6d` failed 29 of 35 rows, and `8b499842f` failed 34 of 35 (the new file plus the three `tests/test_adopt_e2e.py` rows the mutants use). **This round**, at `75c90b6db`, in a scratch worktree. Each mutant was applied alone and restored, and each file's sha256 was checked against the commit (4/4 every time). Each ran against 95 rows: the new file (35), `tests/test_adopt_e2e.py` (27) and `tests/test_adopt_make_reads_first.py` (33). Unmutated, all 95 pass. | id | mutant | rows failing (of 95) | result | |---|---|---|---| | X1 | the review's: the script-only NOTE names `make bootstrap` after the merge (`if stops and makefile`) | 1 | killed | | X6 | the review's: `cmd_execute` passes every leg's paths | 1 | killed | | N1 | NIT-3 undone: beside a kept `Makefile`, no merge named | 2 | killed | | N2 | the merge named where the script went aside too | 1 | killed | | N3 | the merge named where no `Makefile` was kept | 4 | killed | | T1 | NIT-1 undone: "(above)" back | 1 | killed | | T2 | NIT-2 undone: README's `make park` / `make resume` sentence removed | 1 | killed | The merge with #1121 rewrote the clause code that N1-N3 mutate (`stopped` became `reads`, and the merge condition gained `stops`). The mutants were not run again at `6fa1edd56`. **Earlier,** 18 mutants at `1c7ca5c6d` against 43 rows, each applied alone in a scratch worktree and restored with its sha256 checked: | id | mutant | rows failing (of 43) | result | |---|---|---|---| | M1 | `_make_reads_first` drops the `/` of a directory | 14 | killed | | M2 | the clause's directory branch never taken | 10 | killed | | M3 | NEXT ignores a kept directory (`stops = None`) | 6 | killed | | M4 | NEXT's command stays `make bootstrap` for a directory | 4 | killed | | M5 | `cmd_execute` passes `surviving=()` | 2 (the two adoptions) | killed | | M6 | `BOOTSTRAP_COMMAND` without `(python on Windows)` | 12 | killed | | M7 | NIT-2's tail back to "neither ... before both merges are made" | 2 | killed | | M8 | `AGENTS-shape.md`'s "Work from here" caveat removed | 1 | killed | | M9 | the sentence after the five-commands table removed | 1 | killed | | M10 | `README.md`'s sentence removed | 1 | killed | | M11 | #480's NOTE back to plain `python3` | 1 | killed | | M12 | the collision follow-up's "until then" back to plain `python3` | 2 | killed | | M13 | after the merges, NEXT says `make bootstrap` where a directory stops make | 1 | killed | | M14 | the lookup takes the LAST kept name (`reversed`) | 4 | killed | | M15 | the directory NOTE's lead ignores a kept `Makefile` | 1 | killed | | M16 | the lookup folds case (`fold=True`) | 4 | killed | | M17 | the clause drops GNU make's own words (`GNUmakefile: Is a directory.`) | 10 | killed | | M18 | the file clause says `does` whatever `has` is | 0 | **survived** | M18 was equivalent before the merge: the file clause's only caller was the `CONTRACTS_DIR` line. Since the merge, #1121's NOTE calls it with `has them`, and `tests/test_adopt_next_make_reads_first.py` pins that wording. M18 was not run again. Each run went through the lane's runner: `gh` stubbed first on PATH with a bogus token, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null`, `EMAIL` set, `-p no:cacheprovider`, and `tmp_path_retention_policy=failed`. Each run is on a commit, with a clean tree. | run | commit | git | files | passed | failed | |---|---|---|---|---|---| | gate M | `6fa1edd56`, the merge | 2.43.0 | the new file, `test_adopt_next_make_reads_first.py`, `test_adopt_e2e.py`, `test_adopt_make_reads_first.py`, `test_path_guard_hygiene.py`, `test_repo_hygiene.py`, `test_agents_md_codes.py`, `test_cli_reference.py`, `test_pinned_copy_text.py`, `test_scaffold_leg_path_collisions.py` | 618 | 0 | | gate N | `6fa1edd56` | 2.47.1 | the new file and `test_adopt_next_make_reads_first.py` (75), then `test_adopt_e2e.py` (27), run one after the other | 102 | 0 | | gate H | `6fa1edd56` | 2.47.1 | the hygiene five | 379 | 0 | | gate A2 | `75c90b6db` | 2.43.0 | the new file, `test_adopt_e2e.py`, the hygiene five (`test_path_guard_hygiene.py`, `test_repo_hygiene.py`, `test_agents_md_codes.py`, `test_cli_reference.py`, `test_pinned_copy_text.py`), `test_adopt_make_reads_first.py`, `test_adopt_contracts_dir.py`, `test_adopt_printed_sentences.py`, and the template's readers: `test_scaffold_e2e.py`, `test_scaffold_free_text_values.py`, `test_free_plan_hint.py`, `test_template_quoted_values.py`, `test_template_values_single_pass.py`, `test_template_text_placeholders.py`, `test_bootstrap_placement_texts.py`, `test_park_resume_targets.py`, `test_update_shape_hardlink.py` | 1128 | 0 | | gate A | `1c7ca5c6d` | 2.43.0 | 17 files (the new file, `test_adopt_e2e.py`, the hygiene five, `test_scaffold_leg_path_collisions.py`, `test_adopt_make_reads_first.py`, `test_adopt_contracts_dir.py`, `test_adopt_printed_sentences.py`, `test_adopt_attributes_eol_block.py`, `test_adopt_leg_path_collisions.py`, `test_scaffold_e2e.py`, `test_bootstrap_placement_texts.py`, `test_park_resume_targets.py`, `test_template_text_placeholders.py`) | 966 | 0 | | gate B | `1c7ca5c6d` | 2.47.1 | the new file, `test_adopt_e2e.py`, `test_path_guard_hygiene.py`, `test_repo_hygiene.py` | 209 | 0 | | doctor | `1c7ca5c6d` | 2.43.0 | `test_shape_doctor.py`, `test_scaffold_leg_path_collisions.py` | 549 (3 skipped: the PowerShell rows, which run only on a Windows host) | 0 | `tests/` was grepped for every line this PR changes in `templates/assembly-root/` ("They are the shape", "reads first holds", "includes a Makefile that", "(above)", "here and below", "Where this root keeps", "it is what the shape", "before `Makefile`", "`python` on Windows"). Only `tests/test_adopt_make_bootstrap_followups.py` pins them. Four other files read the README as a whole, and each passes in gate A2: - `test_scaffold_free_text_values.py` counts its lines against the template; - `test_free_plan_hint.py` looks for "Free plan" and `--repo`; - `test_template_quoted_values.py` and `test_template_values_single_pass.py` render it. `git merge-tree --write-tree` of the head `01e93b6d1`, on git 2.43.0, at 18:11Z. - **Main** `9729315f1`, fetched again at 18:11Z, is the main this round merged last. The merge-tree is clean, and its tree is the head's own, `f6488542f`. - **Main moved to `801a7d6d0`** at 18:14Z, when lane 3's #1106 landed (`adopt-project.py` and two locale test files). The merge with it is clean, tree `25bc27d39`, and gate P4 passed on it. It was not merged in: it touches none of the code this round resolves, and landing refreshes the branch anyway. - **The open PRs:** one `gh pr list --state open --limit 100 --json number,headRefName,headRefOid,files` read at 18:11Z returned 51 open PRs. 26 of them touch one of this PR's paths. That includes `tests/test_adopt_collision_make_reads.py` and `tests/test_adopt_make_reads_first.py`, which this PR now changes. 25 merge cleanly: #1106, #1120, #1122, #1125, #1141, #1143, #1153, #1154, #1170, #1171, #1177, #1178, #1186, #1189, #1194, #1198, #1210, #1225, #1244, #1249, #1251, #1252, #1253, #1265 and #1268. #1106 has landed since (above). - **Lane 1's #1189** (`472944b5d`, read fresh at 18:11Z) edits three test files that this round changes too: `tests/test_adopt_next_make_reads_first.py`, `tests/test_adopt_collision_make_reads.py` and `tests/test_adopt_make_reads_first.py`. The merge is clean, tree `7fd030b29`. #1189's hunks are in the imports, in the clone rows' parameter lists and docstrings, and in a new refusal row, away from the moved pins, the `makefile-directory` row and NIT-A's comment. On that predicted merge, a local commit object, the three shared files pass on git 2.43.0: `tests/test_adopt_make_reads_first.py` and `tests/test_adopt_collision_make_reads.py` give 62 passed, and `tests/test_adopt_next_make_reads_first.py` gives 38 passed. There are fewer rows than at this head because #1189 leaves out the clone rows that keep case twins. - **#1237** (`b557859fd`) conflicts in `tests/test_adopt_check_throwaway_repos.py`, a file this PR does not change. Main conflicts with #1237 in that file too, while `6fa1edd56` did not, so the conflict is main's, carried in by the merge. - **Main moved again after the round** (rv1207e, at 19:25Z): lane 1's #1143 landed as `81eaf757c` (`adopt-project.py`) and lane 4's #1117 as `9252ef208` (README, the handbook and `scripts/family.py`). The head merges clean with both (trees `e40373967` and `279f8c6ce`), and rv1207e's gate P passed on the predicted merge with `9252ef208` (359 passed). At 19:22Z, 48 PRs were open, 24 touch this PR's files, and 23 merge clean; #1237's conflict is main's, as above. - **No longer on the list:** #1105, #1121, #1118 and #1123 are on main. Since `6fa1edd56`, #1104, #1160, #1169, #1180, #1190 and #1223 landed too. The conflicts are the same in every order, measured offline both ways round and with predicted squashes: - **#1121:** 4 hunks, 84 lines, in `adopt-project.py`'s `_next_steps` and `cmd_execute`'s comment. - **#1105:** 3 hunks, 65 lines, in `scripts/shape_materialize.py`'s `collision_follow_up`: its docstring's NIT-4 sentence, its paragraph on the Makefile's merge, and its two `return`s. - #1121 and #1105 merge with each other cleanly, and so do #1104 and this PR. So the order decides only who resolves them. **Both have landed**, and lane 5 resolved both on this branch: - **#1121** (merge `6fa1edd56`). The resolution is one lookup and one clause, `BOOTSTRAP_COMMAND` in #1121's NOTEs, and #1121's three test pins moved. - **#1105** (merge `7b0192bde`, see "Main merge after #1105"). The resolution keeps #1105's `reads_first` branch and runs `BOOTSTRAP_COMMAND` through it. NIT-2's tail is this PR's where `make` reads the merged `Makefile`, and #1105's where `make` reads another file. Four of #1105's test pins moved: `MERGE_IS_ENOUGH`, `BOTH_MERGES`, `MEANWHILE` and `SCRIPT_MERGED`. Main was merged in once more after lane 1's #1123 (merge `01e93b6d1`): one of #1123's rows pinned the line this PR changes for a kept `makefile/` directory, and it moved (see "The second merge, after #1123"). No other PR has to land first now. `6fa1edd56` was re-checked READY (rv1207b, rv1207c and rv1207d, issuecomment-6722602375). The head, `01e93b6d1`, needs a check of its delta since then: the two merges' resolutions, the four moved pins in #1105's file, #1123's moved row, and NIT-A. #1240 tracks what this PR leaves: - #1132's item 4 (one `GNU_MAKE_READS`, one lookup); - #1105's collision line, for a kept directory (its `python3` part is done here: see "Main merge after #1105"); - #1121's file NOTE beside a kept `Makefile`, which does not name the merge (as this PR's directory NOTE now does); - #1105's second review's NIT-1, NIT-3b, NIT-3c, NIT-4 and NIT-5; - `_make_reads_first_clause`'s `has` argument, now live; - rv1207e's NIT-1: the docstring sentence "With none, the Makefile's follow-up is what it was, byte for byte" (`scripts/shape_materialize.py` about :1067), kept from #1105, is no longer true, since this PR changes the line with no `reads_first`. It sits beside #1240's items F and G, which reword the same docstring. The local branch `fix/1132-template-bootstrap-stacked` (`9eb5cce0b`, never pushed and never tested) is a model of the end state on #1105 + #1121 + main. - **Item 5,** follow-ups that go stale after a hand edit of the plan, is its own issue, filed as #1206. It also holds the three related cases this work found: - a kept `makefile/` directory gets "until the two are merged"; - a directory kept only through deeper entries is not seen by `_root_keeps`; - a kept `Makefile/` directory is treated as a Makefile. - **This PR's `answered-root` row meets item 5 too.** `plan` asks about `GNUmakefile/`, and its stored `CONTRACTS_DIR` line, written before the answer, names no directory. The row asserts what NEXT and `make` do there, and not that line. - **Not measured:** a disk that ignores case, and GNU make other than 4.3. Review: rv1207b and rv1207c, lane 5's independent opus reviewers, and rv1207d, lane 5's independent sonnet reviewer, none of which wrote #1207: READY at `6fa1edd5` (issuecomment-6722602375). Then rv1207e, lane 5's independent opus reviewer, which wrote none of it: READY at `01e93b6d`, H0 of this landing, after the main merges past #1105 and #1123 (issuecomment-6726033282), with no MUST or SHOULD; its three NITs are answered in the body. CI (Brett Heap's ruling 27 and his fast-refresh ruling of 2026-10-15T22:48:35Z): H0 01e93b6 passed tests, tests-git-bash and SonarCloud; the head c9be952 is a clean update-branch merge of main 9cb156a, with tests-git-bash and SonarCloud green; and the local gate passed on its predicted squash tree 0a01d35 over main 9cb156a: the adopt_collision_make_reads, adopt_e2e, adopt_make_bootstrap_followups, adopt_make_reads_first, adopt_next_make_reads_first, repo_hygiene, agents_md_codes, cli_reference sets, 333 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 #1132 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
|
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 5 days and 8 hours by commenting |
…`conftest` imports kept Main `de55beb03847ff98ff1c8d65d03d1e81ed791978` carries #1253 (`f981468b`), which changed `adopt-project.py` and `tests/test_adopt_check_throwaway_repos.py` as this branch does. The one conflict is the `from conftest import (...)` list in the test file: main's side adds `skip_where_a_name_cannot_be_not_utf_8`, this branch's side adds `make_source_repo`, and `tests/conftest.py` defines both. The merge keeps both names in the list's sort order and 79-column wrapping. `adopt-project.py` merged without a conflict. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… with `git rm -f` and writes the twins the root keeps back from the index, so on a disk that ignores case `execute` keeps a set the plan splits across repositories or drops (#1183) (#1237) On a disk that ignores case, `adopt-project.py execute` lost a case twin the plan keeps in the root when its twin goes to a leg or is dropped (`adopt-lost`, exit 1), or stopped mounting the legs (`REFUSED mounting the legs`, exit 2), in each case after both legs were pushed, and `check` printed `plan ok` for every such plan, since `plan-case-twins` (#1161, #1189) asks only about twins the plan keeps in ONE repository. The loss was in the assembly's work tree, between `_mount_the_legs`'s `git rm` loop and `_stage_the_split`'s `git add -A -- .`. Now the mount removes what a case twin is at or under with `git rm -f`, writes the twins the root keeps back from the index, and takes out of the index alone what `-f` would reach through a symlink or at a gitlink. Outside v1.2.0 by Brett Heap's ruling of 2026-10-21T10:32:04Z - `_mount_the_legs` lists the assembly's index once, each path with its mode (`git ls-files -s -z`, `_index_modes`), and keeps each `_case_twin_sets` set with a path at or under a path it removes (`_split_case_twins`). It removes each path such a set has a path at or under with `git --literal-pathspecs rm -r -q -f --` (`GIT_RM_FORCED`) and every other path with today's `GIT_RM`, then writes the twins of those sets that the root keeps back from the index with `git checkout-index -f -z --stdin` (`_write_from_the_index`; a refusal is `CommandFailed`, one of `LATE_FAILURES`). A source with no such set gets the same `git rm` commands as before. - A path `-f` would reach through a symlink is taken out of the index alone (r1237's MUST 1). On a disk that ignores case a folder `D/` and a symlink `d` are one name, and the clone writes `d` last: at `c9f0cc18`, `git rm -r -q -f -- D` unlinked `D/x` in the folder the symlink leads to, outside the work directory. Before each `-f`, `_taken_beyond_a_symlink` asks each path the index holds at or under the removed path, folder by folder from the top, with `lstat` (`_beyond_a_symlink`, `_is_a_symlink`), and takes a path beyond a symlink out with `git --literal-pathspecs rm -r -q --cached --` (`GIT_RM_CACHED`), which touches no file on the disk. A refusal would come after both legs are pushed, for a plan that is good on every disk. - A gitlink whose own path is no folder is taken out the same way (r1237b's MUST 1): `git rm` of a gitlink's entry removes the folder at its path and follows a symlink there, so a plan that drops a gitlink `D` and keeps `d`, a symlink to a folder outside, stopped after both legs were pushed and left that folder EMPTY. `_index_modes` replaces `_index_paths`; where no folder on the way is a symlink, `_taken_beyond_a_symlink` asks each gitlink's own path with `lstat` (`_is_itself_a(path, kind)`, which `_is_a_symlink` now calls). The empty folder a clone writes for a gitlink is still removed with `-f`. - The twins are written back after the loop, from the index: writing each before its sibling's `git rm` was rejected, since one `git rm -r` can remove two twins at once (a dropped folder holding `d/x` and `d/X`). `--cached` for a twin's own path was rejected too: on a disk that keeps case it leaves the file, and `git add -A` adds it again. No `core.ignorecase` probe is made, so the same commands run on every disk. - `plan-case-twins`' remediation text is unchanged, but its words no longer name a stop at `git rm` (r1237's SHOULD 1): `execute` could stop there before any leg exists, at git's `will not add file alias`, or, for a set in the assembly root, after both legs are pushed, as `adopt-lost`. `twins_kept` pins them. - Measured with git 2.43 on a FUSE disk that ignores case and keeps it, `plan`, `check` then `execute --local-remote-dir`, base `4d40ce9f` (#1189's head as it was then) against `ef18f059`'s `adopt-project.py`. Where the twin that goes sorts last (`A` root, `a` code), `git rm a` deleted the one file both names share and `git add -A` staged the kept twin's deletion; where it sorts first (`A` code, `a` root), `git rm A` refused with `the following file has local modifications: A`. - At base `across`, `acrossspec`, `dropped`, `ffacross` and `ffdropped` were exit 1, `adopt-lost`, and `acrossrev`, `droppedrev`, `dropboth` and `specode` exit 2, `REFUSED mounting the legs`; `ffacrossrev` verified. At head all verified, and so did `samebytesacross`, `samebytesdropped`, `dirmergeacross`, `deepacross` and `none`, which base was not measured on. `root` (`A`, `a` root) is `check` exit 1 and `execute` exit 2, `plan-case-twins` before any leg (#1189's refusal, unchanged), and was not run at base. "Verified" means `check` printed `plan ok`, and `execute` exited 0 with `adoption verified: every source path is in exactly one place`. - r1237's symlink scenarios (`victim/` outside `--work-dir`): at `c9f0cc18` `symvictim`, `symvictimdrop`, `symvictimrel` and `symboth` verified and deleted `x`, and `syminside` and `syminsidedrop` gave exit 1, `adopt-lost` `E/x`; at `0b8252c3` all verified, with `x` kept. - r1237b's gitlink scenarios (1 run each): at `63c52718` `glinkdrop`, `glinkdir` and `glinkcode` were exit 2, `REFUSED mounting the legs`, after both legs were pushed, with `victim` EMPTY, `glinkfile` and `glinkfiletop` exit 2 too, and `glinkfolder` verified; at `b557859f` all six verified, `victim` whole where the plan has one, and so did the symlink scenarios of both rounds but `symrev`. r1237c's `glinkrepo`: at `58aa9d2b` git moved an outside repository's `.git` into the assembly before it refused; `--cached` skips that. - Rows: the first rows 10 failed, 2 passed and 4 skipped at `58aa9d2b`, 12 passed and 4 skipped at head; round 1's 14 failed and 1 passed at `c9f0cc18`, 15 passed; round 2's gitlink rows 5 failed and 1 passed at `63c52718`, 6 passed; round 3's row passed at `87325bed`. - Mutants of the changed lines, restored after each run: 37 of 40 at `ef18f059` (34 of 40 at the first rows), 15 of 16 for round 1's, 14 of 14 for round 2's, and 10 of 11 for r1237c's, C05 killed by round 3's row at `87325bed`. Each survivor is equivalent (C09 on POSIX). - Known limits: - The bench disk, which keeps case, was not run in full at head: only `across` and `acrossrev` ran there, and both verified; at base all 15 scenarios but `root` verified there. - `three` (`A` root, `a` code, U+00C5 drop, U+00E5 root) gave no result, a defect in the bench script, not in the tool: the plan quotes the name U+00C5 and the bench's `path:` match does not. - The FUSE-only rows have not been run on a FUSE disk, and skip on every CI disk; the gitlink rows make the clone's symlink, or its one file, by hand on CI's disks. Every FUSE scenario of both review rounds ran once, with git 2.43, and no real macOS or Windows disk was available. - `symrev` still stops at the mount, as at `58aa9d2b`: a symlink `D` that sorts first and goes to a leg, beside a folder `d/` the root keeps; `git rm -f -- D` meets the folder the clone left, `fatal: git rm: 'D': Is a directory`, exit 2 after both legs are pushed, with nothing deleted. It is filed as #1250. - `check`'s rehearsal of the mount still asks `git rm` without `-f` and writes no twin back, so for a twin set the plan splits that the source's rules reach (`* text=auto` on a disk that ignores case), it names a `plan-file-reencoded` the mount no longer meets, and `execute` refuses before any leg. Nothing is lost; follow-up #1298 (r1237e's SHOULD 1). - Not in this PR: the remediation's option to answer the twins of each set into different repositories (left for a follow-up with `TWINS_REMEDIATION` and the doc trio; this PR does not call it safe on every disk), and a `check` probe of `core.ignorecase`. Review: lane 1's independent reviewers reviewed each round. r1237 read `c9f0cc18` and found one MUST, one SHOULD and one NIT: MUST 1, the forced `git rm` removed a file through a symlink a case twin left, answered by `0b8252c3`; SHOULD 1, `plan-case-twins`' words named a stop at `git rm` that `-f` took away, by `f645fcb8`; NIT 1, `_split_case_twins`' docstring, by `63c52718`. r1237b read `63c52718` and found one MUST, one SHOULD and three NITs: MUST 1, a gitlink whose case twin is a symlink, answered by `9259da2b`; SHOULD 1 (R11), NIT 1 (R04) and NIT 2 (R02, R03), each a row, by `3ff03feb`; NIT 3, the test module's #1183 paragraph, by `b557859f`. r1237c read `b557859f` and found it READY, with three NITs: NIT 1 (C05, a row for a gitlink's own path asked only after the folders on the way) is answered by `87325bed`; NIT 2, three stale lines, and NIT 3, the Why bullet on `--cached`, are applied to the body. After #1189 landed as `9cb156a9` (the squash of its final head `dae72509`), the branch was restacked by three merges with no rebase, `181c992c`, `dbbe541e` and `b61d218e` (main `370a23cd`). The reviewed delta and the restacked one are the same 1069 lines (sha256 `58581a52` and `4dbd7dcf`) but for the docstring's blank line; at `87325bed` it is 1088 lines (sha256 `9de5b4d6`), adding exactly round 3's NIT 1 lines. r1237d found `87325bed` READY, with no MUST and no SHOULD (#1237 issuecomment-6755448563). Its NIT 2 is applied to the body. Its NIT 1, a comment's wording, is answered by `fa6d189f`, after a merge of main `de55beb0` (`04f1d0fd`) that #1253's landing needed: one `conftest` import hunk was resolved, and the PR's own lines are otherwise unchanged. r1237e read `fa6d189f` (#1237 issuecomment-6760779988) and found the merge correct, with one SHOULD the branch already had, taken as the Known limit and #1298, which it grades READY. Tests, under a stub `gh` with a bogus token, at `87325bed` with CPython 3.12.3 on the bench (CI runs 3.14), one pytest call per line: `tests/test_adopt_check_throwaway_repos.py` 233 passed and 6 skipped (the 4 FUSE-only rows, and 2 outside this section), its #1183 section alone, 43 rows, 39 passed and 4 skipped; `tests/test_adopt_make_reads_first.py` 34 passed; `tests/test_adopt_clone_template.py`, `tests/test_adopt_git_rm_bytes.py`, `tests/test_adopt_late_failure.py`, `tests/test_adopt_mount_ignored.py` and `tests/test_adopt_submodules.py` 316 passed; `tests/test_adopt_collision_make_reads.py` with `tests/test_adopt_single_repository_record.py` 67 passed; `tests/test_scaffold_leg_path_collisions.py` 104 passed; `tests/test_path_guard_hygiene.py` with `tests/test_no_auto_maintenance.py` 179 passed and 2 skipped; `tests/test_agents_md_codes.py`, `tests/test_cli_reference.py` and `tests/test_repo_hygiene.py` 171 passed; `tests/test_shape_doctor.py` in 4 shards 112 passed, 112 passed, 113 passed, and 109 passed and 3 skipped. `tests/test_adopt_symlink_target_bytes.py` gave `13 failed, 137 passed` at `87325bed`, the same 13 rows that failed on main `370a23cd` then, each because #1170's row did not expect the `plan-case-twins` finding #1189 adds; with lane 1's #1293 (`d3143d84`) merged into a scratch copy of that head, never pushed, it gave 150 passed. #1293 has since landed as `9304069`, and `73b45ee5` holds it. At `fa6d189f`, the first file gave 260 passed and 6 skipped, with #1253's 27 rows, and `tests/test_adopt_symlink_target_bytes.py` 150 passed. It lands by fast refresh (Brett Heap, 2026-10-15T22:48:35Z). After #1189 landed, the branch was restacked over its squash by three merges, and r1237d found the result, `87325bed`, READY; after #1293 mended main, the branch was refreshed over it (`73b45ee5`); after #1253 landed, main was merged into it with r1237d's NIT 1, and r1237e found that head, `fa6d189f`, READY with one Known limit. `fa6d189f` is its H0, and it 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, 1bb333c, is green on SonarCloud and Git Bash. Lane 1's gate passed on its tree: 47 pytest calls over `tests/test_adopt_check_throwaway_repos.py`, `tests/test_adopt_symlink_target_bytes.py`, `tests/test_adopt_root_symlinks.py`, `tests/test_adopt_root_shape_paths.py`, `tests/test_adopt_clone_template.py`, `tests/test_adopt_git_rm_bytes.py`, `tests/test_adopt_late_failure.py`, `tests/test_adopt_mount_ignored.py`, `tests/test_adopt_submodules.py`, `tests/test_adopt_collision_make_reads.py`, `tests/test_adopt_make_reads_first.py`, `tests/test_adopt_next_make_reads_first.py`, `tests/test_adopt_root_manifest.py`, `tests/test_adopt_shape_pin_and_work_dir.py`, `tests/test_adopt_verify.py`, `tests/test_doctor_plan_overrides.py`, `tests/test_adopt_reencoded_files.py`, `tests/test_adopt_nested_attributes.py`, `tests/test_adopt_eol_block_through_links.py`, `tests/test_adopt_printed_sentences.py`, `tests/test_adopt_single_repository_record.py`, `tests/test_scaffold_leg_path_collisions.py`, `tests/test_path_guard_hygiene.py`, `tests/test_no_auto_maintenance.py`, `tests/test_agents_md_codes.py`, `tests/test_cli_reference.py`, `tests/test_repo_hygiene.py`, `tests/test_adopt_clone_default_remote_name.py`, `tests/test_adopt_filter_repo_origin_url.py`, `tests/test_adopt_github_exits.py`, `tests/test_adopt_partial_clone_source.py`, `tests/test_adopt_pin_row_values.py`, `tests/test_adopt_pins.py`, `tests/test_adopt_plan_against_its_source.py`, `tests/test_adopt_plan_and_remote_paths_spelled.py`, `tests/test_adopt_plan_paths_spelled.py`, `tests/test_adopt_plan_value_order.py`, `tests/test_adopt_plan_values_read_as.py`, `tests/test_adopt_relative_submodule_url.py`, `tests/test_adopt_shown_default_ignorables.py`, `tests/test_adopt_source_clone_record.py`, `tests/test_adopt_source_github_limits.py`, `tests/test_adopt_spelled_unambiguous.py`, `tests/test_adopt_unsearchable_source.py`, `tests/test_advisory_agents_md_symlink.py`, `tests/test_bootstrap_spelling.py`, `tests/test_doctor_local_leg_aliases.py`, `tests/test_doctor_unreadable_paths.py`, `tests/test_doctor_unreadable_pin.py`, `tests/test_family.py`, `tests/test_load_yaml_refusals.py`, `tests/test_manifest_validator.py`, `tests/test_naming_gate_spelled.py`, `tests/test_naming_policy_line_break.py`, `tests/test_pinned_copy_text.py`, `tests/test_root_git_unreadable.py`, `tests/test_shape_doctor.py`, `tests/test_update_shape_merged_away.py`, `tests/test_update_shape_pin_source.py`, `tests/test_update_shape_unreadable.py`, `tests/test_value_pattern_line_break.py` and `tests/test_shape_doctor.py` in 4 shards: 5,170 passed, 19 skipped. Closes #1183 Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>



Closes #1192
This branch starts from main at
93d29314, #1169's squash, as one more commit series on top of it:e0105903(the change and 16 rows),af48d8de(2 more rows, for the mutants) and18c2aaef(the stop the new finding names, and itsexecuterow; see "Why" for the run that made it change), then the review round's845666aa,898e9a5eandad70474d(see "Review round"). The 18 rows, mutants M1-M10 and the gate under "Tests" ran at18c2aaef; the review round's rows, mutants and gate ran atad70474d.Outside v1.2.0 by Brett Heap's ruling of 2026-10-21T10:32:04Z
What
check's rehearsal asks the mount'sgit rmas a content compare:update-index -q --refreshover itsTAKENindex, thendiff-files --name-only. That index holds what the plan sends to a leg or drops, and also every.gitattributesof the tree, the root's own kept one included, so the refresh ran the clean filter of rulesgit rmnever compares; and nothing read its exit code. Under a required clean filter that fails for the root's.gitattributes, the refresh died there anddiff-fileslisted every file it had not reached. Measured on base93d29314with git 2.43, in-process, wrapping_SplitRehearsal.git, in each of the three forms:update-index -q --refresh: exit 128,fatal: .gitattributes: clean filter 'w1136' failed;diff-files --name-only -z: exit 0,.gitattributes specs/001-feature/spec.md;_reencoded_files_findings: oneplan-file-reencoded.At head (measured at
e0105903, whose_reencoded_files_findingsis18c2aaef's: the later commits change one constant the finding names, comments and rows), the same probe:update-index -z --assume-unchanged --stdinexit 0, the refresh exit 0,diff-fileslists nothing, and_reencoded_files_findingsgives nothing.Measured with
check, git 2.43, CPython 3.12.3; "base" is93d29314, "head" is18c2aaef. "The filter" isfilter.w1136withclean=false,smudge=cat,required=true. "The three forms" are a global config,GIT_CONFIG_PARAMETERSandGIT_CONFIG_COUNT.*.png binary;attr.treenames, by its object id, a side-branch tree whose.gitattributessays/.gitattributes filter=w1136and*.md text; the filter; in each of the three formsplan-attributes-reencoded(clean filter 'w1136' failed) andplan-file-reencoded"the plan sends 1 file to a leg or drops it ...specs/001-feature/spec.md", a file the split stores as its blobplan-attributes-reencodedalonespecs/001-feature/spec.mdcommitted with CRLF (control: the compare runs to its end and a real file is named)plan-attributes-reencodedandplan-file-reencodednaming the spec*.md textalone, no filter (control)plan ok/notes.txt filter=w1136,notes.txtsent to the spec leg, the code leg or dropped; the filter inGIT_CONFIG_PARAMETERSplan-file-reencoded"the plan sends 1 file ... would store it as other bytes than its blob ...:notes.txt", from the list of files the dead compare never reachedplan-file-reencoded: "this machine's git refuses to compare what the plan sends to a leg or drops with its blob, as the mount'sgit rmdoes (git saidfatal: notes.txt: clean filter 'w1136' failed), soexecutewould stop after the leg repositories exist, at the first step that reads that file again: extracting the spec leg, extracting the code leg once the spec leg is pushed, or, once both legs are pushed, cloning the source for the split or mounting the legs. Change the rule or the setting git names, and re-runplan." (head atad70474d)executeREFUSED plan-file-reencodedbefore any leg, with base's wordingREFUSED plan-file-reencodedbefore any leg, with head'sexecutewithcheck's refusal patched out (the measurement behind the stop it names)REFUSED extracting the spec legatgit checkout -q -B adopt/three-repo-shape <commit>,fatal: notes.txt: clean filter 'w1136' failed, in 47 of 48 runs here, wherever the plan sent the file; onceREFUSED extracting the code leg, the same way, "and the spec leg is pushed"; with the filter kept out of both extractions,REFUSED cloning the source for the splitat the samegit checkout -q -B, "and both legs are pushed", in 24 of 24 (r1253) and 24 of 24 hereexecuteis not changedshape, whereshape/.gitattributesgoes, and says* text eol=lfand/notes.txt filter=w1136;notes.txtsent to the spec leg (the rehearsal cannot write the split's root)plan-root-blocks-shape-copyand "the plan sends 4 files to a leg or drops them", three of them LF files the compare never reachedplan-root-blocks-shape-copyand the compare's refusal*.md filter=w1136(every Markdown file)plan-file-reencodednaming the spec from the stale list, then the store's refusal (README.md), then the copies' (AGENTS-shape.md)docs/.gitattributessent to the spec leg under the root's* text eol=lf(control: only the rulesgit rmleaves are skipped)plan-file-reencodednamingdocs/.gitattributesWhy
git rmasks. The mount'sgit rm -r -q -- <paths>compares only what it removes. Each.gitattributesit leaves now stays inTAKEN, so the rules are read as before, and is marked--assume-unchanged, whichupdate-index --refreshanddiff-filesboth skip. Holding them out of the index instead would leave git only the work tree's copies to read the rules from, where today it falls back to the index's; the bit keeps the index as it was and changes only the compare. Their compare result was never used (takenkeeps only paths inmoved), so the bit changes only that their own filter no longer stops the compare. A.gitattributesthe plan sends to a leg or drops, which a rule reaches, is inmovedand still compared (thedocs/.gitattributescontrol; mutant M2).-qmakes a file that needs an update no error, so a nonzero exit is git refusing the compare (a filter that fails on the way in). Then its list is not read, and the finding is git's last line, as_refused_findinggives every refusal of the rehearsal;COMPARE_REFUSEDis the step. This mirrors the split's side, where a refusedgit add -ualready givesstored = []andSTORE_REFUSED. It is also why the brief's plainest reading, "read the code and name nothing on a failure", was not taken: for a filter that fails for a file the plan sends to a leg (thenotes.txtrows), base refused with the stale list,executewith the check patched out made both legs and stopped extracting one, and naming nothing would have made it a falseplan ok..gitattributesis adopt-project.py: a nested.gitattributessettingeolor-textfor a pinned copy outranks #471's root LF block, so Windows writes CRLF #530's D5(a) question (_stored_as_written,plan-attributes-reencoded), and the split's side already leaves it out ofSTOREDfor that reason; a kept nested.gitattributeswhose filter fails is named by the split'sgit add -u(STORE_REFUSED; the review round's row, a folder named in UTF-8 or not, and mutants R2 and R9). So skipping them in the compare loses no finding.executewith the check patched out stopped extracting the spec leg in 47 of 48 runs here and once extracting the code leg, after the spec leg was pushed: that time the spec leg'sgit checkout -Btrusted the file's stat data. Which step reads the file again is the clock's to decide (READ_AGAIN), soSTOPS_AT_A_READnames the steps in order, and that row now asks only thatexecuterefuses before any leg. Each leg's extraction, and then the split's own clone once both legs are pushed (cloning the source for the split), clones the whole source and runsgit checkout -q -Bin it; the mount'sgit rmcomes after all three. The first round of this text left the split's clone out (r1253's SHOULD-1): with the filter kept out of both extractions,executestopped there in 24 of 24 runs. So the text names four steps: extracting the spec leg, extracting the code leg once the spec leg is pushed, or, once both legs are pushed, cloning the source for the split or mounting the legs; and a row now runsexecutewith the check patched out and asks that it stops at one of them, none in particular._reencoded_files_findingsand_SplitRehearsal, each git command goes throughasked(raises_Unasked) orrefused(returns git's line):refused_paths,_rules_reaching'sread-tree,update-index,hash-objectandcheck-attr,hold,checkout,diff-files,add -u,staged, and_copies_stored'sadd -fandhash-object;_throwaway_madeand_objects_borrowedcheck theirs. The refresh was the one rawasked.git(...)call; none is left outside the class.Tests
The 18 new rows (
tests/test_adopt_check_throwaway_repos.py, section "#1192: the mount's compare, under a filter that fails"), base against head, in the probe environment, node ids passed one per argument:93d2931418c2aaeftest_a_side_trees_failing_filter_over_its_text_rule_is_one_finding(the three forms)test_a_file_the_compare_reaches_is_still_named_beside_that_filter(control, three forms)test_the_side_trees_text_rule_alone_is_plan_ok(control, three forms)test_a_compare_git_refuses_is_that_finding_in_gits_words(spec, code, drop)test_execute_refuses_a_compare_git_refuses_before_any_leg(spec, code, drop)test_a_compare_git_refuses_is_named_where_the_root_is_not_laid_outtest_a_gitattributes_the_mount_removes_is_still_compared(control)test_each_refusal_is_named_in_the_groups_orderThe base column ran in a scratch clone at
18c2aaefwithadopt-project.pyreplaced by93d29314's (blob5e8cfd75), and restored to18c2aaef's (blob698ce8e5) afterwards. The 7 that pass on base are the controls, as a control must.Mutants: 10 killed of 10, no survivor. Run in that scratch clone at
18c2aaefover the 18 ids; each mutant replaced one exact text ofadopt-project.py(asserted to occur once), and the file was restored in afinally; after each,git hash-object adopt-project.pywas698ce8e5, equal togit rev-parse HEAD:adopt-project.py.--assume-unchangedcalltest_a_gitattributes_the_mount_removes_is_still_comparedasked.git,compare_said = None)executerows, the no-root row, the order rowdiff-files' list read after a refused comparetest_a_compare_git_refuses_is_named_where_the_root_is_not_laid_outSTOPS_AT_A_CLONEtest_each_refusal_is_named_in_the_groups_order-qdocs/.gitattributescontrol--really-refresh, which ignores the bitThe same ten (M7 then against
STOPS_AT_THE_SPLIT) also killed 10 of 10 ataf48d8de, over that commit's 18 ids.The gate at
18c2aaef, in the worktree, CPython 3.12.3, git 2.43, in the probe environment (a stubghfirst on PATH,GH_TOKEN=bogus-w1192, an emptyGH_CONFIG_DIR,GIT_CONFIG_GLOBAL=/dev/null,GIT_SSH_COMMAND=false,EMAILset to the task's.invalidaddress, noLANES_LANE), each call under 9 minutes, at most two at once:test_adopt_check_throwaway_repos.pytest_adopt_reencoded_files.pytest_adopt_single_repository_record.pytest_scaffold_leg_path_collisions.pytest_path_guard_hygiene.py,test_no_auto_maintenance.pytest_no_auto_maintenance.py:222, "the session began with GIT_CONFIG_GLOBAL set, and its file includes that one", which the probe environment'sGIT_CONFIG_GLOBAL=/dev/nullcausestest_agents_md_codes.py,test_cli_reference.py,test_repo_hygiene.pytest_shape_doctor.py, shard 0 of 4 (113 ids)test_shape_doctor.py, shard 1 of 4 (112 ids)test_shape_doctor.py, shard 2 of 4 (112 ids)test_shape_doctor.py, shard 3 of 4 (112 ids)test_adopt_nested_attributes.py(beyond the brief: it asks D5(a) and the rehearsal)test_adopt_printed_sentences.py(beyond the brief: itsSTOPSrows runexecutewith the check patched out)Earlier rounds of the same calls, before the stop text changed: at
e0105903, G1 167 passed, 1 skipped (183.8 s), G2 51 passed, G3 39 passed; ataf48d8de, G4 104 passed, G5 179 passed, 2 skipped, G6 171 passed, and the four shards 112 passed, 1 skipped; 111 passed, 1 skipped; 112 passed; 111 passed, 1 skipped.Review round (r1253: two SHOULDs, two NITs)
r1253 reviewed
18c2aaef(issuecomment-6723519114): no MUST, two SHOULDs, two NITs. Three commits answer it, each pushed with an explicit refspec and read back withgit ls-remote. Main is not merged here: lane 1 refreshes the branch at landing.845666aa: SHOULD-1 and NIT-1, inSTOPS_AT_A_READand its comment block inadopt-project.py, andcompare_refused()in the test file.898e9a5e: SHOULD-2's row.ad70474d: SHOULD-1's optional row.SHOULD-1: the stop left out "cloning the source for the split". Between the extractions and the mount, the split's own clone runs the same
git cloneandgit checkout -q -Ban extraction runs. With the filter kept out of both extractions, r1253's probe stopped there in 24 of 24 runs.STOPS_AT_A_READnow says "at the first step that reads that file again: extracting the spec leg, extracting the code leg once the spec leg is pushed, or, once both legs are pushed, cloning the source for the split or mounting the legs". Its comment says each extraction, and then the split's clone, runs that checkout, and that the mount'sgit rmcomes after all three.compare_refused(), the "What" table, Why and Known limits follow.test_execute_stops_at_a_step_the_refused_compare_namesrunsexecutein-process with_refuse_what_check_findspatched out, fornotes.txtsent to the spec leg, the code leg or dropped. It has two forms:_extract_legruns, as in r1253's probe.executemust exit 2 at a step the finding names, with git'sfatal: notes.txt: clean filter 'w1136' failed, and its notice must say the legs are pushed that the finding names for that step ("neither leg", "the spec leg", "both legs"). In the second form, both legs must be pushed.executeexits 0 and the row skips, as the finding's own limit saysexecutemay go on. Any other exit fails the row.ad70474d's tool (the row run 8 times per id):SHOULD-2: no row covered a kept nested
.gitattributes, or a name that is not UTF-8.test_a_kept_nested_gitattributes_whose_filter_fails_is_the_stores_alonekeeps.github/<folder>/.gitattributesin the assembly root. Three ids:the-roots-rule: the root says.github/*/.gitattributes filter=w1136and*.md text;<folder>iskept;the-roots-rule-not-utf-8: the same, with<folder>cafand the byte 0xE9.planasks about it as".github/caf\udce9/"withleg: null, answeredroot;its-own-rule, r1253's kept-own variant: the kept file says.gitattributes filter=w1136, and the root says*.md text.codes(result) == [REENCODED_FILES], and that the one finding is the split's store's refusal: the whole line for the UTF-8 names, and every word but the folder's name for the other (NIT-2).93d29314each id gave a second finding, a falseplan-file-reencodednamingspecs/001-feature/spec.md: a second form of adopt-project.py: under a failing clean filter that a rule names for.gitattributes,checkalso printsplan-file-reencodedfor a file the split stores as its blob, beside the rightplan-attributes-reencoded(#1136) #1192, which the change fixed but no row held.skip_where_a_name_cannot_be_not_utf_8), and its folder is built withchr(0xDCE9), so the module imports on Windows.NIT-1:
STOPS_AT_A_CLONE's comment said both legs are extracted "before either is pushed". It now says the refusal comes extracting the spec leg, before either is pushed, since each leg is extracted and then pushed in turn, the spec leg first. The Known limits bullet and the "Not in this PR" line about it are gone.NIT-2: no code change. It is in Known limits as a follow-up candidate, with follow-up text.
The 9 new ids, base against head. They ran in a scratch clone at
ad70474d, withadopt-project.pyswapped to the named commit's. After each run it was restored to blob5778d0e3, equal togit rev-parse HEAD:adopt-project.py.93d29314(blob5e8cfd75)18c2aaef, before this round (blob698ce8e5)ad70474d.gitattributesspecs/001-feature/spec.mdexecutestops, extractions as they runexecutestops, as if trusting the statThe kept row passes at
18c2aaefbecause the marking it holds was already there: it is the coverage r1253 asked for, and R2 and R9 show it holds the marking.Mutants: 11 killed of 11, no survivor. They ran in that scratch clone at
ad70474dover the #1192 section's 27 ids. Each replaced one exact text ofadopt-project.py(asserted to occur once), and the file was restored in afinally. After each,git hash-object adopt-project.pywas5778d0e3, equal togit rev-parse HEAD:adopt-project.py.STOPS_AT_A_READ.18c2aaef.18c2aaef's text: the split's own clone left outexecuteidsexecuteidsexecuteids as they run (code, drop). The spec one passed. Under T5 it can pass only whereexecutestopped at a later step than the spec leg's extraction, one T5 still names, so in that run the clock passed the spec leg by, as it did once in 48 runs above. A row that asks for no step in particular must let that passexecuteids as they runexecuteids.gitattributesmarkedSTOPS_AT_THE_SPLITexecuteids_nulthe-roots-rule-not-utf-8"The exact-text rows" are the 8 ids that hold
compare_refused()whole: the compare refused in git's words (3),executerefuses before any leg (3), the root not laid out (1) and the groups' order (1). Every T mutant fails those 8.The gate at
ad70474d, in the worktree, CPython 3.12.3, git 2.43, in the probe environment (as under "Tests", withGH_TOKEN=bogus-w1253f), each call under 9 minutes, at most two at once:test_adopt_check_throwaway_repos.pytest_adopt_reencoded_files.py,test_adopt_nested_attributes.pytest_adopt_printed_sentences.py,test_adopt_single_repository_record.pytest_scaffold_leg_path_collisions.pytest_path_guard_hygiene.py,test_no_auto_maintenance.pytest_no_auto_maintenance.py:222, caused by the probe environment'sGIT_CONFIG_GLOBAL=/dev/nulltest_shape_doctor.py, shard 0 of 4 (113 ids)Known limits
git add -u.executestops for such a refusal is the clock's (STOPS_AT_A_READ). Measured here with the check patched out: the spec leg's extraction in 47 of 48 runs, the code leg's, after the spec leg was pushed, in one, and again 47 and 1 of 48 atad70474d; with the filter kept out of both extractions, the split's own clone in 24 of 24 (r1253) and 24 of 24 here. The mount'sgit rmwas never the first to read the file in any run: after a checkout that trusted the file's stat data, no later index write falls in the second it was written, unless the clock steps back. In r1253b's probe the mount was the first read only with the index's mtime set by hand (r1253b's NIT-A). In a run where no step reads the file again,executemay go on: the finding names a source that can fail, as the moved-files finding does (READ_AGAIN).update-index --refreshanddiff-filesskip an--assume-unchangedentry is git's documented behaviour; CI's git was not measured here._SplitRehearsal.refuseddecodes git's stderr with"replace", so in the review round's row git's words name the folder ascafand U+FFFD where_spelled's escape (adopt-project.py: a kept or dropped name reaches the split commit and the pull request body unspelled, and_spelled,_shownandplan's report print text that reads as another name, or raw #900) would printcaf\udce9; the row holds every word of that finding but the folder's name. It reaches every refusal the rehearsal names (checkout, store, copy, and now compare). Follow-up text, if wanted: "adopt-project.py:_SplitRehearsal.refuseddecodes git's stderr withreplace, so a path that is not UTF-8 in a refusalchecknames prints as U+FFFD, not as_spelled's\udcNNescape (measured on adopt-project.py:check's compare for the mount'sgit rmskips the.gitattributesit leaves and reads its exit code, so the root's failing filter isplan-attributes-reencodedalone, and a refused compare is named in git's words (#1192) #1253's branch with git 2.43:fatal: .github/caf<U+FFFD>/.gitattributes: clean filter 'w1136' failed)".Not in this PR
_stored_as_written), the split's side (git add -u), the pinned copies' question, orexecute's own commands.TAKENholds, or to which files are asked about.--helptext or doc-trio row: no doc namesplan-file-reencoded's sentences (git grep -n 'file-reencoded' -- ':!tests' ':!adopt-project.py'is empty).Lane: openreposhape-1 (openRepoShape-1)
🤖 Generated with Claude Code
Summary by Sourcery
Align the rehearsal's mount comparison with
git rmso root filter failures produce a single accurate finding instead of stale changed-file results.New Features:
plan-file-reencodedfindings using Git's refusal message.Bug Fixes:
.gitattributesfiles left by the mount'sgit rmfrom causing false re-encoding findings for files later in the comparison..gitattributesfiles that the plan actually removes or moves.Enhancements:
Tests:
.gitattributespaths, and execution stop behavior.