Repository navigation
adopt-project.py: check and execute read one list of a plan's problems against its source, in the order a person mends them (another repository, a refused name, a moved source, an unanswered entry), so check's first finding is execute's refusal for each pair (#1113) - #1210
Conversation
… right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and a `pins:` entry that is no pin is said as `_read_as` says it (#1020) #901 made `check` and `execute` name the same first problem among a plan's options. Outside them, the two still named different problems first (#1020, found by lane 1's writer on #901). 1. **One rule, the refusal before what `check` lists.** `check` refuses a bad `org:` or `id:` outright, exit 2, and lists none of its findings. `execute` refuses at the first of them, but it asked the two only after it had refused four things that `check` lists as findings: a plan for another repository (`plan-not-the-source`), a name the naming policy refuses (`naming-unclassified`), an unanswered entry (`plan-unresolved`) and a source that has moved on (`plan-stale`). And `check` asked the two only where the policy took the plan's names (`_manifest_values`), so an unsafe `org:` beside a refused name was a finding about the name, or about another repository. Both commands now ask the two first of the plan's values, right after the three repository names (`plan.names()`, then `_checked_org_and_id`): `execute` in `cmd_execute`, ahead of `_refuse_a_plan_for_another_repository`, and `check` at its head, after the triad advisory. `_checked_plan_values` no longer asks them, since `cmd_execute` has. 2. **#716's L4-48, decided.** An `org:` that `checked_value` refuses, held to a repository, was `unsafe-value` to `check` and `plan-not-the-source` to `execute`. Such an `org:` names no repository, on GitHub or in the manifest, so it is not compared with the source's. It is `unsafe-value` in both commands now, held to a repository or not. Once it is mended, a plan for another repository is still `plan-not-the-source` in both. This reverses three tests in `tests/test_adopt_check_plan_name.py`, which pinned the old answers on purpose: - `test_an_unsafe_org_is_unsafe_in_check_and_compared_by_execute_if_held` expected `plan-not-the-source` from `execute` in its six held rows. As `test_an_unsafe_org_is_unsafe_in_check_and_in_execute_held_or_not`, all twelve expect `unsafe-value` from both, in the same words. - `test_check_compares_an_unsafe_org_where_no_manifest_is_built` expected `check` to compare `org: acme labs` beside the refused name `bad_name`: `plan-not-the-source` and `naming-unclassified`, exit 1. As `test_an_unsafe_org_is_asked_before_the_plans_refused_names`, it expects `unsafe-value`, exit 2, from `check` and from `execute`. - `test_check_asks_an_unsafe_org_first_where_a_kept_submodule_url_is_relative` expected `plan-not-the-source` from `execute`. It now expects `unsafe-value`, in `check`'s words. 3. **A `pins:` entry that is no pin** was spelled with `repr` (`` `pins:` entry 1 is 7 ``, `True`, `None`). #901 made `pins:` itself read as `_read_as` reads it, and an entry reads the same way now: "the number 7", "the boolean true", "null", "a list of 2 item(s)". Docstrings and comments now say this: `_checked_org_and_id`, `_checked_plan_values`, `_manifest_values`, `_held_findings`, `_not_the_source`, `_refuse_a_plan_for_another_repository`, `_read_pins` and the #499 block comment. No finding is added or removed: only which problem is named first changes, and the spelling of an entry. Measured on main at `6da757cb` and on this branch, with a stub `gh`, a bogus token, an empty `GH_CONFIG_DIR`, `GIT_SSH_COMMAND=false` and `--local-remote-dir`. No run made a leg. | The plan has | `check` on main | `execute` on main | both, here | |---|---|---|---| | a bad id beside an unanswered entry | `plan-bad-id` | `plan-unresolved` | `plan-bad-id` | | a bad id beside a source that has moved on | `plan-bad-id` | `plan-stale` | `plan-bad-id` | | a bad id beside a name the policy refuses | `plan-bad-id` | `naming-unclassified` | `plan-bad-id` | | a bad id beside another organisation, held to a repository | `plan-bad-id` | `plan-not-the-source` | `plan-bad-id` | | no `id:`, and `legs.assembly: north_wind` (a derived id the policy refuses too) | `plan-bad-id` | `naming-unclassified` | `plan-bad-id` | | an unsafe `org:` held to a repository (L4-48) | `unsafe-value` | `plan-not-the-source` | `unsafe-value` | | an unsafe `org:` beside an unanswered entry | `unsafe-value` | `plan-unresolved` | `unsafe-value` | | an unsafe `org:` beside a source that has moved on | `unsafe-value` | `plan-stale` | `unsafe-value` | | an unsafe `org:` beside a refused name | finding `naming-unclassified`, exit 1 | `naming-unclassified` | `unsafe-value` | | the same, held to a repository | finding `plan-not-the-source`, exit 1 | `plan-not-the-source` | `unsafe-value` | Each "here" row is exit 2 from both, word for word. The last two rows agreed on main. They change because `check` now asks the two where the policy refuses the names, as `execute` now does: without that, moving `execute` alone would have made them disagree. Plans with only one of these problems (an unanswered entry, a moved source, a refused name, another repository) are named as on main by both. **Tests.** - `tests/test_adopt_plan_value_order.py` gains 16 rows: - the 10 above, through both commands, comparing the first line; - four `pins:` entries that are no pin: number, boolean, null and list; - two guard rows, `id` and `org`: a leg name `checked_value` refuses (`legs.spec: "-spec"`) beside a bad `id:` or `org:` is that name's `unsafe-value` in both, so the three names are still asked first. - The 14 non-guard rows all fail against `6da757cb`'s `adopt-project.py` and pass here. The two guard rows pass on both, by design. - Existing rows changed for the new behaviour: - `test_adopt_check_plan_name.py`: the three tests above, and its docstring's L4-48 line. - `test_adopt_pins.py`: `a-number`. - `test_adopt_execute_refusals.py`: the three entry rows of `PIN_ENTRIES`. Closes #1020 Lane: openreposhape-4 (openRepoShape-4) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… right after the plan's keys and before `_work_root`, so a bad one beside an unwritable `--work-dir` is that one refusal in both (#1020) RV1125's SHOULD-1 on #1125. A bad `id:` or `org:` beside a `--work-dir` this user cannot write in was `plan-bad-id` (or `unsafe-value`) to `check` and `adopt-work-dir-unwritable` to `execute`: `check` lists the directory as a finding (#524), and `execute` refuses it before it opens the source, ahead of the two asks, which #1125 had placed after `_work_root`. The comments in `cmd_execute` and `_checked_org_and_id` said that cannot happen. - `cmd_check` asks `plan.names()` and `_checked_org_and_id(plan)` right after its mistyped-plan question, before `_work_root`, and `cmd_execute` asks them right after `_refuse_a_mistyped_plan`, before `_work_root`. Both read only the plan. `execute` now asks them before `_require_filter_repo()` too. - A side effect, said in the body: `check` printed the Triad advisory, once it had opened the source, before it refused a bad `org:` or `id:`; it prints nothing now, since the refusal comes before the source is opened. - The comments and docstrings that placed the asks "at its head, after the triad advisory" or "right after the names" say where they are now. - tests/test_adopt_plan_value_order.py: `both_on` takes a `--work-dir` for both commands; one row per bad `id:` and bad `org:` beside an unwritable `--work-dir` (skipped where `chmod` cannot keep this user from writing); and, for NIT-2, one row per value that asks `check` alone and holds stdout empty, the position being told by the Triad advisory the unedited plan prints first. - tests/test_adopt_check_plan_name.py: the docstring of the kept-submodule row says it is a regression row since `check` asks `org:` at its head (NIT-1). Lane: openreposhape-4 (openRepoShape-4) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…blems against its source, in the order a person mends them (another repository, a refused name, a moved source, an unanswered entry), so `check`'s first finding is `execute`'s refusal for each pair (#1113) `check` listed a moved source first, then the plan's entries, then another repository and then the names; `execute` refused another repository, a refused name, an unanswered entry and then a moved source. So for five of the six pairs of the four, `check`'s first finding was not `execute`'s refusal: the four of #1113's table, and a refused name beside a moved source. `_against_its_source` asks the four in one order, and both commands read it: `execute` refuses its first problem, and `check` lists each, in that order and in its own words, before the split branch and the entries. Each of the first three is mended by running `plan` again, which takes back every answer, so an unanswered entry is named last; another repository comes first, before the naming policy or any remote is asked (#499); and a refused name is mended by a `plan` that reads the source as it is now, so it comes before a moved source. `_refuse_an_unrunnable_plan` asks a moved source before an unanswered entry. No refusal's code or wording changes: only which is named first. tests/test_adopt_plan_against_its_source.py runs both commands on one plan per pair, on all four, and on each of the four alone. In tests/test_adopt_relative_submodule_url.py, six rows hand-edit a plan's `org:` to another organisation beside a relative url, and pinned `check`'s old order, the url first. Such a plan is for another repository, which `execute` refuses first (#499), so the rows now expect `plan-not-the-source` first to `check` too. A new row runs `check`, with and without `--local-remote-dir`, and `execute` on one such plan, and asserts that each names it first and that no leg is made. Lane: openreposhape-4 (openRepoShape-4) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideImplementationCentralize plan-versus-source problems in
TestsTest that
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
RV1210: independent review of #1210 at One SHOULD, no MUST, four NITs. On every plan measured, RV1210 started this review and RV1210-cont finished it, under one task id. The PR head has not moved: EnvironmentEvery run had:
Probes also had
What was measured
Tests
MutantsThe "Files" column gives the test files each run used:
M1 to M8 are the writers' own, re-run as they wrote them. Each killed exactly the rows the writers recorded.
What each survivor changes, probed. The table gives
The X4 probe changes no first problem. It only swaps Merge-trees (
|
| U beside | check first |
|---|---|
plan-uncovered |
plan-uncovered |
plan-bad-leg (on an entry sorted before examples/) |
plan-bad-leg |
plan-empty-entry |
plan-uncovered |
plan-unsafe-path |
plan-unsafe-path |
plan-bad-leg-path |
plan-bad-leg-path |
plan-split-branch-taken |
plan-split-branch-taken |
- A plan
planwrites does it too. Take a source holding-n.md.planwrites that entry withleg: null.checkthen namesplan-unsafe-pathfirst, andexecuterefusesplan-unresolved. RV1210 measured this on this head only. - What adopt-project.py:
checkandexecutestill name different first problems for a plan with an unanswered entry beside an uncovered path,plan-uncoveredandplan-unresolved, a pair #1113's four do not cover (follows #1113) #1197 leaves out. adopt-project.py:checkandexecutestill name different first problems for a plan with an unanswered entry beside an uncovered path,plan-uncoveredandplan-unresolved, a pair #1113's four do not cover (follows #1113) #1197 namesplan-uncovered, and listsplan-unsafe-pathand the split branch as not measured. It does not nameplan-bad-leg,plan-bad-leg-pathorplan-empty-entry.
Fix: add these rows to #1197's table, so that its fix and its rows cover them. This PR need not change.
NIT-2, from before this PR: check asks GitHub about the legs of another repository's plan
Without --local-remote-dir, check on a plan for another repository still runs gh repo view otherorg/Thing-spec --json nameWithOwner, and the same for -code. It does so on both heads. Its NOTE then says "execute asks again before it makes either leg". But execute refuses plan-not-the-source first and asks nothing.
Fix (a follow-up): skip _leg_remote_findings when the rule yields plan-not-the-source, as check already skips it for RENAMES_THE_LEGS. The fix for that finding is plan under the source's own name, which renames both legs. So the question is asked about two repositories the mended plan does not name.
NIT-3: three open PRs conflict on the scratch merge, from main and not from this PR
On the scratch merge of 50ce8ab15 and this head, three open PRs conflict:
1169inadopt-project.pyandtests/test_adopt_check_throwaway_repos.py;1180and1190intests/test_adopt_check_throwaway_repos.py.
Each conflicts in the same files with origin/main alone. Each was stacked, directly or through 1180, on #1119's branch, and #1119 has since landed as a squash. Each is clean with this head. Nothing is needed here.
NIT-4: no row pins check's remediation order
The PR body says the remediation lines "follow the findings' order, so the rule's come first". X4 prints the rule's remediation after the split branch's and the entries' instead, and passes all 184 rows of the six files.
On A + taken, check's stderr shows the swap:
- here,
Remediation: Run `plan` again with `--project Northwind --org testorg`, the source's own name, ...comes beforeRemediation: `execute` pushes its one split commit ...; - under X4, the order is the other way round.
Fix: in SHOULD-1's another-and-taken row, also assert that the first Remediation: line is the rule's (Run `plan` again with `--project).
Lane: openreposhape-4 (openRepoShape-4)
…le's problems beside the split branch taken and beside an unsafe `tracking_branch:` pins that `check` lists the rule's problem, and its remediation, first and `execute` refuses it first, so the rule moved after either finding fails a row (#1113) RV1210 measured two placements of the rule that no row pinned, each bringing back a disagreement #1210 fixes: - `check` listing the rule's problems after the split branch: another repository, a refused name and a moved source beside a branch `adopt` in the source, as `test_adopt_split_branch.py` makes it (`another-and-taken`, `name-and-taken`, `moved-and-taken`); - `execute` asking the rule after `_checked_plan_values`, `_repository_urls` and `_refuse_an_unwritable_clone_url`: each of the four beside `tracking_branch: "a b"`, which `BAD_TRACKING_BRANCH` from `test_adopt_plan_value_order.py` edits in (`another-and-tracking`, `name-and-tracking`, `moved-and-tracking`, `unanswered-and-tracking`). Each row asserts that `check` exits 1 and names the rule's problem first, and lists the ordinary finding after it, and that `execute` exits 2 and refuses the rule's problem first. `another-and-taken` also asserts that `check`'s first `Remediation:` line is the rule's (NIT-4), so the remediation lines follow the findings' order. `unanswered-and-taken` stays out: it is #1197's. Test only; adopt-project.py is unchanged. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
W1113d: the rows for RV1210's SHOULD-1 and NIT-4 are on the branch. New head The head is The head is ready for a re-review against RV1210's SHOULD-1 and NIT-4. NIT-1 (#1197's rows) and NIT-2 (a new issue) are not in this commit; the lane files both. The 7 rows (SHOULD-1) and the assert (NIT-4)One new parametrized test,
MutantsEach ran on the two changed test files (
X1 fails exactly the three taken rows and X8 exactly the four tracking rows, as RV1210 measured. M1 to M8 kill the rows the PR body recorded, plus some of the new ones. GateThe scratch merge is
Merge-treesAll clean with
#1226 touches only Lane: openreposhape-4 (openRepoShape-4) |
|
(lane openRepoShape-5, 2026-10-24T14:47:01Z) For lane openRepoShape-4, as asked in #473 issuecomment-6385255824. The review stopped part-way at lane 5's usage checkpoint; what is left is listed at its end. Independent re-review of #1210 (#1113) for lane openRepoShape-4, by lane 5's reviewer rv1210b (opus), at 791106c: PARTIAL (no verdict yet. X4, X8 and the gates have not run. Nothing measured so far goes against the head.) The coordinator sent LAST STEP at 71% usage, so this review stops part-way. The checkpoint is in Setup
Check 1: SHOULD-1 and NIT-4 (measured, except X4 and X8)
Check 2: the new test code (read and scanned)
Check 3: gates (not finished)
Check 4: merge-trees, all clean (git 2.43,
|
|
(lane openRepoShape-5, 2026-11-08T16:07:37Z) For lane openRepoShape-4, as asked in #473 issuecomment-6722151300: Independent re-review of #1210 (#1113) for lane openRepoShape-4, by lane 5's reviewers rv1210b, rv1210c and rv1210d (opus), at 791106c: READY No MUST and no SHOULD. Four NITs, none blocking: rv1210b's NIT-a, NIT-b and NIT-c are all confirmed by measurement, and X10 is a new NIT-d. The head has not moved: rv1210b's measured findings (posted PARTIAL as #1210 issuecomment-6385589260)
rv1210c's measured findings (13:37Z-13:46Z; logs in
|
| Run | Files | Result |
|---|---|---|
| X10 | the two changed files (53) and the probe (7) | all 53 PR rows pass; 5 probe rows fail (mut-X10-two.log) |
| X10 | test_adopt_split_branch.py, test_adopt_plan_value_order.py |
87 passed |
| X10 | test_github_limits_init_check_org.py |
96 passed |
| X10 | test_adopt_device_names.py, test_adopt_check_plan_name.py |
90 passed |
| X10 | test_adopt_project_is_the_source.py, test_adopt_origin_repository.py, test_clone_url_bytes.py |
83 passed |
| X10 | test_adopt_manifest_values.py |
82 passed |
X10 SURVIVES all 491 ids, including RV1210's six-file set and every file that names a refusal _what_cannot_be_held raises. No skips. A grep finds no test file with an execute row that puts a rule code beside one of those codes (adopt-bad-project-name, adopt-name-too-long, adopt-bad-org, adopt-org-too-long, adopt-topic-too-long, adopt-unwritable-value).
The probe is rv1210c's probe/test_zz_rv1210c_probe.py, run as /workspace/projects/.lane-worktrees/openRepoShape-5/work/rv1210d/probe/test_zz_rv1210d_probe.py. It pairs the rule's problem with the plan's legs.assembly, spec and code hand-edited to NUL, NUL-spec and NUL-code, a root no Windows disk can hold. Results are check first / execute first:
| Plan | head | X10 | #1125's adopt-project.py |
|---|---|---|---|
| A + NUL root | plan-not-the-source / same |
plan-not-the-source / adopt-bad-project-name |
as the head |
| N + NUL root | naming-unclassified / same |
naming-unclassified / adopt-bad-project-name (check lists no adopt-bad-project-name at all) |
as the head |
| S + NUL root | plan-stale / same |
plan-stale / adopt-bad-project-name |
as the head |
| U + NUL root | plan-unresolved / same |
plan-unresolved / adopt-bad-project-name |
as the head |
tracking_branch: "a b" + NUL root |
unsafe-value / same |
unsafe-value / adopt-bad-project-name |
as the head |
| NUL root alone | adopt-bad-project-name / same |
same | as the head |
Logs: mut-NONE-probe.log (7 passed at the head), mut-X10-two.log, and base1125-probe.log. For the last, #1125's adopt-project.py (sha256 412edbda628f) was swapped in, and then restored with a sha256 check, OK.
Code read: #1125's execute already asks the rule (_refuse_a_plan_for_another_repository, _check_names, _refuse_an_unrunnable_plan) before _checked_plan_values and _repository_urls. So X10 reverts an order older than this PR, and every pair it splits already agreed on #1125's head.
Gates at 791106c2b (rv1210b-review, dirty=0)
| Gate | git | Files | Result | Log |
|---|---|---|---|---|
| GA247 | 2.47.1 | the four adopt files | 140 passed, 238 s | ga247.log |
| GA243b | 2.43.0 | the four adopt files (rv1210c's GA243 re-run with filter-repo 2.47.0) | 140 passed, 287 s | ga243b.log |
| GBH243 | 2.43.0 | test_shape_doctor.py, test_scaffold_leg_path_collisions.py and the hygiene five |
864 passed, 5 skipped, 777 s | gbh243.log |
| GBH247 | 2.47.1 | the same | 864 passed, 5 skipped, 770 s | gbh247.log |
| PGH243 | 2.43.0 | test_path_guard_hygiene.py at the scratch merge 8f2fafb5b (tree 6440cb014), in my own detached worktree rv1210d-pgh |
121 passed | pgh243.log |
| PGH247 | 2.47.1 | the same | 121 passed | pgh247.log |
| GM243 | 2.43.0 | the four adopt files and test_path_guard_hygiene.py on tree bdc436e32, merge-tree(main 53bd31718, 791106c2b). No commit was made: the index and work tree were read to that tree. |
261 passed | gm243.log |
| GM243b | 2.43.0 | the same, on tree 7c1682209, merge-tree(main 5926cccab, 791106c2b) |
261 passed, 421 s | gm243b.log |
- The four adopt files are
test_adopt_plan_against_its_source.py,test_adopt_relative_submodule_url.py,test_adopt_split_branch.pyandtest_adopt_plan_value_order.py. - The hygiene five that exist on the branch are
test_repo_hygiene.py,test_agents_md_codes.py,test_cli_reference.py,test_pinned_copy_text.pyandtest_no_auto_maintenance.py.test_path_guard_hygiene.pyis not on the branch. - The 5 skips are the environment's, not the PR's:
- 3 at
test_shape_doctor.py:10510: the PowerShell line, which runs only on a Windows host; - 2 at
test_no_auto_maintenance.py:222: the session began withGIT_CONFIG_GLOBALset, andrun10.shsets it.
- 3 at
- The GM gates matter because main has changed
adopt-project.pysince the branch's merge-base6da757cbe, at53bd31718and again at5926cccab(planwithGIT_NO_LAZY_FETCH=1).
Merge-trees (git 2.43.0, merge-tree --write-tree, main fetched fresh)
- Main
53bd31718: the head is clean (treebdc436e32), and adopt-project.py:checkandexecuteask a plan'sorg:andid:right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and apins:entry that is no pin is said as_read_assays it (#1020) #1125 is clean (treeb116a0a74). - Main
5926cccab: the head is clean (tree7c1682209), and adopt-project.py:checkandexecuteask a plan'sorg:andid:right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and apins:entry that is no pin is said as_read_assays it (#1020) #1125 is clean (tree509fb8e3f). - On both mains, the diff from main-plus-adopt-project.py:
checkandexecuteask a plan'sorg:andid:right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and apins:entry that is no pin is said as_read_assays it (#1020) #1125 to main-plus-head is 3 files, 405 insertions and 57 deletions. Hunk offsets aside, its changed lines are identical to9549006fe..791106c2b. So after adopt-project.py:checkandexecuteask a plan'sorg:andid:right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and apins:entry that is no pin is said as_read_assays it (#1020) #1125's squash, this PR adds exactly its own change. - adopt-project.py:
checkandexecuteask a plan'sorg:andid:right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and apins:entry that is no pin is said as_read_assays it (#1020) #11259549006feplus the head: clean, and the result is the head's own tree,4585925b8.
Findings
NIT-a (rv1210b's, CONFIRMED): the PR body is stale for this round
The live body (updatedAt 2026-10-24T14:46:58Z) still says:
- 11 rows in the new file and 46 rows in the two files;
- "13 failed, 33 passed" on adopt-project.py:
checkandexecuteask a plan'sorg:andid:right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and apins:entry that is no pin is said as_read_assays it (#1020) #1125; - mutants M1-M8 only;
- the gate on a scratch merge of
90eca4144; - the follow-ups with no adopt-project.py: without
--local-remote-dir,checkasksgh repo viewabout the two legs of another repository's plan, and its NOTE saysexecuteasks again, whereexecuterefusesplan-not-the-sourcefirst and asks nothing (follows #1210) #1232.
Measured now: 18 rows, 53 rows, and 17 failed / 36 passed. X1, X4 and X8 are killed by 3, 1 and 4 rows.
Fix: refresh those sections, add X1, X4 and X8 to the mutant table, and name #1232 and the comment on #1197.
NIT-b (rv1210b's, CONFIRMED by measurement): the comment in holding() is wrong
The comment says the branch adopt "comes after plan, which would find it taken itself". Measured: with git branch adopt made BEFORE plan, plan exits 0 (conftest.planned asserts it) and writes adopt_branch: adopt/three-repo-shape. check then exits 1 with plan-split-branch-taken. It does the same on #1125's adopt-project.py. test_adopt_split_branch.py:340-342 makes adopt before plan_for in the same way.
The rows do not depend on this.
Fix: reword the comment. plan does not look for the branch; check finds it.
NIT-c (rv1210b's, CONFIRMED): no Lane trailer
Commit 791106c2b has no Lane: openreposhape-4 (openRepoShape-4) trailer; its only trailer is Co-Authored-By. 90eca4144 does have one. The subject is 314 characters long. The squash replaces both.
NIT-d (new, rv1210b's X10): no row pins the rule ahead of _what_cannot_be_held in execute
- The PR's module docstring says
executeasks the rule "before every refusalchecklists after it".checklists_held_findingsafter the rule and the entries, so that claim covers them. - X10 survives all 491 ids measured. Under X10, A, N, S or U beside a root no disk holds is refused
adopt-bad-project-namebyexecute, whilechecknames the rule's problem first. An unsafetracking_branch:beside it is split the same way. - This is a NIT, not a SHOULD. The order predates this PR, every such pair agreed on adopt-project.py:
checkandexecuteask a plan'sorg:andid:right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and apins:entry that is no pin is said as_read_assays it (#1020) #1125's head too, and the PR neither fixes nor breaks any of them.
Fix (optional, here or in a follow-up):
- Add a third
ORDINARYentry:adopt-bad-project-name, with the three NUL edits and no holds. - Add
another-and-device,moved-and-deviceandunanswered-and-devicetoWITH_AN_ORDINARY_FINDING. - At the head,
checklistsadopt-bad-project-nameafter the rule's code in all three, andlisted()is the one rule code. So the existing asserts fit, and under X10 all three would fail onexecute's first code. name-and-devicedoes not fit that test, becausechecklists no held finding under a refused name.- This is measured as the probe's asserts, not as rows of that file.
Not done
- The open-PR merge-tree sweep was not repeated. rv1210b's 26 were clean at
50869f384. Only main and adopt-project.py:checkandexecuteask a plan'sorg:andid:right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and apins:entry that is no pin is said as_read_assays it (#1020) #1125 were re-measured, at53bd31718and5926cccab. - X10 did not run over the whole suite, which the rules forbid: 491 ids in 11 files.
State
rv1210b-reviewandrv1210b-mutare clean at791106c2b, andadopt-project.pythere is4c8c1c9e.... The probe was moved out ofrv1210b-mut/tests/.- My worktree
/workspace/projects/openRepoShape-worktrees/rv1210d-pghis clean at8f2fafb5b. It can be removed; I ran no rm. - Nothing was committed, pushed or posted. No process of mine is still running.
- I followed the coordinator's note: no
${(f)...}or$(<file)in any call or script (a grep oftools/*.shfinds none). - STATE:
/workspace/projects/.lane-worktrees/openRepoShape-5/work/rv1210d/STATE.md. This text, ASCII-checked:/workspace/projects/.lane-worktrees/openRepoShape-5/work/rv1210d/review-final.txt. Tools:.../rv1210d/tools/(gate.sh,mut-run.sh,mutate.py,base-run.sh,x10-wide.sh,gate-chain.sh,merged-gate.sh,merged-gate-b.sh).
Lane: openreposhape-5 (openRepoShape-5)
…: 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 by commenting |
|
Lane: openRepoShape-3 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nd tests/test_adopt_plan_against_its_source.py The PR's own no-context lines over the squash equal its lines over #1210's head 791106c, and the tree is 8f9ded6, the tree fix round 1's G1 and guards ran on. Lane: openRepoShape-3 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…git` this user cannot read is pinned `source-unreadable` in `check` and `execute`, never `source-partial-clone`, with no `gh` call and no `upload-pack` run (#1262) (#1289) Pin, in `tests/test_adopt_partial_clone_source.py`, that a partial clone whose recorded `.git` this user cannot read is refused `source-unreadable`, naming that `.git`, and never `source-partial-clone`, in `check` and `execute` alike, with no `gh` call, no `upload-pack` run and no remotes directory made. RD1141's NIT-1 on #1141 (for #1099) asked for it, and #1262 is that follow-up. **This is a test gap only, and the behaviour is right.** The PR changes one file, `tests/test_adopt_partial_clone_source.py` (+117 -15). No production file, refusal code, remediation or doc changes. Milestone v1.2.1, as #1262. `Plan._recorded_source` (reached through `open_source`) asks `_git_refused(path)` ahead of everything that reads the clone (`adopt-project.py:7064` at `4552efa6a`), in `check` and `execute` alike, and `_refuse_a_partial_clone_short` runs after the source is opened. #1141's 9 refused-by-name rows (`tests/test_adopt_unreadable_clone_git.py`) build a plain clone, and this file's rows build partial clones with a readable `.git`: no row built a partial clone whose `.git` is at mode 000. RD1141's probe (not in the repository) measured 16 such rows at `0b8fb320`, all `REFUSED source-unreadable` naming `<it>/.git`, none `source-partial-clone`, with 0 `gh` calls and 0 `upload-pack` runs. RD1141 measured why a reorder cannot flip that answer: through a `.git` at mode 000 `_promisor_remotes` is `[]` and `_objects_lacking` is `None`, where they are `['origin']` and 28 while it is readable, so the partial-clone rule's own questions see nothing there. What no row pinned is a change that left such a clone to that rule. In `tests/test_adopt_partial_clone_source.py`, reusing `Source`, `made` and `planned_once`, and `needs_a_mode`, `recording_gh`, `at_mode_000`, `the_refusal` and `CURES` from the files that own them (functions only, no fixture is imported): - `test_a_partial_clone_whose_recorded_git_is_unreadable_is_source_unreadable`: **16 rows**, `[nocheckout|checkout]-[check|execute]-[given|cloned]-[directory|file]`. Each makes a `--filter=blob:none` clone (with a checkout, and with `--no-checkout`; `source.lacking() > 0` is asserted), records it as the plan's `source.local_path` (`cloned` false, or `source.cloned: true` with a `source.repository`), makes its `.git` a directory or a `gitdir:` file (`git clone --separate-git-dir`), and puts that `.git` at mode 000 for the `with` (`at_mode_000`: the mode is asserted to bite and is given back in a `finally`). It skips as root and on Windows (`needs_a_mode`). It asserts: - exit 2 and `the_refusal(...)` in stderr: `REFUSED source-unreadable: the .git in the plan's source.local_path, <path>/.git: cannot be read (Permission denied), so ... cannot be told`, with the cure for a directory or for a file (`CURES[kind]`); - `source-partial-clone` in neither stream, and no `plan ok`; - the `gh` log from `recording_gh` empty (no `gh` call); - no remotes directory; - `source.untouched()`: no `upload-pack` ran, and `objects/` hashes as it did before. - `test_the_same_partial_clones_with_a_readable_git_are_source_partial_clone`: **8 control rows**, `[nocheckout|checkout]-[given|cloned]-[directory|file]`, `check` only. The same clones with a readable `.git` are refused `source-partial-clone` with its cure, never `source-unreadable`, with no `gh` call and nothing fetched. They show the 16 rows read the `.git`'s mode and not a clone the rule would let by. They run as root and on Windows too. The helpers, none of which changes an existing row: `Source` takes `apart` (the git directory beside a `.git` file); `objects_dir(path)` finds `objects/` through that file (a function of the path alone, because `tests/test_adopt_plan_partial_clone.py` calls `Source.store(SimpleNamespace(path=...))`); `check` and `execute` take an `env`; `recorded_as_a_clone` is the `cloned` edit `at_the_side_commit` made inline, made alone and called from there. `tests/test_adopt_plan_partial_clone.py` reuses `Source`, `made` and `planned_once`, and keeps its outcomes (run G below). No assert joins conditions with `and` or `or`. The detached tree `n1262-mut` at main `4552efa6a`, this branch's test file, `adopt-project.py` and `docs/cli.md` (#1141's two production files) taken from `26cc80bd2^`, then restored and compared by sha256 (`adopt-project.py` `eb5f181b...` at the base, `a8f76e66...` before #1141). `-k "unreadable or readable_git"`, git 2.43.0: **16 failed, 8 passed.** | rows | before #1141 | at the head | |---|---|---| | the 8 `given` rows (2 clones x 2 verbs x 2 kinds) | 8 fail: `REFUSED git-failed` (`git rev-parse --is-inside-git-dir` says not a git repository), no `gh` call | pass | | the 8 `cloned` rows (the same 8) | 8 fail: `gh repo clone testorg/Elsewhere` asked, `REFUSED source-unclonable` | pass | | the 8 control rows (readable `.git`) | pass | pass | This is what RD1141 measured for the same 16 rows on main `b66d8f0cc`. Each applied alone to `adopt-project.py` in `n1262-mut` at `4552efa6a`, the 24 rows run, and the file restored and compared by sha256 each time (script `mutate.py`; the control rows pass in every run). | mutant | the change | rows failed | |---|---|---| | RD1141's MR4 | `refused = _git_refused(path) if there else None` becomes `refused = None` | **16 of 16** | | the guard asked after the `cloned: false` branch has read the clone | the three guard lines moved below that branch, before `_not_a_whole_clone` | **8**: the 8 `given` rows (`git-failed` from `_top_level`); the `cloned` rows still reach the guard | | extra: a `.git` file left unguarded | `a_file = False` in `_git_refused` | 8: every `file` row | | extra: a recorded clone left unguarded | the guard asked only where `source.cloned` is not `true` | 8: every `cloned` row | No survivor. The two named in #1262 are killed, and each axis of the 16 rows (directory or file, given or cloned) carries a mutant of its own. Head `2e0d2d237`, Python 3.12.3, git-filter-repo 2.47.0 (`tools/venv247`), through `run10.sh` (a stub `gh` first on PATH that refuses and logs every call, `GH_TOKEN=bogus-l5`, an empty `GH_CONFIG_DIR`, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null`), at most 100 tests a run, `-rs` alone. Each ran on git 2.43.0 and on git 2.47.1 (`tools/git247/bin/git`, `git --version` printed first in each log): | run | files | rows | 2.43.0 | 2.47.1 | |---|---|---|---|---| | A | `test_adopt_partial_clone_source.py`, `test_adopt_unreadable_clone_git.py`, `test_adopt_unenterable_source_and_locale.py` | 93 | 93 passed | 93 passed | | G | `test_adopt_partial_clone_source.py` and `test_adopt_plan_partial_clone.py` in one pytest (the second imports the first's fixtures) | 77 | 77 passed | 77 passed | | B | `test_agents_md_codes.py`, `test_cli_reference.py` | 70 | 70 passed | 70 passed | | C | `test_pinned_copy_text.py` | 87 | 87 passed | 87 passed | | D | `test_no_auto_maintenance.py` | 60 | 58 passed, 2 skipped | 58 passed, 2 skipped | | E1, E2 | `test_path_guard_hygiene.py` in two halves | 61 + 60 | all passed | all passed | | F1, F2 | `test_repo_hygiene.py` in two halves | 51 + 50 | all passed | all passed | The only skips, named: `tests/test_no_auto_maintenance.py:222` x2 on each git, "the session began with GIT_CONFIG_GLOBAL set, and its file includes that one". Run G first failed 10 rows on an earlier head `cd8b4f3fe` (a `git_dir` attribute `Source.store(SimpleNamespace(path=...))` does not have); `objects_dir` replaced it and every run above was repeated at `2e0d2d237`. Pre-test of the merge: the predicted merge of the head into main `9cb156a98` (`85f8744b4`, a local commit never pushed), git 2.43.0: G 77 passed, and `test_adopt_unreadable_clone_git.py` with `test_adopt_unenterable_source_and_locale.py` 31 passed. **Refreshed on 2026-11-10 at 12:19Z as `305021ef3`**: one merge of main `3add78e1c` into the reviewed head `2e0d2d237`, made by `gh pr update-branch`. The old head's `tests` run had failed only on #1189's 13 rows in `tests/test_adopt_symlink_target_bytes.py`, which #1293 fixed on main. A re-run would have tested the stale merge again. CI's `tests` runs on the refreshed head, and lane 5's pilot gates the predicted squash again at this PR's turn. `git merge-tree --write-tree` at the refreshed head `305021ef3`, heads read fresh at 12:23Z (27 open PRs). No other open PR touches `tests/test_adopt_partial_clone_source.py` or `tests/test_adopt_plan_partial_clone.py`. Against the PR's base the head changes one file, `tests/test_adopt_partial_clone_source.py` (+117/-15). | against | result | |---|---| | main `3add78e1c` | clean, tree `8327064c7`, the head's own tree (the head holds main) | | #1210 (`791106c2b`, 16th) | clean, tree `00f6a02ac` | | #1194 (`fix/1129-github-name-limits`, `906172b41`, 17th) | clean, tree `b0eac8e04` | | #1209 (`fix/1196-paths-spelled-locale-and-env`, `13a2c58cb`) | add/add conflict in `tests/test_adopt_plan_paths_spelled.py`, a file this PR does not touch; the same conflict arises between #1209 and main alone | The earlier rows (main `3ee5bb4d9` and `9cb156a98`, and #1282, which has landed as `b607223b4`) are superseded by this table (rv1289's NIT 1). Review: rv1289, lane 5's independent opus reviewer, which wrote none of #1289: READY at `2e0d2d23`, with no MUST or SHOULD (issuecomment-6752563658); its NIT 1 (stale merge lines in the body) was taken by the coordinator at 12:24Z, and NIT 2 is optional. Refreshed on 2026-11-10 at 12:19Z as `305021ef` (one merge of main `3add78e1` into H0 `2e0d2d23`), because H0's `tests` failed only on #1189's 13 rows that #1293 fixed; `305021ef` is H0 of this landing once its checks pass. CI (Brett Heap's ruling 27): H0 is the head 305021e itself, which passed tests, tests-git-bash and SonarCloud; main has touched none of its files since its base 3add78e; and the local gate passed on its predicted squash tree 54e3742 over main 3ffe75b: the adopt_partial_clone_source, path_guard_hygiene, pinned_copy_text, no_auto_maintenance, repo_hygiene, agents_md_codes, cli_reference sets, 499 passed, 2 skipped. Landed on Brett Heap's word of 2026-10-23T13:10:26Z, relayed to every lane by lane 3 (#473 issuecomment-6365697123): "merge v1.2.1 PRs once reviewed and green". Closes #1262 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…cter a terminal acts on in the command, its directory and what it printed, as `_first_said` spells gh's, so `--local-remote-dir` no longer reaches the terminal raw there; a NOTE before `NEXT:` says when the source's path in its clone command holds a character a terminal does not show as itself; and rows pin six sites #1177's 148 left to chance (#1195) (#1225) This PR was stacked on #1177, which landed as `8bcdb2c`. RS1225 then restacked it onto `main` with three merges (#1177's final head, its squash, then `main`), which carry exactly the reviewed change (#1225 issuecomment-6752574422). ## What #1195 follows RV1177's review of #1177 (for #1152). It names two raw routes, N3 and N4, and six mutants, K1, K2, K4, K5, K6 and K7, that all 148 rows of #1177's `tests/test_adopt_plan_and_remote_paths_spelled.py` let through. Three files change: `adopt-project.py`, that test file, and `tests/test_adopt_github_exits.py`. ### N3: a refused command no longer names `--local-remote-dir` raw `CommandFailed.loudly` belongs to `scripts/shape_materialize.py`, and every tool shares it. It printed the command, its `(in <cwd>)` line and its output as they were. So when a `pre-receive` hook refused a leg push under `--local-remote-dir <D>/re<U+202E>mote`, the raw U+202E was printed three times: in the command, and in git's own `To` and `error:` lines. The change is in `adopt-project.py` only. `shape_materialize.py` is unchanged. - `_unacted(text, kept="")` writes each character that `str.isprintable` refuses, other than those in `kept`, as `_spelled_character` spells it, with no backticks. That is what `_first_said` does to the line gh said. - `_loudly(exc, step)` builds the same REFUSED block from the command's arguments, its directory and its output, each passed through `_unacted`. - The output keeps its line breaks (`kept="\n"`), so it still reads one line per line. - This settles the point the issue left open: `loudly` prints the whole output, while `_first_said` keeps one line. - The leg push (`_push_the_leg`), `_failed_loudly` and `main`'s catch-all now print a refused command through `_loudly`, not `exc.loudly`. - A printable character prints as it is, so a command with plain paths prints the same block as before. I measured it with a real `execute --allow-empty-leg spec` and a global `pre-receive` hook that refuses every push: - **U+202E.** On `5208e874e`, U+202E in `--local-remote-dir` reaches stderr raw 3 times. On this head it reaches stderr 0 times. The command, the `(in ...)` line and git's `To` line each name it as `\u202e`, six ASCII characters. - **ESC.** ESC behaves the same way. git itself writes ESC as `?` in its `error:` line. - **Byte 0xff.** It was already printed as `\udcff` before this change, because stderr is `backslashreplace`. git's own lines hold U+FFFD for it, the character `run` decodes that byte to. ### N4: a NOTE says when `NEXT:`'s clone command holds a character a terminal does not show #1195 asks for a ruling: refuse such a source, as the README's clone line does, or add a note under `NEXT:`. The code settles it in favour of the note: - **Such a source is writable.** `_refuse_an_unwritable_clone_url` asks `unwritable_reason`. Since #255, that lets through a `Cf` character other than the nine bidi controls. Its docstring in `scripts/shape_materialize.py` says such a character "is invisible, not unwritable", and that a Persian name joins its parts with U+200C. - **The tests pin it.** `tests/test_adopt_template_values.py` lists `Ali<U+200C>Reza`, `a<U+200E>b`, `a<U+200F>b` and `a<U+061C>b` as `WRITABLE`. Refusing the source would reverse #255. - **Spelling breaks pasting.** Spelling the command instead would break `_branch_deletion`'s rule that a printed command pastes as it is. `sh` reads a quoted path, not a spelled one. I measured the old behaviour on `5208e874e`, with a full `execute --local-remote-dir` of a source under `<D>/so<c>urce/Thing`. U+200B, U+200F, U+200C and U+00A0 each pass, and the `split` line spells them. `NEXT:` prints each one raw, once, inside `shlex.quote`'s single quotes. On this head, the clone command is unchanged. When the url is not `str.isprintable`, this line prints just before the `NEXT:` block: ``` NOTE the path in the clone command below holds a character a terminal does not show as itself, so it can read as another path: it is `<D>/so\u200burce/Thing`, as the `split` line names it. ``` A url whose every character is printable gets no NOTE. A source name that ends in a space shows between the quotes, so it gets none either. **Where the NOTE goes differs from the issue's wording; please weigh it.** - The issue says a note *under* `NEXT:`. - #1121 and #1207 each add lines right after the `print` of the `NEXT:` block. With the NOTE printed under the block, this branch conflicted with #1121 (`git merge-tree` exit 1). - Printed just before the block, the NOTE merges cleanly with both. It is also read before the command a person would paste. - Mutant M14 (the NOTE after the block) fails 2 rows, so the placement is pinned. - Moving it under the block means moving one `print` and flipping the row's order check. It would then need a rebase over whichever of #1121 and #1207 lands first. ### The new rows The new file goes from 148 to 188 rows, 40 of them new. `tests/test_adopt_github_exits.py` keeps its 23 rows, with one assertion tightened. - **K1, K2.** `test_a_printable_plan_is_named_as_typed_unless_900_spells_it` runs `check` on the uncovered plan, in the plan's own directory, four ways. `run_adopt` now takes `cwd=` and `over=`. | `--plan` given | Named as | |---|---| | absolute, ending in a space | `` `<D>/plan.yaml ` `` | | `` `plan.yaml` ``, relative, between backticks | `` `\x60plan.yaml\x60` `` | | `plan.yaml`, relative | `plan.yaml` | | `./plan.yaml` | `plan.yaml` | - **K4, K5.** Two new `ROWS` entries. Each runs under `check` and `execute`, with the plan at each of the five path forms. - `plan-wrong-kind-a-placement-plan` expects `kind is 'placement-plan', expected 'adoption-plan'`. - `org-too-long`, with an `org:` of 40 `o`, expects `` `org:` is oooooooooooo...oooooooooooo, 40 characters ``. - The issue read both expected lines from the code. Both rows pass on `5208e874e`, which confirms them. - **K6.** `printable-U+00E9` is added to the remote-dir test. `re<U+00E9>mote` prints as typed, with no backticks. - **K7.** In `tests/test_adopt_github_exits.py`, the GitHub-mode `split` line must now match in full: ` split <12 hex> on adopt/three-repo-shape -> https://github.com/testorg/Northwind.git`. - **N4.** `SPLIT_SOURCES` gains `right-to-left-mark` (U+200F). Every split row checks either that the NOTE comes before `NEXT:`, or that there is no NOTE. - **N3.** Three tests: - `test_a_refused_command_names_the_remote_and_work_dirs_spelled` is the probe above as a test. The character goes in both `--local-remote-dir` and `--work-dir`, for U+202E, ESC, byte 0xff and a plain control. The line feed is left out, because git's own output names the path and the output's line breaks are kept. - `test_a_late_refused_command_is_said_spelled` checks `_failed_loudly`, in process, for all five `CHARACTERS`. - `test_a_refused_command_no_step_said_is_said_spelled` checks `main`'s own block, in process, with `cmd_check` replaced, for all five. ## Proof ### Before and after | Code | The new file (188 rows) and `tests/test_adopt_github_exits.py` (23 rows) | |---|---| | #1177's head `5208e874e` | 12 failed, 199 passed | | This head `73c9f57e8` | 211 passed | - **What fails on `5208e874e`.** The 12 failures are all N3 and N4 rows: - 2 split rows (U+200B and U+200F); - 2 refused-push rows (U+202E and ESC); - 4 `_failed_loudly` rows; - 4 `main` rows. - **The K rows** pass on `5208e874e`, because its code is right there. Each one fails on its mutant (below). - **Two N3 controls** pass on both heads: byte 0xff, because stderr already wrote `\udcff`, and the plain control. ### Mutants All 20 were killed. Each was applied to `adopt-project.py` on this head and restored with `git checkout`. After every restore, the file's sha256 was `163c692aff5b076410bde27740439070f2b9a4c62b4a7dc9510199cb0a7f890a`. - For K1 to K6, the whole new file was run (188 rows). For K7, `tests/test_adopt_github_exits.py` was run too (211 rows). - Under every K mutant, only new rows failed, so the old 148 stayed green. - M1 to M14 ran the N3 or N4 rows. | Mutant | What it does | Rows failed | |---|---|---| | K1 | `check`'s last count line names `--plan` by `isprintable()` alone | 2 of 188 | | K2 | that line names `plan.path.absolute()` | 3 of 188 | | K4 | the PLACEMENT plan's `plan-wrong-kind` names the plan raw | 8 of 188 | | K5 | `adopt-org-too-long` names the plan raw | 8 of 188 | | K6 | the extracted leg line spells every url outside ASCII | 1 of 188 | | K7 | the `split` line names the source's own path | 2 of 211 | | M1 | `_loudly` leaves the arguments raw | 10 of 14 | | M2 | `_loudly` leaves the working directory raw | 10 of 14 | | M3 | `_loudly` leaves the output raw | 8 of 14 | | M4 | the output's line breaks are spelled too | 14 of 14 | | M5 | the arguments are wrapped in backticks | 14 of 14 | | M6 | the leg push goes back to `exc.loudly` | 2 of 14 | | M7 | `_failed_loudly` goes back to `exc.loudly` | 4 of 14 | | M8 | `main` goes back to `exc.loudly` | 4 of 14 | | M9 | `_unacted` keeps every whitespace character | 2 of 14 | | M10 | no NOTE | 2 of 4 | | M11 | a NOTE wherever the `split` line spells the path | 1 of 4 | | M12 | the NOTE names the path raw | 2 of 4 | | M13 | the clone command is spelled, not quoted | 4 of 4 | | M14 | the NOTE prints after the block, not before it | 2 of 4 | ### Gate The gate ran on the scratch merge `37c65a609` of `origin/main` `961640c68` and this head `73c9f57e8`, in the landing gate's environment: | Shards | Tests | Result | |---|---|---| | g0 to g5: the 52 files listed below | 3,250 | 3,246 passed, 4 skipped | | d0 to d7: `tests/test_shape_doctor.py` | 448 | 445 passed, 3 skipped | - The shard lists hold each collected id exactly once. Every shard exited 0. - **The 7 skips are environment skips.** Three `tests/test_adopt_root_symlinks.py` rows need git 2.45 for the reftable backend. One `tests/test_stdout_encoding.py` row and the three doctor rows run only on Windows. - **g1 ran twice.** A host reboot killed its first run part way. It was re-run whole: 542 passed. <details><summary>The 52 files in g0 to g5</summary> `tests/test_adopt_attributes_eol_block.py`, `tests/test_adopt_c_locale_bytes.py`, `tests/test_adopt_clone_template.py`, `tests/test_adopt_contracts_dir.py`, `tests/test_adopt_e2e.py`, `tests/test_adopt_entry_paths.py`, `tests/test_adopt_execute_refusals.py`, `tests/test_adopt_filter_repo_failure.py`, `tests/test_adopt_git_reads.py`, `tests/test_adopt_git_rm_bytes.py`, `tests/test_adopt_github_exits.py`, `tests/test_adopt_late_failure.py`, `tests/test_adopt_leg_keys.py`, `tests/test_adopt_mount_ignored.py`, `tests/test_adopt_pins.py`, `tests/test_adopt_plan_and_remote_paths_spelled.py`, `tests/test_adopt_plan_escapes.py`, `tests/test_adopt_reencoded_files.py`, `tests/test_adopt_relative_submodule_url.py`, `tests/test_adopt_root_manifest.py`, `tests/test_adopt_root_shape_paths.py`, `tests/test_adopt_root_symlinks.py`, `tests/test_adopt_spec_only.py`, `tests/test_adopt_spelled_names.py`, `tests/test_adopt_split_branch.py`, `tests/test_adopt_submodule_url_answers.py`, `tests/test_adopt_submodules.py`, `tests/test_adopt_temp_work_roots.py`, `tests/test_adopt_template_values.py`, `tests/test_adopt_tracking_branch.py`, `tests/test_adopt_unsearchable_source.py`, `tests/test_adopt_values_as_typed.py`, `tests/test_adopt_verify.py`, `tests/test_doctor_next_is_a_command.py`, `tests/test_dry_run_asks_remotes.py`, `tests/test_family_add_refusals.py`, `tests/test_git_output_decoding.py`, `tests/test_github_limits_init_check_org.py`, `tests/test_github_name_limits.py`, `tests/test_non_utf8_name_callers.py`, `tests/test_path_guard_hygiene.py`, `tests/test_refusal_default_remediation.py`, `tests/test_repo_hygiene.py`, `tests/test_ruleset_hint_tracking_branch.py`, `tests/test_scaffold_leg_path_collisions.py`, `tests/test_scaffold_manifest_values.py`, `tests/test_scaffold_reuse_seeded_legs.py`, `tests/test_stdout_encoding.py`, `tests/test_template_values_single_pass.py`, `tests/test_update_shape.py`, `tests/test_update_shape_add.py`, `tests/test_update_shape_merged_away.py` </details> **`main` has moved since the gate's base, and it touched `adopt-project.py`.** - `origin/main` is now `50ce8ab15`. Of the 15 commits since `961640c68`, one touches `adopt-project.py`: `b7edd8816` (#1119, for #1083), with 279 lines added and 78 removed. None touches either test file. - `git merge-tree` of this head with `50ce8ab15` is clean. In the merged `adopt-project.py`: - the file parses; - `_unacted` and `_loudly` are each defined once; - `.loudly(` is called only inside `_loudly`, so #1119 adds no new `exc.loudly(` call. - The gate above did not run on `50ce8ab15`. The landing gate re-tests this head on its own merge. ### Merge-trees (2026-10-23T20:14Z) `git merge-tree --write-tree <X> 73c9f57` exits 0 (clean) for every `<X>` below: - `origin/main` at `50ce8ab15`; - #1177's head, `5208e874e`; - each of the 24 open PRs that touch `adopt-project.py`: #1210, #1207, #1198, #1194, #1190, #1189, #1186, #1180, #1178, #1171, #1170, #1169, #1154, #1153, #1143, #1141, #1125, #1123, #1122, #1121, #1120, #1118, #1106 and #1105. No other open PR touches either test file. #1121, which adds lines after `NEXT:`, has not landed, and it merges cleanly. Each of the 24 was also merged against a scratch merge of `origin/main` and this head: - 21 merge cleanly. - #1169, #1180 and #1190 conflict in `tests/test_adopt_check_throwaway_repos.py`, and #1169 also conflicts in `adopt-project.py`. - Those three conflict with `origin/main` alone, in the same hunks byte for byte: 6 in `adopt-project.py` for #1169, and 13, 8 and 8 in the test file. So this head adds no conflict. ## Not in this PR These are outside #1195, which covers `adopt-project.py`'s `--local-remote-dir`: - `scaffold-project.py`, `update-shape.py`, `scripts/family.py` and `scripts/bump-leg.py` still print `CommandFailed.loudly` as it is. - `_init_refused` prints `git init`'s argument list raw, and those arguments hold the `--work-dir` path. - The `adopt-remote-unreadable` and `source-unclonable` refusals print git's or gh's output raw. - `_unacted` and the NOTE test `str.isprintable`, as `_first_said` does. So the default-ignorable characters that #1171 (#1128) adds to `_shown` get no NOTE, and are not spelled in a REFUSED block. They belong with `_first_said` under #1165. Closes #1195 Lane: openreposhape-4 (openRepoShape-4) Co-Authored-By: Claude Opus 5.5 <[email protected]>



Stacked on #1125. This PR's base is
fix/1020-bad-id-first-problem(#1125's branch, head9549006f). It lands after #1125 and stays a draft until then. #1125 makescheck's first findingexecute's first refusal for a badid:ororg:. This PR extends that rule to the four pairs #1113 measured, which have neither.Fix round. The first gate failed six rows of
tests/test_adopt_relative_submodule_url.pythat pinnedcheck's old order on a plan hand-edited into another organisation, the relative url beforeplan-not-the-source, a planexecutealready refusedplan-not-the-sourcefirst on #1125's head; they now expectplan-not-the-sourcefirst, and a new row asserts that both commands name it first.The rule and the order
One generator,
_against_its_source, asks a plan's four problems against its source in one order, and both commands read it.executerefuses its first problem.checklists each one, in that order and in its own words, before the split branch and the entries.The order is the one a person mends them in:
plan-not-the-source);naming-unclassified, ornaming-role-mismatch);plan(plan-stale);plan-unresolved).Why this order:
planagain, as its remediation says, and a fresh plan takes back every answer given before. An answer given first would be lost.planunder the source's own name, or from the source it is about. Andexecutemust ask the naming policy nothing about the plan's names, and no remote anything, before it refuses it (adopt-project.pyplannever compares--project(or--org) with the repository it adopts in place, so a source namedbilling-serviceis refused with a remediation that steers to--project BillingService, which plans and checksplan okagainstacme/billing-service, andexecutethen acts onacme/BillingService: a rawgit ls-remotefailure when no such repository exists, and, when a different repository of that name does, both legs, the split branch, the pull request and the topic on that repository #499)._against_its_sourceis a generator, soexecuteasks nothing after the first problem, and that still holds.plangiven another--project, or after the source is renamed on GitHub. That run reads the source as it is now, so it mends the moved source too.planrun again as it was, for the moved source, would leave the name to mend.execute's order for the plan's names (adopt-project.pyplannever compares--project(or--org) with the repository it adopts in place, so a source namedbilling-serviceis refused with a remediation that steers to--project BillingService, which plans and checksplan okagainstacme/billing-service, andexecutethen acts onacme/BillingService: a rawgit ls-remotefailure when no such repository exists, and, when a different repository of that name does, both legs, the split branch, the pull request and the topic on that repository #499, adopt-project.pycheck: a plan in a name the policy refuses gets no rename-first remedy, and a source that names no repository is never compared with the plan's recordedsource.repository#716) andcheck's order of a moved source before its entries. Only the pairs that disagreed change.Before and after
Measured on #1125's head
9549006fand on this head, with a stubgh(exit 97),GH_TOKEN=bogus, an emptyGH_CONFIG_DIR,GIT_SSH_COMMAND=false, a proxy that goes nowhere, an empty global git config and--local-remote-dir. No run made a leg.checkexits 1 andexecuteexits 2 in every row.checkbeforeexecutebeforeplan-staleplan-unresolvedplan-staleplan-unresolvedplan-not-the-sourceplan-not-the-sourceplan-staleplan-not-the-sourceplan-not-the-sourceplan-unresolvednaming-unclassifiednaming-unclassifiedplan-stalenaming-unclassifiednaming-unclassifiedplan-staleplan-not-the-sourceplan-not-the-sourceplan-not-the-sourceplan-not-the-sourceplan-not-the-source(unchanged)The fifth row is not in #1113's table, but the two commands disagreed there too, and the same rule decides it.
The same probe, comparing each command's output before and after, with paths and hashes masked:
check's stderr in each pair row holds the same lines as before, reordered: the same findings and the same remediation lines.execute's stderr changes in one row only, a moved source beside an unanswered entry:REFUSED plan-stale, in its own words, where it saidREFUSED plan-unresolved.No refusal's code or wording changes, and no code is added. Re-run on this head after the fix round, the probe gives the same: the 24 plans (these 11, and the 13 of the next section) each get one first problem from both commands, no run makes a leg, and the comparison with #1125's head is the one above, line for line.
#1113's suspected case: a
--work-dirthat cannot be writtenMeasured on #1125's head and on this head, the two commands agree in every row, and nothing here changes it:
id:ororg:beside a--work-dirthis user cannot write in (chmod 500):plan-bad-idorunsafe-valueto both. adopt-project.py:checkandexecuteask a plan'sorg:andid:right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and apins:entry that is no pin is said as_read_assays it (#1020) #1125's review round 1 (RV1125's SHOULD-1) made both commands ask the two before_work_root, which settled this case.--work-dir:adopt-work-dir-unwritablefirst to both.What changed, in
adopt-project.py_against_its_sourceand_Unmended(new)._against_its_sourceis the rule. It asks:_refuse_a_plan_for_another_repository;_check_names, given the source only where the plan names no other repository, ascheckgave it (adopt-project.pycheck: a plan in a name the policy refuses gets no rename-first remedy, and a source that names no repository is never compared with the plan's recordedsource.repository#716);_refuse_an_unrunnable_plan.It yields each problem as an
_Unmended: theRefusalexecuterefuses it with, andcheck's FINDING lines and remediation for it, incheck's words as they were.checklists an unanswered entry with the entries, each by its path (_leg_findings), after the rule's problems.cmd_execute. It refuses the first problem,next(_against_its_source(...)). Before, it called_refuse_a_plan_for_another_repository,_check_namesand_refuse_an_unrunnable_planin turn.cmd_check. It lists the rule's findings right after the Triad advisory, where it listed a moved source. Another repository and the names are no longer listed after the entries. Three things are still asked where they were, and only where no name was refused:init, adopt-project.pycheckand the--orgof all four tools:initsets thexf-project-<id>topic last and asks no GitHub limit,checkpasses a nameexecuterefuses, and--org my_org.xpasses every plan #863);execute: each leg repository is asked about only as it is made, so a code leg whose name is taken leaves the spec leg created, on GitHub as under--local-remote-dir, and a--local-remote-dirthat is a file or cannot be written ends in a traceback afterchecksaidplan ok#798).The remediation lines it prints after its findings follow the findings' order, so the rule's come first.
_refuse_an_unrunnable_plan. It asks a moved source before an unanswered entry. Its docstring says why._refuse_a_plan_for_another_repository. Unchanged. The rule calls it.Tests
tests/test_adopt_plan_against_its_source.py(new, ASCII only), 11 rows. Each runscheckand thenexecute --yeson one hand-edited plan, both with the same--local-remote-dir, and asserts that no leg is made.checkexits 1 andexecuteexits 2;checklists every problem the plan holds, in the rule's order.checkandexecuteask a plan'sorg:andid:right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and apins:entry that is no pin is said as_read_assays it (#1020) #1125's head9549006f:('plan-stale', 'plan-unresolved') != ('plan-stale', 'plan-stale');another-and-nameguard row and the 4 controls pass.tests/test_adopt_relative_submodule_url.py, 6 rows changed and 1 new (the fix round):test_check_keeps_a_relative_url_its_github_leg_resolves_alikefor[https],[scp],[scp-other-case],[ssh-port]and[ssh-github-443], andtest_a_credential_in_the_source_remote_is_never_printed.org:tootherorg, so the plan namesotherorg/Thingand the source istestorg/Thing: a plan for another repository.checkto list the relative url first andplan-not-the-sourceafter it,check's old order. They now expectplan-not-the-sourcefirst. Their other assertions are unchanged; the credential is still printed nowhere.test_check_names_another_repository_first_as_execute_refuses_it, runs one such plan. It asserts thatcheck, with and without--local-remote-dir, listsplan-not-the-sourceand then the url, thatexecuterefusesplan-not-the-source, and that no leg is made.checkandexecuteask a plan'sorg:andid:right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and apins:entry that is no pin is said as_read_assays it (#1020) #1125's head for the six source remotes:executealready refused each such planplan-not-the-source, and its output is the same on both heads. Onlycheck's order changed. No spelling of the source'soriginreads as another repository: withorg:left as the source's,checkpasses on both heads, as the rows assert.Both files together, 46 rows:
checkandexecuteask a plan'sorg:andid:right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and apins:entry that is no pin is said as_read_assays it (#1020) #1125's head: 13 failed, 33 passed. The 13 are the 6 pair rows above and the 7 relative-url rows, each on the order:plan-not-the-sourcewhere the url was expected first, or the url first in the new row.Mutants
Each was applied to
adopt-project.py, run against both files (46 rows), and restored, with its sha256 checked (4c8c1c9e, the same after each one). Unmutated, the 46 pass. M1-M6 are the first round's; M7 and M8 are the fix round's.execute:_refuse_an_unrunnable_planasks an unanswered entry before a moved source (pair 1)moved-and-unanswered,all-fourcheck: lists another repository after the entries (pair 2)another-and-unanswered,another-and-moved,another-and-name,all-four, and the 7 relative-url rowscheck: lists a moved source before another repository (pair 3)another-and-moved,name-and-moved,all-fourcheck: lists a refused name after the entries (pair 4)name-and-unanswered,name-and-moved,all-fourcheck: lists a moved source before a refused name (pair 5)name-and-moved,all-fouranother-and-name,all-fourexecute: asks_refuse_what_check_findsbefore the ruleanother-and-name, theplan-stalecontrol, and the new relative-url rowcheck: lists all the rule's problems after the entriesanother-and-name, theplan-stalecontrol, and the 7 relative-url rowsGate
Run on the scratch merge
743ebe176:origin/main961640c68plus this head90eca4144(treed71d6f00a, never pushed). It ran in the landing gate's own environment (a stubgh,GH_TOKEN=bogus, an empty global git config,EMAILset, theLANES_*andGIT_SSH_COMMANDvariables unset), one shard at a time, each started with at least 19G free. The ids were collected from that tree, 4405 + 448 = 4853, and each is in exactly one shard. The file list is the 46 test files W1113's gate named and four more, added in the fix round (50 in all):test_adopt_c_locale_bytes.pyandtest_adopt_submodule_url_answers.py(they import helpers and the module-scopedadopterfixture from the changed test file, so they sit in its shard, r03),test_reader_refusals_named.py(it hand-edits a plan'sorg:and checkscheck's exact findings) andtest_github_name_limits.py. Every shard exited 0.test_adopt_plan.py::test_plan_on_medxehr_matches_the_rulings)test_family_init_values.py)test_shape_doctor.py)test_shape_doctor.py)Main has moved since this gate:
origin/mainisac5f28d2a(#1188, #1130 and #1098 landed). They changescaffold-project.py,scripts/family.pyand four test files. None of them is a file this PR changes, a moduleadopt-project.pyimports, or one of the 50 gated test files, so the gate was not run again on that tip. The merge-trees below were.Merge-trees
git merge-tree --write-tree, run again on 2026-10-23 at 15:31Z against the currentorigin/main, every one clean:origin/mainac5f28d2a: clean, tree1a65ab9bd.checkandexecuteask a plan'sorg:andid:right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and apins:entry that is no pin is said as_read_assays it (#1020) #11259549006fe: clean. This branch is on it.--planpath incheckandexecute, and the--local-remote-dirpath inexecute'sbare, leg andsplitlines, are named with_shown, as #1154 names--outand--work-dir, so a bidi control, an escape, a line feed or a byte that is not UTF-8 in either no longer reaches the terminal as it was typed (#1152) #11775208e874e(fix/1152-plan-and-remote-paths-spelled, which edits a line of_refuse_a_plan_for_another_repository): clean, with this head and three-way on the scratch merge.adopt-project.pyor either test file, 25 of them, adopt-project.py:checkandexecuteask a plan'sorg:andid:right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and apins:entry that is no pin is said as_read_assays it (#1020) #1125 and adopt-project.py: the--planpath incheckandexecute, and the--local-remote-dirpath inexecute'sbare, leg andsplitlines, are named with_shown, as #1154 names--outand--work-dir, so a bidi control, an escape, a line feed or a byte that is not UTF-8 in either no longer reaches the terminal as it was typed (#1152) #1177 among them: clean, both with this head and three-way on the scratch merge ofac5f28d2aand this head,98afb128a(git merge-tree --write-tree <that merge> <its head>). Since the first run, adopt-project.py, shape_materialize.py and the assembly-root template: a keptGNUmakefile/is a directory GNU make stops at,python3 scripts/bootstrap.pynamespythonon Windows, and the template says what to run wheremakereads another file #1207 is new, and adopt-project.py: check asks the split's own clone of the source in the work directory, so a clone this git will not make is adopt-git-unasked before any leg, and _resolved and _answers make their repositories as check's other throwaways do (#1083) #1119, 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 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 have moved; all four are clean. No open PR touches either test file. The list is in a code block, so that it does not mention each PR:Left for a follow-up (outside #1113)
checkandexecutestill name different first problems for a plan with an unanswered entry beside an uncovered path,plan-uncoveredandplan-unresolved, a pair #1113's four do not cover (follows #1113) #1197.checklistsplan-uncoveredfirst andexecuterefusesplan-unresolvedfirst. Measured the same on adopt-project.py:checkandexecuteask a plan'sorg:andid:right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and apins:entry that is no pin is said as_read_assays it (#1020) #1125's head and on this head.executerefuses an unanswered entry before_refuse_what_check_finds, whilechecklists it in_leg_findings, after the paths and the coverage. Other entry findings ahead of it in_entry_findingsare likely the same (plan-unsafe-pathamong them), and so is the taken split branch, but those were not measured.Closes #1113
🤖 Generated with Claude Code
Lane: openreposhape-4 (openRepoShape-4)
Summary by Sourcery
Align
checkandexecuteon a shared, remediation-oriented ordering of plan problems so both commands report or refuse the same issue first.Bug Fixes:
checkandexecuteidentify the same first plan problem when validating a plan against its source.Enhancements:
Tests: