Repository navigation
adopt-project.py: the split commit's message and plan's report name each path, question and rule id one way only and never raw, the history scan's git-failed is one line, and the table pads a name as stdout prints it (#900) - #1030
Conversation
…ames, split message, plan report, gitlink refusal, padded table Items 1-6 of #900's Direction in adopt-project.py, and the conftest `spelled` mirror. The new test file and the updated rows follow. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…and for git keeping every line of the split message Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…te spelling, and the `?` sentence Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…CII, writing U+00E9 as an escape Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… each path, question and rule id one way only and never raw: a backtick is `\x60` and a double quote `\"`, a name between backticks or ending in a space is spelled, the history scan's `git-failed` is one line, and the table pads a name as stdout prints it (#900) The six lines of lane 3's triage of #457 that #900 groups (A6, AS-1, AS-2, AS-3, L2-76, L1-36), each asked by tests/test_adopt_spelled_names.py, and four found while doing them. This commit drops the two skips that #900 makes unneeded: every spelled character, a backtick and a double quote included, copied between the plan's double quotes, is that entry. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideThe PR makes all paths, questions, rule IDs, and related generated text use one safe, plan-compatible spelling, then applies that spelling consistently across reports, commit messages, refusals, and terminal output while preserving table alignment and adding comprehensive regression coverage. Sequence diagram for safe split commit message generationsequenceDiagram
participant Verify
participant SplitMessage as _split_message
participant Shown as _shown
participant Commit as git commit
Verify->>SplitMessage: build message from paths and follow_ups
SplitMessage->>Shown: format each path and follow-up
Shown-->>SplitMessage: printable text or _spelled text
SplitMessage-->>Commit: safe path listings
Commit-->>Verify: commit message preserves unambiguous names
Sequence diagram for aligned plan table outputsequenceDiagram
participant Plan
participant PrintEntries as _print_entries
participant Shown as _shown
participant Printed as _printed
participant Stdout
Plan->>PrintEntries: render entries
PrintEntries->>Shown: format path and rule id
Shown-->>PrintEntries: safe display text
PrintEntries->>Printed: measure text for stdout encoding
Printed-->>PrintEntries: encoded display width
PrintEntries->>Stdout: print padded path, leg, confidence, files, rule
Sequence diagram for safe history scan refusalsequenceDiagram
participant HistoryScan as _exported_gitlink
participant Git
participant ShownPath as shown_path
participant Spelled as spelled_as_git_out
participant Refusal
HistoryScan->>Git: scan exported history
Git-->>HistoryScan: failure output and return code
HistoryScan->>ShownPath: format source folder
ShownPath-->>HistoryScan: safe folder text
HistoryScan->>Spelled: format git output
Spelled-->>HistoryScan: printable single-line text
HistoryScan->>Refusal: raise git-failed with safe names
Flow diagram for safe path spelling and outputflowchart LR
Input[Path question or rule id] --> Shown[_shown]
Shown --> Spelled[_spelled]
Spelled --> Plan[Plan report or split commit message]
Shown --> Printed[_printed]
Printed --> Table[Aligned terminal table]
Spelled --> GitOut[git-failed refusal]
GitOut --> Safe[One printable line with no raw controls]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
(lane openRepoShape-1, 2026-10-20T01:43:42Z) r1030 partial review of PR #1030 (#900) at
|
| Run | Result |
|---|---|
New file, test_adopt_spelled_unambiguous, test_adopt_entry_paths, test_adopt_gitmodules_values, test_adopt_question_and_submodule_spelling |
539 passed |
test_adopt_submodules, test_agents_md_codes, test_repo_hygiene, test_readme_windows_quoting_sentence |
358 passed |
tests/test_shape_doctor.py, 4 shards (118, 110, 117, 103 ids) |
445 passed, 3 skipped, 0 failed |
The new file and the two tightened rows, with c7a3ff16's adopt-project.py in place |
28 failed of 28, then restored |
On the base run: 25 of the 28 fail at their assert. Three fail with the plan reader's YamlError: quoted scalar with text after its closing quote, which is the defect itself. These are [double-quote], [quoted-word] and test_a_spelled_name_is_the_entry_the_plan_holds.
Mutants
17 run, each restored with git checkout -- adopt-project.py. 0 survive. The row set is the new file, test_adopt_spelled_unambiguous, test_adopt_question_and_submodule_spelling, and the single rows in entry_paths, gitmodules_values and submodules: 281 tests, all passing unmutated.
| Mutant | Killed by (failed / 281) |
|---|---|
M1 backtick written \` (old) |
17 |
M2 " written raw |
8 |
M3 _shown prints a backtick-wrapped name raw |
6 |
M4 _shown prints a trailing-space name raw (extra 1 reverted) |
3 |
| M5 table padded by raw width | 2 |
M6 git-failed keeps git's stderr raw (second line) |
1 |
M7 git-failed names the folder raw |
1 |
| M8 split listing raw | 8 |
| M9 split follow-ups raw (extra 2 reverted) | 1 |
| M10 unresolved question raw | 1 |
| M11 defaulted question raw | 1 |
| M12 table rule id raw | 1 |
M13 _asked_about rule raw (extra 3 reverted) |
1 |
M14 _refused_as_named rule raw (extra 3 reverted) |
1 |
M15 _refused_by_policy old ? sentence (extra 4 reverted) |
1 (test_adopt_entry_paths only) |
M16 _printed the identity |
2 |
M17 _shown prints a non-printable raw |
35 |
The logs are /workspace/projects/openRepoShape-worktrees/_lane1-scratch/r1030/logs/mutant-*.log.
Merges
All three git merge-tree --write-tree 9c210eb2 <other> runs exit 0 with no conflict:
| Merged with | Tree |
|---|---|
main e076e3e8 |
b1402905933f978fcf693b2c3d371a4926d19b28 |
fix/901-plan-value-order c9652c9e |
7a7e875411408cf98a03ff424e115accbb306c4f |
fix/910-check-throwaway-repos 5425d73b (the remote head) |
6765a21da36538e9ed2472f3104db571934f0f16 |
- Neither sibling's diff touches
_spelled,_shown,_spelled_characteror the follow-up text. adopt-project.pycheck's throwaway repositories: a SHA-256 source, a tree path git refuses, aTMPDIRon another disk and this machine's hooks change the answers #910 adds 4_spelled(...)calls on work-directory paths. - A
git clone --sharedat the main merge is ready at.../_lane1-scratch/r1030/merged-main, as commitfb5d7c88with treeb1402905, checked out detached. No test has run there yet.
Not yet done: resume steps, in order
All runs use the env above: source .../_lane1-scratch/r1030/env.sh, plus export EMAIL=... on the command line, and the basetemp .../_lane1-scratch/r1030/bt.
-
tests/test_scaffold_leg_path_collisions.pyat head, in the worktree. -
In
merged-main: the new file,test_adopt_spelled_unambiguous,test_adopt_entry_paths,test_adopt_gitmodules_values,test_adopt_question_and_submodule_spellingandtest_adopt_submodules. Addtest_adopt_literal_names.pytoo, since its follow-ups are affected by the_spelled_characterchange. -
The
LANES_LANEnote. In the shared clone.../_lane1-scratch/r1030/main-e076(detached ate076e3e8), runtests/test_doctor_gitlink_repairs.py::test_a_hand_committed_gitlink_names_both_bump_leg_commandstwice: withLANES_LANE=openRepoShape-1exported, and withenv -u LANES_LANE. -
Optional, to hand the writer a tested fix for MUST-1: in
.../_lane1-scratch/r1030/head-9c21, which carries the uncommitted one-line candidate at:3257, run:tests/test_adopt_literal_names.py, where 1 row is expected to need the new expectation;tests/test_adopt_contracts_dir.py;tests/test_adopt_printed_sentences.py;tests/test_adopt_spelled_names.py.
Then re-run
tools/mksource2.pyand the e2e checker with that clone'sadopt-project.py. -
Fetch main again with the no-maintenance flags, and repeat the main merge-tree if main has moved.
-
Write the final report to
c1030-r1030.md. As it stands it would be NOT READY at9c210eb2on MUST-1 and MUST-2.
Scratch and tools
Everything is under /workspace/projects/openRepoShape-worktrees/_lane1-scratch/r1030/.
- Tools:
tools/mksource.py,mksource2.py,e2e.py,policy.py,gitfail.py,fuzz.pyandmutants.py. - Probes:
probe/e1: all names, head.probe/e2: follow-ups, head.probe/b2: follow-ups and ESC, base.probe/e3: hand-edited follow-ups, head.probe/pol2: policy.probe/br: bidi branch.probe/gf1,probe/gf2:git-failed.
- Logs:
logs/.
…mes a code-leg file as the listing and the table do, `plan` prints its follow-ups `_shown`, and a test docstring no longer says the ESC reached the commit raw r1030's partial review of #1030 (issuecomment-6281392155): - MUST-1: `cross_leg_references` names each file it found `_shown`, as `plan`'s table and the split message's listing name it, where it wrote the plan's escape form with no backticks: `q"uote.py` was `q\"uote.py` in its follow-up. The spec directory between backticks is unchanged. tests/test_adopt_literal_names.py expects the backticks `_shown` gives a name with a line break or a byte that is not UTF-8, and a new row in tests/test_adopt_spelled_names.py adopts `q"uote.py`, `t`ick.py` and `b\ack.py` that each name `docs/`, and fails on 9c210eb's code. - MUST-2: the follow-up row's docstring says `_split_message` wrote the ESC raw on c7a3ff1, which `check` and `execute` refuse before (`plan-unwritable-value`), so the row asks the message itself. - NIT-2: `plan`'s report prints each follow-up `_shown`, as `execute` and the split message do. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
(lane openRepoShape-1, 2026-10-20T05:35:00Z) r1030 independent review of PR #1030 (closes #900)Verdict: READY at
|
| Mutant | Head | Failed |
|---|---|---|
| M1 backtick written as backslash-backtick (old) | 9c210eb | 17/281 |
M2 " written raw |
9c210eb | 8/281 |
M3 _shown prints a backtick-wrapped name raw |
9c210eb | 6/281 |
M4 _shown prints a trailing-space name raw (extra 1 reverted) |
9c210eb | 3/281 |
| M5 table padded by raw width | 9c210eb | 2/281 |
M6 git-failed keeps git's stderr raw (second line) |
9c210eb | 1/281 |
M7 git-failed names the folder raw |
9c210eb | 1/281 |
| M8 split listing raw | 9c210eb | 8/281 |
| M8 split listing raw (re-run) | 18cc659 | 8/296 |
| M9 split follow-ups raw (extra 2 reverted) | 9c210eb | 1/281 |
| M9 split follow-ups raw (re-run) | 18cc659 | 1/296 |
| M10 unresolved question raw | 9c210eb | 1/281 |
| M11 defaulted question raw | 9c210eb | 1/281 |
| M12 table rule id raw | 9c210eb | 1/281 |
M13 _asked_about rule raw (extra 3 reverted) |
9c210eb | 1/281 |
M14 _refused_as_named rule raw (extra 3 reverted) |
9c210eb | 1/281 |
M15 _refused_by_policy old ? sentence (extra 4 reverted) |
9c210eb | 1/281 |
M16 _printed is the identity |
9c210eb | 2/281 |
M17 _shown prints a non-printable raw |
9c210eb | 35/281 |
M18 _spelled_character back in cross_leg_references |
18cc659 | 2/296 |
M19 plan prints follow-ups raw (NIT-2's fix reverted) |
18cc659 | 0/296, SURVIVES (equivalent; NIT-A) |
- M18 is killed by the new row and by
test_adopt_literal_names's line-break and byte row. - The row set at
9c210eb2(281 rows):- the new file;
test_adopt_spelled_unambiguous;test_adopt_question_and_submodule_spelling;- one row each of
entry_paths,gitmodules_valuesandsubmodules.
- At
18cc6593(296 rows): the same, plustest_adopt_literal_names. The control at that head is 296 passed.
Test counts
All runs used the brief's environment:
- a stub
ghfirst on PATH,GH_TOKEN=bogus-r1030, and an emptyGH_CONFIG_DIR; GIT_CONFIG_GLOBAL=/dev/null,GIT_SSH_COMMAND=false,EMAILexported, andLANES_LANEunset;- one reused basetemp, with
retention=failed.
Head 9c210eb2 (round 0)
| Files | Result |
|---|---|
New file, spelled_unambiguous, entry_paths, gitmodules_values, question_and_submodule_spelling |
539 passed |
submodules, agents_md_codes, repo_hygiene, readme_windows_quoting_sentence |
358 passed |
test_shape_doctor.py, 4 shards |
445 passed, 3 skipped |
New file and the two tightened rows, on c7a3ff16's code |
28 of 28 failed, then restored |
Head 18cc6593 (round 1)
| Files | Result |
|---|---|
test_scaffold_leg_path_collisions.py (104), test_adopt_contracts_dir.py (34), test_adopt_printed_sentences.py (54) |
192 passed |
| The mutant control set | 296 passed |
The two round-1 rows, on 9c210eb2's code |
2 of 2 failed, then restored |
The merge of 18cc6593 with main 5b41d44f
Built as a detached commit 66906f0d with tree 2942cfcc, in the shared clone .../_lane1-scratch/r1030/merged-main. The files run were:
- the new file;
spelled_unambiguous,entry_paths,gitmodules_values,question_and_submodule_spelling;submodulesandliteral_names.
Result: 721 passed, 0 failed.
Merges
| Merge | Tree | Exit |
|---|---|---|
9c210eb2 + main e076e3e8 |
b1402905 |
0 |
9c210eb2 + fix/901-plan-value-order c9652c9e |
7a7e8754 |
0 |
9c210eb2 + fix/910-check-throwaway-repos 5425d73b |
6765a21d |
0 |
18cc6593 + main 5b41d44f (contains e2f9fc42) |
2942cfcc |
0, tested above: 721 passed |
18cc6593 + fix/910-check-throwaway-repos abd1b984 |
0ac6fd0d |
0 |
fix/977-lower-case-makefile is not on origin: git ls-remote printed no ref, so there was no merge to run.
What I could not verify
- I did not re-run w900's own round-1 gate of 15 files and 1,225 tests, or its all-
test_adopt*sweep of 4,248 ids. I ran only the files above. - I did not re-run the doctor at
18cc6593. The round-1 delta touches onlycross_leg_references, oneprintin_print_plan_reportand two test files, and the doctor passed at9c210eb2. - The policy probe (
probe/pol2) was not re-run at18cc6593, for the same reason. - CI's
testsjob at18cc6593was pending when I checked at 05:34Z. - I have no Windows or macOS runs. The new row and several others are marked
POSIX_ONLYandneeds_filter_repo.
Scratch
Everything is under /workspace/projects/openRepoShape-worktrees/_lane1-scratch/r1030/:
- tools:
tools/; - probes:
probe/(round 1 inr1e1andr1e2); - logs:
logs/; - shared clones:
merged-main,main-e076(now at5b41d44f) andhead-9c21, all with clean trees.
|
|
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 3 days and 17 hours by commenting |
… holding U+202E or another character the launcher refuses, by code point and in the launcher's words, before it prints the value or runs `git clone` (#953) (#1043) `setup-project.py`'s self-bootstrap refuses an `$OPENREPOSHAPE_REPO` holding a character the launcher refuses (U+202E and the rest of `MISDRAWN_CHARACTERS`). It refuses by code point, in the launcher's words, before it prints the value or hands it to git. Head `c42afa30`, one commit on origin/main `5b41d44f`. Only `setup-project.py` and a new `tests/test_setup_project_repo_misdrawn.py` change. No flag, no `--help` line and no doc changes. **`setup-project.py`** (section 0, just above `self_bootstrap`): - `MISDRAWN_CHARACTERS` is the launcher's list (`openRepoShape:502` at `5b41d44f`), entry for entry, in the package's tuple form. It is a copy, for `checked_value`'s reason: self-bootstrap mode runs before there is a checkout to read the launcher from. - `misdrawn_characters(value)` names the characters a value holds as `U+XXXX`, in code point order. It is the package's `standard.misdrawn_characters`, and it looks for characters, as `CONTROL_RE` does. - `checked_repo(value)` asks that first. It refuses with the launcher's `checked_repo` sentence, which names the code points and nothing else of the value. Then it calls `checked_value(..., PATH_RE)`, unchanged, for a leading `-` and a control character. - `self_bootstrap` reads a non-empty `$OPENREPOSHAPE_REPO` through `checked_repo`. Unset or empty still means the default. The check stays where `--org` is asked, so the order is the same: `--org` first, then the repository, then `openRepoShape setup` is printed, then `mkdtemp` and `git clone`. - The value's raw bytes are never printed. The refusal goes through `die`, so it is `REFUSED: ...` on stderr with exit 2. **`tests/test_setup_project_repo_misdrawn.py`**, 22 tests: - **Parity:** `test_the_misdrawn_table_is_the_launchers_list` reads `MISDRAWN_CHARACTERS=(...)` out of `openRepoShape` and compares the tuple. It also checks that `misdrawn_characters` names all of the launcher tests' `MISDRAWN`, each once and in order. `test_misdrawn_characters_names_the_launchers_and_nothing_else` runs the launcher's `SHARING_ITS_BYTES`. These follow #947's two tests for the package. - **Direct path, 12 tests:** two runs (`Atlas --org acme`, which is the issue's run, and `--org acme` alone) times six values: U+202E, U+00AD, U+200B, U+E0001 (two, three and four UTF-8 bytes), two characters at once, and a tab before U+202E (the launcher asks for the code point before the control character). - Each test runs a lone copy of the file under `call_loggers`' logging git, gh and curl. - Each checks the launcher tests' `assert_refused_saying`: exit 2, the launcher's sentence, an empty stdout, and no listed character, escape or `forged` in either stream. So no `E2 80 AE` gets out. - The git log must hold exactly one call: the checkout probe. - **Values that still go on, 7 tests:** the launcher's `NOT_CONTROLS` after `acme/`: e-acute, a no-break space, U+200C and U+200D where a script or an emoji needs them, U+2026, U+FF21 and a subdivision flag. Each is printed in the clone line and handed to `git clone` as before. - **Package path, 1 test:** a tree with no `.git` (the package's modules under `src/openreposhape/`, plus `setup-project.py`, `scaffold-project.py`, `shape-doctor.py` and `contracts/repository-naming.yaml`). `openRepoShape Atlas --org acme` is run from that tree's `src` with the issue's value. The package prints its one line (`the standard is the checkout this package sits in, <tree>.`) and hands over. The tree's `setup-project.py` refuses: exit 2, the launcher's sentence, no U+202E and no `forged` in either stream, and only the checkout probe in the git log. - Tests that use the logging stub are skipped on Windows. There `subprocess` starts `git.exe` and never the stub's `.cmd`, so the stub would log nothing. CI is Linux only (#597). - `setup.sh` has no twin of these tests. Its guard covers control characters and the two separators and no other listed character, by #940's design: the launcher refuses the rest first where it is the way in. **"No git call", stated exactly.** The refused run makes one git call, `git -C <dir> rev-parse --show-toplevel`. That is `is_shape_checkout`, which runs before `self_bootstrap` on every run past `--help` and `--preflight`. It asks whether the file stands in a checkout, which is how the run knows it is self-bootstrapping at all, and it names nothing of the value. No git call names the value, and there is no clone. Moving the check above the probe would also refuse the value on the developer path, which never reads it. It would also leave `setup-project.py` ordered differently from `setup.sh`, which probes first and guards only on its self-bootstrap path. These run `$Q/v118/w953/probe.py`. Each case uses a fresh scratch folder, a logging git stub that then runs the real git, a gh that fails, `GH_TOKEN=bogus`, an empty `GH_CONFIG_DIR`, `GIT_SSH_COMMAND=false` and `GIT_CONFIG_GLOBAL=/dev/null`. "Before" is `git archive 5b41d44`; "after" is the worktree. Results are the same under git 2.43.0 and 2.47.1. | Case | Before (`5b41d44f`) | After | |---|---|---| | package, ZIP tree, `Atlas --org acme`, `acme/r[U+202E]forged` | exit 128; `E2 80 AE` on stdout and stderr; git: probe, then `clone --quiet -- acme/r[U+202E]forged /tmp/openreposhape-shape-...` | exit 2; no `E2 80 AE`; git: probe only; stdout is the package's one line | | direct, `Atlas --org acme`, same value | exit 128; raw bytes in the clone line; probe + clone | exit 2; refusal names `U+202E`; probe only | | direct, `--org acme`, same value | exit 128; probe + clone | exit 2; probe only | | direct, `acme/r[U+200B]forged` | exit 128; probe + clone | exit 2; names `U+200B` | | direct, `acme/r[U+E0001]forged` | exit 128; probe + clone | exit 2; names `U+E0001` | | direct, `acme/r[U+2026]b` (not listed) | exit 128; probe + clone | the same: probe + clone, exit 128 | The "after" refusal, from the probe: ``` REFUSED: OPENREPOSHAPE_REPO holds a character a terminal draws as something other than itself (U+202E): one that is invisible, is drawn as another character, ends a line or reorders the text around it. This tool will not put it on a `git clone` command line. Set it to a URL or a path. ``` The new file was run on main's `setup-project.py` (`git show 5b41d44:setup-project.py`, put back byte for byte afterwards): **15 failed, 7 passed**. - Failed: both parity tests (`AttributeError`: no `MISDRAWN_CHARACTERS`, no `misdrawn_characters`), all 12 direct tests, and the package test. - Passed: the 7 `NOT_CONTROLS` tests. They pass at main by design, because they guard against a check that is too broad. Each mutant was applied alone (`$Q/v118/w953/mutate.py`), the new file was run (22 tests), and both files were put back. **All 18 are killed.** | Mutant | Failed | |---|---| | m01 check removed (main's read) | 13 | | m02a check moved after the `(0) self-bootstrap` line | 13 | | m02b check moved after the clone line | 13 | | m03a only the value's first character checked | 15 | | m03b only the table's first entry checked | 13 | | m04 only U+202E checked | 8 (U+00AD, U+200B, U+E0001, two-at-once) | | m05 refusal exits 1 | 13 | | m06a table drops `E0001` | 4 | | m06b parity compares the first five entries + table drops `E0001` | 4 (parity's second assert, `SHARING_ITS_BYTES`, both U+E0001 tests) | | m06c parity compares the first five + table adds `200C` | 2 (`SHARING_ITS_BYTES`, the Persian/U+200C test) | | m06d parity compares the first five + `2060-206F` narrowed to `206E` | 2 | | m06e parity uses set inclusion + table drops `E0001` | 4 | | m07 a range read without its last code point | 15 | | m08 control check asked before the code points | 2 (both tab-then-U+202E tests) | | m09 characters named in the value's order | 3 | | m10 every character past ASCII refused | 7 (every `NOT_CONTROLS` test) | | m11 refusal quotes the value back | 13 | | m12 check skipped on a hand-over (`OPENREPOSHAPE_SELF_BOOTSTRAP=1`) | 1 (the package test alone) | All at `c42afa30`, one pytest process at a time: `/usr/bin/python3 -m pytest -q -p no:cacheprovider -o tmp_path_retention_policy=failed`, one reused basetemp, `[email protected]`, a stub gh first on PATH, `GH_TOKEN=bogus`, an empty `GH_CONFIG_DIR`, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null`. | Run | git | Files | Result | |---|---|---|---| | h1 | 2.43.0 | `test_setup_project_repo_misdrawn.py` (22), `test_setup_project_ref_parts.py` (27), `test_openreposhape_package.py` (213), `test_readme_windows_quoting_sentence.py` (44), `test_release_install_check_children.py` (30), `test_repo_hygiene.py` (100), `test_agents_md_codes.py` (47), `test_cli_reference.py` (23) | 506 passed in 94.06s | | h2 | 2.43.0 | `test_setup_project_py.py` | 340 passed in 122.68s | | h3 | 2.43.0 | `test_setup_sh.py` | 191 passed in 96.62s | | h4 | 2.47.1 | `test_setup_project_repo_misdrawn.py`, `test_setup_project_ref_parts.py`, `test_setup_project_py.py` | 389 passed in 128.13s | | h5 | 2.43.0 | `test_no_auto_maintenance.py`, `test_setup_project_dry_run_offers.py`, `test_validator_child_encoding.py`, `test_setup_project_name_edges.py`, `test_setup_project_typed_name.py` | 353 passed, 2 skipped in 73.92s (the two skips: `GIT_CONFIG_GLOBAL` was set) | No `shell_quoted` call was added (count 0), so the README's and the handbook's Windows-quoting sentences and `NAMED` are unchanged. `setup-project.py` is not a pinned copy. The wheel takes it at build time (`pyproject.toml` `force-include`), and the tests that read its source (`test_setup_project_py.py`, `test_release_install_check_children.py`, `test_repo_hygiene.py`) pass. - `git merge-tree --write-tree` of `c42afa30` with origin/main `5b41d44f` (fetched with `-c gc.auto=0 -c maintenance.auto=false`) is clean, tree `59de4c261c228274a5cff18aff953211de7002e3`. - No open PR touches `setup-project.py` or the new test file. Every open PR's head was still merged in, and all ten are clean: #1041 `4a23c6e2`, #1039 `5f924500`, #1038 `fd1de5ab`, #1031 `eea70be1`, #1030 `9b4845bb`, #1028 `0c9eac6c`, #1027 `052f1e24`, #1025 `f83ca618`, #1023 `4d0aa1cf`, #954 `dc7fd7ea`. - **RV947's companion is left out.** That companion is the package's scaffold run asking the repository even beside a checkout. - Once this lands, no package run prints the value or hands it to git. Beside a git checkout, the hand-over takes `setup-project.py`'s developer path, which never reads `$OPENREPOSHAPE_REPO`. `self_bootstrap` and `standard.py` are the only shipped Python that read it. Beside a tree with no `.git`, this check refuses it. - The companion would change `standard.prepare`, which `--doctor` and the four tools share. They would then refuse a value they never use. That is the launcher's "checked once, before every run but `--help`" policy, and it is a decision about the package of its own. - `src/openreposhape/standard.py` is also open in #1038. - **Found while measuring, not changed here:** `CONTROL_RE` and `PATH_RE` hold `\x00-\x1f\x7f` only, so a C1 control passes `checked_value`. The launcher and the package refuse C1 (U+0080 to U+009F) in a repository. With `acme/r[U+009B]31mforged`, the clone line prints the raw `C2 9B`, before and after this change. `--into` and `--local-remote-dir` go through the same `PATH_RE` (read in the code, not measured). That would be a follow-up for `checked_value`, which every flag shares. Review: rv953, lane 5's independent reviewer, not the writer (w953): READY at `c42afa30`, the head that lands (issuecomment-6284626889), with no MUST. It rules #953's Verify met in substance: the refused run's only git call is the checkout probe every run makes, which names nothing of the value, and there is no clone. Its SHOULD is #459's documented C1 known limit (U031, L4-24), left with its test NIT for a follow-up on a ruling. CI (Brett Heap's ruling 27): H0 is the head c42afa3 itself, which passed tests, tests-git-bash and SonarCloud; main has touched none of its files since its base 5b41d44; and the local gate passed on its predicted squash tree e146bb5 over main e656199: the setup_project_repo_misdrawn, repo_hygiene, agents_md_codes, cli_reference sets, 192 passed. Landed on Brett Heap's word of 2026-10-18T14:45:28Z, relayed to every lane by lane 3 (#473 issuecomment-6251255596): "merge v1.2.0 PRs once reviewed and green". Closes #953. Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…hain link before an `=` that leaves a path after it, so the offer the gate prints for a link holding `=` verifies that link when typed as printed (#980) (#1044) For a declared-unverified chain link whose name holds `=`, the naming gate offers only sources that verify that link's tree when typed as printed. The gate offered `open=y` the source `--link-source open=y=<path>`, and read every `--link-source` key at the value's first `=`: the key was `open`, which no chain names, so the value was a bare PATH for the first link, `open=y` stayed declared-unverified under the same offer, exit 0. **The issue's direction (a)**, in `scripts/validate-repository-naming.py`. `LinkSources._read_source` reads a `--link-source` key the way `_read_remedy` reads a `--link-remedy` link since #949: the longest text before an `=` that names a link of a chain this run reads, by `pin_product_key`, and leaves a path after it. `__init__` and `no_path` both take the key and the path from it, so the path refused as empty is the one after the key's own `=`. For a chain whose links hold no `=`, every value is read exactly as before: a text holding `=` can only name a link that holds one. **What (a) keeps from the documented rules, and how each case was checked** (probes below, and one test row or more each): - A link holding `=`: `open=y=<tree>` verifies `open=y`, as printed and in capitals (`OPEN=Y=<tree>`, by `pin_product_key` as every key is). - Two links where one is a prefix of the other (`open` and `open=y` in one chain): `open=y=<tree>` is `open=y`'s and `open=<tree>` is `open`'s, in either order. On main both were `open`'s and the later replaced the earlier, so `open=y` read none. - A path that itself holds `=`: `open=y=<dir>/a=b/tree` is `open=y`'s with that whole path. A text holding `/` names no link, since a link's name is `repo_basename`'d, so an `=` after a `/` never ends the key. A path that begins like a longer link's name is given after `./`: `open=./y=dir` is `open`'s in a chain naming `open=y` too. - A key that names a link but leaves an empty path: `open=y=` is `PRODUCT=` for `open=y`, refused as `link-source-no-path`, exit 2, as `openXdox=` is (#442). On main it was a bare PATH asked for `openXdox`, a link the person did not name. Where a shorter link leaves a path (`open=y=` with `open` in the chain too), that link is the key, `open` with the path `y=`, as `--link-remedy openXdox=y=` gives `openXdox` the words `y=` where a chain names `openXdox=y`: the longest link that leaves a path wins, and `open=y` leaves none. - A value that is a real directory spelled like the whole value: `open=y=x` beside a directory `open=y=x` is still `open=y`'s, decided by the chain and not the disk, with `_also_a_directory`'s line; `./open=y=x` asks for the directory, as a bare PATH for the first link. - The key is read whole, where a remedy's link is stripped and cut at its last `/`: ` open=y=<tree>` and `opensoft/open=y=<tree>` name no link and stay bare PATHs, as on main. **One difference from `--link-remedy`, deliberately.** `--link-remedy open=y=` is a NOTE (its link falls back to the first `=`, `open`). `--link-source open=y=` is refused, because the #442 rule refuses `PRODUCT=` for every link, and `--link-remedy`'s own `openXdox=` refusal is made by argparse before the chains are known, which is why it cannot catch `open=y=`. `_read_source`'s docstring says so. **Not (b).** (a) makes the offer the gate already prints true, so the person who types it gets the verification; (b) would only stop offering it. Setup's step (4) is unchanged: it passes the gate its `--pin-source` as an absolute path, with a separator before every `=`, so no text before one names a link. **Docs.** The module docstring (a new paragraph, "A KEY IS THE LONGEST LINK A VALUE NAMES"), the `LinkSources`, `_link_remedy` and `_read_remedy` docstrings, the `--link-source` help, and `docs/cli.md` regenerated from it. `setup-project.py`'s `as_the_plan_reads_it` docstring stated the first-`=` rule, and now states this one. README, the handbook and AGENTS.md state no rule for how a `--link-source` key is read (README names `--link-source PRODUCT=<path>` only), so they are unchanged. The class docstring records that `validate-pins.py` still ends a `--pin-source` key at the first `=`; no scaffold writes a pin holding one (`--pin` names are `[A-Za-z0-9_.-]`), and it is left as its own change. Measured from a root scaffolded at main `5b41d44f` (local remotes, no network): - `update-shape.py check --upstream <this checkout> --at c64e85f` lists `upstream-changed scripts/validate-repository-naming.py`, with `upstream-changed 1 unchanged 10`. - `update-shape.py apply --yes --branch ...` exits 0, commits `contracts/shape-pin.yaml`, `project.yaml` and the copy, and the project's validators print `pins ok` and `manifest ok`. A fresh `check` prints `unchanged 11`, and the root's own naming gate exits 0. - The new sha256 of `scripts/validate-repository-naming.py`: `ec167fb0e259f90705db895a1a37f4adebd4cbf03ca2d5ae18f6d9a8df896548` (78664 bytes). No other pinned copy and no template changes. Run from empty folders, `<D>` a fresh folder, trees as named (`trees/y` declares `openInk`, `trees/x` declares `open=y`; for the chain with `open`, `trees/x2` declares `open` and `trees/o` declares `open=y`). The gate prints an arrow between links; it is written `->` here. | Probe | At main `5b41d44f` | At head `c64e85fe` | |---|---|---| | P1, the issue's row: `--referent-chain openXdox,open=y,openInk --link-source open=y=<D>/trees/y` | `link-source-unreadable ... could not answer for openXdox`, "It was read as a PATH: `open` is not a link", and `open=y` declared-unverified with the same offer; exit 0 | only `openXdox` declared-unverified (no source named it); no `link-source-unreadable`; exit 0 | | P2, P1 plus `openXdox=<D>/trees/x`, `--explain` | NOTE: the value not used, read as a PATH; `CHAIN openXdox -> open=y -> openInk [declared-unverified]` | `[verified]`, nothing warned or noted | | P3, chain `openXdox,open,open=y,openInk`, `open=<o>` then `open=y=<y>` | `link-source-unreadable: y=<D>/trees/y (--link-source open=...)`, NOTE `open=<o>` replaced; 2 links declared-unverified | `[verified]`, nothing warned or noted | | P4, `open=y=` (chain without `open`) | bare PATH `open=y=` asked for `openXdox`; exit 0 | `REFUSED link-source-no-path: --link-source open=y= names no path for open=y`; exit 2 | | P5, `open=y=` (chain with `open`) | `y= (--link-source open=...) could not answer for open` | the same | | P6, `open=y=<D>/trees/a=b/y` | read as a PATH, `[declared-unverified]` | `[verified]` | | P7, `open=y=x` beside a directory `open=y=x` | bare PATH, read as the directory for `openXdox` | `link-source-unreadable: x (--link-source open=y=...) could not answer for open=y`, then "`open=y=x` is also a directory; `--link-source ./open=y=x` reads it as one." | | P7b, `./open=y=x` | the directory, for `openXdox` | the same | | P8, chain with `open`: `open=./y=dir`, `open=y=<y>` | `open=y=<y>` read for `open`, replacing `open=./y=dir` | `[verified]` | Eleven new rows in `tests/test_chain_remedy_callers.py`, section "#980", reusing its helpers (`naming`, `tree`, `gate_warnings`, `UNREACHED`, `GATE_OFFER`, `EQUALS`), with no assert that joins conditions with `and`: - `test_the_offer_for_a_link_holding_an_equals_verifies_it[as-printed, in-capitals, a-path-holding-an-equals]`: reads the offer the gate prints for `open=y`, types it with a tree, and asserts the one WARNING left is `openXdox`'s, with no `link-source-unreadable` and no NOTE. - `test_each_link_reads_its_own_source_where_one_name_begins_another[open-first, open=y-first, a-path-that-begins-like-the-longer-link]` - `test_a_value_that_ends_at_a_link_holding_an_equals_names_no_path` - `test_a_shorter_link_that_leaves_a_path_is_the_key` - `test_a_link_holding_an_equals_wins_over_a_directory_spelled_like_it` - `test_a_key_is_read_whole[a-blank, an-owner]` **Failing at main.** The test file copied onto a `git archive` of `5b41d44f`: 8 of the 11 fail, each on the defect (the offer row's `open=y` WARNING and `link-source-unreadable`, the prefix rows' `[declared-unverified]`, `open=y=` exiting 0, the keyed reading not winning over the directory). The other 3 pass at main by design: they pin behaviour main already had (`test_a_shorter_link_that_leaves_a_path_is_the_key`, `test_a_key_is_read_whole[a-blank]` and `[an-owner]`), and each kills a mutant below. **Mutants**, each applied alone to the fixed gate in a scratch repository, then `test_chain_remedy_callers.py`, `test_link_source_chain_defaults.py`, `test_naming_policy.py`, `test_chain_link_fold.py` and `test_chain_pin_sources.py` (400 passed, 4 skipped with no mutant). All 11 killed: | Mutant | Failed | Killed by (new rows unless named) | |---|---|---| | M1 back to `typed.partition("=")` | 8 | the offer rows, the prefix rows, `open=y=`, the directory row | | M2 the shortest match instead of the longest | 3 | the prefix rows | | M3 the "leaves a path after it" check dropped | 1 | `test_a_shorter_link_that_leaves_a_path_is_the_key` | | M4a the `./PATH` rule dropped (`./` stripped from the key) | 3 | the directory row; `test_a_labelled_source_holding_an_equals_is_not_said_to_be_a_path`; `test_naming_policy.py::test_a_link_named_before_the_equals_is_the_key_even_over_a_directory` | | M4b the key cut at its last `/`, as a remedy's link is | 4 | as M4a, and `test_a_key_is_read_whole[an-owner]` | | M5 the empty-path fallback dropped | 6 | `open=y=`; `test_a_value_that_names_no_path_is_spelled`; 4 rows of `test_link_source_chain_defaults.py::test_a_link_source_that_names_no_path_is_refused` | | M6 the fallback at the first `=`, as a remedy's | 1 | `open=y=` | | M7 `no_path` taken after the first `=` | 1 | `open=y=` | | M8 the keyed path taken after the first `=` | 7 | the offer rows, the prefix rows, the directory row | | M10 the key stripped, as a remedy's link is | 1 | `test_a_key_is_read_whole[a-blank]` | | M12 the key not folded by `pin_product_key` | 56 | `in-capitals` and the prefix rows, and 52 existing rows | **Runs**, all on head `c64e85fe`, `/usr/bin/python3 -m pytest -q -p no:cacheprovider -o tmp_path_retention_policy=failed`, one reused basetemp per run, with `[email protected]`, a stub `gh` first on PATH, `GH_TOKEN=bogus`, an empty `GH_CONFIG_DIR`, `GIT_SSH_COMMAND=false` and `GIT_CONFIG_GLOBAL=/dev/null`: - git 2.43.0 (`/usr/bin/git`), 31 files: the 25 that run the naming gate (`grep -l validate-repository-naming tests/`, the pinned-copy files `test_pinned_copy_text.py`, `test_update_shape_kept_helper.py`, `test_update_shape_unreadable.py` and `test_adopt_reencoded_files.py` among them, and `test_repo_hygiene.py`), the files that scan every script's source (`test_git_output_decoding.py`, `test_shape_advisory.py`, `test_no_auto_maintenance.py`, `test_non_utf8_git_failures.py`), and the trio's other two, `test_agents_md_codes.py` and `test_cli_reference.py`: **2964 passed, 5 skipped** in 1749 s, exit 0. - git 2.47.1 first on PATH, the 25 naming-gate files: **2680 passed, 3 skipped** in 1181 s, exit 0. No template changes. `grep` of `tests/` found no fixed digest or `^id:`-style pattern over the gate: the tests that read a root's copy of it (`test_shape_doctor.py`, `test_doctor_validator_verdicts.py`) compare it at run time, and both are in the first run, as are the source scanners above and `test_cli_reference.py`, which holds `docs/cli.md` to the help. - `git merge-tree --write-tree origin/main HEAD`, origin/main `5b41d44f` (fetched with `-c gc.auto=0 -c maintenance.auto=false`, and `git ls-remote` agrees): clean, tree `82780dc63d7f`, the head's own tree. - Open pull requests: none of the 9 open (#954, #1023, #1025, #1027, #1028, #1030, #1031, #1038, #1039) touches `scripts/validate-repository-naming.py`, `tests/test_chain_remedy_callers.py`, `setup-project.py` or `docs/cli.md`, so there is no merge-tree to run against them. Review: rv980, lane 5's independent reviewer, not the writer (w980): READY at `c64e85fe` (issuecomment-6288391970), with no MUST or SHOULD; the landing head only merges main over it. Its NIT-1 (three test rows for the corners of the old first-`=` split) and NIT-2 (a sentence in `validate-pins.py`) go to a follow-up. CI (Brett Heap's ruling 27 and his fast-refresh ruling of 2026-10-15T22:48:35Z): H0 c64e85f passed tests, tests-git-bash and SonarCloud; the head 0f5845b is a clean update-branch merge of main b0babe1, with tests-git-bash and SonarCloud green; and the local gate passed on its predicted squash tree ac9c882 over main b0babe1: the chain_remedy_callers, repo_hygiene, agents_md_codes, cli_reference sets, 233 passed. Landed on Brett Heap's word of 2026-10-18T14:45:28Z, relayed to every lane by lane 3 (#473 issuecomment-6251255596): "merge v1.2.0 PRs once reviewed and green". Closes #980. Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…makefile` or `GNUmakefile` GNU make reads first, and where a case-blind disk writes the shape's; README says which Makefile exports `CONTRACTS_DIR` (#977) (#1046) ## What Two follow-ups to #906 that lane 1's review of #964 (r906) found and ruled out of that pull request. Neither is a regression: both were as untrue on `main` before #906 as after it. **(a) The Makefile follow-up names the root file GNU make reads first.** The line is in `plan`'s `follow_ups:`, in `check`'s output and in the split commit's message, which is also the pull request's body. GNU make reads the first file it finds of `GNUmakefile`, `makefile` and `Makefile`, and only that one. #906 asked only whether the source keeps `Makefile`, comparing names byte for byte (`_root_keeps`). So a source that keeps `makefile` or `GNUmakefile` got "the root Makefile wires `CONTRACTS_DIR` ...". But the clone's root then holds the shape's `Makefile`, with the block, and the source's file, which `make` reads instead, so `make contracts-dir` answered `No rule to make target 'contracts-dir'` (r906's probe, both names). `_makefile_follow_up` now writes the line: - It names the source's file that GNU make reads at the root, wherever that file is not the `Makefile` #906's words already name. It also says what it takes for `make` there to export `CONTRACTS_DIR`. - On a disk that ignores case, a kept `makefile` IS `Makefile`. `place` (`Path.exists()`) finds the name taken and writes the shape's Makefile as `shape/Makefile`. The line says so in `CASE_ASIDE`'s words. `_root_keeps` gains `fold`, which asks the question the way `_KeptTree` asks it for `check`'s disk that ignores case. - A source that keeps only `Makefile`, or none of the three names and no other case of `Makefile` that a rule keeps, gets the line it got before, byte for byte. - Each kept name is printed with `_spelled`, and the three names GNU make looks for with `_and_listed`. No `shell_quoted` call is added. | The root keeps | Before | After | | --- | --- | --- | | none | "the root Makefile wires `CONTRACTS_DIR` ..." | unchanged | | `Makefile` | #906's line: "the shape's Makefile wires ...; but the source keeps a Makefile of its own at the root, so that block waits in `shape/Makefile` until the two are merged, and the run adds none of it to the root's Makefile" | unchanged | | `makefile` | "the root Makefile wires ..." | "the shape's Makefile wires ...; it is written as the root's `Makefile`, or as `shape/Makefile` once case is ignored, as a macOS or Windows disk does, where the source's `makefile` is that path, until the two are merged; and GNU make at the root reads the source's `makefile`, ..." | | `GNUmakefile` | "the root Makefile wires ..." | "the shape's Makefile wires ...; it is written as the root's `Makefile`, but GNU make at the root reads the source's `GNUmakefile`, ..." | | `makefile` and `GNUmakefile` | "the root Makefile wires ..." | as for `makefile`, and GNU make reads the source's `GNUmakefile` | | `Makefile` and `makefile` | #906's line | #906's line, then "; and GNU make at the root reads the source's `makefile`, ..." | | `Makefile` and `GNUmakefile`, or all three | #906's line | #906's line, then "; and GNU make at the root reads the source's `GNUmakefile`, ..." | | `MAKEFILE`, kept in the root by a `--path-policy` rule (with the shipped rules `plan` asks about it, and a person's `root` answer keeps the line `plan` wrote: "the root Makefile wires ...") | "the root Makefile wires ..." | "the shape's Makefile wires ...; it is written as the root's `Makefile`, or as `shape/Makefile` once case is ignored, ..., where the source's `MAKEFILE` is that path, until the two are merged" | The clause that names the file, in full: ```text GNU make at the root reads the source's `makefile`, the first of `GNUmakefile`, `makefile` and `Makefile` it finds, so `make` there exports `CONTRACTS_DIR` only once `makefile` does, or includes a Makefile that does ``` **(b) README.md, section "Adopting an existing repository".** - Before: "the root Makefile it materializes exports `CONTRACTS_DIR`, pointing at the `contracts/` of the spec leg where the plan mounts it (`$(CURDIR)/spec/contracts` by default)." - After: "the shape's Makefile exports `CONTRACTS_DIR`, pointing at the `contracts/` of the spec leg where the plan mounts it (`$(CURDIR)/spec/contracts` by default); it is the root's Makefile, or, where the source keeps a `Makefile` of its own, `shape/Makefile`, which holds the export until a person merges the two." This is r906's wording, as its re-check corrected it, with one change: `Makefile` is in backticks in "a `Makefile` of its own". A source that keeps `makefile` has the shape's Makefile written as the root's `Makefile` on a disk that keeps case, so the plain word would have claimed `shape/Makefile` for it. The section is bound to the handbook's `adopt` section. The handbook says nothing of `CONTRACTS_DIR`, and its sentence that a shape file whose name the source already holds, `Makefile` among them, is written under `shape/` stays true. So only the section's marker moves, to the section's new blob, computed with `readme_segments` and `readme_fingerprint`. The tail of the paragraph is reflowed, and README.md grows by one line, to 1479, which is the cap. No `tests/readme-cap.d/` file is needed while no other README pull request lands first. ## Measured On a disk that keeps case (Linux, GNU Make 4.3, git 2.43), each row ran a real `execute --local-remote-dir` and made a recursive clone of the split. Each file the source keeps has its own `which` target, so `make which` at the clone's root prints the name of the file GNU make read. | The root keeps | `make which` prints | the split message names | `make contracts-dir` at the root | the block is in (`make -f <it> contracts-dir` prints the spec leg's `contracts/`) | | --- | --- | --- | --- | --- | | `makefile` | `makefile` | `makefile` | no rule | `Makefile` | | `GNUmakefile` | `GNUmakefile` | `GNUmakefile` | no rule | `Makefile` | | `makefile` and `GNUmakefile` | `GNUmakefile` | `GNUmakefile` | no rule | `Makefile` | | `Makefile` | `Makefile` | #906's line, the source's own `Makefile` | no rule | `shape/Makefile` | | `Makefile` and `makefile` | `makefile` | `makefile` | no rule | `shape/Makefile` | | `Makefile` and `GNUmakefile` | `GNUmakefile` | `GNUmakefile` | no rule | `shape/Makefile` | | all three | `GNUmakefile` | `GNUmakefile` | no rule | `shape/Makefile` | The disk that ignores case is not measured: there is none here. What the line says of it rests on `place`'s `Path.exists()`, and is tested against `_KeptTree(..., fold=True)`, `check`'s model of that disk. ## Tests - `tests/test_adopt_make_reads_first.py`, new: 33 tests. - The line word for word, for every row above, and for `makefile` and `GNUmakefile` sent to legs. - The line against `_KeptTree` on both disks. - `plan` and `check` for each row but none and `Makefile`, which `test_adopt_contracts_dir` and `test_adopt_printed_sentences` already plan and check. - A real `execute` for each row except none, with the `make` measurements above. - README's sentence, and the handbook marker matching the section as it now stands. - Fail on base: on `e2f9fc42` (main when the branch was made), 23 fail and 10 pass. The 10 are the handbook marker test, which was current on base, and rows whose line does not change: none and `Makefile` alone; `makefile` and `GNUmakefile` sent to legs; and the `Makefile`-plus-another rows of the disk test, which asks only where the copy goes. - Gate on this head, named files only, one basetemp, a stub `gh` first on PATH, `GH_TOKEN=bogus`, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null`: - The new file, `test_adopt_contracts_dir`, `test_adopt_printed_sentences`, `test_adopt_leg_keys`, `test_adopt_plan`, `test_adopt_e2e`, `test_repo_hygiene`, `test_readme_sections`, `test_agents_md_codes`, `test_cli_reference`, `test_readme_windows_quoting_sentence` and `test_scaffold_leg_path_collisions`: 652 passed, 1 skipped (the MedxEHR test, no clone here). - Every other adopt test file that names `Makefile`, `makefile` or `CONTRACTS_DIR`: `attributes_eol_block`, `verify`, `ignored_shape_files`, `leg_path_collisions`, `submodules`: 368 passed. `root_manifest`, `root_symlinks`, `symlink_target_bytes`, `root_shape_paths`: 403 passed. - `test_shape_doctor.py` in 4 shards: 445 passed, 3 skipped (the PowerShell line, Windows only). - After the last test-only edit (helpers imported from `test_adopt_printed_sentences`): the new file and `test_adopt_printed_sentences`, 87 passed (33 and 54). Mutants of the change, each restored. Each one is killed: | Mutant | Failed | | --- | --- | | GNU make's order with `makefile` before `GNUmakefile` | 18 of 33. The end-to-end rows `makefile`+`GNUmakefile` and all three fail on `make which` against the split message itself. | | the case-folding check off | 9 | | the joining word always "; and" | 3 | | "the shape's" not chosen when only `GNUmakefile` or `makefile` is kept | 4 | | GNU make's first file never found | 19 | | `_root_keeps` folds case by default | 13, #906's `the-root-keeps-it` row among them | | README's old sentence | 3, `test_the_handbook_follows_the_readmes_outline` among them | | the handbook marker left stale | 2 | ## Merge with main `git merge-tree --write-tree` of this head with `main` at `dc7cd49b` is clean (tree `ae9abfcb`). Of this branch's files, only `adopt-project.py` moved on main: #1030 (#900) changed `_spelled`, and #1038 (#994) changed a hint and a docstring. `_spelled` changes only a backslash, a double quote or a backtick inside a name. The names this line spells are plain letters, so its words do not change. README.md, `docs/handbook.html` and `tests/readme-cap.d/` did not move on main, so the marker stays current and the cap still holds. On the merge, built in a `git clone --shared` checkout: the new file, `test_adopt_printed_sentences`, `test_repo_hygiene` and `test_readme_sections`, 263 passed. ## Not in this PR (follow-ups for lane 1 to file) - **NEXT's `make bootstrap`, measured.** For a source that keeps `makefile` or `GNUmakefile`, `execute`'s NEXT block prints `make bootstrap`. `make -n bootstrap` in the clone exits 2 with `No rule to make target 'bootstrap'`. For `Makefile` and `GNUmakefile`, its NOTE says the shape's make targets "arrive only once the follow-up merges the two". But GNU make at the root reads `GNUmakefile`, not the merged `Makefile` (inferred; before the merge, `make -n bootstrap` there exits 2, as the NOTE says). - **`collision_follow_up`'s sentence.** In `shape_materialize.py`, "The shape's make targets ... arrive only with that merge" is likely untrue where the source also keeps `GNUmakefile` or `makefile`, which GNU make reads before the merged `Makefile`. Inferred, not measured. - **`AGENTS-shape.md` in the pinned template.** "Where the source kept a Makefile of its own, that block waits in `shape/Makefile`" has the same gap for a kept `makefile`. It is pinned bytes, so it is left. - **Disks that ignore case.** - `_predict_collisions` stays byte for byte, so on such a disk a plan for a kept `makefile` lists no "merge shape/Makefile into Makefile" follow-up. `execute`'s own collision report lists it. - A split made on a disk that keeps case commits both `Makefile` and `makefile`, two names that collide in a clone on a disk that ignores case. - Spellings such as `gnumakefile` are not asked about. - None of this is measured. **Review round 0, body only** (lane 1's reviewer r1046's partial review, issuecomment-6288714370): the `MAKEFILE` row and the byte-for-byte sentence now say that a `--path-policy` rule, not a person's answer, is what keeps `MAKEFILE` in the root. Follow-ups are built from the rules' answers alone, so a `MAKEFILE` a person answers `root` keeps "the root Makefile wires ...", which a disk that ignores case makes untrue, as on base. **Review round 1** (`c121ed90`, test file only): the comment above `ANSWERED` says a `--path-policy` rule, not a person's answer, reaches the follow-ups (r1046's SHOULD-1). The new test file is ASCII: its section signs and em dashes are written as escapes, with two lines rewrapped: the assert's string is unchanged, the `re` pattern matches the same text (its raw string now holds the escape), and one docstring changes only where its lines break (NIT-2). `tests/test_adopt_make_reads_first.py` 33, `tests/test_adopt_printed_sentences.py` 54 and `tests/test_repo_hygiene.py` 100 passed. It lands by fast refresh (Brett Heap, 2026-10-15T22:48:35Z). Its reviewed head `c121ed90` is green on Linux and SonarCloud. The branch merged main once and was never rebased; the last merge is update-branch's, clean, giving db92198, which is green on SonarCloud and Git Bash. Lane 1's gate passed on its tree: the 13 test files that run `adopt-project.py`'s Makefile follow-ups and `make`, read README and the handbook, the doctor and the docs, 1,097 passed and 4 skipped. Closes #977 Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…inal gives it, not the code points it holds, so a wide or combining name's `leg` column lines up under `leg` with every other row's (#1034) (#1178) `plan`'s table padded each name with `:<34`, which counts code points, not the columns a terminal gives them. On a UTF-8 stdout the name U+540D U+524D `.md` (two wide ideographs) takes 7 columns and was padded as 5, so its `leg` began at column 37, 2 right of the heading's 35. The name `e` U+0301 `.md` (a combining acute) takes 4 columns and was padded as 5, so its `leg` began at 34. Names that stdout escapes have lined up since #900's PR (#1030). In `adopt-project.py`, `_columns(text)` now counts the columns a terminal gives a text: none for a character whose general category is in `ZERO_COLUMN_CATEGORIES` (Mn, Me and Cf) or that is a Hangul medial vowel or final consonant (`MEDIAL_AND_FINAL_JAMO` and `MEDIAL_AND_FINAL_JAMO_EXTENDED_B`), two for one `unicodedata.east_asian_width` calls wide or fullwidth (`TWO_COLUMN_WIDTHS`), and one for any other. The category is asked before the width, since the voiced sound mark U+3099 is Mn and East Asian wide, and a terminal draws it over the kana before it. `_padded(text, columns)` pads a text to that many columns, and leaves a wider one as it is, as `:<34` does. `_print_entries` pads `_printed(_shown(entry.path))` with `_padded(..., 34)`, so the text measured is the one printed, and an ASCII stdout's escapes still count one column each (#900). `tests/test_adopt_spelled_names.py` has 44 passed. `test_a_name_takes_the_columns_a_terminal_gives_it` holds 14 names whose columns are counted by hand, and glibc's `wcswidth` gives each new name the count the row holds. `test_a_name_wider_than_its_column_is_padded_by_no_space` holds a 43-column name as it is, and `test_the_table_pads_a_wide_and_a_combining_name_by_their_columns` runs `_print_entries` on a UTF-8 stdout, with every row's `leg` at column 35. `test_plan_on_a_utf_8_stdout_keeps_each_column_under_its_heading` runs `plan` end to end over a source holding the two wide names, the combining one and a decomposed Hangul one. With main's `adopt-project.py`, 17 of the 18 rows selected fail, and each of the 17 mutants run is killed. Closes #1034 Lane: openreposhape-3 (openRepoShape-3) Co-Authored-By: Claude Opus 5.5 <[email protected]>



adopt-project.pynow names every path, question and rule id that it prints or writes one way only, with no raw control byte. This covers the split commit's message, which is also this pull request's body,plan's report, and thegit-failedrefusal of the history scan (#900, from lane 3's triage of #457: A6, AS-1, AS-2, AS-3, L2-76 and L1-36).The split commit's message (A6):
_split_messagelists each moved, dropped and kept path asplan's report shows it (_shown). The issue's source keepscaf<0xE9>.mdandcr<CR>in the root, andcheckandexecutestill run toadoption verified. Its message, throughcat -A, readcaf?.md$andcr$, two names of other paths. It now reads`caf\udce9.md`$and`cr\r`$.A backtick and a double quote (AS-1):
_spelled_characteris the plan's own table (repo_shape.double_quoted) for every character but the backtick. A double quote is\"and a backtick is\x60, the code point the plan's reader resolves. A spelled name, copied between the plan's double quotes, is now that entry. Before,\`` kept its backslash and named another entry, and a bare"` ended the quoting and left the plan unreadable.A name between backticks (AS-2):
_shownspells a printable text that begins and ends with a backtick. The issue's four names, called directly:_spelledbefore_spelledafter_shownbefore_shownaftera`b`a\`b``a\x60b`a`ba`ba"b`a"b``a\"b`a"ba"b`x``\`x\```\x60x\x60``x``\x60x\x60`x`x``x`xxBefore,
`x`was shown exactly asxis spelled.A policy's question and rule id (AS-3):
planprints a path policy'squestion:and rule id through_shown, ascheckprints the question. With--path-policy, an ESC in either used to reach the terminal raw.The history scan's refusal (L2-76):
_exported_gitlink'sgit-failednames the source folder withshown_pathand what git printed withspelled, asgit_outdoes. The code is stillgit-failed. A folder namedThing<LF>WARNING forged-line<ESC>[2Jused to split the refusal over two lines and send the ESC raw. It is one printable line now, and after the command it reads exactly asgit_out's refusal of the same failure.plan's table (L1-36):_print_entriespads a name as stdout prints it (_printed). UnderLC_ALL=C PYTHONUTF8=0, a source holdingcaf<U+00E9>.mdprintedcaf\xe9.mdpadded as 7 characters, so its leg column stood 3 columns right ofleg. It is aligned now.Beyond the issue's Direction, found while doing it. Each has rows of its own:
_shownalso spells a name that ends in a space.git commitstrips the space from the end of a message line, sotrail.mdwas listed astrail.md, andplan's table paddedtrail.mdandtrail.mdto the same row.plan's report too, writes each follow-up_shown, asexecutealready prints it.checkandexecutealready refuse a control character there (plan-unwritable-value). What this changes is a hand-edited follow-up that ends in a space, whichgit commitstripped, or begins and ends with a backtick, or holds a zero-width character: each is listed asexecuteprints it.planwrites that name the rule they replace (_asked_about,_refused_as_named) name it_spelled. For an ordinary rule id the text is byte for byte what it was._refused_by_policyno longer says the split commit's message lists a byte that is not UTF-8 with a?. It said so before this change, and it is no longer true.Rows changed, each because it pinned the old spelling:
test_adopt_spelled_unambiguous.py:test_a_backslash_and_a_backtick_are_escaped(renamed from..._as_before) expects`a\\b\x60c`.test_python_repr_and_a_spelled_name_agree_on_every_characterpasses over"as well as the backtick. Two rows no longer skip the backslash, the double quote and the backtick, because adopt-project.py: a kept or dropped name reaches the split commit and the pull request body unspelled, and_spelled,_shownandplan's report print text that reads as another name, or raw #900 makes them hold:test_a_character_is_spelled_as_the_plan_writes_itnow skips only the backtick.test_a_spelled_name_is_the_entry_the_plan_holdsskips nothing. Both fail againstc7a3ff16's code.test_adopt_question_and_submodule_spelling.py: the backtick question row, and two[a-backtick]key rows, expect\x60.say "hi"leavesUNCHANGED_NAMES, because_git_quotedkeeps git's quotes only where_spelledwrites nothing different. It is now the row[a-double-quote]:`submodule.say \"hi\".update`.test_adopt_gitmodules_values.py: one row,`\x60x\x60`.test_adopt_submodules.py: one row,`src/ven\x60d\\or`.test_adopt_entry_paths.py:NOT_UTF8_FINDINGcarries_refused_by_policy's corrected sentence.conftest.py:spelled(), the tests' copy of the spelling, now writes\"and\x60too.Review round 1 (
18cc6593, after lane 1's reviewer r1030's partial review, issuecomment-6281392155):cross_leg_references) names a code-leg file_shown, as the split message's listing andplan's table do. A file whose name holds a double quote, a backtick or a backslash was named two ways in one commit message and one report; it is now named one way. The new rowtest_the_read_across_follow_up_names_a_file_as_the_listing_doesfails on9c210eb2'sadopt-project.py, andtest_adopt_literal_names.py's two follow-ups now expect the backticked form.planprints its follow-ups_showntoo, so all three places follow one rule.c7a3ff16:checkandexecuterefused it there.LANES_LANEunset: 15 files, 1,225 passed, 4 skipped, 0 failed. That is the new file (27),test_adopt_spelled_unambiguous.py(145),test_adopt_literal_names.py(14),test_adopt_contracts_dir.py(34),test_adopt_printed_sentences.py(54), the doctor (445, 3 skipped) and nine more.Tests, under a stub
ghwith a bogus token,GIT_CONFIG_GLOBAL=/dev/null,GIT_SSH_COMMAND=falseandEMAILset, one reused basetemp, on the branch at9bf7f4cd(the final head9c210eb2changes only those two rows, which give 171 passed with the new file):tests/test_adopt_spelled_names.pygives 26 passed. Againstc7a3ff16'sadopt-project.py, all 26 fail, each at the assert it is about.tests/test_adopt*.pyfile, 4248 node ids in 142 chunks of 30: 4245 passed, 3 skipped, 0 failed.test_scaffold_leg_path_collisions.pyandtest_repo_hygiene.py: 104 and 100 passed._spelled,_shown,spelledorsplit_message, and every other one that runsadopt-project.py,test_stdout_encoding.pyandtest_readme_windows_quoting_sentence.pyamong them: 9028 passed, 40 skipped and 1 failed, in 13 chunks of 10.test_doctor_gitlink_repairs.py::test_a_hand_committed_gitlink_names_both_bump_leg_commands, and it comes from the shell, not this branch. The lane exportedLANES_LANE, which the test's in-processbump_leg_commandreads, whilerun_scriptblanks it for the doctor it runs.LANES_LANEunset, as in CI, it passes.git merge-tree --write-treeof9c210eb2with maine076e3e8is clean, giving treeb1402905. Main changedadopt-project.py,tests/conftest.pyandtests/test_adopt_entry_paths.py, as this branch does.conftest.spelled,test_stdout_encoding.py, the scaffold collisions and the doctor in four shards.Follow-up: the
env_commitdocstring inscripts/shape_materialize.pystill says the split message names a byte that is not UTF-8 with a?. That file is a pinned shape copy, so it is left as it is here; lane 1 files it as a follow-up.Closes #900
Lane: openreposhape-1 (openRepoShape-1)
🤖 Generated with Claude Code
Summary by Sourcery
Make adopt-project.py use one safe, unambiguous representation for every printed or persisted path-related name and keep its reports and tables consistent with stdout output.
Bug Fixes:
Enhancements:
Tests: