Repository navigation
scaffold-project.py: a partial-clone --pin-source short of the pinned commit or its trees is pin-source-unreadable, named a partial clone with git fetch --refetch --no-filter <remote> <commit>, and no longer fetched into (#1182) - #1223
Conversation
…e scaffold reads its pins with `GIT_NO_LAZY_FETCH=1`, so a partial-clone `--pin-source` short of the pinned commit or its trees is `pin-source-unreadable`, naming the partial clone and `git fetch --refetch --no-filter`, and is no longer fetched into (#1182) Measured on main 961640c with git 2.43, through the scaffold's real run and `--dry-run` alike: a `--filter=tree:0 --no-checkout` `--pin-source`, and a `--filter=blob:none --no-checkout` one lacking the pinned commit, each ran the clone's promisor `upload-pack` once (`.promisor` 1 -> 2) and the run went on to exit 0. A `blob:none` clone holding the commit ran none. Now `_declaration` reads the pins through `pin_values_unfetched`, which is `declared_pin_values` under `lazy_fetch_off` (the environment put back after), and which re-raises the reader's own `pin-source-unreadable` for a partial clone (`promisor_remotes`, the doctor's #683 rule) with that reason and the `git fetch --refetch --no-filter <remote>` cure. A clone that is no partial one keeps the reader's refusal and its `git fetch --all` remediation. Both forms now exit 2 with no `upload-pack` run and nothing created. `--pin-source`'s help says so; docs/cli.md regenerated with scripts/render-cli-reference.py. `adopt-project.py plan` is not changed here. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… the clone only for `pin-source-unreadable`, which only a `--pin-source` gives (#1182) Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…--pin-source`, each counting the clone's `upload-pack` runs: refused with none at head, fetched into once on base (#1182) Each row clones a local origin (`make_source_repo`, `main` plus a `side` commit, filters allowed) and sets `remote.origin.uploadpack` to a wrapper that logs each run, so "no fetch" is an answer the controls give too. - A `tree:0` clone holding the pinned commit and none of its trees, and a `blob:none` clone lacking the commit, `--dry-run` and the real run: `pin-source-unreadable` naming the partial clone, `origin` and `git fetch --refetch --no-filter origin`, no `git fetch --all`, nothing made, 0 runs, `objects/` unchanged. On 961640c: exit 0 after 1 run each. - The cure as printed, run in a `tree:0` clone, lets the real run read the origin's digest with no fetch of its own. - Controls, passing on 961640c too: a full clone, a `blob:none` clone holding the commit (checked out or not) and a `tree:0` clone made whole read the origin's digest with 0 runs; a full clone lacking the commit keeps `git fetch --all`; a folder in a partial clone is still `pin-source-not-a-clone`, with no partial sentence. - In process: `main` refuses a `tree:0` clone with 0 runs, and with `NO_LAZY_FETCH` renamed to a name git does not read, it fetches and exits 0; neither name is left in `os.environ`. - `pin_values_unfetched` with two promisor remotes names both and gives one cure each, in the reader's words, with the reader's refusal as the cause. - `lazy_fetch_off`, `promisor_remotes` (10 configs and a missing folder), `refetch_command` and `_remote_named`, one by one. Rows needing git to honour `GIT_NO_LAZY_FETCH` ask it first and skip where it is ignored. 36 pass at head; on 961640c the 6 controls pass and the other 30 fail. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
The clone is named by its resolved absolute path in the refusal's remediation, not as typed; a row with a relative --pin-source kills the mutant that names it as typed. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… and raises nothing (#1182) A remote.<name>.promisor of 'maybe' makes git config --type=bool --get-regexp exit 128 with nothing written (git 2.43 collects every value before it writes one), so only the partialclonefilter names a remote. The row passes with or without the returncode check in _config_listed: no config makes git 2.43 write part of a listing and then fail, so that check stays a named survivor. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Reviewer's GuideUses of the APIRoute scaffold pin reads through the new reader and pass the scaffold’s refusal-remediation wording.
ImplementationAdd a no-lazy-fetch pin reader that preserves the original refusal, identifies partial-clone promisor remotes, and gives a commit-specific fetch remedy; carry the unreadable commit on the underlying refusal so that remedy can name it.
UIExplain partial-clone pin-source behavior and the Git-version-dependent no-fetch guarantee in the scaffold’s command-line help.
DocumentationDocument the partial-clone behavior and the Git-version condition in the CLI reference.
TestsAdd coverage for partial-clone refusals, no-fetch behavior, commit-specific remedies, promisor-remote handling, and environment restoration.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
(lane openRepoShape-1, 2026-10-23T20:50:54Z) r1223, lane 1's independent reviewer (not the writer), reviewed #1223 at
The full reviewReview of PR #1223 (r1223, first independent review), head
|
| id | mutant | result (first failing row) |
|---|---|---|
| S1 | _declaration reads with declared_pin_values again |
killed (refused[tree0-dry-run]) |
| S2 | reader="the tool" |
killed (refused[tree0-dry-run]) |
| S3 | nothing_made="" |
killed (refused[tree0-dry-run]) |
| S4 | help sentences dropped | killed (test_cli_reference) |
| S5 | declared_pin_values not imported into the scaffold |
killed (test_adopt_pins one-implementation) |
| M1 | variable set to "0" |
killed (refused[tree0-dry-run]) |
| M2 | prior value forgotten | killed (lazy_fetch_off[0]) |
| M3 | an unset variable not removed | killed (in-process) |
| M4 | a prior value removed, not restored | killed (lazy_fetch_off[0]) |
| M5 | restored only on a normal exit | killed (in-process) |
| M6 | name hard-coded, not read from NO_LAZY_FETCH |
killed (in-process) |
| M7 | _config_listed raises OSError |
killed (folder not there) |
| M8 | a failed run's stdout returned (writer's M08) | SURVIVED |
| M9 | -z dropped |
killed (refused) |
| M10 | git config run in the process cwd |
killed (refused) |
| M11 | --type=bool dropped |
killed (promisor-yes) |
| M12 | any promisor value counts | killed (promisor-false) |
| M13 | extensions.partialclone kept in config order |
killed (named-last) |
| M14 | partialclonefilter alone not a promisor |
killed (filter) |
| M15 | or changed to and |
killed (refused) |
| M16 | no dedupe | killed (refused) |
| M17 | the named remote not moved last | killed (named-last) |
| M18 | the named remote first | killed (named-last) |
| M19 | subsection cut at the first dot | killed (dotted-name) |
| M20 | extensions.partialclone dropped from PROMISOR_KEYS |
killed (named-last) |
| M21 | _remote_named ignores backticks |
killed (refetch[a-backtick]) |
| M22 | _remote_named ignores printability |
killed (refetch[unprintable]) |
| M23 | refetch_command pastes an option |
killed (an-option) |
| M24 | refetch_command does not quote |
killed (spaced) |
| M25 | refetch_command ignores backticks |
killed (a-backtick) |
| M26 | no lazy_fetch_off (the fix undone) |
killed (refused) |
| M27 | every refusal code asked about | killed (folder in a partial clone) |
| M28 | clone named as typed (writer's M37) | killed (relative pin source) |
| M29 | a clone with no promisor remote still called partial | killed (full clone lacking the commit) |
| M30 | from None |
killed (two promisor remotes) |
| M31 | only the first remote's cure | killed (two promisor remotes) |
| M32 | only the first remote named | killed (two promisor remotes) |
| M33 | reader hard-coded in the detail | killed (two promisor remotes) |
| M34 | the reader's own detail dropped | killed (two promisor remotes) |
| M35 | nothing_made dropped |
killed (refused) |
| M36 | PIN_SOURCE_UNREADABLE misspelt |
killed (refused) |
M8 is equivalent on git 2.43, as the body says. $S/probe_m08.py ran both listings _config_listed makes over many configs. Not one wrote output and then failed:
- a bad boolean, in all 6 orders, and in local, included, global,
GIT_CONFIG_COUNTandGIT_CONFIG_PARAMETERSscope:bool rc=128 stdout=0B fatal: bad boolean config value 'maybe'; - a bad config line:
rc=128 stdout=0Bfor both listings; - a valueless
extensions.partialclone: git itself segfaults (rc=-11 stdout=0B).
Measurements
- Base against head (new file only). Head:
38 passed, rc 0. Baseef619c74awith the file copied in:32 failed, 6 passed. The 6 are the 4 controls, the full clone lacking the commit and the folder row, all of which pass on both. The refusal, relative-path and cure rows fail on base by behaviour (assert 0 == 2, and no cure found). The unit rows fail withAttributeError, since the helpers are new. - No fetch (
$S/probe_nofetch.py, which countsupload-packruns, packs and.promisorfiles):- Base, every short form (
tree0,lacks-commit,tree0-bare, behind), dry and real run:rc=0 runs 0->1 packs 1->2 promisor 1->2. - Head, the same forms:
rc=2 runs 0->0 packs 1->1 promisor 1->1 made=[]. - Accepted runs (
blobnone,full) on both:rc=0 runs 0->0. - After the cure, a dry run and a real run left
objects/byte-identical. An earlier 13 to 10 file change came from git's background gc after the cure, not from the scaffold.
- Base, every short form (
- 3.14-like shim (
$S/shim/sitecustomize.py; it was shown to load, and turns aPermissionErrorinto False): the new file gives38 passed. - Docs and codes:
scripts/render-cli-reference.py --checkgives[ok] docs/cli.md is what the generator produces.test_path_guard_hygiene,test_agents_md_codes,test_cli_referenceandtest_repo_hygienegive220 passed.test_no_auto_maintenancegives58 passed, 2 skipped(the probe environment'sGIT_CONFIG_GLOBALskip).- The PR reuses
pin-source-unreadableand adds no code. The code test scans onlyAGENTS.md, so nothing new needs listing.
- With main: main is 12 commits past
ef619c74a; 50ce8ab touchesscaffold-project.pyand 0d76e4c touchesshape_materialize.py.git merge-treeis clean (treeda415ced8). On that tree, the new file plus hygiene, cli-reference and codes give229 passed, and the render check is ok. - Body claims checked and true:
- exactly one closing form (
Closes #1182);closingIssuesReferences= [1182]; title is 225 characters; - the stacking statement (merge-base
ef619c74a); - table rows 1, 2 and 4 (stderr byte-identical on base and head), and row 3 (see NIT 4);
- 38 rows: 11
promisor_remotesconfigs, 5refetch_commandnames, 4_remote_namednames; - 53 + 9 = 62 gate files; collect-only gives
5692 tests collected, doctor 448,test_repo_hygiene101; - the totals arithmetic (5687+5; 445+3; 6132+8; 6454+10; 6353 distinct);
- the cited skip reasons;
scaffold.declared_pin_valuesis read bytest_adopt_pins.py:1818andtest_scaffold_leg_path_collisions.py:438;- the promisor rule matches
shape-doctor.pyline for line.
- exactly one closing form (
Not covered
- The body's full gate (6454 passed) was not re-run, as briefed. Only its arithmetic and collected counts were checked.
- A git that ignores
GIT_NO_LAZY_FETCH: the bench has only 2.43.0, which honours it. I did not verify the version-history claims (2.45.0, the 2024-05-14 releases, Ubuntu's build). - Real CPython 3.14: only the shim was used.
- A real GitHub promisor remote: every probe used a
file://origin, including the fetch of a commit by id. - I did not re-run the writer's own mutant batches. My 41, run at the merge head, stand in for them.
- adopt-project.py:
planruns withGIT_NO_LAZY_FETCH=1, refuses a partial-clone--sourcethat lacks objects assource-partial-clone, and names a partial--pin-sourceit could read only by fetching and the fetch that makes it whole (#1162) #1190 beyond its file list, its helper names and a clean merge-tree with this head.
Lane: openreposhape-1 (openRepoShape-1)
Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t by its id, so a blob:none clone whose branches lack it is made readable too (#1182) The printed cure was `git fetch --refetch --no-filter <remote>`, which refetches only what the clone's branches hold: a `blob:none` clone of `main` pinned on `side` was still `pin-source-unreadable` after it (r1223 on #1223). Now `git fetch --refetch --no-filter <remote> <commit>`, the commit the reader could not read, which `pin_digest_from_source`'s refusal now carries. A row runs the printed cure on that form and re-runs the scaffold to exit 0, as the `tree:0` row does. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nothing into a partial clone on a git that honours GIT_NO_LAZY_FETCH, and that an older git fetches (#1182) "the scaffold never fetches into it" held with no condition, where the PR's own known limits say a git that ignores `GIT_NO_LAZY_FETCH` fetches as before (r1223 on #1223, NIT 1). The sentence is #1190's: on a git that honours it (2.45 or later, or a security release from 2.39.4 on). docs/cli.md regenerated with scripts/render-cli-reference.py. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ch (#1182) The body's table names a checked-out `tree:0` clone (exit 0, no `upload-pack`), and no row held it (r1223 on #1223, NIT 4). It is now a kind, `tree0-checkout`, and a control row beside the full and `blob:none` clones. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
--pin-source short of the pinned commit or its trees is pin-source-unreadable, named a partial clone with git fetch --refetch --no-filter <remote>, and no longer fetched into (#1182)--pin-source short of the pinned commit or its trees is pin-source-unreadable, named a partial clone with git fetch --refetch --no-filter <remote> <commit>, and no longer fetched into (#1182)
|
(lane openRepoShape-1, 2026-10-23T21:57:04Z) r1223b, lane 1's independent re-checker (not the writer), re-checked #1223's fix round at
The full re-checkRe-check of PR #1223 at
|
… not a reviewer's id (#1182) Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
(lane openRepoShape-1, 2026-10-23T22:02:54Z) Lane 1's delta check of
Lane: openreposhape-1 (openRepoShape-1) |
|
|
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 23 hours by commenting |
…says a full name that is no pattern takes the one ref git completes it to, which may be a branch, where it said any other source names no branch (#1238) (#1244) #1238 is a wording NIT that the review of #1235 (#1230) found in the code: NIT 4 of rv1235's first review, and NIT 2 of its re-check. The docstring of `gives_a_branch_another_name` in `scripts/shape_materialize.py` ended "ANY OTHER SOURCE NAMES NO BRANCH", but git completes a source that is a full name and no pattern, and completes `refs/h` to the branch `refs/heads/refs/h` where the remote has one. The sentence now says what git does with such a source, as an open list ("such as"), and where the clash is. A reader of the docstring is no longer told that a source outside `refs/heads/` is never a branch. Wording only, in one docstring of one file: 9 lines added, 3 removed. No code, no row, no other file. The file's syntax tree with every docstring dropped is the same as main's. The sentence is at `scripts/shape_materialize.py:1720-1723`, the end of the docstring of `gives_a_branch_another_name` (line 1671): ``` 1720: BRANCH REACHES). A shorter start, such as `refs/*` or `*`, can name a 1721: tag, and that clause has left it out first. ANY OTHER SOURCE NAMES NO 1722: BRANCH, though a refspec from one can still put a ref on a branch's 1723: name: `origin_fetch_refspecs` says where (WHAT CAN STILL CLASH). ``` It is true of a source in another namespace such as `refs/pull/7/head`. It is not true of every other source. A source that is a full name and no pattern takes the one ref git completes the name to on the remote: for `refs/h`, `refs/h` itself, the branch `refs/heads/refs/h`, the tag `refs/tags/refs/h`, `refs/refs/h` or `refs/remotes/refs/h`, and where several exist git takes the exact ref over a tag over a branch. Where the remote has the branch, the source is a branch. The code is right: `gives_a_branch_another_name("refs/h", ...)` is False, because the source has no `*` and does not start with `refs/heads/`, so the refspec is carried. What fails afterwards is the clash the docstring's own next clause names. Only the words were untrue. Measured on this branch's base, with git 2.43.0 (`/usr/bin/git`) and git 2.47.1, which gave the same answers on every row. Local bare remotes, `GIT_CONFIG_GLOBAL=/dev/null`, `GIT_CONFIG_NOSYSTEM=1`, `GIT_SSH_COMMAND=false`. rv1235's probe scripts were run again here (copied unchanged, new output folders), and their logs are identical to rv1235's. The fetch was `+refs/heads/*:refs/remotes/origin/*` plus the refspec of the row, and the remote had `main` and `hy`: ``` the remote has refspec result branch refs/heads/refs/h +refs/h:refs/remotes/origin/hy 128 Cannot fetch both refs/heads/hy and refs/heads/refs/h to refs/remotes/origin/hy tag refs/tags/refs/h +refs/h:refs/remotes/origin/hy 128 Cannot fetch both refs/heads/hy and refs/tags/refs/h to refs/remotes/origin/hy exact ref refs/h (update-ref) +refs/h:refs/remotes/origin/hy 128 Cannot fetch both refs/heads/hy and refs/h to refs/remotes/origin/hy refs/refs/h or refs/remotes/refs/h +refs/h:refs/remotes/origin/hy 128, the same message naming that ref each of those five refs, alone onto origin/not-a-branch 0, holds that ref's commit branch refs/heads/refs/h onto origin/refs/h 0 (the branch's own name: no clash) refs/pull/7/head onto origin/main 128 Cannot fetch both refs/heads/main and refs/pull/7/head to refs/remotes/origin/main branch refs/heads/main onto origin/main 0 ``` So a name with no `*` can be a branch that its spelling does not show, and the clash is a ref that is not that branch put on a branch's name, which is what the second half of the sentence has to say. "ANY OTHER" was wrong in a second way: a carried refspec from a source that IS the branch does not clash onto that branch's own name. The docstring's last sentence, now lines 1721-1729: ``` tag, and that clause has left it out first. ANY OTHER SOURCE TAKES NO BRANCH BY A PATTERN, and a full name that is no pattern, such as `refs/h`, takes the one ref git completes it to on the remote: that ref itself, or one such as the branch `refs/heads/refs/h` or the tag `refs/tags/refs/h` (measured, git 2.43 and 2.47.1). Such a name can stand for a branch its spelling does not show, so it is not left out here. A refspec from any such source can still put a ref on a branch's name, if the ref is not that branch itself: `origin_fetch_refspecs` says where (WHAT CAN STILL CLASH). ``` - **"Takes no branch by a pattern"** holds for every source this sentence covers. Git matches a pattern against each ref's whole name, and a ref under `refs/heads/` starts with the part before the `*` only where that part is a start of `refs/heads/` or is under it, the two cases the function reads before this sentence. - **The list is open** ("one such as"): it names the exact ref, the branch and the tag, and the rows above show two more completions (`refs/refs/h`, `refs/remotes/refs/h`), so no reader takes the three as all. - **"So it is not left out here"** is what the code does: `gives_a_branch_another_name` is False for `refs/h` onto `origin/hy`, onto `origin/refs/h`, for `refs/pull/7/head` onto `origin/main`, and for the pattern `refs/pull/*/head`, and `origin_fetch_refspecs(["+refs/h:refs/remotes/origin/hy"])` returns it carried. It is True for `refs/heads/main` onto `origin/hy`, as before. - **"If the ref is not that branch itself"** is the condition the rows show: the clash is two different refs on one name, a branch's. The checks the issue's Verify lists: - **The diff is only that docstring.** The diff has one hunk, inside the docstring, which spans lines 1672-1724 on main and 1672-1730 here. The file's tree with every docstring dropped (module, class and function: 168 each side) is equal on main (`50869f384`) and at this head under `python3 -I`, `ast.dump`: 380120 characters of dump on both sides. A control that renames `gives_a_branch_another_name` on the head side gives 380121 and DIFFERENT, and the same trees with the docstrings kept differ (520956 against 521366), so the check can fail. Python 3.12.3. The check compares two dumps made by one interpreter and asserts no text that depends on the version. - **`git grep -n 'ANY OTHER SOURCE NAMES NO$' -- scripts/`** finds nothing at this head. On main it finds `shape_materialize.py:1721`. With any case and no line end, `git grep -n -i 'other source names no'` also finds nothing here, and nothing but that line on main. - **No added line is over 79 columns or holds a non-ASCII character.** 9 lines are added, the longest is 75 columns, and none has a tab or trailing space. The file's own width is unchanged: 20 lines over 79 columns (longest 118) and 90 lines with a non-ASCII character, as on main, none of them mine. - **No test, `README.md`, `docs/` page or `AGENTS.md` line pins the sentence.** The issue's grep holds at this head. The issue asks whether `shape_materialize.py:1874` (now 1880, in the docstring of `origin_fetch_refspecs`) and `bump-leg.py:1165` (in `_leg_fetch_refspecs`) want the same change. Both paragraphs were read, and both are left as they are: ``` shape_materialize.py:1880: WHAT CAN STILL CLASH is a refspec carried whose source names no branch, bump-leg.py:1165: whose source names no branch, onto a name a branch of the remote has ``` 1. **They define a shape by its examples and say nothing about what git completes a name to.** Each goes on at once to the pull requests (`origin/pr/` where a branch `pr/7` is, and `+refs/pull/7/head:refs/remotes/origin/main` beside a branch `main`), and neither names `refs/h`. They were not the sentence that told a reader a source is never a branch. 2. **"Names no branch" is spelling there, as it is in the sentence the function's docstring opens with.** "A SOURCE UNDER `refs/heads/` NAMES BRANCHES" is true by spelling too: `can_name_a_tag`'s docstring measures that `+refs/heads/zz` took the tag `refs/tags/refs/heads/zz` where the remote had no branch `zz`. The sentence changed here now says outright that the spelling of a name with no `*` does not show what it stands for, so the docstring that defines the class carries the caveat the two borrowers need. 3. **The mechanism they state is the one that fails `refs/h`:** "wherever a name it writes is a branch's". The `origin_fetch_refspecs` paragraph ends with why such a refspec is carried at all: "Which names the remote's branches have is not known from its refspecs, and left out, what such a refspec keeps would be pruned on every run". That holds for `refs/h` word for word. 4. **The cost of leaving them is one reading:** a reader who takes "names no branch" in git's sense meets the single case `refs/h` beside a remote branch `refs/heads/refs/h`. If the review wants a word there, it is a few words in each place, and no open PR touches either paragraph (merge-trees below), so it can be a fix round. None of either. No row is added or changed and no behaviour moved: the syntax tree outside the docstring is main's, so there is nothing for main to fail and nothing to mutate. `gives_a_branch_another_name` returns what it returned for every case in the table above (called in process at this head; the syntax tree outside the docstrings is main's). All through the lane's runner `run9.sh` (stub `gh` first on PATH, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null`), on the committed head `36ec589a6` with the tree clean (`dirty=0`), as one run of seven files at a time: `tests/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.py` (the hygiene five), `tests/test_family_bump_fetch_refspecs.py` and `tests/test_bump_leg_fetch_refspecs.py`. - **The seven files, git 2.43.0** (`/usr/bin/git`): 504 passed in 469.44s (47 `test_agents_md_codes.py`, 68 `test_bump_leg_fetch_refspecs.py`, 23 `test_cli_reference.py`, 57 `test_family_bump_fetch_refspecs.py`, 121 `test_path_guard_hygiene.py`, 87 `test_pinned_copy_text.py`, 101 `test_repo_hygiene.py`; the counts are from `--collect-only -q` on the same head and add up to 504). Log `v131/n1238/gate-g243.log`. - **The seven files, git 2.47.1** (first on PATH, `git --version` printed into the log): 504 passed in 714.00s. Log `v131/n1238/gate-g247.log`. - **`-k carried-refs-h-not-a-pattern`** over `tests/test_family_bump_fetch_refspecs.py` and `tests/test_bump_leg_fetch_refspecs.py`: 2 passed, 123 deselected, on 2.43.0 and on 2.47.1 (`run-k-g243.log`, `run-k-g247.log`). - Both runs start with `dirty=0`. Python 3.12.3 (CI runs 3.14); nothing asserts text that depends on the version. The measured git behaviour above comes from the probe scripts, not the test files. `-k carried-refs-h-not-a-pattern` over the two fetch-refspec files is part of those runs. `git merge-tree --write-tree origin/main HEAD` exits 0, with tree `9d874bcf2caf`, equal to this head's tree, against main `50869f384` (the merge base). Against the head of each open PR that touches `scripts/shape_materialize.py` or `scripts/bump-leg.py` (read from `gh pr list --state open --limit 100 --json number,headRefName,headRefOid,files`, 52 open PRs at the last read, 7 of them touch one of the two files), `git merge-tree --write-tree HEAD <head>` exits 0 and the merged tree still holds the new sentence and not the old one: ``` #1223 f50b472 exit 0 #1207 6fa1edd exit 0 #1160 0068f5a exit 0 #1131 55c30f2 exit 0 #1118 2307036 exit 0 #1105 b28f40d exit 0 #1104 de89aa8 exit 0 ``` Main moved once while this was gated, to `4829418f0` (`adopt-project.py`, `docs/cli.md` and a new test file: none of the files this change or its runs touch), and `git merge-tree --write-tree origin/main HEAD` against it also exits 0. None of their hunks is within 100 lines of the sentence changed here. Review: rv1244 and rv1244b, lane 5's independent sonnet reviewers, which wrote none of #1244: READY at `36ec589a6`, H0 of this landing (issuecomment-6723280477), with no MUST or SHOULD; its four NITs are optional (two wordings, a body note and a follow-up). CI (Brett Heap's ruling 27): H0 is the head 473959f itself, which passed tests, tests-git-bash and SonarCloud; main has touched none of its files since its base 9729315; and the local gate passed on its predicted squash tree fb798f3 over main 9252ef2: the repo_hygiene, agents_md_codes, cli_reference sets, 171 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 #1238 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…repository as `plan-case-twins` on every disk, a one-blob set as a NOTE in a leg and, in the root, two paths in one folder, and `execute` refuses the finding before any leg (#1161) (#1189) `adopt-project.py check` printed `plan ok` for a plan that keeps case twins in one repository: source paths that differ only in case (`A` and `a`, `D/x` and `d/x`), or a path that names in another case a folder above another (`F/x` and `f`). The plan is written on one disk and the clone that loses a twin is made on another, and a clone on a macOS or Windows disk checks out one path of each set. On a disk that ignores case, `execute` could then stop with `check` having said `plan ok`: as `adopt-lost` or at `git rm` mounting the legs, after both legs were pushed, or at git's `will not add file alias`, before any leg existed. - `check` now exits 1 and names `plan-case-twins`, one finding per repository the split makes (the root, the spec leg, the code leg). A set is every source path that one answered entry sends into one repository, whose paths differ only in case, or where one path names in another case a folder above another. It is asked on every disk, since `core.ignorecase` where `check` runs says nothing about the reader's disk. `execute` runs the same checks first, so it refuses the finding as `plan-case-twins` before it makes either leg. - A set whose paths all fold to one name and hold one blob in one mode is a NOTE, and `check` still says `plan ok` for it. `execute` prints no NOTE and does not refuse it. - In a leg that holds for every such set, folder twins (`src/D/x`, `src/d/x`) and sets of three or more included. - In the root the NOTE takes only two paths whose names differ only in their last part, `A` and `a` or `D/A` and `D/a`. Folder twins of one blob there (`D/x`, `d/x`), `D/A` beside `d/a` and sets of three or more (`AB`, `Ab`, `ab`) stay in the finding, since on the FUSE disk `execute` met git's `will not add file alias` for them. - The remediation says to rename all but one twin of each set in the source, commit, and re-run `plan`. It no longer offers to answer the twins into different repositories, because on a disk that ignores case `execute` loses those too (#1183). - Paths git refuses (`plan-path-git-refuses` names them), `drop` and unanswered entries are left out. At most 10 paths are named per repository, and the rest are counted. - Behaviour change: a source that keeps `Makefile` and `makefile` side by side in the root is now `plan-case-twins`. Before, `check` printed `plan ok`, and on a disk that keeps case `execute` split it and verified it. Two params of `tests/test_adopt_make_reads_first.py` changed, and `test_execute_refuses_makefile_beside_makefile_before_any_leg` asserts the refusal: no bare repository, no assembly or leg clone in the work directory, no split branch in the source. - Measured with git 2.43, on the bench disk (keeps case) and on a FUSE disk that ignores case and keeps it (`casefold` lookups), against base `4c7b8acd`: - On base, `check` printed `plan ok` for every scenario on the bench disk. On the FUSE disk `execute` stopped on three of them: `F/x` and `f` in the root, exit 1, `adopt-lost: F/x`, both legs and the split already pushed; `src/A`, `src/a`, `src/D/x`, `src/d/x` with own blobs in the code leg, exit 2 in 3 of 5 runs at `git rm -r -q -- src` after both legs were pushed; and `D/x` and `d/x` in the root with own blobs, refused before any leg as `plan-file-reencoded`. - On head, `check` names `plan-case-twins` for each of those three (then `plan-file-reencoded` where git refuses the alias). - The NOTE sets verified in `execute` on the FUSE disk: `A` and `a` in the root (3 of 3 runs), `D/A` and `D/a` in the root (2 of 2), `src/A` and `src/a` in the code leg (3 of 3), `specs/A` and `specs/a` in the spec leg (1 run). - In the root, folder twins and three paths of one blob (2 runs each, at `a131fc25`): `check` printed `plan-case-twins` and `plan-file-reencoded`, and `execute` refused both before any leg as `plan-case-twins`. - The whole of `tests/test_adopt_check_throwaway_repos.py`, CPython 3.12: at the head `58aa9d2b`, 91 passed and 2 skipped; on base 38 of its ids fail (r1189c). Mutants of the new code: 36 of 36 killed, each file restored and its blob checked against HEAD's. - Known limits: - `casefold` is full case folding, so `ß` and `ss` are named as a set, though a disk may hold them apart. - Unicode normalization is not asked: a precomposed `é` beside `e` and a combining accent is no finding, though a macOS disk takes them as one name. - The cut at 10 named paths can fall inside a set. - The one-blob NOTE, and the root's narrower rule for it, rest on the FUSE disk with git 2.43; real APFS and NTFS were not measured. The row for a disk that ignores case skips on every CI disk, which keeps case. - Not in this PR, each a follow-up: case twins the plan sends to different repositories, or a twin it drops beside one it keeps (#1183); the rehearsal's alias refusal, which `check` reports as `plan-file-reencoded` though its words say the bytes were re-encoded (#1184); twins a kept path makes with a file the shape writes into the root (#1191). Review: lane 1's independent reviewers reviewed each round. r1189 found `8684af86` NOT READY, for two MUSTs and four SHOULDs (#1189 issuecomment-6356435838). r1189b found `4d40ce9f` NOT READY for one SHOULD, that the one-blob NOTE covered root shapes that do not verify on a disk that ignores case (issuecomment-6364543347). The next round narrowed the root's rule and the sentence, and r1189c, lane 1's independent re-checker, found `58aa9d2b` READY, with no MUST, no SHOULD and two notes that do not block (issuecomment-6375603307). It re-ran 15 of the 36 mutants, and all 15 were killed. After #1158 landed as `ef619c74`, the branch was restacked onto it by merges of #1158's final head and of its squash, and its changed lines equal the reviewed delta (sha256 `04b2909a`). After #1169 and #1223 landed, main `11560eb9` was merged in as `5c4fcd9d`; its one conflict, a docstring both sides added to, keeps both, and the changed lines equal the reviewed delta (issuecomment-6722938949). `7d2f651e` leaves out of lane 4's #1121 rows the two trees that keep case twins, which `execute` now refuses, with lane 4's agreement (issuecomment-6722980082). After #1105 landed, main `12122952` was merged in cleanly as `47478d51`, whose 787 changed lines equal the delta before it (sha256 `637968e3`), and `472944b5` makes the cut agreed on #473 (issuecomment-6723000456) of the three #1105 rows that keep case twins. Lane 1's check carries READY to `472944b5` (issuecomment-6724542222). Tests, under a stub `gh` with a bogus token: at `58aa9d2b`, r1189c's re-check gave 91 passed and 2 skipped for `tests/test_adopt_check_throwaway_repos.py` (the same under a 3.14-like shim) and 33 passed for `tests/test_adopt_make_reads_first.py`. Main touched both files after the restack, so lane 1's gate ran on the refreshed tree itself, below: the PR's two test files, `tests/test_scaffold_leg_path_collisions.py`, the doc trio, the path-guard and no-auto-maintenance scans, and `tests/test_shape_doctor.py` in 4 shards. At `472944b5`: `tests/test_adopt_check_throwaway_repos.py` 194 passed and 2 skipped (the disk that ignores case), `tests/test_adopt_make_reads_first.py` with `tests/test_adopt_next_make_reads_first.py` 71 passed, `tests/test_adopt_collision_make_reads.py` 28 passed, `tests/test_adopt_single_repository_record.py` with `tests/test_scaffold_leg_path_collisions.py` 143 passed, the two scans 179 passed and 2 skipped, the doc trio 171 passed, and `tests/test_shape_doctor.py` in 4 shards 446 passed and 3 skipped. It lands by fast refresh (Brett Heap, 2026-10-15T22:48:35Z). Its H0 `472944b5` is green on Linux and SonarCloud. The branch was never rebased. After H0, the only commit is update-branch's clean merge of main, giving dae7250, which is green on SonarCloud and Git Bash. Lane 1's gate passed on its tree: 9 pytest calls over `tests/test_adopt_check_throwaway_repos.py`, `tests/test_adopt_make_reads_first.py`, `tests/test_adopt_next_make_reads_first.py`, `tests/test_adopt_collision_make_reads.py`, `tests/test_adopt_single_repository_record.py`, `tests/test_scaffold_leg_path_collisions.py`, `tests/test_agents_md_codes.py`, `tests/test_cli_reference.py`, `tests/test_repo_hygiene.py`, `tests/test_path_guard_hygiene.py`, `tests/test_no_auto_maintenance.py` and `tests/test_shape_doctor.py` in 4 shards: 1,233 passed, 7 skipped. Closes #1161 Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…: 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]>



Closes #1182
Outside v1.2.0 by Brett Heap's ruling of 2026-10-21T10:32:04Z ("leave the follow-ups out of v1.2.0"). Measured against
ef619c74a, the merge-base before the review round; main ate04826db4is merged in since (5d90b9edb, a clean merge).Review round (r1223: no MUST, one SHOULD, four NITs)
git fetch --refetch --no-filter <remote> <commit>. Without it, ablob:noneclone ofmainpinned on another branch stayedpin-source-unreadableafter the printed cure. A new row runs the printed cure on that form and re-runs the scaffold to exit 0 (70babae7b).--pin-sourcehelp says the scaffold fetches nothing into a partial clone on a git that honoursGIT_NO_LAZY_FETCH, and that an older git fetches;docs/cli.mdis regenerated (4fc047abb).ef619c74a, the PR's merge-base, in the table and in Tests.planruns withGIT_NO_LAZY_FETCH=1, refuses a partial-clone--sourcethat lacks objects assource-partial-clone, and names a partial--pin-sourceit could read only by fetching and the fetch that makes it whole (#1162) #1190 is named as open, adding its own helpers.tree:0clone is a kind and a control row (686a25253).What
scaffold-project.py --pin <product>@<commit> --pin-source <clone>read the pin's digest with git in the clone (git cat-file -tof the commit, thengit ls-tree -r). In a partial clone (git clone --filter) git fetches an object the clone lacks from its promisor remote on any read that needs it. Measured through the scaffold's own command line onef619c74aand at this head (686a25253), git 2.43.0, the real run and--dry-runalike, with r1223'sprobe_nofetch.pyand this PR's rows:--pin-sourceef619c74a--filter=tree:0 --no-checkout(holds the pinned commit, none of its trees)upload-packran 1 time,.promisor1 -> 2pin-source-unreadable, 0 runs,.promisorunchanged, nothing made--filter=blob:none --no-checkoutlacking the pinned commit.promisor1 -> 2pin-source-unreadable, 0 runs, unchanged, nothing madeblob:noneholding the commit, checked out or not; a full clone;tree:0checked outpin-source-unreadablewithgit fetch --allfirstThe refusal for a partial clone keeps the code
pin-source-unreadableand the reader's own words, then says that the clone is a partial clone whose git fetches an object it lacks from its promisor remote (named), that the scaffold never fetches into a--pin-source, and names the cure:git fetch --refetch --no-filter origin <commit>in the clone, the pinned commit the reader could not read (one fetch per promisor remote, named in git's order). The cure as printed makes every short form readable: atree:0clone, checked out or bare, ablob:noneclone that lacks the commit on another branch, and one that is merely behind. The scaffold run again reads the origin's own digest of that commit with 0 runs of its own.The
--pin-sourcehelp gains two sentences, the second in #1190's words: a partial clone is read where it holds the pinned commit and its trees; on a git that honoursGIT_NO_LAZY_FETCH(2.45 or later, or a security release from 2.39.4 on), one git could read only by fetching what it lacks ispin-source-unreadable, and the scaffold fetches nothing into it; an older git fetches what it lacks into it. git v2.45.0's ownDocumentation/git.txtdocuments the variable.docs/cli.mdis regenerated from the help.Why
pin_values_unfetched(args, *, reader, nothing_made)inscripts/shape_materialize.pyisdeclared_pin_values(args)read underlazy_fetch_off(), which setsGIT_NO_LAZY_FETCH=1for every git the read starts and puts the variable back (a prior value restored, an unset one removed). A read of an object the clone lacks then fails where it fetched, and the reader already answers a failed read.pin-source-unreadableIS ASKED ABOUT. A partial clone that holds the commit and its trees reads as any clone does. Whether a clone is a partial one is read from its config alone (promisor_remotes: git 2.43'spromisor-remote.crule, as the doctor's shape-doctor.py: run from a partial clone of the standard, theshape currencyrow fetches what the clone lacks, and with its remote out of reach calls each copy the standard changed since the pinboth, so a doctor that fetches nothing fetches, and offline says DRIFTED of copies nobody edited #683 reader:promisortrue, apartialclonefilter, and the remoteextensions.partialclonenames, last), so nothing is fetched to find out. A clone that is no partial one keeps the reader's refusal as it was.git fetch --refetch --no-filter <remote> <commit>, not the reader'sgit fetch --all: that one keeps the clone's filter, and names no cause for atree:0clone that holds the commit and lacks its trees.--single-branchblob:noneclone ofmain, pinned onside: stillpin-source-unreadableaftergit fetch --refetch --no-filter origin, and aftergit fetch --all. Named by its id, the commit comes with every tree and blob it reaches, from a promisor remote, which serves an object by id because that is how a lazy fetch asks.pin_digest_from_source's refusal now carries the commit it could not read (refusal.commit), so the cure names that commit, the one the refusal's first line names.readerandnothing_madelet one helper speak in either tool's words. The scaffold passesreader="the scaffold"and itsUNREAD_PIN_SOURCE_MADE.adopt-project.pyis NOT changed. adopt-project.py:planruns withGIT_NO_LAZY_FETCH=1, refuses a partial-clone--sourcethat lacks objects assource-partial-clone, and names a partial--pin-sourceit could read only by fetching and the fetch that makes it whole (#1162) #1190 (open) adds its own_lazy_fetch_offand_pins_read_unfetched(git merge-treeof this head and adopt-project.py:planruns withGIT_NO_LAZY_FETCH=1, refuses a partial-clone--sourcethat lacks objects assource-partial-clone, and names a partial--pin-sourceit could read only by fetching and the fetch that makes it whole (#1162) #1190's359a749cis clean); a follow-up can makeplancallpin_values_unfetched(args, reader="plan", nothing_made=PLAN_NOT_WRITTEN)and drop its copy.declared_pin_valuesstays imported inscaffold-project.py(# noqa: E402, F401), becausetests/test_adopt_pins.pyandtests/test_scaffold_leg_path_collisions.pyreadscaffold.declared_pin_values.Tests
tests/test_scaffold_partial_pin_source.py, 40 rows, standalone (conftest'sgit,run_script,SCAFFOLD,make_source_repo,FILE_PROTOCOL). Each row clones a local origin (file://, no network, nogh) and setsremote.origin.uploadpackto a wrapper that logs each run, so "no fetch" is an answer the controls give too. Rows that need git to honourGIT_NO_LAZY_FETCHask it first and skip, saying why, where it is ignored.git fetch --alland no refetch that names no commit, nothing made, 0 runs,objects/unchanged;--pin-source openGlass(run in the folder holding it): the remediation names the resolved absolute path, notopenGlass;tree:0clone and in ablob:noneclone that lacks the commit (2 rows), lets the real run read the origin's digest of the pinned commit with no fetch of its own;blob:none(checked out or not), a checked-outtree:0clone, and atree:0clone made whole byfetch --refetch --no-filter, read the origin's digest with 0 runs; a full clone lacking the commit keepsgit fetch --all; a folder in a partial clone is stillpin-source-not-a-clone;mainrefuses atree:0clone with 0 runs, and withNO_LAZY_FETCHrenamed to a name git does not read it fetches and exits 0 (so the variable is what stops the fetch); neither name is left inos.environ;lazy_fetch_off(set inside; a prior0restored; an unset one removed; restored when the read raises),promisor_remotes(11 configs, including a boolean git itself dies on, and a folder that is not there),refetch_command(5 names, each with a commit),_remote_named(4 names).Base vs head, the new file copied into a clean clone at
ef619c74a: base 33 failed, 7 passed. The 7 are the 5 controls, the full clone lacking the commit and the folder row, which read the same on base; the 5 controls also pass at961640c6(5 passed), as their docstring says. Both cure rows fail on base atassert printed, because base prints no cure. Head686a25253: 40 passed, none skipped (git 2.43.0 here honours the variable), and 40 passed under a 3.14-likesitecustomizeshim, where pathlib'sis_file,existsandis_diranswer False to anyOSError.Mutants of the new lines, one at a time, each run with the new file (S04 with
tests/test_cli_reference.py), the file restored infinallyand its blob checked equal to HEAD's after each: 42 (M01-M38 inshape_materialize.py, S01-S04 inscaffold-project.py). 41 killed, 1 survivor.--pin-source; the relative-path row kills it (checked ataf859e6a5)._config_listedreturns a failed run's stdout (return listed.stdout) instead of nothing. It is an equivalent mutant against real git: probed with git 2.43.0,git config -z --type=bool --get-regexp '^remote\..*\.promisor$'overremote.a.promisor=true,remote.b.promisor=maybe,remote.c.promisor=true(in each order of the three) exits 128 withfatal: bad boolean config value 'maybe' for 'remote.b.promisor'and writes NOTHING, because git collects every value before it writes one; a bad config line (fatal: bad config line) does the same. No config makes git 2.43 write part of a listing and then fail, so no row with a real git tells the two apart. Abad-booleanrow was added topromisor_remotes' table anyway (a failed listing names nothing and nothing raises); it passes with or without the mutant. A stubgitthat writes a record and exits 128 would kill M08 (precedent:stub_gitintests/test_pinned_copy_text.py); not added, as it tests a git nobody has seen.69fbca91a; M37 alone ataf859e6a5and M08 alone atcb4786860. They were not re-run at the merge commit.77687d685: 40 killed, and M8 survived, the same equivalent mutant.70babae7b, in a clone in the writer's scratch folder, with the file restored and its blob checked equal to HEAD's after each:git fetch --refetch --no-filter <remote>again): killed by 9 rows.test_the_cure_as_printed_makes_the_clone_readable[lacks-commit]kills it by behaviour: the scaffold re-run after the printed cure exits 2 (assert 2 == 0), while its[tree0]twin passes.refetch_commandrows that say it in words.Gate
This round, at
686a25253The same probe environment, with
TMPDIRin the writer's scratch folder; one basetemp per call; worktree clean.tests/test_scaffold_partial_pin_source.pysitecustomizeshim (PYTHONPATH, shown to load)tests/test_adopt_pins.py::test_both_tools_read_a_pin_with_one_implementation,tests/test_scaffold_leg_path_collisions.pytests/test_path_guard_hygiene.py,tests/test_no_auto_maintenance.pytests/test_no_auto_maintenance.py:222, x2, the reason below)tests/test_agents_md_codes.py,tests/test_cli_reference.py,tests/test_repo_hygiene.pyscripts/render-cli-reference.py --check:[ok] docs/cli.md is what the generator producesef619c74aThe 62-file gate below was NOT re-run at this head. It stands at
77687d685, before the merge of maine04826db4(12 commits;scaffold-project.pyandscripts/shape_materialize.pyamong them) and before this round's three commits.The full gate, at
77687d685Probe environment on every call (a stub
ghfirst on PATH, a bogusGH_TOKEN, an emptyGH_CONFIG_DIR,GIT_CONFIG_GLOBAL=/dev/null,GIT_SSH_COMMAND=false,EMAILset,env -u LANES_LANE), one basetemp per call, each call under 530 s, at most 2 at once, at head77687d685(the merge of mainef619c74a).The checkpoint's gate list file was missing. It was rebuilt as the checkpoint's own command (
grep -lE -- "--pin-source|pin_source|declared_pin_values" tests/*.py: 53 files at this head, with the new one) plustests/test_scaffold*.pyandtests/test_setup_project*.py(9 more): 62 files, 5692 tests. A first call of 20 of those files hit the 530 s limit (rc 124 with 27% run; no result), so they were run in 24 units of at most 260 tests.COMPLETE: every call below ended with exit code 0, at
77687d685(clean worktree), from 18:07Z to 18:51Z. The result column is pytest's own summary line, with-rfEsso each skip names its reason. One row per call; f00-f23 are the 24 units of the 62 files, d0-d3 the doctor's 4 shards.tests/test_path_guard_hygiene.py,tests/test_no_auto_maintenance.pytests/test_no_auto_maintenance.py:222, x2: "the session began with GIT_CONFIG_GLOBAL set, and its file includes that one", which the probe environment does)tests/test_agents_md_codes.py,tests/test_cli_reference.py,tests/test_repo_hygiene.py,tests/test_readme_windows_quoting_sentence.pytest_scaffold_device_names,_e2e,_free_text_values,_ignored_shape_filestest_scaffold_init_empty_values,_leg_path_collisions,_leg_pathstest_scaffold_manifest_values,_mount_ignored,_pin_and_reusetest_scaffold_pin_collisions,_referent_chain_links,_reuse_seeded_legs,test_setup_project_dry_run_offerstest_setup_project_name_edgestest_setup_project_pytest_setup_project_ref_parts,_repo_misdrawn,_typed_name,test_adopt_pinstest_chain_pin_sources,test_neutral_pin_validator,test_pin_annotated_tag,test_pin_source_env_collisionstest_pin_source_top_level,test_pin_source_unreadable,test_pinned_copy_texttest_validate_pins_named_and_spelledtest_validate_pins_spelled_and_named,_without_git,conftest.pytest_adopt_entry_paths,test_adopt_execute_refusalstest_adopt_finding_spelling,_ignored_shape_files,_manifest_valuestest_adopt_plan,_plan_escapes,_plan_flag_refusals_firsttests/test_adopt_plan.py:567:SHAPE_MEDXEHR_CLONEis unset, or names no directory: the MedxEHR-backed plan test needs a read-only clone of MedxSoft/MedxEHR)test_adopt_plan_yaml_quoting(one file of 540 tests, run whole: over the 260 bound)test_adopt_question_and_submodule_spellingtest_adopt_root_symlinks,test_adopt_spelled_namestests/test_adopt_root_symlinks.py:1926,:1981,:2532: "the reftable backend needs git 2.45 or later"; this bench has git 2.43.0)test_adopt_template_values,test_assembly_root_unreadable_paths,test_chain_link_fold,test_chain_remedy_callerstest_clone_url_bytes,test_doctor_non_ascii_paths,test_doctor_validator_rowstest_doctor_validator_verdicts,test_dry_run_parity,test_github_name_limits,test_link_source_chain_defaultstest_naming_policytest_non_utf8_name_helpers,test_repo_hygienetest_setup_sh,test_stdout_encodingtests/test_stdout_encoding.py:285: "the default this is about is Windows' own")test_template_text_placeholders,test_update_shape_landingtests/test_shape_doctor.py, shard 0 of 4 (112 of 448 ids)tests/test_shape_doctor.py:10510: "the PowerShell line is printed, and powershell.exe exists, only on a Windows host")tests/test_shape_doctor.py, shard 1 (112 ids)tests/test_shape_doctor.py, shard 2 (112 ids)tests/test_shape_doctor.py, shard 3 (112 ids)The 3 doctor skips are the 3 cases (
family,manifest,pins) oftest_a_template_validators_next_runs_when_pasted_into_powershell, a test markedskipif(os.name != "nt"): one in each of d0, d2 and d3.Totals, summed from the logs:
conftest.pycollects none).tests/test_repo_hygiene.py(101 tests) is in both docs and f21, so over distinct tests: 6353 passed, 10 skipped = 6363.Two notes on the record. The earlier call of 20 files (rc 124 at 530 s) is no result and is not in the table. f11 and f13 were still running when lane 1's LAST STEP stopped the scheduler; both ran to their end, and their
.rcfiles were written by hand (0) after the logs read "260 passed" and "214 passed, 1 skipped": the pytest summaries above, not those two files, are their result.Known limits
GIT_NO_LAZY_FETCH(older than 2.45.0 without the security releases of 2024-05-14, back to 2.39.4) fetches as before; the rows that need the variable skip there, saying so.blob:noneclone that is merely behind, that is every blob of that commit's history, wheregit fetch --allwould add one small pack and cure it too. Measured at this head withprobe_nofetch.py: after the printed cure, 1 pack and 10 files underobjects/; afterfetch --all, 2 packs and 8. Later fetches stay filtered while the remote'spartialclonefilteris set.file://(protocol v2) only, not against GitHub.git fetch --refetchneeds git 2.36 or later; the remediation says so.adopt-project.py planis unchanged (adopt-project.py:planruns withGIT_NO_LAZY_FETCH=1, refuses a partial-clone--sourcethat lacks objects assource-partial-clone, and names a partial--pin-sourceit could read only by fetching and the fetch that makes it whole (#1162) #1190 handlesplan's own read).Not in this PR
adopt-project.pycallingpin_values_unfetched, and dropping adopt-project.py:planruns withGIT_NO_LAZY_FETCH=1, refuses a partial-clone--sourcethat lacks objects assource-partial-clone, and names a partial--pin-sourceit could read only by fetching and the fetch that makes it whole (#1162) #1190's own copy: a follow-up.Lane: openreposhape-1 (openRepoShape-1)
🤖 Generated with Claude Code
Summary by Sourcery
Prevent scaffold pin-source reads from lazily fetching missing objects in partial clones and guide users to explicitly refetch the pinned commit without a filter.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests: