Repository navigation
adopt-project.py and repo_shape.py: a name that holds a default-ignorable character, which a terminal draws as nothing, is spelled by its code point in plan's lines and in the unsafe-value refusal, so a branch ma<U+034F>in no longer prints as main (#1128) - #1171
Conversation
… `_shown` names a path, so a bidi control, a line boundary or a byte that is not UTF-8 in it is spelled and no longer reaches the terminal raw (#1035) The branch was printed as it is, `({source.branch})`. It is `_shown` now: a printable branch reads as it did, and any other is spelled between backticks as `check` spells it in `plan-stale` and `plan-tracking-branch-missing`. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…r and zero-width characters are written as ASCII escapes in the rows' source, not as the characters (#1035) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…able character, which a terminal draws as nothing, is spelled by its code point in `plan`'s lines and in the `unsafe-value` refusal, so a branch `ma<U+034F>in` no longer prints as `main` (#1128) `_shown` printed a name as it is wherever `str.isprintable` passed it, and that passes 267 of Unicode's Default_Ignorable_Code_Point characters: 263 combining marks, among them U+034F and the variation selectors, and the four Hangul fillers, among them U+3164. `checked_value` named the value it refused with `repr`, which prints the same 267 as they are. - scripts/repo_shape.py: `DEFAULT_IGNORABLE_RANGES`, the property's 17 joined ranges (4174 code points, the same in Unicode 14.0.0, 16.0.0 and 17.0.0), written as a fixed table so that Python 3.12 and 3.14 agree; `DEFAULT_IGNORABLE`; `code_point_escaped`, taken out of `_escaped`, which is unchanged; `visible_repr`; and `checked_value`'s `unsafe-value` refusal names the value with `visible_repr`. - adopt-project.py: `_shown` spells a name that holds one, and `_spelled_character` writes one as its code-point escape, which the plan's reader reads back as the character. - tests/test_adopt_shown_default_ignorables.py (new, 46 rows), with the rows RV1120's review asked for on #1120's `source` line: a printable branch outside ASCII prints as it is, a branch named `main` between backticks is spelled, and the branch that is not UTF-8 is spelled under a `utf-8:surrogateescape` stdout too. - tests/test_adopt_spelled_unambiguous.py: its two sweeps of every character take the default-ignorables apart and hold each to its escape. Stacked on #1120 (see #1035). Lane: openreposhape-4 (openRepoShape-4) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideData structuresDefine the fixed Unicode Default_Ignorable_Code_Point ranges and compiled pattern that the escaping helpers depend on.
APIExpose code-point escaping and visible-representation helpers, and use the latter to make unsafe-value refusals unambiguous.
ImplementationUse the shared default-ignorable detection and escaping helpers so plan output spells invisible characters while preserving existing behavior for other names.
TestsCover the Unicode table and pattern, escaping and round-tripping, refusal diagnostics, plan output, and compatibility with pinned copies.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
RV1171: independent review of #1171 at Independent adversarial review for lane 4. The code is right everywhere I measured: the table is Unicode's, and only the 267 characters the issue names change, in every helper. One SHOULD keeps it from READY. The refusal's promise to escape EACH default-ignorable character has no row with two in one value, and a Heads and merge
1. The table
2. The sweep: every code point, #1120's head against this headI ran six outputs for each of the 1114112 code points
3. The refusal's new wording, the readers, and the pinned copy
4. End to end:
|
| Tree | Raw bytes of the character in stdout/stderr (3 surfaces x 3 characters) |
|---|---|
#1120 c55e55e3 |
9 of 9 |
| this head | 0 |
the merge 9de8cbdd9 |
0 |
- The lines on this head, one character each:
source .../probe-pr/U034F/s1 @ a876039c7162 (`ma\u034fin`), 3 files, 1 commits
`ma\u3164in.md` spec medium 1 extension-majority
NOTE the tracking branch is `main`, which is no branch of the source (its branches: `ma\ufe0fin`; the source's default branch is `ma\ufe0fin`). ...
REFUSED unsafe-value: --tracking-branch (not given, so the source's default branch) is 'ma\u034fin', which is not a value this tool will put on a `git` or `gh` command line
- The refusal exits 2 and writes no plan.
- U+200B is spelled on both trees.
checkon those plans prints none of the characters raw.- The plan file still holds them raw (
default_branch: "ma+ U+034F +in"), becausedouble_quotedwrites them. That is validate-repository-naming.py, validate-manifest.py, validate-pins.py, repo_shape.py, shape_materialize.py and adopt-project.py: the helpers that spell a name for a line or for the plan teststr.isprintable()or userepr, so a combining mark, a variation selector or a Hangul filler in a name prints raw, andmaU+034Finreads asmain#1165's item 3.
5. Mutants
- Setup: each ran on the merge, against the new file,
test_adopt_spelled_unambiguous.pyand adopt-project.py:plan'ssourceline names the source's branch as_shownnames a path, so a bidi control, a line boundary or a byte that is not UTF-8 in it is spelled and no longer reaches the terminal raw (#1035) #1120'stest_adopt_plan_source_branch_shown.py. The baseline was 210 passed. - Restored: each file was restored afterwards, and its sha256 checked.
| Mutant | Result |
|---|---|
| M1: the range U+3164 dropped | killed, 9 failed |
| M2: the range U+E0000-U+E0FFF dropped (holds the printable U+E0100-U+E01EF) | killed, 3 failed |
| M3: a range's end one short, U+FE00-U+FE0E | killed, 9 failed |
| M4: a range's end one past, U+180B-U+1810 (U+1810 is a printable digit) | killed, 1 failed: the table row alone |
| M10: a range's start one past, U+17B5-U+17B5 | killed, 3 failed |
M5: _spelled_character back to raw |
killed, 18 failed |
M6: checked_value back to {text!r} |
killed, 4 failed |
M6b: visible_repr returns repr(str(value)) |
killed, 4 failed |
M7: _shown without the DEFAULT_IGNORABLE test |
killed, 10 failed |
M8: _shown asks .match where it asked .search |
killed, 10 failed |
M9: the escape applied before repr ('ma\\u034fin') |
killed, 7 failed |
| M11: the compiled pattern runs one past each range, the table unchanged | survives, 210 passed |
M12: visible_repr escapes only the first match (count=1) |
survives, 210 passed |
- M12 measured outside the tests:
- this head refuses
mU+034FaU+3164inU+FE0F as'm\u034fa\u3164in\ufe0f'; - M12's form is
'm\u034fa+ U+3164 +in+ U+FE0F +', with two characters raw.
- this head refuses
- M11: this head's compiled pattern equals the table (4174), so M11 is a gap in the tests, not in the code.
6. Merge-trees against the open PRs
Each of the 19 open PRs that touch adopt-project.py or scripts/repo_shape.py merges cleanly (exit 0) with this head and with the scratch merge. The heads fetched are the heads gh pr list gave.
- adopt-project.py:
checkandexecuterun withGIT_NO_LAZY_FETCH=1and refuse a partial-clone source that lacks an object its branches, tags or HEAD reach assource-partial-clone, so neither fetches into the source any more (#1145) #11802c8082a2a, adopt-project.py:plan's table pads each name by the columns a terminal gives it, not the code points it holds, so a wide or combining name'slegcolumn lines up underlegwith every other row's (#1034) #1178fa56168ab, 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) #11775208e874e; - adopt-project.py:
checknames each case twin at the shape's copy, above it and at the manifest, before a link there or after it, and at a pin's file whose exact spelling holds nothing, as_KeptTreekeeps every row, not the first (#1138) #11704df784ac4, adopt-project.py:check's rehearsal and_stored_as_writtentake a parent's-csettings,attr.treetoo, and the source's objects,GIT_ATTR_SOURCEis refused by name before any question, and each throwaway reads its environment first (#1136) #1169b8e63bcf0, adopt-project.py:plan written toandcloning <repository> (read only) intoname the caller's--outand--work-dirwith_shown, as the other lines of the report name a path, so a bidi control, a line feed or a tab in either no longer reaches the terminal as it was typed (#1115) #11548a7828332; - adopt-project.py: under a one-byte locale such as Latin-1, a clone
checkmakes again for a plan's clone record that neither spelling names is compared with both, so it is kept and the next run reads it rather than cloning again (#1112) #1153ff33ba12a, adopt-project.py: a--work-dirlink into a loop that Python 3.12 reads past a link that does not loop names the loop, Windows' winerror 1921 counts as one, and a path read as the loop's link says so, with tests for r1065's mutants (#1074) #11437af5fabc3, adopt-project.py: a recorded source whose.gitthis user cannot read is refusedsource-unreadable, naming that.git, socheckandexecuteno longer call a cloneplanmade with its.gitat mode 000 no longer whole and clone it again (#1099) #11417a2711d03; - repo_shape.py and bootstrap.py:
COMMIT_RE,SHA256_REandCOMMIT_40end in\Z, not$, so a pin'scommit:ortree_sha256:that ends in a line break is refused as not 40 or 64 hex by every validator andadopt-project.py(#1017) #11264c1f80cf4, 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) #11259549006fe, README.md, adopt-project.py and the handbook: a kept directory entrymakefile/is tested, README saysmakeat the root reads a keptGNUmakefileormakefileinstead, and a docstring says the shape's Makefile alone holdsCONTRACTS_DIR(#1061) #11235c3908f8d; - adopt-project.py: an
org/repo--sourcetoo long for the disk is refused as a path is, naming no GitHub repository and offering no url, so--source <300 a's>/Thingis no longer offeredhttps://github.com/<300 a's>/Thing, which can never clone (#1003) #1122c01c4d73d, adopt-project.py:execute's NEXT printspython3 scripts/bootstrap.pywhere GNU make at the root reads a keptGNUmakefileormakefile, and its NOTE names that file and what it takes formake bootstrapto run there (#1047) #11211c5173758, adopt-project.py:plan'ssourceline names the source's branch as_shownnames a path, so a bidi control, a line boundary or a byte that is not UTF-8 in it is spelled and no longer reaches the terminal raw (#1035) #1120c55e55e33; - 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
bba168bdd, adopt-project.py, shape_materialize.py and tests: a named bad link left out of the copy and pin findings takes no other path's finding with it, and the docstrings and the materializer's refusal name the #979 exception and what helps it (#1089) #11182307036ab, adopt-project.py: under a one-byte locale such as Latin-1,checkreads a plan written in UTF-8 whose source is there, asking the plan's UTF-8 bytes where the spelling as written names nothing, rather than refusingplan-source-gone(#1078) #1106504a1dd65, shape_materialize.py and the pinned AGENTS-shape.md: where the root keeps aGNUmakefileor amakefile, which GNU make reads first, the Makefile collision follow-up no longer says the shape's make targets arrive with the merge, and the pinned file saysmakereads the first of the three and the block reaches it only once that file holds it (#1048) #1105b28f40de0.
Besides #1120 itself, five change a line that names _shown, checked_value or isprintable: #1180, #1178, #1177, #1154 and #1125. None of them changes the helpers. #1180 adds an isprintable() check of its own (N5).
7. Gate
Linux, the landing gate's environment, a stub gh, on 9de8cbdd9.
The files:
- the new file,
test_adopt_spelled_unambiguous,test_pinned_copy_textandtest_stdout_encoding; - every test file that names
unsafe-valueorchecked_value, which is 40 files and includes adopt-project.py:plan'ssourceline names the source's branch as_shownnames a path, so a bidi control, a line boundary or a byte that is not UTF-8 in it is spelled and no longer reaches the terminal raw (#1035) #1120's; test_repo_hygiene,test_path_guard_hygiene(tests/test_path_guard_hygiene.py and shape-doctor.py: a bare is_file/is_dir/exists guard in a shipped tool fails by file and line unless its_is_aor a reasoned allowlist covers it, and aproject.yamllinked into an unsearchable folder isyaml-unreadable(#430) #1111's rule) andtest_scaffold_leg_path_collisions.
That is 46 files and 5062 ids, in 8 shards. test_shape_doctor.py is 448 ids in 8 shards. Every shard ran from a bash script with mapfile, every list non-empty, every collected id in exactly one shard, no timeout under 600 s.
| Shards | Result |
|---|---|
| g01-g08 (5062 ids) | 4880 passed, 182 skipped, 0 failed |
| d01-d08 (448 ids) | 441 passed, 7 skipped, 0 failed |
the 160 ids those runs skipped because git-filter-repo was not on PATH (156 of the 182 and 4 of the 7), run again with it on PATH |
159 passed, 1 skipped, 0 failed |
- Per shard: g01 614/19s, g02 592/41s, g03 582/51s, g04 590/43s, g05 617/16s, g06 632/1s, g07 622/11s, g08 631/0s (passed/skipped).
- d01-d08 per shard: 56, 56, 56, 56, 56, 52/4s, 56, 53/3s.
- The re-run's one skip is the row's own (
test_leg_path_yaml_scalars.py:581: "the templates read 2026 back ... so the rule has nothing to refuse"). - Net: 5035 of the 5062 gate ids and 445 of the 448 doctor ids passed, 0 failed anywhere. The doctor's 3 skips match the body's. I did not re-run the other 26 gate skips, and their reasons were not recorded (the shards ran with
-rfE).
Findings
S1 (SHOULD): no row puts two default-ignorable characters in one value, so visible_repr's "each" is unpinned (M12 survives).
- What the PR promises: "with each default-ignorable character written as its code-point escape", and the refusal is the surface adopt-project.py: follow-ups from RV1120's review of #1120 (#1035):
_shownlets 267 invisible characters through, and two cases the tests do not pin #1128 names. - What the rows cover: every one holds one character per value: the 4174 sweep, the six characters, the end-to-end rows.
- So a regression goes unseen: a
visible_reprthat escapes only the first (M12,count=1) passes all 210, and it brings adopt-project.py: follow-ups from RV1120's review of #1120 (#1035):_shownlets 267 invisible characters through, and two cases the tests do not pin #1128's defect back for a value holding two. Measured above, its refusal ofmU+034FaU+3164inU+FE0F leaves U+3164 and U+FE0F raw on stderr. - Fix: one row. Give
checked_value(and, for symmetry,_shown) a value holding the three issue characters together. Assert that the refusal holds'm\u034fa\u3164in\ufe0f', that_showngives`m\u034fa\u3164in\ufe0f`, and that neither holds a raw byte of any of the three.
N1 (NIT): the compiled pattern is never checked against the table (M11 survives; M4 dies only on the table row).
- Why the sweeps miss it:
test_adopt_spelled_unambiguous.py's two sweeps take their expected value fromDEFAULT_IGNORABLEitself. A pattern that matches more than the table therefore spells extra characters, and every row still passes. - The cost is small: that over-spells, which is the safe direction.
- Fix: in
test_the_table_is_unicodes, addassert [code for code in range(0x110000) if repo_shape.DEFAULT_IGNORABLE.match(chr(code))] == IGNORABLE. This head passes it (measured: 4174, equal). It fits the S1 round.
N2 (NIT): the body's reason for the shape bump is not so.
- The claim: "a root's
validate-family.pycallschecked_value". - What the file holds:
templates/family-root/scripts/validate-family.pyimports nochecked_value(itsrepo_shapeimport, about :183-188) and names it only in a comment (about :1761). - No pinned copy calls it. Its callers are
adopt-project.py,scaffold-project.py,scripts/bump-leg.py,scripts/family.py,scripts/shape_materialize.py,setup-project.pyandupdate-shape.py, so inside a root the new code never runs. - The placement is still right.
checked_valuelives inrepo_shape.py, so its refusal cannot change without theupstream-changedrow. That makes this the exception to the ruleshape_materialize.pykeeps ("IT LIVES HERE AND NOT INscripts/repo_shape.py", about :1602, :2526, :2980, :4749). - Fix: say that in the body.
N3 (NIT): the skew rule's list does not grow with this PR's names.
NEWER_THAN_A_KEPT_LIBRARY(tests/test_pinned_copy_text.py, about :782) still holds onlyshown_pathandhost_shell_dialect.- A kept root
repo_shape.pyolder than this PR has none ofDEFAULT_IGNORABLE_RANGES,DEFAULT_IGNORABLE,code_point_escapedandvisible_repr. - validate-repository-naming.py, validate-manifest.py, validate-pins.py, repo_shape.py, shape_materialize.py and adopt-project.py: the helpers that spell a name for a line or for the plan test
str.isprintable()or userepr, so a combining mark, a variation selector or a Hangul filler in a name prints raw, andmaU+034Finreads asmain#1165 is the change most likely to want one in a pinned validator. Add the four here or in validate-repository-naming.py, validate-manifest.py, validate-pins.py, repo_shape.py, shape_materialize.py and adopt-project.py: the helpers that spell a name for a line or for the plan teststr.isprintable()or userepr, so a combining mark, a variation selector or a Hangul filler in a name prints raw, andmaU+034Finreads asmain#1165, so the skew rule refuses that import.
N4 (NIT, for #1165): two docstrings no longer hold for the 267.
_spelled's "THE SPELLING IS THE PLAN'S OWN": the plan file holds them raw (double_quoted, validate-repository-naming.py, validate-manifest.py, validate-pins.py, repo_shape.py, shape_materialize.py and adopt-project.py: the helpers that spell a name for a line or for the plan teststr.isprintable()or userepr, so a combining mark, a variation selector or a Hangul filler in a name prints raw, andmaU+034Finreads asmain#1165 item 3), while the spelling escapes them.unwritable_values: it says its value is spelled "asunsafe-valuespells one", but it still uses!r.- Both move with validate-repository-naming.py, validate-manifest.py, validate-pins.py, repo_shape.py, shape_materialize.py and adopt-project.py: the helpers that spell a name for a line or for the plan test
str.isprintable()or userepr, so a combining mark, a variation selector or a Hangul filler in a name prints raw, andmaU+034Finreads asmain#1165.
N5 (NIT, outside this PR): #1180 adds another member of #1165's class.
- Where: adopt-project.py:
checkandexecuterun withGIT_NO_LAZY_FETCH=1and refuse a partial-clone source that lacks an object its branches, tags or HEAD reach assource-partial-clone, so neither fetches into the source any more (#1145) #1180 (2c8082a2a) adds_refetch, which quotes a remote for a person to paste whereverremote.isprintable() and not remote.startswith("-"). - What happens: a remote named
maU+034Finpasses that test and is printed raw. - Note it on validate-repository-naming.py, validate-manifest.py, validate-pins.py, repo_shape.py, shape_materialize.py and adopt-project.py: the helpers that spell a name for a line or for the plan test
str.isprintable()or userepr, so a combining mark, a variation selector or a Hangul filler in a name prints raw, andmaU+034Finreads asmain#1165 or adopt-project.py:checkandexecuterun withGIT_NO_LAZY_FETCH=1and refuse a partial-clone source that lacks an object its branches, tags or HEAD reach assource-partial-clone, so neither fetches into the source any more (#1145) #1180.
Out of scope, as the brief says
#1165's helpers are untouched by this PR, and I did not review them.
Lane: openreposhape-4 (openRepoShape-4)
…a value that holds three default-ignorable characters is refused and shown with each one escaped, the compiled `DEFAULT_IGNORABLE` is held to the table, and the skew rule knows the four new names (#1128) RV1171's review of #1171 (issuecomment-6356224053), the SHOULD and two of the NITs. - tests/test_adopt_shown_default_ignorables.py (46 rows, now 48): - S1: `m` U+034F `a` U+3164 `in` U+FE0F through `checked_value`'s `unsafe-value` refusal and through `_shown`: each is written as its escape and none is raw. Every other row held one character to a value, so a `visible_repr` that escaped only the first match passed all of them. - N1: the compiled `DEFAULT_IGNORABLE` matches exactly the table's code points over all 0x110000. The sweeps take their expected value from the pattern, so a pattern one past each range passed them. - tests/test_pinned_copy_text.py: `DEFAULT_IGNORABLE_RANGES`, `DEFAULT_IGNORABLE`, `code_point_escaped` and `visible_repr` join `NEWER_THAN_A_KEPT_LIBRARY`, so the skew rule refuses a pinned script that imports one. Stacked on #1120 (see #1035). Test-only. Lane: openreposhape-4 (openRepoShape-4) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
RV1171r2: independent re-check of #1171 at Independent adversarial re-check for lane 4, after fix round 1. RV1171's SHOULD (S1) and its NITs N1, N2 and N3 are resolved, and each is measured below. N4 and N5 are left for #1165, as RV1171 said. I found no MUST and no SHOULD. One new NIT (N6) is about tracking, not about the code. Heads and merge
1. Scope of the fix round
2. The four findingsS1 (SHOULD): resolved.
N1 (NIT): resolved.
N2 (NIT): resolved. The PR body now says: "No pinned copy calls
N3 (NIT): resolved.
N4 and N5: left for #1165, as RV1171 said. N4 ( 3. MutantsRun on the PR head (
Both M11 and M12 fail for the right reason. M12's refusal read 4. GateLinux, the landing gate's environment, a stub
That is 496 passed, 1 skipped, 0 failed: W1128c's count, exactly. RV1171's full gate on 5. CI on
|
…t four sites, so a name that ends in a line feed matches no family and `validate-repository-naming.py` refuses it, and `repository-naming.yaml` says a pattern is read whole (#1202) (#1266) **#1202: a repository name that ends in a line feed is the name of no family of the naming policy, and `validate-repository-naming.py` refuses it as `naming-unclassified`, by name, over a manifest's leg `repository:` and over an argument, where main classified `Atlas\n` as `Atlas` and exited 0.** This is a DRAFT on `main` (`be21751c3`, the landing for #1243). It is the follow-up lane 5 filed as #1202 from its independent review of #1166 (#1139), finding 1 (pull/1166 issuecomment-6352173084). #1166 ended the seven module-level patterns of the validators in `\Z` and read the three ids with `fullmatch`, and left `NamingPolicy`, whose patterns come from `contracts/repository-naming.yaml`, every one `^...$`, read with `.match`. The change is one commit, `09697e9c5`: 3 files, +255 and -4 (`git diff --shortstat origin/main...HEAD`): `scripts/repo_shape.py` (+5 -4), `contracts/repository-naming.yaml` (+8), and the new `tests/test_naming_policy_line_break.py` (+242, 77 rows). Measured on main `be21751c3` (production code equal to `5926cccab`, where the branch was cut), Python 3.12.3, git 2.43.0, a stub `gh` and no network. `NamingPolicy` read a name with `.match` at four sites of `scripts/repo_shape.py`: `descendant_referents` (the family's `_re`, then its `_split_re`) and `matches` (a role's `_re`, then a family's). In Python `$` also matches just before a trailing line feed, and the YAML reader reads a double-quoted `"...\n"` as the text and a line feed. So `matches`, `classify` and `descendant_referents` gave a name with a trailing line feed the answers of the name without it (`NamingPolicy.load(contracts/repository-naming.yaml)`, in process): | Name, with and without `\n` | `classify` on main | On this branch, with `\n` | |---|---|---| | `Atlas`, `Atlas-spec`, `Atlas-code` | `('project-leg', 'assembly' / 'spec' / 'code')` | `matches == []`, `classify is None` | | `openFoo` | `('neutral-product', None)`, also `project-leg/assembly` | `matches == []`, `classify is None` | | `Thing-Install` | `('install', None)` | `matches == []`, `classify is None` | | `user-wip` | `('workspace', None)` | `matches == []`, `classify is None` | | `InkxRouter`, `MedxScribe` | `('project-leg', 'assembly')`, with `descendant_referents` `('openRouter', 'openxRouter')` and `('openScribe', 'openxScribe')` | `matches == []`, `classify is None`, and `descendant_referents == ()` | `Atlas-Spec` (a capital S) is `None` with and without the line feed, on both. `topic_pattern.match('xf-project-atlas\n')` is a match on main; no tool reads `topic_pattern` (see Limits). The gate (`validate-repository-naming.py`, run by the root template at `Makefile:48` and `validate.yml:310`), measured by the new rows run on main's code: - `--project project.yaml` over a scaffolded root whose leg `repository:` is written `"testorg/Atlas\n"` (and likewise `-spec` and `-code`): **exit 0**, the table naming the leg and its family on two lines (`' Atlas'`, then `' project-leg/assembly'`). - The same name as an argument (`Atlas\n`, `Atlas-spec\n`, `Atlas-code\n`): exit 0, the same split. A name read from stdin is stripped (`line.strip()`), and is untouched. - The issue also measured that `validate-manifest.py` has refused such a leg since #1166 (`manifest-leg-repository`, `QUALIFIED_RE` ending in `\Z`), so the root's gate as a whole already failed; the naming step passed. I did not re-run that measurement. - **`scripts/repo_shape.py`:** the four sites read `fullmatch`. `NamingPolicy` is the only code that matches a name against the data's patterns (`grep` of the tracked `*.py`; `scaffold-project.py:1535` prints the neutral-product pattern's text in a remedy and matches nothing). A one-line note beside `topic_pattern` says that a reader must use `fullmatch`, because `$` takes a final line feed. - **`contracts/repository-naming.yaml`:** a paragraph at the end of the header, "A PATTERN IS READ AGAINST THE WHOLE NAME", for a fork's pattern. A pattern with no `$` was read as a prefix under `.match` and is read as the whole name now, so a fork writes the pattern for the entire name. I took this of the two ways the issue offers (the other is to keep `.match` and refuse a name that holds a line feed at the entry of `matches`, `classify` and `descendant_referents`) as the shorter. Every shipped pattern begins with `^` and ends with `$`, and the measured sweep below shows `fullmatch` changes no answer except a trailing line feed. - **`tests/test_naming_policy_line_break.py` (new, 77 rows):** - the names are read from the data (`families[].examples`, `roles[].examples`, the descendant family's `claim_without_referent_examples`), so a family or a role added to the contract is covered without a line here; a `declared_only` family is asked under its own id; - a baseline row per name (the name without the line feed is matched as it was) and, per name with the line feed, `matches == []`, `classify is None` and `descendant_referents == ()`; - rows over a fork's policy (`NamingPolicy` built from the shipped data with ONE pattern written without `$`) for each of the four sites; - the gate rows: `validate-repository-naming.py --project` over a scaffolded root for each of the three roles, a double-quoted baseline, and an argv name for each, with its baseline. - **Nothing else.** No refusal code is added, changed or renamed, no sentence of a refusal changes, no command or flag is added, so `AGENTS.md`, `README.md`, `docs/` and the handbook mirror stay as they are. Before the change I grepped `tests/`, `README.md`, `docs/` (the handbook), `AGENTS.md` and `contracts/` for text that pins the header's wording or a prefix reading of a policy pattern: nothing reads the contract's comments, and the only patterns a test writes into a policy are `tests/test_naming_policy.py:2498`'s fork form `^~[a-z]+$`, which has a `$`, and `tests/test_doctor_validator_verdicts.py:324`'s corrupted `(^open(?:`, which does not compile. - **What pins `scripts/repo_shape.py`.** This repository holds no copy of it and no digest of it. A project's copy is pinned by the shape pin's tree digest (`sorted-ls-tree-r-v1`, computed over the shape's tree at the pinned commit), and `update-shape.py` reaches it as an `upstream-changed scripts/repo_shape.py` row; `contracts/repository-naming.yaml` is in the copy lists of `scripts/shape_materialize.py` (lines 444 and 652) and reaches a project the same way. `fullmatch` needs no import, so no pinned script meets a name it lacks; `tests/test_pinned_copy_text.py` passes (hygiene five below). `tests/test_naming_policy_line_break.py` run on main's production code (`n1202-mut`, a detached tree at `be21751c3` with the new file copied in; sha256 of the file equal to the branch's): **40 failed, 37 passed** (`run-new-main-be21751c3.log`). The 37 that pass are the baselines (21 family names, 6 role names, 6 descendant names, the double-quoted leg, 3 argv names). The 40 that fail, and why: | Row (function) | Failing on main | Because | |---|---|---| | `test_a_name_that_ends_in_a_line_feed_matches_no_family` | 24: `neutral-product-` `openxFactory`, `openXwallet`, `openChart`, `openDox`, `openXdox`; `install-` `xFactory-Hermes-Install`, `Hermes-Install`, `Keycloak-Install`; `domain-descendant-` `MedxChart`, `LedgerxWallet`, `codexFactory`, `MedxGlass`, `codexDox`; `project-leg-` `Atlas`, `Atlas-spec`, `Atlas-code`, `Northwind`, `Northwind-spec`, `Northwind-code`; `family-` `InkRouter`, `Northwind`; `workspace-` `brett-wip`, `scott-wip`, `a1-wip` | `matches(name + "\n")` was the answer for the name | | `test_a_descendant_name_that_ends_in_a_line_feed_has_no_referent` | 6: `MedxChart`, `LedgerxWallet`, `codexFactory`, `MedxGlass`, `codexDox`, `MedxScribe` | `descendant_referents` gave `openChart` and `openxChart`, and so on | | `test_a_forks_descendant_pattern_with_no_dollar_is_read_as_the_whole_name` | 2: `family-pattern`, `split-pattern` | a prefix pattern took `MedxScribe` | | `test_a_forks_leg_pattern_with_no_dollar_is_read_as_the_whole_name` | 2: `role-pattern`, `family-pattern` | a prefix pattern took `Atlas_x` | | `test_the_naming_gate_refuses_a_leg_repository_that_ends_in_a_line_feed` | 3: `assembly`, `spec`, `code` | exit 0 where 1 is expected | | `test_the_naming_gate_refuses_an_argv_name_that_ends_in_a_line_feed` | 3: `Atlas`, `Atlas-spec`, `Atlas-code` | exit 0 where 1 is expected | On the branch all 77 pass. The refusal is, for each: exit 1 and the line `FINDING naming-unclassified: <name>`. **No name without a line feed changes its answer** (measured, not argued): `matches`, `classify` and `descendant_referents` over 66,688 names (every string of up to 5 characters over `A a x X - 1 _`, a space and a line feed, and 11 stems with 12 suffixes, with and without `open`) under 5 declared roles (none, `assembly`, `spec`, `code`, `family`), on main and on the branch: 333,440 rows, **3,225 differ and every one is a name that ends in a line feed; none that does not**; and no name that ends in a line feed matches anything on the branch (`probe_inproc.py` and `sweep.py` in lane 5's `work/n1202/`). `tests/test_naming_policy.py` passes unchanged. Each applied alone to `scripts/repo_shape.py` on the branch's copy in `n1202-mut`, run against the new file, and restored with a sha256 check (`restored True`, and at the end the file is main's bytes again, blob `00759f1e6`): | Mutant | Result | Killed by | |---|---|---| | M1: `descendant_referents`, the family's `_re.fullmatch` put back to `.match` | 1 failed, 76 passed | `test_a_forks_descendant_pattern...[family-pattern]` | | M2: `descendant_referents`, `_split_re.fullmatch` put back to `.match` | 1 failed, 76 passed | `test_a_forks_descendant_pattern...[split-pattern]` | | M3: `matches`, a role's `_re.fullmatch` put back to `.match` | 25 failed, 52 passed | 18 of the every-name rows, `test_a_forks_leg_pattern...[role-pattern]`, and the 3 leg and 3 argv gate rows | | M4: `matches`, a family's `_re.fullmatch` put back to `.match` | 31 failed, 46 passed | all 24 every-name rows, `test_a_forks_leg_pattern...[family-pattern]`, and the 3 leg and 3 argv gate rows | | M5: M1 and M2 together | 14 failed, 63 passed | 6 every-name rows, the 6 descendant rows, both fork descendant rows | | M6: all four sites | 40 failed, 37 passed | the same 40 as on main | No survivor. **M1 and M2 are killed only by the fork rows, and that is the shape of the code, not a gap in the rows:** the two sites of `descendant_referents` stand in series, and the shipped `split_pattern` takes the family pattern's language, so on the shipped data either alone makes the other redundant (M5 is what the shipped-data rows kill). A fork's policy whose one pattern has no `$` is what asks each by itself; it is also the case the contract's new paragraph is written for. Python 3.12.3 (CI runs 3.14; the rows assert lists, tuples and finding lines, nothing that depends on a `repr` or an `ast.dump`), through lane 5's `run10.sh` (gh stub first on PATH, bogus token, empty `GH_CONFIG_DIR`, blank git identity, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null`), git-filter-repo 2.47.0 (CI's pin; `git filter-repo --version` prints `a40bce548d2c`), at head `09697e9c5`, dirty=0: | Run | git | Result | |---|---|---| | the new file, `tests/test_value_pattern_line_break.py` (the sibling it imports two helpers from), `tests/test_naming_policy.py`, and the hygiene five: `test_path_guard_hygiene`, `test_repo_hygiene`, `test_agents_md_codes`, `test_cli_reference`, `test_pinned_copy_text` | 2.43.0 | **751 passed** in 131.18s | | the same files | 2.47.1 (`tools/git247/bin/git`, built from kernel.org's tarball) | **751 passed** in 120.02s | | the neighbours that name `NamingPolicy` or run the naming gate: `test_manifest_validator`, `test_scaffold_referent_chain_links`, `test_chain_pin_sources`, `test_github_name_limits`, `test_adopt_manifest_values`, `test_scaffold_manifest_values`, `test_reader_refusals_named`, `test_pin_source_env_collisions`, `test_family_init_values` | 2.43.0 | **750 passed, 19 skipped** in 383.95s (all 19 are template skips in `tests/test_family_init_values.py`: 16 at `:229`, "this template quotes the placeholder", and 3 at `:301`, "this template quotes `id:`", as rv1266 printed them with `-rs`) | Before the rebase onto `be21751c3` the same files (without the sibling) passed at the then head `f552017f1`: 720 on 2.43.0 and 720 on 2.47.1. **Not run:** the full suite, a real Windows host and macOS, and `test_shape_doctor.py` (it reads the naming validator through the doctor and no name in it ends in a line feed). **Read again by rv1266 at 2026-11-08T17:10Z:** main `46fe6ac19` gives tree `251537e4`, clean, and main `12122952b` gives `c46cbe55`, clean. The new file, `test_value_pattern_line_break`, `test_naming_policy` and the hygiene five passed on that predicted merge (751, git 2.43.0), since `12122952b` changed `tests/test_pinned_copy_text.py`. `git merge-tree --write-tree <other> 09697e9` (git 2.43.0) at 2026-11-08T16:29Z, against main and every open PR that touches one of this PR's files (50 open): | Against | Head | Tree | |---|---|---| | main | `be21751c3` | `836cb7fec` (clean) | | #1249 (`scripts/repo_shape.py`) | `3146c3ca5` | `f41cf1dca` (clean) | | #1171 (`scripts/repo_shape.py`) | `8162b874e` | `29eee887f` (clean) | | #1236 (`scripts/validate-repository-naming.py`, which the new rows run) | `352dcbc96` | `64990151d` (clean) | The later lander takes the refresh. - **`topic_pattern` has no row.** Nothing outside `tests/test_naming_policy.py:422` reads it at main, and the data's `topic.pattern` and `topic.id_pattern` are read by no tool, so a row cannot fail on main for it. The note beside it, and the contract's paragraph, say a reader must use `fullmatch`. - **A project's own copy reaches this through `update-shape.py`.** Until a project takes the new `scripts/repo_shape.py` its `validate-repository-naming.py` and `validate-manifest.py` run the old `.match`. The root's `validate-manifest.py` already refuses a leg `repository:` that ends in a line feed since #1166. - **The refusal prints the name raw.** `naming-unclassified` names the name as typed, so `Atlas\n` ends the finding's first line and the existing text ("These names match none of the families ...") follows after a blank line; a name holding an ESC prints raw there on main too. Not changed: the issue asks that the name be refused by name, and no wording or code moves. - **A fork's data that relied on a prefix reading.** A fork's pattern with no `$` is read as the whole name now, as the contract's header says. The shipped data has none, and no test writes one. - Not touched, read at their call sites: `scaffold-project.py`, `setup-project.py`, `family.py` and `shape_materialize.py` take a name from argv, which `checked_value` refuses first; `validate-family.py` strips it. Review: rv1266, lane 5's independent opus reviewer, which wrote none of #1266: READY at `09697e9c`, H0 of this landing (issuecomment-6724498649), with no MUST or SHOULD; its NIT 2 is #1267, fixed by the stacked #1271. CI (Brett Heap's ruling 27): H0 is the head 09697e9 itself, which passed tests, tests-git-bash and SonarCloud; main has touched none of its files since its base be21751; and the local gate passed on its predicted squash tree 8af5516 over main 3027202: the naming_policy_line_break, adopt_check_throwaway_repos, adopt_e2e, adopt_pins, chain_link_fold, doctor_unsearchable_links, family, path_guard_hygiene, pinned_copy_columns, pinned_copy_text, update_shape_unreadable, validate_family_unreadable, no_auto_maintenance, repo_hygiene, agents_md_codes, cli_reference sets, 1263 passed, 4 skipped. Landed on Brett Heap's word of 2026-10-23T13:10:26Z, relayed to every lane by lane 3 (#473 issuecomment-6365697123): "merge v1.2.1 PRs once reviewed and green". Closes #1202 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…prints through `spelled()`, so a name with a line feed or an ESC byte is one row and one `naming-unclassified` name, with its column worked out from the spelled form (#1267) (#1271) **#1267: `validate-repository-naming.py` prints every name it tables or refuses through `repo_shape.spelled()`, so a name that holds a line feed or another control byte stays on one line and in one table row, and the finding for `Atlas` plus a line feed cannot read as the finding for a valid `Atlas`.** **This PR was stacked on #1266 (#1202) and was restacked onto main after #1266's squash.** Its base was `fix/1202-naming-fullmatch` (#1266's head `09697e9c5`); its base is `main` now, and #1266 is on main as the squash `28be96557`. It is a DRAFT. The change is three commits written on top of `09697e9c5`, `4b1653d8b`, the review round `4fa9f78a6` and the round after rv1271b's delta check `76e99ec86` (see "Review round" and "The round after rv1271b's delta check"), and the restack's merge of #1266's squash, `2d9250c57` (see "The restack after #1266's squash"). Against main it is 3 files, +416 and -19 (`git diff --shortstat origin/main..HEAD`): `scripts/validate-repository-naming.py` (+31 -15), the new `tests/test_naming_gate_spelled.py` (+376, 39 rows), and `tests/test_naming_policy_line_break.py` (+9 -4: two of #1266's rows now assert the spelled form, see "What changed"). It is the follow-up lane 5's independent review of #1266 filed as #1267 (NIT 2, #1266 issuecomment-6724498649). #1266 makes `Atlas` plus a line feed a name of no family; this one is about how the gate then prints that name. rv1271 (opus, independent) found this PR READY at `4b1653d8b` with six NITs, none blocking (#1271 issuecomment-6726218829). The round is one commit on it, `4fa9f78a6`: 2 files, +39 and -20 (`scripts/validate-repository-naming.py` +13 -10, `tests/test_naming_gate_spelled.py` +26 -10). NITs 1 to 5 are done. NIT 6 was left for the restack, and the restack has done it (see "The restack after #1266's squash"). | NIT | What rv1271 found | What was done | |---|---|---| | 1 | The module docstring said two things that cannot both be true: a chain link and a caller's words are "printed as given", and "every repository name this prints" is spelled | **Docstring only** (the script's syntax tree outside the docstring is equal to `4b1653d8b`'s, proved with `ast`). It now says one thing: every name the gate classifies or refuses is spelled, and a sentence that quotes one is spelled whole, so a chain link or a caller's `--link-remedy` words inside it are spelled too, while the `CHAIN` line, `link-source-unreadable` and the NOTEs print a chain link as given. The old "printed as given" lines no longer list a chain link or the words of a remedy | | 2 | Two rival escapers survived every row: X1 (escape only a line feed and an ESC) and X3 (`repr(value)[1:-1]`) | **Four new rows**, below. X1 now fails 2 rows and X3 fails 2, each mutant applied alone and restored with a sha256 check | | 3 | A surrogate name's row changed, against "byte for byte as before" | **Body only.** "What changed" now says the name's bytes are unchanged and its label moved from character 40 to 35 | | 4 | The skips were explained wrongly: the body said the reasons "were not printed" | **Body only.** "Runs" names each reason and says why the first gate's logs hid them (`run10.sh`'s `-rs`, then the gate's `-rf`: pytest keeps only the last `-r`) | | 5 | The Merges section was stale | **Body only.** "Merges" is re-measured at the round's head against main fetched fresh | | 6 | `closingIssuesReferences` was `[]` while the base was #1266's branch | **Left for the restack, now done:** the PR was restacked onto main, and `closingIssuesReferences` reads #1267 (see "The restack after #1266's squash") | **NIT 1, measured.** At the round's head, with a chain link `openX<ESC>dox` and `--link-remedy 'openXdox=run<TAB>make <ESC>[31mfetch'` (`logs/docstring-claims-head.log`, `logs/note-claims-head.log`): the stderr `WARNING <name>: <sentence>` and `--explain`'s `WARNING` spell the link (`openX\x1bdox`) and the remedy words (`run\tmake \x1b[31mfetch`); `--explain`'s `CHAIN` line, the `link-source-unreadable` WARNING (`could not answer for openX<ESC>dox`) and the NOTEs that name a link (`no name classified here reads openX<ESC>dox's own declaration`, `links: openX<ESC>dox, openDox`) print the link with its ESC byte. The values of `--link-source` and `--link-remedy` go through `_shown`, as the docstring's paragraph above the new one says. The "Limits" bullet on chain links still holds as written; the remedy words are the half it did not name. **NIT 2, the rows.** `SPELLED_ITSELF` in `tests/test_naming_gate_spelled.py` adds two names to the finding row and the table row on the shipped contract (the file is 36 rows now). The expected spellings are written out by hand, as the file's others are: | Name | Spelled | Pins | |---|---|---| | `Atlas` plus a CR (`ends-in-cr`) | `Atlas\r` | the CR: a gate that escapes only a line feed and an ESC prints it raw | | `At\las` plus a line feed (`backslash`) | `At\las\n` | the backslash: `spelled` prints it as it is, so `repr` doubles it (and an escaper of every non-ASCII character does too); the line feed beside it keeps the row failing on the base | A ZWJ was not used for the table row: lane 3's #1217 pads by terminal columns and a ZWJ (category Cf) takes none, so its row would change on the restack (`ZERO_COLUMN_CATEGORIES` at `352dcbc96`). A backslash is ASCII and one column. - **At the head:** the 4 rows pass (`tests/test_naming_gate_spelled.py` 36 passed, `logs/new-file-head.log`). - **On the base** (`09697e9c5`'s script): the 4 fail, the base prints the CR raw and splits the backslash name's row and finding at its line feed (`logs/run-base.log`, `logs/new-names.log`). **On main** (`dff8fd4ba`): the same 4 fail (`logs/run-main-gate-spelled.log`). - **Under X1** (`spelled` replaced by a local escaper of a line feed and an ESC): **2 failed**, the finding row and the table row of `ends-in-cr`; the other 40 of the 42 core tests pass. **Under X3** (`repr(str(value))[1:-1]`): **2 failed**, the finding row and the table row of `backslash`; the other 40 pass. Each applied alone to the script in `n1267-mut` and restored from git, `restored x1-narrow sha256 ok`, `restored x3-repr-unquoted sha256 ok` (`logs/mutants-core.out`, `logs/mut-core-x1-narrow.log`, `logs/mut-core-x3-repr-unquoted.log`). No other row fails under either mutant. rv1271b (sonnet, independent) found this PR READY at `4fa9f78a6` with no MUST or SHOULD and two NITs (#1271 issuecomment-6726914536). The round is one commit on it, `76e99ec86`: 2 files, +44 and -15 (`scripts/validate-repository-naming.py` +5 -2, `tests/test_naming_gate_spelled.py` +39 -13). Both NITs are done and nothing else changed: the script's syntax tree outside its module docstring is equal to `4fa9f78a6`'s (proved with `ast`, `logs/ast-delta.log`), and the test file adds three ids. | NIT | What rv1271b found | What was done | |---|---|---| | 1 | Five rival escapers pass every row, because no name holds a character outside LF, CR, ESC and a backslash: y1 (C0 controls only), y2 (category Cc only), y3 (`spelled` without the bidirectional controls), y4 (an `isprintable` test) and y5 (a table of LF, CR and ESC) | **Three new ids**: a name with U+202E (RLO) in the finding row and the table row, and a name with U+200D (ZWJ) in the finding row only. Each of y1 to y5, applied alone and restored with a sha256 check, now fails at least one | | 2 | The module docstring's first paragraph says every `--link-remedy` value this prints is shown as it is or by `_shown`, but the `declared-unverified` WARNING prints the remedy's words spelled, without quotes | **Docstring only.** The paragraph names that one exception | **NIT 1, the rows.** The names are written in the test source as `chr(0x202E)` and `chr(0x200D)`, never as raw characters, and the expected spellings by hand, as the file's others are. Both are asked of the shipped contract, where the file's other `SPELLED_ITSELF` names are: | Name | Printed as | Rows | Pins | |---|---|---|---| | `At`, U+202E, `las` (`rlo`) | `At\u202elas` | the finding, the table row | a bidirectional control that reorders the text around it and is no C0 or C1 control: an escaper that misses it (y1, y2, y3, y5) prints it raw | | `At`, U+200D, `las` (`zwj`) | the name itself, the joiner as it is | the finding only | a format character `spelled` leaves alone, as its docstring says: an `isprintable` test (y4) writes it `\u200d` | The ZWJ is in the finding row only. #1236 (landed on main as `81cbe9c82`) pads the table by the columns a name takes, and a ZWJ (category Cf) takes none, so a table row holding one would depend on that pad; the RLO name prints as ASCII (`\u202e` is six columns) and is safe in both. The ZWJ row passes on main and on the base **by design**: those print the joiner as it is, which is the text `spelled` gives, so it cannot fail there. It is a row that kills a rival, not one that fails on the base (see "Failing on the base"). The other two ids, `finding[rlo]` and `table[rlo]`, fail on both. **Each rival, measured** (`probes/mutate.py`, `logs/mutants-y.out`; each applied alone to the gate's call in `n1267-mut` at `76e99ec86`, in place of the import of `spelled`, the new file run, the script restored with a sha256 check, `9cc39a2eafb0` each time, porcelain 0 after each): | Rival | What it escapes | Rows failing (of the 39) | Killed by | |---|---|---|---| | y1 | C0 controls only | 2 | `finding[rlo]`, `table[rlo]` | | y2 | category Cc only (C0, DEL, C1) | 2 | `finding[rlo]`, `table[rlo]` | | y3 | every category `spelled` escapes, but no bidirectional controls | 2 | `finding[rlo]`, `table[rlo]` | | y4 | what `str.isprintable` refuses | 1 | `finding[zwj]` | | y5 | LF, CR and ESC by a table | 2 | `finding[rlo]`, `table[rlo]` | No other row fails under any of the five, which is the proof that each passed every row of `4fa9f78a6`. rv1271b's other rivals and rv1271's X1 and X3 are still killed (`logs/mutants-rest.out`): y6 (every non-ASCII character too) 9, y7 (C0 as `\xNN`) 25, y8 (`ascii()` without quotes) 11, y9 (one-lining) 37, X1 4, X3 3. **These six counts are over the new file's 39 rows alone.** The Mutants table below counts over the 45 core tests, the new file's 39 rows and the 6 updated rows of `tests/test_naming_policy_line_break.py`, and is the first round's table re-measured at this head. Over the 45, X1 is 4 and X3 is 3 as here (they are rows of that table), and rv1271c measured the four y rivals that are not in it as y6 9, y7 31, y8 11 and y9 43: y7 and y9 each count 6 more over the 45 (y7 25 and 31, y9 37 and 43). **NIT 2, the docstring.** The paragraph now says the one exception: the WORDS of a `--link-remedy` where a `declared-unverified` WARNING offers them stand inside its sentence and are spelled with it, so a TAB or an ESC in them is `\t` or `\x1b`, without quotes. Measured at the head (`probes/docstring-claim.py`, `logs/docstring-claim-head.log`): `--link-remedy 'openXdox=run<TAB>make <ESC>[31mfetch'` read by a chain gives `WARNING InkxDox: declared-unverified: openXdox declaring a pin on openDox is a fact in openXdox's own tree, which is not reachable here (run\tmake \x1b[31mfetch). The recorded chain still classifies.`, with no raw TAB or ESC in the output; a remedy no holder used is a NOTE whose VALUE goes through `_shown`, quotes included (`NOTE --link-remedy 'openQdox=run\tmake \x1b[31mfetch': not used ...`), as the paragraph still says. **The runs of this round.** Head `76e99ec86`, dirty=0, Python 3.12.3, git-filter-repo 2.47.0 (`a40bce548d2c`), through `run10.sh` with its `-rs` and no other `-r`, so a skip names its reason. The files are the brief's: the new file (39), `test_naming_policy_line_break` (77), `test_naming_policy` (264), `test_chain_link_fold` (17), `test_legs_not_a_list` (112), the hygiene five (`test_path_guard_hygiene` 121, `test_repo_hygiene` 101, `test_agents_md_codes` 47, `test_cli_reference` 23, `test_pinned_copy_text` 87) and `test_no_auto_maintenance` (60): 948 tests in 9 runs per git. Four single files hold more than 100 tests (`test_naming_policy`, `test_legs_not_a_list`, `test_path_guard_hygiene`, `test_repo_hygiene`); each took `flock` on one lock, so no two runs of more than 100 tests overlapped, and no other run held more than 100. | Run | git | Result | |---|---|---| | the 11 files (9 runs) | 2.43.0 (`/usr/bin/git`) | **946 passed, 2 skipped, 0 failed** | | the 11 files (9 runs) | 2.47.1 (`tools/git247/bin/git`) | **946 passed, 2 skipped, 0 failed** | | the new file alone, before the commit | 2.43.0 | 39 passed | The 2 skips are the same on both gits: `tests/test_no_auto_maintenance.py:222` x2 ("the session began with `GIT_CONFIG_GLOBAL` set, and its file includes that one"): `run10.sh` exports `GIT_CONFIG_GLOBAL=/dev/null` for every run, which is the lane's rule for a gate, and the two rows of that test skip under it. Logs: `gate/gate-243-1.log` to `-9.log`, `gate/gate-2471-1.log` to `-9.log`. **Not run:** the full suite, a real Windows host and macOS; the first commit's 37-file gate under "Runs" stands for the rest, since the round changes a docstring and the new test file only. **The restack's `_print_classification` hunk, pre-checked.** #1236 landed on main as `81cbe9c82` while this PR waited for #1266. The restack onto main will conflict at one line, and only there (see "Merges"). I built the resolution as an object-only commit, with no branch, no ref and never pushed: `git merge-tree --write-tree` of this head and main `30272026e`, then `git commit-tree` over the resolved file, the one `print` line read as `print(f" {_padded(_printed(spelled(name)), 32)} {label}{also}")` and main's comment above it kept. That commit is `0cfaedf3f` (tree `24e4b4e3`). Checked out detached in `n1267-mut`, through the gate runner, in 4 runs: the new file with `test_chain_link_fold.py` (39 + 19 = 58 tests), `test_pinned_copy_columns.py` (55), `test_siblings_family_name.py` (154, under `flock`, as the one file that needs more than 100) and `test_naming_policy_line_break.py` (77): **344 passed** (`logs/resolved-main-a.log` to `-d.log`). The mut tree was put back at `76e99ec86`, clean, its script's sha256 equal to the branch's. #1266 (#1202, this PR's base) landed on main as a squash, and GitHub retargeted this PR to `main`. The restack was done by hand, in the writing tree `l5-1267-naming-spelled`, as three merges (the route lane 5's `restack3.sh` takes: the parent's final head, the parent's squash, then main), because one conflict is in a file #1266 never touched. The merge commit carries the identity the lane's rules give it. The PR's own change is the one it was: its diff against main is the same 435 changed lines as before the restack, except the one print line resolved below, and no row or test changed. | Step | What | Result | |---|---|---| | H66, #1266's final head | `09697e9c52f35c9aadbafdebb88e47950105f474` | already an ancestor of the branch (`git merge-base --is-ancestor` says yes: the branch was built on it), so no merge and **no commit** | | S, #1266's squash | `28be9655772602597028e7936c6fb0649130801d` (its parent is main `30272026e`, its tree `8af55167`) | `git merge --no-ff S`: the merge commit **`2d9250c57f8d571ac4280a297927cf51d07be1a6`** (parents `76e99ec86` and S); **two conflicts, both the expected ones** (below) | | main | `28be96557`, fetched fresh with `-c gc.auto=0 -c maintenance.auto=false fetch --no-write-fetch-head`; it is S itself, main's tip | `git merge origin/main`: **"Already up to date."** No commit | **The two conflicts, and no other** (`git merge-tree --write-tree --name-only S 76e99ec` named the same two before the merge): - **`tests/test_naming_policy_line_break.py`, add/add.** The file is #1266's own, and this PR changed 13 lines of it (+9 -4: the two rows that now assert the spelled form). Resolved by taking the branch's side whole (`git checkout --ours`, then `git add`). Nothing is lost: S's copy of the file is #1266's own (blob `b6a75d9bf`, equal to the one at `09697e9c5`), and the branch's copy is that blob plus the 13 lines. The result's blob is `5885627f8c27426bbbcfff1e49e42bc88770809a`, **equal to `76e99ec86`'s**. - **`scripts/validate-repository-naming.py`, one hunk, `_print_classification`'s print line,** where main's #1236 (`81cbe9c82`, the display-width pad) meets this PR's `spelled`. The branch's side was `print(f" {spelled(name):<32} {label}{also}")`; main's side is the two comment lines and `print(f" {_padded(_printed(name), 32)} {label}{also}")`. Resolved by hand, as the body has said all along: spell first, then pad what is printed, with main's comment kept: `print(f" {_padded(_printed(spelled(name)), 32)} {label}{also}")`. The resolved file's blob is `c568e33b86ca922ade043a856bf47b060fd1f3ae`, **equal to the file in the object-only commit `0cfaedf3f` (tree `24e4b4e3`) that the round before pre-checked**, and main's file is the same as it was then (blob `4bfafa631` at `30272026e` and at S), so the pre-check stands for the head. Neither side was taken wholesale. The merge commit's message names S, both files and how each was resolved. **Verified at `2d9250c57`** (git 2.43.0; the changed lines are in `changed-old.txt` and `changed-new.txt` in the writer's folder): - `git diff --name-only origin/main HEAD` lists exactly `scripts/validate-repository-naming.py`, `tests/test_naming_gate_spelled.py` and `tests/test_naming_policy_line_break.py`: 3 files, +416 and -19, with `scripts/validate-repository-naming.py` +31 -15, the new test file +376, `tests/test_naming_policy_line_break.py` +9 -4. `scripts/repo_shape.py` is the same blob (`852d272ef`) at the head, at S and at `09697e9c5`: the restack leaves it to #1266. - The `-U0` changed lines of `git diff origin/main HEAD` (435) equal those of `git diff 09697e9 76e99ec` (435), line for line, **except the one resolved print line**. Before: `- print(f" {name:<32} {label}{also}")` and `+ print(f" {spelled(name):<32} {label}{also}")`. Now: `- print(f" {_padded(_printed(name), 32)} {label}{also}")` and `+ print(f" {_padded(_printed(spelled(name)), 32)} {label}{also}")`. - `git merge-tree --write-tree origin/main HEAD` exits 0 and gives **`24e4b4e3255e9fcd55abcdec217f577ccb22270d`, the head's own tree**: nothing is left to merge, and the tree is the one of `0cfaedf3f`. **The runs of the restack.** Head `2d9250c57`, dirty=0, Python 3.12.3, git-filter-repo 2.47.0 (`a40bce548d2c`), through `run10.sh` with its `-rs` and no other `-r`, so a skip names its reason. The files are the brief's: the new file (39), `test_naming_policy_line_break` (77), `test_naming_policy` (264), `test_chain_link_fold` (19 at the head; 17 at `76e99ec86`, and the two more rows are main's #1236, `81cbe9c82`), `test_legs_not_a_list` (112), `test_pinned_copy_columns` (55), `test_siblings_family_name` (154), the hygiene five (`test_path_guard_hygiene` 121, `test_repo_hygiene` 101, `test_agents_md_codes` 47, `test_cli_reference` 23, `test_pinned_copy_text` 87) and `test_no_auto_maintenance` (60): 1159 tests in 11 runs per git. Five single files hold more than 100 tests (`test_siblings_family_name`, `test_naming_policy`, `test_legs_not_a_list`, `test_path_guard_hygiene`, `test_repo_hygiene`); each took `flock` on one lock, so no two runs of more than 100 tests overlapped, and no other run held more than 100. | Run | git | Result | |---|---|---| | the 13 files (11 runs) | 2.43.0 (`/usr/bin/git`) | **1,157 passed, 2 skipped, 0 failed** | | the 13 files (11 runs) | 2.47.1 (`tools/git247/bin/git`) | **1,157 passed, 2 skipped, 0 failed** | The 2 skips are the same on both gits: `tests/test_no_auto_maintenance.py:222` x2 ("the session began with `GIT_CONFIG_GLOBAL` set, and its file includes that one"): `run10.sh` exports `GIT_CONFIG_GLOBAL=/dev/null` for every run, which is the lane's rule for a gate, and the two rows of that test skip under it. Logs: `gate/gate-243-1.log` to `-11.log`, `gate/gate-2471-1.log` to `-11.log`. **Not run:** the full suite, a real Windows host and macOS. **The new rows on main's own script.** With #1266 on main, main's `validate-repository-naming.py` (S's, blob `4bfafa631`) was swapped into `n1267-mut` at the head (its `scripts/repo_shape.py` is the same blob as main's), and the two test files run in two runs (`logs/swap-main-a.log`, `logs/swap-main-b.log`): `tests/test_naming_gate_spelled.py` gives **37 failed, 2 passed**, and `tests/test_naming_policy_line_break.py` gives **6 failed, 71 passed**. The 2 passes are `test_a_plain_valid_name_prints_exactly_as_it_did` (the plain-name control) and `test_the_finding_prints_the_spelled_name_on_one_line[zwj]` (the ZWJ finding row, which prints the same on main by design, see "The round after rv1271b's delta check"); the 6 failures of #1266's file are the 6 rows this PR updated to assert the spelled form. The script was restored from git with a sha256 check (`f504b0e48b4a`, the head's) and the tree was clean after. **The record after the push.** `git ls-remote origin refs/heads/fix/1267-naming-spelled` reads `2d9250c57f8d571ac4280a297927cf51d07be1a6`; `gh pr view 1271` reads base `main`, head `2d9250c57f8d571ac4280a297927cf51d07be1a6`, `closingIssuesReferences` `[1267]` and `mergeable` `MERGEABLE`. Sections elsewhere in this body that say "on main (without #1266)" or call `09697e9c5` the base describe those commits as they were measured, before the restack; they are not re-measured, and the Mutants and Runs sections still describe the heads they name. rv1271c (sonnet, independent) found this PR READY at `76e99ec86` and again at the restack `2d9250c57`, with no MUST or SHOULD and three NITs (#1271 issuecomment-6759403546). This round takes the first two. It is one commit on `2d9250c57`, `c56753ba7`: 1 file, +4 and -4 (`tests/test_naming_gate_spelled.py`, four `#` comment lines). NIT 3 is informational (rival edits the new file's rows cannot tell from `spelled`, which the library's own tests kill) and needs nothing. Nothing was merged into the branch: main is `28be96557` still, an ancestor of the head, and the PR's diff against it is the same 3 files, +416 and -19. | NIT | What rv1271c found | What was done | |---|---|---| | 1 | Four `#:` comments in `tests/test_naming_gate_spelled.py` write an escape with a doubled backslash. A doubled backslash is right in a string literal or a docstring, where Python reads it as one, and wrong in a comment, where it reads literally. Two of the four read correctly at `4fa9f78a6` and became wrong at `76e99ec86`, when the paragraph was re-wrapped | **Comments only.** The four comments write one backslash. Lines 80 and 81 read as they did at `4fa9f78a6` (its lines 72 and 73); lines 87 and 98 are the comments the RLO and ZWJ rows added | | 2 | The sentence that gives `y6 9, y7 25, y8 11, y9 37, X1 4, X3 3` counts over the new file's 39 rows, while the Mutants table counts over the 45 core tests, and the body says neither | **One sentence**, in "The round after rv1271b's delta check": it says the six counts are over the new file's 39 rows, that the Mutants table counts over the 45 core tests, and what the same rivals count over the 45 | **NIT 1, the four lines** (`git diff -U0 2d9250c c56753b`, the whole diff of the round; the lines are code text and show a backslash as the file has it): ``` @@ -80,2 +80,2 @@ NAMES = [pytest.param(*ENDS_IN_LF, id="ends-in-lf"), -#: double the backslash: `spelled` writes a CR as `\\r` and leaves a backslash -#: as it is (the line feed beside it is still `\\n`), so the name holding it +#: double the backslash: `spelled` writes a CR as `\r` and leaves a backslash +#: as it is (the line feed beside it is still `\n`), so the name holding it @@ -87 +87 @@ WITH_BACKSLASH = ("At\\las" + LF, "At\\las\\n") -#: `\\u202e`, and a rival that escaped only the C0 controls, only the category +#: `\u202e`, and a rival that escaped only the C0 controls, only the category @@ -98 +98 @@ SPELLED_ITSELF = [pytest.param(*ENDS_IN_CR, id="ends-in-cr"), -#: `str.isprintable` would write it as `\\u200d`. It takes no column, so only +#: `str.isprintable` would write it as `\u200d`. It takes no column, so only ``` **The round is comments only, proved** (`probes/prove-comments-only.py`, run over the two committed blobs, `logs/prove-comments-only-committed.log`; the file's sha256 is `bac49172...` before and `9b52a2cb...` after): - `ast.dump` of the file, with `include_attributes=False`, is equal before and after (48,502 characters each); with the node positions it is equal too. - A `tokenize` comparison: 2,337 tokens on each side, and **4 differ, all 4 COMMENT tokens**. The tokens that are not comments are equal in type and text; four NL tokens, the line ends after the shortened comments, stand one column to the left. - `git diff -U0` shows 8 changed lines, every one a `#` line, in three hunks (lines 80 and 81, line 87, line 98). - No comment holds a doubled backslash now: 0 `COMMENT` tokens by `tokenize` (4 before), and 0 lines with a `#` before a doubled backslash by a text search (`probes/grep-comments.py`, `logs/grep-comments-after.log`). The doubled backslashes that remain are in string literals and docstrings, where Python reads them as one (`"Atlas\\n"`, the module docstring, the finding test's docstring), and are untouched. **NIT 2, the sentence.** It is the last sentence of the paragraph in "The round after rv1271b's delta check" that gives the counts of rv1271b's other rivals and rv1271's X1 and X3. The numbers were true and are not changed; the sentence now names what they count over. **The runs of this round.** Head `c56753ba7`, dirty=0, Python 3.12.3, git-filter-repo 2.47.0 (`a40bce548d2c`), through `run10.sh` with its `-rs` and no other `-r`, so a skip would name its reason. Three files, each run alone: the new file (39) and the two single files that hold more than 100 tests (`test_repo_hygiene` 101, `test_path_guard_hygiene` 121). Each of those two took `flock` on one lock, so no two runs of more than 100 tests overlapped, and the two gits ran side by side (two runs at most): 261 tests per git, 6 runs. | Run | git | Result | |---|---|---| | the new file alone | 2.43.0 (`/usr/bin/git`) | **39 passed** | | the new file alone | 2.47.1 (`tools/git247/bin/git`) | **39 passed** | | `tests/test_repo_hygiene.py` alone, under `flock` | 2.43.0 | **101 passed** | | `tests/test_repo_hygiene.py` alone, under `flock` | 2.47.1 | **101 passed** | | `tests/test_path_guard_hygiene.py` alone, under `flock` | 2.43.0 | **121 passed** | | `tests/test_path_guard_hygiene.py` alone, under `flock` | 2.47.1 | **121 passed** | 0 failed and 0 skipped in all six. Logs: `gate/gate-243-1.log` to `-3.log` and `gate/gate-2471-1.log` to `-3.log`. **Not run:** the rest of the 11-file gate. The round changes four comment lines, proved above, so rv1271c's gate at `2d9250c57` stands for the rest: 1,157 passed and 2 skipped on both gits (`tests/test_no_auto_maintenance.py:222` x2, "the session began with `GIT_CONFIG_GLOBAL` set, and its file includes that one"). Also not run: the full suite, a real Windows host and macOS. Measured at `09697e9c5` (Python 3.12.3, git 2.43.0): the gate printed a name raw. - `validate-repository-naming.py` given `Atlas` plus a line feed: exit 1, stdout `' Atlas'` and then `' NO FAMILY'` on the next line (the row split in two), stderr `FINDING naming-unclassified: Atlas` and then a blank line, which reads exactly as the finding for a valid `Atlas`. - `At`, a line feed, `las`: the same split. - `At`, ESC, `[31mlas`: the ESC byte reached the terminal in the row and in the finding. - A name with a CR (`Atlas-spec` plus a carriage return) printed the same way, the CR raw in the row and in the finding. On main (without #1266) `Atlas` plus a line feed is not refused at all: it exits 0, classified as `Atlas`, with its row split in two (#1266's body has that measurement). Every `print` of the script, and every string it builds from a name, at the base (`09697e9c5`), with what became of it. Ten changed: | # | Site (base line) | What it prints | Row | |---|---|---|---| | 1 | `_print_classification` (1297) | the plain listing's row, ` <name padded to 32> <label>` | table rows, classified-name row | | 2 | `_no_family_lines` (791) | `--explain`'s header for a name of no family | explain NO FAMILY | | 3 | `_describe` (955) | `--explain`'s header for a classified name | explain classified | | 4 | `_referent_claim_note` (831) | `[a CLAIM: needs a declared pin on openRouter or openxRouter ...]`, the referents derived from the name | claim note | | 5 | `_referent_lines` (935) | `--explain`'s `WARNING <sentence>`; the sentence quotes the name | explain WARNING | | 6 | `_referent_lines` (937) | `--explain`'s `OVERLAP <reason>`; a broken chain's reason quotes the name | explain OVERLAP | | 7 | `_classify_targets` (1321) | the stderr line `WARNING <name>: <sentence>`; the sentence quotes the name again | stderr WARNING | | 8 | `_leg_target` (1112) | `FINDING <name>: declared role 'code' but the name is the 'assembly' form ...` | role finding | | 9 | `_leg_target` (1119) | `FINDING <name>: <broken chain's reason>`; the reason quotes the name | broken-chain finding | | 10 | `_emit_reports` (1358) | `FINDING naming-unclassified: <name>, <name>` | the finding rows | Sites 1 to 4, 8 and 10 spell the name (1 pads the SPELLED name: `f" {spelled(name):<32} ..."`, so the width is worked out from the printed form). Sites 5, 6, 7 and 9 spell the WHOLE string: the sentence `resolve_referent` builds says the name again (`it ends at openQ, but <name> would need openDox or openxDox`), so spelling only the prefix leaves the name raw in the same line. (A mutant that spells only the name, M7b and M9b, is killed.) **Not changed, and why** (each prints no repository name): - `print(f"WARNING {warning}")` (1347) and `print(f"FINDING {finding}")` (1354), `print("\n".join(_describe(...)))` (1317): they emit the strings above, spelled where they are built. - `sources.unread_lines()` and `unused_lines()` (WARNING and NOTE, 1350 and 1352): link-source values and paths through `_shown`, chain links as given, as the module docstring has said since #610. - `print(str(exc))` (1457, 1473), `no_path_refusal()` (1482), `REFUSED naming-no-target` (1500): the policy or manifest path and fixed words. - `_pins_field_findings`, `_chain_field_findings`, `_legs_field_findings`, `_topic_finding`, and `_leg_target`'s `manifest-leg` and `a leg has no repository:` lines: values through `!r` or `_shown`. - `--explain`'s `CHAIN` line (a chain link is a neutral product's name, printed as given; a manifest's links are checked printable by `_not_a_name`, #714), the family rows (the policy's ids and patterns) and the policy's notes. - **`scripts/validate-repository-naming.py`:** `spelled` is imported from `repo_shape` and applied at the ten sites; the module docstring says so beside the `_shown` paragraph, and that a name with no control prints as it did. `spelled` is in every kept library: `scripts/repo_shape.py` at v1.0.0, v1.0.1, v1.1.0, v1.1.1 and v1.2.0 each define it, with the same text (the sha256 of the AST source of `spelled` and of its two constants, `ESCAPED_CATEGORIES` and `ESCAPED_BIDI_CONTROLS`, is equal in all five and at the head), so the import is not skewed (`tests/test_pinned_copy_text.py`'s `NEWER_THAN_A_KEPT_LIBRARY` names only `shown_path` and `host_shell_dialect`, and passes unchanged). - **No refusal code, flag, command or exit status changes.** `naming-unclassified` stays; only the name in its words is spelled. A name without a line feed, CR, ESC or other control prints as before (the plain-name row, and the 3,563 gate tests below), with one change in a ROW and none in the name: a name with a lone surrogate (`Atl\udcffas`, in `test_legs_not_a_list.py`) prints its own bytes as before (`spelled` writes `\udcff`, as stderr's `backslashreplace` did), but its label moved from character 40 to character 35, because the column is now worked out from the spelled name and so lines up with every other row's (measured on `09697e9c5`, `4b1653d8b` and the round's head: `logs/surrogate-label.log`; rv1271's NIT 3). - **`tests/test_naming_policy_line_break.py` (#1266's file), two rows updated:** `test_the_naming_gate_refuses_a_leg_repository_that_ends_in_a_line_feed` (3 rows) and `test_the_naming_gate_refuses_an_argv_name_that_ends_in_a_line_feed` (3 rows) asserted `FINDING naming-unclassified: Atlas`, the raw form (the line feed ended the first line). They assert `FINDING naming-unclassified: Atlas\n` now (a backslash and an `n`), which is what the issue asks. The docstrings say so. No other row of the file changed. - **What pins the printed forms (grepped first).** `tests/`, `README.md`, `docs/` (the handbook included) and `AGENTS.md` for `naming-unclassified`, `NO FAMILY`, `declared role`, `also_matches` and the table's columns: README, docs and AGENTS name the command only, never a printed name with a control; the tests that pin the table or the finding use printable names (`test_chain_link_fold.py`, `test_naming_policy.py`, `test_setup_project_name_edges.py` with its trailing space), which `spelled` leaves alone, or `Atl\udcffas` (`test_legs_not_a_list.py`), which `spelled` writes as `\udcff` exactly as stderr's `backslashreplace` did. The files that run the gate or read its output all pass (Runs). `tests/test_naming_gate_spelled.py` (new, 39 rows). The expected spellings are written out by hand (`Atlas\n`, `At\nlas`, `At\x1b[31mlas`, `Atlas\r`, `At\las\n`, `At\u202elas`; the joiner's name prints as it is), not computed by the library under test. - **On the shipped contract (19 rows):** for each of the issue's three names, the finding is exactly three stderr lines (the finding on one line with the spelled name, then the two lines a plain unclassified name gets), the stdout is exactly one row ` <spelled padded to 32> NO FAMILY`, and `--explain`'s header is ` <spelled>: NO FAMILY` with every later line indented; one run of all three plus a plain `Atlas` gives four rows with their labels in one column and one finding naming all three; a name on stdin (an ESC; stdin strips a line feed) is spelled too; and a control row, a run of five plain names, prints exactly as it did. Two more names pin `spelled` itself (rv1271's NIT 2; the finding row and the table row of each, 4 rows): `Atlas` plus a CR, which `spelled` writes `\r` (a gate that escaped only a line feed and an ESC prints it raw), and `At\las` plus a line feed, written `At\las\n` (a backslash prints as it is; `repr` would double it). Two more pin it against the rivals rv1271b found (its NIT 1; the RLO name in the finding row and the table row, the ZWJ name in the finding row only, 3 rows): `At`, U+202E, `las`, written `At\u202elas` (a bidirectional control no C0 or C1 escaper writes), and `At`, U+200D, `las`, which prints as it is (a format character an `isprintable` test would write). - **On a fork's contract (20 rows):** the shipped contract classifies none of the three names (#1202), so sites 3 to 9 print a name only when a fork's patterns take an ESC and a line feed. The rows read the shipped contract with its 12 character classes `[A-Za-z0-9]` widened (`loosened()` asserts the count), and ask: the listing row and the header of a classified name (3 + 3 rows), the claim note's derived referents (3), the stderr WARNING (2), `--explain`'s WARNING and OVERLAP (2 + 2), the role finding (3) and the broken-chain finding (2). A descendant name ends in its product, which the direct pin reads, so the control is in its stem there (inner line feed and ESC); the other rows ask all three names. ### Failing on the base The base is `09697e9c5`'s script (sha256 `fc5c9f81c953`), swapped into `n1267-mut` (detached at the round's head `76e99ec86`, so the new file and the updated rows are the branch's) and restored with a sha256 check (`9cc39a2eafb0`, the branch's script; `logs/swap-base.log`, `logs/swap-base.out`): - `tests/test_naming_gate_spelled.py`: **37 failed, 2 passed**. The two that pass are the plain-name control (it must: nothing about a plain name changed) and the ZWJ finding row, which passes on the base and on main by design (`spelled` leaves U+200D as it is, so their raw print is already the text it expects; the row kills the `isprintable` rival y4, see "The round after rv1271b's delta check"). The 37 fail because the base prints the raw bytes: the finding row ends its first line at the line feed (`assert ['FINDING naming-unclassified: Atlas', '', ...] == [...]`), the table row is `' Atlas\n ... NO FAMILY\n'` where `' Atlas\\n ... NO FAMILY\n'` is expected, the ESC rows carry the byte, `--explain`'s header is `' Atlas'` and the stderr WARNING and the broken-chain finding carry the raw name twice. The 4 rows of the first round fail the same way: the base prints the CR raw in the row and the finding, and splits the backslash name's row and finding at its line feed (`logs/new-names.log`). The 2 RLO rows fail because the base prints U+202E raw. - `tests/test_naming_policy_line_break.py`: the 6 updated rows fail (**6 failed** in this run; the file's other 71 rows passed when it was run whole with the first commit, and neither the file nor the base has changed), because the base prints `Atlas` where the spelled `Atlas\n` is now asserted. - **On main, what each row does:** the new file is **37 failed, 2 passed** at main `438cfad53` (fetched at 04:21Z on 2026-11-10, still without #1266, with main's `repo_shape.py` swapped in as well; `logs/swap-main.log`, `logs/swap-main.out`; main's two files are the same at `30272026e`, main when this body was written), the same 37 as on the base, and the same two pass. Rows for the two names without a trailing line feed fail as above. Every `ends-in-lf` row fails first on the exit code (`assert 0 == 1`): main classifies `Atlas` plus a line feed as `Atlas`, exit 0, with its row split in two. `tests/test_naming_policy_line_break.py` is **40 failed, 37 passed** on main (measured at `9729315f1` with the first commit; it is #1266's file and has not changed since), the number #1266's own body gives. The PR needs #1266's change, and has it: #1266 landed as `28be96557` and the PR was restacked onto main. Each applied alone to the branch's `scripts/validate-repository-naming.py` in `n1267-mut` (detached at the round's head `76e99ec86`), run against `tests/test_naming_gate_spelled.py` (39 rows) and the 6 updated rows of `tests/test_naming_policy_line_break.py` (45 tests). The counts are re-measured at this head: the round's three ids add to M1, M1w, M10, M11, X1, X2, X3, X4 and X8, and nothing else moves. Each is restored with a sha256 check (`restored ... sha256 ok` after each, and the script's bytes equal the branch's at the end, porcelain 0; `logs/mutants-core.out`): | Mutant | Rows failing | Killed by | |---|---|---| | M1: site 1 prints the raw name (`{name:<32}`) | 16 | the 6 table rows, the 4-row run, stdin, the 3 classified-listing rows, the stderr WARNING (2), the role finding (3) | | M1w: site 1 spells the name but pads by the RAW name's length (`32 - len(name)`) | 16 | the same 16: the escape is longer than the byte it writes, so every label stands 1 or 3 columns off (5 for the RLO name) | | M2: site 2 raw | 3 | the 3 `--explain` NO FAMILY rows | | M3: site 3 raw | 7 | the 3 classified-header rows, and 4 more that read the header line (2 claim rows, 2 `--explain` WARNING rows) | | M4: site 4 raw (the claim note's referents) | 3 | the 3 claim rows | | M5: site 5 raw (`--explain` WARNING) | 2 | the 2 `--explain` WARNING rows | | M6: site 6 raw (`--explain` OVERLAP) | 4 | the 2 OVERLAP rows and the claim rows whose OVERLAP line splits (inner line feed, trailing line feed) | | M7: site 7 raw (stderr WARNING) | 2 | the 2 stderr WARNING rows | | M7b: site 7 spells the name only, not the sentence | 2 | the same 2 (the sentence says the name again) | | M8: site 8 raw (role finding) | 3 | the 3 role-finding rows | | M9: site 9 raw (broken-chain finding) | 2 | the 2 broken-chain rows | | M9b: site 9 spells the name only | 2 | the same 2 | | M10: site 10 raw (`", ".join(unclassified)`) | 14 | the 6 finding rows (every name with a control: the ZWJ's prints as it is), the 4-row run, stdin, and #1266's 6 updated rows | | M11: `spelled` replaced by `repr` | 45 | all 39 rows of the new file, plain control included, and the 6 updated rows (the quotes and the doubled backslash are not the spelling) | | X1 (rv1271's): `spelled` is a local escaper of a line feed and an ESC only | 4 | the finding row and the table row of `ends-in-cr` (first round) and of `rlo` (this round: U+202E is neither) | | X3 (rv1271's): `spelled` is `repr(str(value))[1:-1]` | 3 | the finding row and the table row of `backslash` (first round), and the finding row of `zwj` (`repr` writes U+200D as an escape and `spelled` does not) | rv1271's other mutants are killed too, with the rows of the rounds: X2 (escape every non-ASCII character; the backslash rows and the ZWJ finding row kill it) 11, X4 (spell the whole `naming-unclassified` block, its line breaks too) 15, X5 (site 9 spells the reason and not the name) 2, X6 (site 7 spells the sentence and not the name) 2, X7 (the claim note spells its first referent only) 3, X8 (pad the raw name, then spell it) 16. X1 and X3 survived every row of the first commit (rv1271's NIT 2); the first round's 4 rows kill them, and the new ids fail them too (X1 4, X3 3, above). rv1271b's y1 to y5 survived every row of the first round; this round's 3 ids kill them (the table in "The round after rv1271b's delta check"). No survivor. Python 3.12.3 (CI runs 3.14; the rows assert lists and lines, nothing that depends on a `repr` or an `ast.dump`), through lane 5's `run10.sh` (gh stub first on PATH, bogus token, empty `GH_CONFIG_DIR`, blank git identity, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null`), git-filter-repo 2.47.0 (CI's pin; `git filter-repo --version` prints `a40bce548d2c`), at head `4b1653d8b`, dirty=0. The gate list is the 37 test files that name `validate-repository-naming` or pin its printed forms (`grep -l`), this PR's three, `tests/test_naming_policy.py`, and the hygiene five (`test_path_guard_hygiene`, `test_repo_hygiene`, `test_agents_md_codes`, `test_cli_reference`, `test_pinned_copy_text`): 3,567 tests in 28 runs, none of more than 100 tests beside another (one exception, below). | Run | git | Result | |---|---|---| | the gate list (28 runs) | 2.43.0 | **3,563 passed, 4 skipped, 0 failed** | | the gate list (28 runs) | 2.47.1 (`tools/git247/bin/git`, built from kernel.org's tarball) | **3,560 passed, 7 skipped, 0 failed** (3 more skips than the 2.43.0 leg: `test_adopt_check_throwaway_repos.py:1041`, below) | | `tests/test_naming_gate_spelled.py` alone, before the commit | 2.43.0 | 32 passed | | the naming files, `test_naming_policy`, the hygiene five and `test_chain_link_fold`, on the PREDICTED merge of current main (`51a9c5f10`) and the branch (`merge-tree` and `commit-tree`: an object, no ref) | 2.43.0 | **769 passed** in 92.43s | **The skips, by reason.** rv1271 measured them. The first gate's logs hid them because `run10.sh` passes `-rs` and the gate runs then passed `-rf`, and pytest keeps only the LAST `-r` option, so no reason was printed. On 2.43.0 the 4 skipped are `tests/test_shape_doctor.py:10516` x3 ("the PowerShell line is printed, and powershell.exe exists, only on a Windows host") and `tests/test_adopt_check_throwaway_repos.py:482` x1 ("needs a disk that ignores case: `git init` wrote no `core.ignorecase=true` in the work directory, so that disk keeps case; the rows above write the setting into the throwaway repository by hand instead"). On 2.47.1 the 7 are those 4 and `tests/test_adopt_check_throwaway_repos.py:1041` x3 ("this git's `git clone` takes `init.defaultBranch = a..b`, as 2.55's does: the split clones there"); 2.43.0's clone does not take it, so its rows run. I ran those two files again at the round's head with `-rs` alone, on both gits, and the same lines print (`logs/skips-243.log`, `logs/skips-2471.log`). **A slip in the load rule (first gate):** the 106-test run of the #1236 check below ran while the gate's slot A held a run of more than 100 tests; it passed. **The review round's runs.** Head `4fa9f78a6`, dirty=0, Python 3.12.3, git-filter-repo 2.47.0 (`a40bce548d2c`), through `run10.sh` with its `-rs` and no other `-r`, so a skip would name its reason. The files are the brief's ten: the new file, `test_naming_policy_line_break`, `test_naming_policy`, `test_chain_link_fold`, `test_legs_not_a_list` and the hygiene five (`test_path_guard_hygiene`, `test_repo_hygiene`, `test_agents_md_codes`, `test_cli_reference`, `test_pinned_copy_text`): 885 tests in 8 runs per git, none of more than 100 tests beside another. | Run | git | Result | |---|---|---| | the ten files (8 runs) | 2.43.0 (`/usr/bin/git`) | **885 passed, 0 skipped, 0 failed** | | the ten files (8 runs) | 2.47.1 (`tools/git247/bin/git`) | **885 passed, 0 skipped, 0 failed** | | `tests/test_naming_gate_spelled.py` alone, before the round's commit | 2.43.0 | 36 passed | Logs: `gate/gate-243-*.log`, `gate/gate-2471-*.log`, `gate/slotA.out`, `gate/slotB.out`. The round changes the script's docstring and the new test file only, so the first commit's 37-file gate above stands for the rest. **A slip in the load rule:** the resolved-#1236 check (Merges) ran its 154-test chunk while the skip re-run above held a 152-test file; both passed. **Not run:** the full suite, a real Windows host and macOS. `git merge-tree --write-tree --name-only <other> c56753b` (git 2.43.0) at 2026-11-10T05:01:53Z, against main (fetched fresh at 05:01:28Z and again at 05:01:53Z, before the push: `28be96557` both times; a third fetch at 05:04:12Z, after it: still `28be96557`) and every open PR that touches one of this branch's files (32 open when listed; `live/open-prs.json`, `logs/merge-trees.txt`, `probes/merge-trees.sh`): | Against | Head | Result | |---|---|---| | main | `28be96557` (#1266's squash, main's tip) | **clean**, exit 0, tree `723bb5ad`, the head's own tree: main is an ancestor of the head | | #1284 (lane 5's #1279; `scripts/validate-repository-naming.py`) | `0270d48d7` | clean, tree `2eeb4848` | | #1274 (`scripts/repo_shape.py`) | `136b38d12` | clean, tree `70f33a48` | | #1249 (`scripts/repo_shape.py`) | `3146c3ca5` | clean, tree `e4a8454a` | | #1171 (`scripts/repo_shape.py`) | `ce1dd661f` | clean, tree `52ca1d68` | Of the open PRs only #1284 touches one of the three files this branch changes against main. #1274, #1249 and #1171 touch `scripts/repo_shape.py`, which this branch carried while it was stacked on #1266 and does not carry now; they stay in the table because the earlier Merges listed them. #1266 landed: its head `09697e9c5` is an ancestor of this branch and is no longer a row. **The conflict this body has named all along is resolved in the head, and main no longer conflicts.** #1236 landed on main as `81cbe9c82` (lane 3's #1217 display-width pad) while this PR waited for #1266. The merge of #1266's squash met it at `_print_classification`'s `print` line and nowhere else, and the line was resolved as this body said it would be: `print(f" {_padded(_printed(spelled(name)), 32)} {label}{also}")`, with main's comment kept (see "The restack after #1266's squash"). - **Sites 3 to 9 print a control only under a fork's contract.** The shipped patterns take `[A-Za-z0-9]` and hyphens, so on the shipped data a name with a control is never classified and only sites 1, 2 and 10 print it. The other sites are spelled for the same reason the first three are (one rule: a repository name the gate prints is spelled), and their rows read a fork's contract. No shipped project sees them change. - **Chain links and `--pins` values are printed as given** (the module docstring's standing rule; a manifest's are checked printable, a command line's are the caller's words). So `--explain`'s `CHAIN` line prints a link raw, while the four sentences that quote it (sites 5, 6, 7, 9) are spelled whole and so escape a control in a link too. Not changed here. - **A manifest leg's `role:` prints raw** in `--explain`'s `[ADMITS ...; <role> is declared here and is not admitted]` note (`--role` is a closed choice; a manifest's value is not). It is a role, not a repository name, so it is outside #1267. Found, not fixed. - **A name read from stdin is stripped**, so a trailing line feed reaches the gate only from argv or a manifest; the stdin row asks for an ESC. - A project's own copy of `validate-repository-naming.py` reaches this through `update-shape.py`; it needs `spelled` in its `scripts/repo_shape.py`, which every kept library has. - `shape-doctor.py` and the setup, scaffold and adopt tools run the gate and quote its lines; they print what it prints, so a name with a control is spelled in their rows too. Their tests are in the gate list above. Review: rv1271, lane 5's independent opus reviewer, which wrote none of #1271: READY at `4b1653d8` (issuecomment-6726218829), with no MUST or SHOULD; its NITs 1-5 are fixed in `4fa9f78a`. Then rv1271b, lane 5's independent sonnet reviewer, which wrote none of it: READY at `4fa9f78a` (issuecomment-6726914536); its NITs 1-2 are taken in `76e99ec8`. Then rv1271c, lane 5's independent sonnet reviewer, which wrote none of it: READY at `76e99ec8`, and READY at the restack `2d9250c5` onto main after #1266's squash `28be9655` (issuecomment-6759403546), with no MUST or SHOULD. Its NITs 1-2 are taken in `c56753ba`, comments only: one file, four `#` lines, the syntax tree equal (checked by the coordinator; n1267e, W22). `c56753ba` is H0 of this landing once `tests` is green on it. CI (Brett Heap's ruling 27): H0 is the head c56753b itself, which passed tests, tests-git-bash and SonarCloud; main has touched none of its files since its base 28be965; and the local gate passed on its predicted squash tree e344d88 over main 3bf35b2: the naming_gate_spelled, naming_policy_line_break, adopt_check_throwaway_repos, path_guard_hygiene, pinned_copy_text, no_auto_maintenance, repo_hygiene, agents_md_codes, cli_reference sets, 774 passed, 4 skipped. Landed on Brett Heap's word of 2026-10-23T13:10:26Z, relayed to every lane by lane 3 (#473 issuecomment-6365697123): "merge v1.2.1 PRs once reviewed and green". Closes #1267 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ame the file as `shown_path` does, and validate-pins.py, family.py and shape-doctor.py read either spelling (#1168) (#1274) `repo_shape.load_yaml` names the file it refuses as `shown_path` names a path, in all three of its refusals (`yaml-unreadable` twice, `yaml-unparsable`), and so does `policy-unreadable` on the next line of `NamingPolicy.load`. A U+202E, an ESC or a line feed in a typed `--plan`, `--path-policy`, `--policy`, `--project` or `--root` path no longer reaches the terminal raw from any of the six tools that hand `load_yaml` such a path (eight runs: `adopt-project.py` reads two flags, `validate-repository-naming.py` two). A printable path prints byte for byte as on main. Every reader that finds the path at the start of a refusal's detail by its text keeps working, beside a `repo_shape.py` from before this change or after it. Probed at `51a9c5f10` with a stub `gh` first on PATH, `GH_TOKEN=bogus`, an empty `GH_CONFIG_DIR`, `GIT_SSH_COMMAND=false` and an empty global git config: a folder `pl<U+202E>an` holding a file that is not this reader's YAML (`a: 1` then `: b`). Each run exits 2 with one line, the U+202E in it raw: ``` REFUSED yaml-unparsable: <D>/pl<U+202E>an/<file>: line 2: empty keys are not supported ``` - `adopt-project.py check --plan` (and `execute --plan`, the same `Plan.load`); - `adopt-project.py plan --path-policy`; - `validate-repository-naming.py --policy` and `--project`; - `bump-leg.py --root` (`<root>/project.yaml`); - `family.py bump --family-root` (`<root>/family.yaml`); - `update-shape.py check --root` (`<root>/contracts/shape-pin.yaml`); - `validate-manifest.py --root`, as a root carries it. On this branch the same eight runs say `'<D>/pl\u202ean/<file>'`. The rows below hold all eight, with U+202E, an ESC and a line feed in turn, and a printable name. The readers that find the path in the detail by its text, on main: `validate-pins.py`'s `_load` tests `exc.detail.startswith(f"{path}: ")`; `family.py`'s `_read_member_project` swaps `str(manifest_path)` for `<repo> @ <commit>:project.yaml`; `repo_shape.link_declarations` swaps `str(path)` for `shown_path(path)`. Beyond the issue's list, a grep of every shipped `.py` for a detail read by its prefix found two more, both in `shape-doctor.py`: `naming_script_refusal` (`detail.startswith(f"{shape / NAMING_COPY}: ")`) and the `manifest-kinds` row (`exc.detail.removeprefix(f"{path}: ")`). Measured with only `repo_shape.py` changed: `validate-pins.py` named a root that is not printable by its whole spelled path in place of `project.yaml`; `family.py` named the deleted clone in place of the member when `TMPDIR` is not printable (probed with an ESC in the clone's folder); the doctor no longer knew its own policy's refusal, and its `manifest-kinds` row quoted the whole path again. Each is held below. - `scripts/repo_shape.py`, `load_yaml`: `named = shown_path(path)`, used at the three sites; `NamingPolicy.load`'s `policy-unreadable`: `shown_path(path)`. Same module, no new import. The words after the path are unchanged. - `templates/assembly-root/scripts/validate-pins.py`, `_load`: the prefix is looked for raw and as the gate's own `_shown` spells it (`_shown` is written in the gate, not imported, under the skew rule), and either is named relative to the root. - `scripts/family.py`, `_read_member_project`: the swap to `shown` takes the spelled path, then the raw one. - `shape-doctor.py`: `naming_script_refusal` asks both prefixes (`policy-wrong-kind` still names the policy raw); the `manifest-kinds` row takes the path off with a new `less_the_path`, in either spelling. - `repo_shape.link_declarations` is unchanged: its `replace(str(path), named)` finds nothing to swap in a spelled detail and the `why` reads as it did (a row says so). - `tests/test_load_yaml_refusals.py`: the rows below, added to the file that already holds `load_yaml`'s refusals (#192), not a new file. No refusal code, remediation or word after the path changes, and a printable path is named as before. `README.md`, `docs/cli.md`, the handbook and `AGENTS.md` hold none of `cannot be read (`, `not UTF-8 at byte`, `yaml-unparsable`, `yaml-unreadable` or `policy-unreadable`; the release notes of v1.0.0, v1.1.1 and v1.2.0 name the codes as the record of those releases, with printable paths, and stay as they are; the 46 files under `tests/` that hold them are all in the gates below. **`scripts/repo_shape.py` and `templates/assembly-root/scripts/validate-pins.py` are shape copies.** Every assembly root carries both, and every family holder carries `repo_shape.py`, so `update-shape.py check` shows each as `upstream-changed` in every project until `apply` re-copies it and re-pins, as #827 and #919 did. `family.py` and `shape-doctor.py` run from a checkout of the standard and are not copied. A root re-copies its pinned files one row at a time (`update-shape.py apply --accept-local` keeps a copy), so `validate-pins.py` and `repo_shape.py` may be of different ages. Rows, each a real run of the root's own gate over a root under a folder holding the character: | gate | library | the refusal names | row | |---|---|---|---| | this branch | this branch | `project.yaml` | `test_the_gate_names_the_file_from_the_root_beside_this_library` | | this branch | before #1168 (`51a9c5f10`, raw) | `project.yaml` | `test_the_gate_names_the_file_from_the_root_beside_an_older_library` | | before #1168 | this branch | the whole path, spelled, nothing raw | `test_an_older_gate_beside_this_library_names_the_whole_path_spelled` | | before #1168 | before #1168 | `project.yaml` | main | The third order is the one no change here can reach: that gate's own code asks the raw prefix alone. It still prints nothing raw, and it names `project.yaml` again once the gate is re-copied. A printable root is named `project.yaml` in all four. The two older copies are read with `git show 51a9c5f:...`, a skip where a checkout lacks that history (CI checks out with `fetch-depth: 0`), so `test_the_gates_load_takes_either_prefix` also holds both halves in process with no history. `family.py` and the doctor always import their own checkout's `repo_shape.py`, so they cannot meet another age; they read both spellings all the same, so no reader of the prefix depends on which library it meets, and their rows run beside each. `adopt-project.py` spells the paths it prints itself with its own `_shown` (backticks, #1115, and #1152's PR #1177 for `--plan`), and `load_yaml` now spells with `shown_path` (`repr`, quotes). Measured, for one plan path: | path holds | `adopt-project.py` `_shown` | `shown_path` | |---|---|---| | U+202E | `` `/d/pl\u202ean/plan.yaml` `` | `'/d/pl\u202ean/plan.yaml'` | | ESC | `` `/d/x\x1b[31m/plan.yaml` `` | `'/d/x\x1b[31m/plan.yaml'` | | a line feed | `` `/d/a\nb/plan.yaml` `` | `'/d/a\nb/plan.yaml'` | | a byte that is not UTF-8 | `` `/d/caf\udce9/plan.yaml` `` | `'/d/caf\udce9/plan.yaml'` | | a quote and an ESC | `` `/d/it's\x1b/plan.yaml` `` | `"/d/it's\x1b/plan.yaml"` | | a trailing space | `` `/d/trail /plan.yaml ` `` | `/d/trail /plan.yaml ` | | nothing unusual | `/d/plain/plan.yaml` | `/d/plain/plan.yaml` | **Decision: `shown_path` in `load_yaml`, and the two styles stand.** The escapes are the same; only the delimiters differ, and `_shown`'s extra cases (a trailing space, backticks at both ends) are printable, so neither is a hole. A run never shows both for the plan: `check` and `execute` over an unparsable plan each print exactly one line, the `load_yaml` refusal, and stop (measured). `shown_path` is what the other five tools print for the same refusal, and what the three pinned validators' own `_shown` print (`test_the_pinned_scripts_spell_a_path_as_the_library_does` holds them equal). One spelling for `adopt-project.py` too would mean a spelling parameter on a function in a shape copy, or re-raising at `Plan.load` and `PathPolicy.load`, in a file #1177 is changing next to those lines and 20 other open PRs touch, for a difference of quote marks. 112 rows in `tests/test_load_yaml_refusals.py`: 101 new, and the 11 that were there (#192). Run on main's code: this branch's rows in the detached tree at `51a9c5f10`, with main's version of each changed file swapped in, each put back with a sha256 check (measured on the 109 rows at `e39b5d7e3`, and again on all 112 at `136b38d12`: the table is the second run, and the three rows the review round added are the only change). | rows | on main's 4 files | main's `repo_shape.py` only | main's `validate-pins.py` only | main's `family.py` only | main's `shape-doctor.py` only | |---|---|---|---|---|---| | each refusal, U+202E / ESC / line feed x absent / not UTF-8 / unparsable (9) | 9 fail | 9 fail | pass | pass | pass | | `policy-unreadable`, 3 names (3) | 3 fail | 3 fail | pass | pass | pass | | each of the 8 tools x 3 names (24) | 24 fail | 24 fail | pass | pass | pass | | older gate beside this library, 3 names (3) | 3 fail | 3 fail | pass | pass | pass | | gate beside this library, 3 names, real run (3) and in process (3) | pass | pass | 6 fail | pass | pass | | family member manifest beside this library, 3 names (3) | pass | pass | pass | 3 fail | pass | | doctor's own policy in the naming script's output, 3 names x 2 refusals (6) | 2 fail (line feed) | 2 fail (line feed) | pass | pass | 6 fail | | doctor's `manifest-kinds` row beside this library, 3 names (3) | pass | pass | pass | pass | 3 fail | | a path typed relative, `adopt-project.py check --plan`, 3 names (3) | 3 fail | 3 fail | pass | pass | pass | | total failing of 112 | 44 | 44 | 6 | 3 | 9 | 60 of the 101 new rows fail on main's code: the 44 above with main's four files, and 16 more that read the path back (the gate 6, `family.py` 3, the doctor 4 + 3) with main's reader beside this branch's library, the skew this change would otherwise open. The other 41 new rows pass in every column, as do the 11 that were there. They are the controls the brief asks for: a printable path in each refusal (3), in `policy-unreadable` (1) and through each tool (8), which prints byte for byte as on main; the four readers beside a library older than #1168 (gate real run 4, gate in process 4, `family.py` 4, `manifest-kinds` 4) and beside this one for a printable path (6); `link_declarations` (4), which reads as it did; and the doctor finding `policy-wrong-kind` raw (3). Mutants M5, M8, M10, M12, M13 and M14 each fail some of them; the `link_declarations` rows guard only that its `why` did not move, which nothing in this change can move (M16). The doctor's two line-feed rows fail on main's four files too: a raw line feed splits the naming script's line before the doctor reads it. Each applied alone in the detached tree, the 109 rows of `e39b5d7e3` run, the file put back and its sha256 checked against the branch's (all 17 matched). 15 killed, 2 survived. The review round adds M18 and M19, both killed by its three new rows (below). | mutant | killed by | |---|---| | M1 `cannot be read` back to `{path}` | the in-process `absent` rows (3) | | M2 `not UTF-8 at byte` back to `{path}` | the in-process `not-utf-8` rows (3) | | M3 `yaml-unparsable` back to `{path}` | 31 rows: the in-process `unparsable` rows (3), the 24 tool rows that are not printable, the older gate's (3) and the doctor's line-feed `load-yaml` row | | M4 `policy-unreadable` back to `{path}` | the three `policy-unreadable` rows, and the doctor's line-feed row | | M5 `validate-pins.py`: the raw half of the prefix test dropped | gate beside an older library (3), `_load` with an older library (3) | | M6 `validate-pins.py`: the spelled half dropped | gate beside this library (3), `_load` with this library (3) | | M7 `family.py`: the spelled swap dropped | family with this library (3) | | M8 `family.py`: the raw swap dropped | family with an older library (3) | | M9 doctor `naming_script_refusal`: the spelled prefix dropped | its `load-yaml` and `not-a-mapping` rows that are not printable (6) | | M10 doctor `naming_script_refusal`: the raw prefix dropped | `policy-wrong-kind` named raw, U+202E and ESC (2) | | M11 `less_the_path`: the spelled prefix dropped | `manifest-kinds` with this library (3) | | M12 `less_the_path`: the raw prefix dropped | `manifest-kinds` with an older library (3) | | M13 `load_yaml`'s `named` always `repr`, a printable path too | 24 rows: the printable rows of each refusal (3) and each tool (8), the four #192 rows that assert `str(refusal).startswith(f"REFUSED yaml-unreadable: {path}")`, and printable rows of the readers | | M14 `policy-unreadable` always `repr` | its printable row and the doctor's printable `not-a-mapping` row (2) | | M15 `validate-pins.py`'s spelled half as `repr(str(path))` in place of `_shown(str(path))` | **survived, equivalent**: for a path that is not printable the two are the same text, and a printable one is caught by the raw half first | | M16 `link_declarations`' `replace(str(path), named)` removed | **survived, equivalent**: the detail already holds `shown_path`'s spelling, so the swap finds nothing to swap; the row `test_a_link_manifest_is_named_in_why_as_it_was` is there to say the output did not move | | M17 `less_the_path` returns the detail whole | `manifest-kinds`, both libraries (6) and its printable rows (2) | | M18 `load_yaml`'s `named` from `Path(path).absolute()` (rv1274's X5, which survived the 109 rows) | the relative-path rows (3), and no other of the 112 | | M19 the same from `Path(path).resolve()` | the same 3 | Every run through the lane's runner: a stub `gh` first on PATH (and the suite's own `gh` guard ahead of it), `GH_TOKEN=bogus`, an empty `GH_CONFIG_DIR`, `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL=/dev/null`, a blank git identity, git-filter-repo 2.47.0 (CI's pin; `--version` says `a40bce548d2c`) on PATH, Python 3.12.3 (CI runs 3.14; no row asserts text that depends on the version). The gate list, 53 files, 4591 tests: the new rows; the hygiene five (`test_path_guard_hygiene`, `test_repo_hygiene`, `test_agents_md_codes`, `test_cli_reference`, `test_pinned_copy_text`) and `test_no_auto_maintenance`; the 46 files under `tests/` that hold `cannot be read (`, `not UTF-8 at byte`, `yaml-unparsable` or `yaml-unreadable`; every `validate-pins` file (`test_pin_validator`, `test_validate_pins_lockstep_lines`, `test_validate_pins_without_git` beside those the grep found); and for the doctor and `family.py` readers, `test_shape_doctor`, `test_doctor_validator_verdicts`, `test_naming_policy`, `test_family_py_unreadable` and `test_validate_family_unreadable`. One run of more than 100 tests at a time. | run | git | head | result | |---|---|---|---| | the gate list | 2.43.0 | `0e5f95db5` | 4579 passed, 12 skipped, 0 failed (40:38) | | the gate list | 2.47.1 | `e39b5d7e3` | 4586 passed, 5 skipped, 0 failed (46:43) | | the new rows, the hygiene five, `test_no_auto_maintenance` | 2.43.0 | `e39b5d7e3` | 546 passed, 2 skipped, 0 failed | | `tests/test_load_yaml_refusals.py` | 2.43.0 | the change before the commit | 109 passed | | the same, on main's code (5 swaps) and under 17 mutants | 2.43.0 | `51a9c5f10` + this change | as in the tables above | | `tests/test_load_yaml_refusals.py` (112), the hygiene five and `test_no_auto_maintenance` (439), 14 runs of at most 100 | 2.43.0 | `136b38d12` | 549 passed, 2 skipped, 0 failed | | the same | 2.47.1 | `136b38d12` | 549 passed, 2 skipped, 0 failed | `e39b5d7e3` differs from `0e5f95db5` by one comment in `tests/test_load_yaml_refusals.py` (the commit was amended before it was pushed), so the 2.43.0 gate list stands for it, with the small run above on the final head. The 12 skips on 2.43.0: the reftable backend needs git 2.45 (7), the session's `GIT_CONFIG_GLOBAL` (2), a PowerShell line printed only on Windows (3). On 2.47.1, 5: the last two kinds. `136b38d12` (the review round) changes `tests/test_load_yaml_refusals.py` alone: three rows added and one row's setup moved out of a `pytest.raises` block. The gate list at `136b38d12` is 4594 tests; its other 52 files are not run again, and the new file, the hygiene five and `test_no_auto_maintenance` are, on both gits (the two rows added to the table above). Their 2 skips, on both gits: `test_no_auto_maintenance.py:222`, the session began with `GIT_CONFIG_GLOBAL` set. `git merge-tree --write-tree` (git 2.47.1) of the head `136b38d12` with main and with the head of each open PR on a file this changes, main fetched and heads read with `gh pr list` at about 16:20Z on 2026-11-09. The table of 2026-11-08, at `e39b5d7e3`, differs in three rows: #1172 was open, #1269 was at `c792615f4`, and #1164 (at `74096eb47`) conflicted in `tests/test_path_guard_hygiene.py`, which this does not touch, and is clean at its new head. | with | head | result | |---|---|---| | main | `ebb87168a` | clean. Main moved since `51a9c5f10`: in `scripts/family.py` (#1117's remedies, not `_read_member_project`) and, since the last table, in `shape-doctor.py` (the `members` row), `bootstrap.py`, `validate-family.py`, `siblings.py`, `adopt-project.py` and `tests/conftest.py`; a grep of its production changes since `8e6f53268` finds no new reader of a `load_yaml` detail. The predicted merge, checked out alone, passes the 112 rows, `test_pinned_copy_text`, `test_family_py_unreadable`, `test_validate_family_unreadable`, main's touched `family.py` tests (`test_family_add_member_id`, `test_family_bump_to_checks`, `test_remove_add_remedies_family_root`) and `test_adopt_plan_source_branch_shown`: 411 passed on git 2.43.0 | | #1266 (`scripts/repo_shape.py`) | `09697e9c5` | clean | | #1171 (`scripts/repo_shape.py`, `adopt-project.py`) | `8162b874e` | clean; it leaves `shown_path` as it is | | #1249 (`scripts/repo_shape.py`) | `3146c3ca5` | clean | | #1177 (`--plan`'s `_shown`) | `5208e874e` | clean | | #1263, #1248, #1239 (`validate-pins.py`; #1248 also `shape-doctor.py`) | `9ef8f0ab5`, `1b747f7ab`, `fff421456` | clean | | #1269 (`shape-doctor.py`) | `52e5c1883` | clean | | #1201, #1164 (`scripts/family.py`) | `24b6a0af6`, `16ff93917` | clean | | #1264 (`scripts/family.py`) | `43d2e8b26` | `docs/handbook.html` conflicts, which this does not touch; against main alone it conflicts there and in five more files (`scripts/family.py` and four tests), the same six with this change merged in, and the five conflict blocks of `family.py` are identical with and without it | #1172 was open in the last table and has merged since: its change is in the main row. Two independent reviews of `e39b5d7e3` (rv1274, then rv1274b, which continued it after a reboot) found no MUST and called the PR READY. What each point of theirs came to, in `136b38d12` (tests only; no production file changed): - **SHOULD, the refusals #1168 names and this PR leaves raw:** filed as #1279. It lists eight "unreadable" and "not a mapping" refusals that still name the path as typed, measured at `e39b5d7e3` with their sites, and two sites not probed; the Limits below name the same family. Nothing in this change touches those lines. - **NIT 1, the dead raw halves:** kept. `family.py` and `shape-doctor.py` import their own checkout's `repo_shape.py`, so the raw swap in `_read_member_project` and the raw prefix in `less_the_path` run only when a row swaps in an older library in process. They are harmless, they make each reader independent of which library it meets (the version mix above), and the doctor's raw prefix in `naming_script_refusal` is live, since `policy-wrong-kind` still names the policy raw. - **NIT 2, no row typed a relative path:** done. rv1274's mutant X5 (`load_yaml` naming `Path(path).absolute()`) survived the 109 rows, since every tool row types a path under `tmp_path`, which is absolute. `test_a_path_typed_relative_is_named_as_typed_and_spelled` (3 rows: U+202E, ESC, a line feed) runs `adopt-project.py check --plan` with the path typed relative to the working directory and holds the refusal to the path as typed, relative and spelled. On main's `repo_shape.py` all 3 fail; X5 and its `.resolve()` twin each fail exactly those 3 of the 112 rows; every restore matched its sha256 (git 2.43.0). The tools handed a file keep the path as typed (`adopt-project.py check --plan` and `plan --path-policy`, `validate-repository-naming.py --policy` and `--project`, measured); the four handed a root (`bump-leg.py`, `family.py bump`, `update-shape.py`, `validate-manifest.py`) make it absolute before `load_yaml` sees it, so one tool of the first kind is the row. - **NIT 3, Sonar python:S5778:** done. `unparsable(root / "project.yaml")` ran inside the `pytest.raises` block of `test_the_gates_load_takes_either_prefix`, beside `gate._load`. The file is made first, so only `gate._load` runs inside the block; the row's 8 ids and their verdicts are the same. - **NIT 4, stale counts:** done. The open PRs touching `adopt-project.py` (20 others than #1177, as of 16:20Z), the merges table (main `ebb87168a`, every head read fresh), and the counts of rows and mutants above (112 rows, 101 new, 44 failing on main's four files; M18 and M19 added). They also checked, and asked nothing of this change: no reader of a `load_yaml` detail is left outside the five it changes, the gate's `_shown` equals `shown_path`, and neither shape copy's digest is stored anywhere in the tree. - **An older `validate-pins.py` beside this `repo_shape.py`** names a root that is not printable by its whole spelled path, not `project.yaml`, until the gate is re-copied (the version-mix table). Nothing raw. - **`policy-wrong-kind`**, the line after `policy-unreadable` in `NamingPolicy.load`, still names the policy raw: the brief kept the scope to the three `load_yaml` refusals and `policy-unreadable`. It is the same one-line change, and the doctor already reads either spelling. - **The "not a mapping" lines in other files** still name the path raw: `plan-unreadable` (`adopt-project.py`, which #1177 spells), `path-policy-unreadable` and `path-policy-wrong-kind` (`scripts/path_classify.py`), `bump-leg-manifest-unreadable` (`bump-leg.py`), `manifest-unreadable` (`validate-repository-naming.py`, which #1267 and #1236 are changing), `manifest-missing` and `manifest-unreadable` (`validate-manifest.py`), `update-pin-unreadable` (`update-shape.py`) and the doctor's own `policy-raised`. Follow-up candidates. - **Not probed:** the two `bootstrap.py`, `siblings.py`, `validate-family.py` and `shape_advisory.py`. By reading, each hands `load_yaml` `<root>/<one set name>`; where it does not swallow the refusal (two of `siblings.py`'s three do), it prints the detail whole (`bootstrap.py` through `spelled`, which leaves a spelled path as it is), so each now says the spelled path. - `link_declarations`' swap now finds nothing to swap. It is left in place: removing it is a further change to a shape copy for no change in output (mutant M16). Review: rv1274 and rv1274b, lane 5's independent opus reviewers, which wrote none of #1274 (rv1274 stopped for the reboot of 2026-11-08 with no MUST; rv1274b finished its review): READY at `e39b5d7e` with no MUST (issuecomment-6742338962); its SHOULD is the follow-up #1279, and its NITs 2-4 are fixed in `136b38d1`. Then rv1274c, lane 5's independent sonnet reviewer, which wrote none of it: READY at `136b38d1`, H0 of this landing, with no finding (issuecomment-6745586545). CI (Brett Heap's ruling 27 and his fast-refresh ruling of 2026-10-15T22:48:35Z): H0 136b38d passed tests, tests-git-bash and SonarCloud; the head 52a140c is a clean update-branch merge of main 150e401, with tests-git-bash and SonarCloud green; and the local gate passed on its predicted squash tree 2fb87fe over main 150e401: the load_yaml_refusals, adopt_check_throwaway_repos, adopt_e2e, adopt_execute_refusals, adopt_make_bootstrap_followups, adopt_make_reads_first, adopt_pins, adopt_plan_source_branch_shown, adopt_template_values, adopt_tracking_branch, bump_leg_branch_and_push_line, chain_link_fold, doctor_unreadable_paths, doctor_unreadable_pin, family, family_dry_run, path_guard_hygiene, pin_source_unreadable, pinned_root_git_unreadable, root_git_unreadable, stdout_encoding, update_shape_apply_lines_and_headers, update_shape_header_comments, update_shape_merged_away, update_shape_unreadable, validate_family_unreadable, validate_pins_spelled_and_named, pinned_copy_text, no_auto_maintenance, repo_hygiene, agents_md_codes, cli_reference sets, 2432 passed, 6 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 #1168 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r own premise or read their UTF-8 file as UTF-8, and the 13th, the assembly root bootstrap.py saying it could not create a branch it made, is left failing for its own issue (#1259) (#1278) This PR settles 12 of its 13 rows. The 13th row is a tool defect (kind c below), left failing on purpose, and it is now #1283, the issue of its own that #1259's first "Done when" box asks for, so nothing in #1259 is left open. ## Goal #1259 counts 8 rows of `tests/test_pinned_copy_text.py` and `tests/test_family.py`, and its comment 5 rows of `tests/test_bootstrap_spelling.py`, that fail under a Latin-1 locale and pass under UTF-8. None had a kind. Each is measured here, by test id, into #1214's kinds: - **a, cannot judge under a one-byte locale (11 rows):** each skips there on its own premise, which the skip reason states. - **b, the test reads wrongly (1 row):** corrected; it now runs and passes under Latin-1. - **c, a tool defect a Latin-1 user would meet (1 row):** not fixed, and the row is untouched. The evidence is under "The tool defect". Main is `42308f26b`, which holds #1258 (the helper `skip_where_the_locale_does_not_spell_it_as_utf_8` and its premise sentences). This branch is one commit on it. It changes three test files and no tool. ## The 13 rows | # | Test id | Kind | Measured under Latin-1 | Change | |---|---|---|---|---| | 1 | `test_pinned_copy_text.py::test_the_variable_the_warning_offers_reads_the_later_link` | a | Exit 0 and no WARNING, as the row asserts. Stdout reads `openXdox \u2192 openYdox \u2192 openInk`: `scaffold-project.py` calls `escape_what_stdout_cannot_encode()` (#214) at the start of `main`, so the arrow is printed escaped by design. | `skip_where_the_locale_does_not_spell_it_as_utf_8("\u2192", PRINTED_AS_ITSELF)`, after the exit and WARNING asserts | | 2, 3 | `test_pinned_copy_text.py::test_an_unused_pin_source_is_named_spelled[esc]`, `[forged-line]` | a | Exit 0 and no ESC, as asserted. The note reads `not used \u2014 each declared pin ...`. The root's `validate-pins.py` makes a `strict` or `surrogateescape` stdout `backslashreplace` in `_emit_report` (#295), the reconfigure `escape_unencodable_stdout` does, written there because that file imports nothing but `repo_shape`. | the same guard on `"\u2014"`, after the ESC assert | | 4 | `test_pinned_copy_text.py::test_a_replaced_pin_source_and_its_replacement_are_spelled` | a | The same: both notes read `not used \u2014 the later ...`. | the same | | 5 | `test_pinned_copy_text.py::test_a_key_read_as_a_path_is_spelled` | a | The same. | the same | | 6 | `test_pinned_copy_text.py::test_a_printable_pin_source_is_named_as_typed` | a | The same. | the same, after the exit assert | | 7 | `test_family.py::test_init_writes_the_holders_agent_files` | **b** | `init` writes the holder's `AGENTS.md` as UTF-8 under Latin-1 too: its first line holds `e2 80 94` for U+2014. The row read it with `read_text()`, in the locale's codec, so U+2014 came back as three characters. | its four `read_text()` calls take `encoding="utf-8"` | | 8 | `test_family.py::test_commit_one_refuses_a_trailer_that_is_no_text_before_it_stages` | a | `os.fsdecode(b"Co-Authored-By: Jos\xe9")` is `...Jos\xe9` (U+00E9), and `_commit_one` commits the trailer as `Co-Authored-By: Jos\xc3\xa9`, the text a Latin-1 terminal typed. Under UTF-8 the same bytes read as `...Jos\udce9`, and `_commit_one` refuses `trailer-not-utf8` with `a.txt` still untracked. The tool is right in both. | `skip_where_the_locale_does_not_spell_it_as_utf_8("Co-Authored-By: Jos\udce9", A_BYTE_READ_AS_A_SURROGATE)`, before the `pytest.raises` | | 9 | `test_bootstrap_spelling.py::test_a_register_and_its_path_are_spelled_when_it_cannot_be_read` | a | The TEST raises `UnicodeEncodeError` on U+2028 in `os.mkdir`, before any tool runs. | `skip_where_the_environment_cannot_carry("sp\u2028ec")` | | 10 | `test_bootstrap_spelling.py::test_a_roots_own_directory_name_is_spelled` | a | The test raises in `os.rename` (`shutil.move`). | `skip_where_the_environment_cannot_carry(renamed.name)` | | 11 | `test_bootstrap_spelling.py::test_a_family_roots_own_directory_name_is_spelled` | a | The same. | the same | | 12 | `test_bootstrap_spelling.py::test_a_members_row_and_the_make_target_are_spelled` | a | The test raises in `open` (`write_bytes`) of `ta\u2028rget.py`. | `skip_where_the_environment_cannot_carry(target)` | | 13 | `test_bootstrap_spelling.py::test_a_branch_name_is_spelled_in_every_line_that_names_it` | **c** | The assembly root's `bootstrap.py` makes the branch and then says it could not. See "The tool defect". | none | **Why rows 9 to 12 take `skip_where_the_environment_cannot_carry`.** The four `UnicodeEncodeError`s that #1259's comment reads are the test's own: `os.mkdir`, `os.rename` and `open` of a name holding U+2028, which Latin-1 cannot encode. The docstring of #1258's helper gives such a row to that guard ("A name the TEST cannot make or pass at all is `skip_where_the_environment_cannot_carry`'s"), as #1258 did for its 18 "a1" rows. Its reason names the encoding and the name, for example `this system's file name encoding (iso8859-1) cannot spell 'At\u2028las'`. **No tool traceback hides behind them.** I ran both roots' `bootstrap.py` under Latin-1, with the row's `PYTHONIOENCODING=utf-8:strict`, on the manifests those rows had written before they raised: the leg path `"sp\u2028ec"`, the member path `"members/Ir\u2028s"` and the project `"Bo\u2028x"`. Neither printed a traceback. The assembly root printed `[spec] sp\u2028ec: NOT INITIALIZED ...` and `bootstrap ok`, exit 0. The family root spelled both members and ended at its own `family bootstrap FAILED` for the two members whose `make` the probe ran, exit 1. **The guards ask only of the text their premise is about,** just before the first line that needs it, as #1258's do. The asserts before each guard still judge under Latin-1 (exit code, no ESC, no WARNING). Under UTF-8 no guard skips. Every skip reason states its premise, for example `this locale's encoding (iso8859-1) cannot spell '\u2014': the row reads this character as itself in what the tool prints, and a stdout in this encoding writes it as an escape (#214)`. ## The tool defect (row 13, kind c): not fixed here **This defect is #1283.** Lane 4 filed it from the evidence below, as #1259's first "Done when" box asks. This PR changes no tool, and row 13 stays failing and untouched until #1283 is mended. **What a Latin-1 user meets.** Take a project whose `project.yaml` says `tracking_branch: "tb\udcffx"`, the spelling `bootstrap.py` takes for a branch holding the byte 0xFF (#715). Under Latin-1, `make bootstrap` makes that branch in each leg, with HEAD on it at the pin, then prints: ``` [spec] spec: could not create branch 'tb\udcffx' at the pin f6d8ff445a2d; leaving detached `git checkout -b` exited 0, and HEAD is not on the branch at the pin nothing else is tried; the recorded pin is authoritative. Deal with what git said and run bootstrap again. ``` Every later run prints `branch tb\udcffx is at the pin f6d8ff445a2d, and git refused to check it out:` with the same two lines, and exits 0. Both claims are false. **Measured** in the tree the failed Latin-1 run kept, before and after a second run: - `git symbolic-ref HEAD` in `spec` and in `code` gives `refs/heads/tb\377x`; - `git rev-parse HEAD` gives the pin, `f6d8ff44...` and `ce229835...`, which equal `git rev-parse HEAD:spec HEAD:code` in the root. Under UTF-8 and ASCII the same manifest gives `branch tb\udcffx created at <pin>` and, on the next run, `on tb\udcffx at <pin> (branch tip == pin)`. The row passes in both. **The code at fault** (`templates/assembly-root/scripts/bootstrap.py`, at main `42308f26b`; on `2fde6c3d0` the same lines are :841, :857, :922, :1505 and :1755): - `_head_of` (:782) returns HEAD's ref as `os.fsdecode(ref.rstrip(b"\r\n"))` (:798). Its docstring says such a name "reads back as the `refs/heads/<branch>` built from the same name". That holds only where `os.fsdecode(os.fsencode(name)) == name`. - Under Latin-1, `os.fsencode("tb\udcffx")` is `b"tb\xffx"` (surrogateescape), which is what git is handed. `os.fsdecode(b"tb\xffx")` is `"tb\xffx"` (U+00FF), not `"tb\udcffx"`. - So the text comparisons of `(pin, f"refs/heads/{branch}")` with `_head_of(sub)` fail with HEAD on the branch: - the creation step, `if _head_of(sub) != (pin, f"refs/heads/{branch}")` (:1696), which prints `could not create branch` (:1698); - `_check_out`, `if _head_of(sub) == (pin, f"refs/heads/{branch}")` (:863), which returns "`git checkout` exited 0, and HEAD is not on the branch at the pin" (:866), and its caller prints "git refused to check it out" (:1446). ## Runs The commands, the environment and the logs are W1259's. Pytest is `/usr/bin/python3 -m pytest -p no:cacheprovider` on Python 3.12.3. The environment for every run: - a stub `gh` first on PATH, `GH_TOKEN=bogus`, an empty `GH_CONFIG_DIR`; - `GIT_CONFIG_GLOBAL` an empty file, `GIT_CONFIG_NOSYSTEM=1`, the test identity, `EMAIL` set; - `GIT_ALLOW_PROTOCOL`, `GIT_SSH_COMMAND` and `LANES_*` unset; - git-filter-repo 2.47.0 (`a40bce548d2c`, pip launcher) first on PATH. The locales: - UTF-8 is `LC_ALL=C.UTF-8`. - Latin-1 is built with `localedef -c` as #1153's `test_adopt_one_byte_locale.py` builds one, then `LOCPATH`, `LC_ALL=en_US.ISO-8859-1`, `PYTHONUTF8=0`. Python reports `iso8859-1`. - ASCII is `LC_ALL=C PYTHONUTF8=0 PYTHONCOERCECLOCALE=0`. **The gate: 22 test files, on main `42308f26b` and on this head.** They are: - the three files of the 13 rows; - the other 14 test files #1258 changed; - `tests/test_adopt_one_byte_locale.py`; - the 4 more test files that use a name this PR calls (`skip_where_the_locale_does_not_spell_it_as_utf_8`, `PRINTED_AS_ITSELF`, `A_BYTE_READ_AS_A_SURROGATE`, `skip_where_the_environment_cannot_carry`): `test_adopt_git_reads.py`, `test_non_utf8_git_failures.py`, `test_non_utf8_git_reads.py`, `test_non_utf8_oserror_sites.py`. The 71 other test files that import from one of the three changed files were collected in each locale, on main and on the head. Each run collects 3782 tests with no error, and the per-file counts are identical. | Run | main `42308f26b` | this head | |---|---|---| | 22 files, Latin-1 | 35 failed, 1144 passed, 87 skipped | 23 failed, 1145 passed, 98 skipped | | 22 files, UTF-8 | 1265 passed, 1 skipped | 1265 passed, 1 skipped | | 22 files, ASCII | 52 failed, 1120 passed, 94 skipped | 41 failed, 1121 passed, 104 skipped | | the three files, Latin-1 | 13 failed, 394 passed | 1 failed (row 13), 395 passed, 11 skipped | | the three files, UTF-8 | 407 passed | 407 passed | | the three files, ASCII | 27 failed, 380 passed | 16 failed, 381 passed, 10 skipped | **By test id, from main to the head:** - **Latin-1:** 12 rows change, and nothing else: rows 1 to 6 and 8 to 12 go from failed to skipped, and row 7 from failed to passed. No row goes from passed to failed or to skipped. Each of the head's 23 failures fails on main too: row 13, and 22 rows in other files of the gate, which are not among #1259's 13 (see "Left"). - **UTF-8:** nothing changes. The one skip is `test_stdout_encoding.py`'s Windows default-stdout row, on both. - **ASCII:** 11 rows change, and nothing else: 10 go from failed to skipped and row 7 from failed to passed. Rows 8 and 13 pass under ASCII on main and still do. No row goes from passed to failed or to skipped. **#1259's "Done when", on a scratch merge.** The merges are main `42308f26b` with #1209's head `13a2c58cb` (`bad3de928`), then with this head (`20fcb11e1`). Both are local, never pushed, and both merged clean. | Run | main + #1209 | main + #1209 + this head | |---|---|---| | `test_pinned_copy_text.py` and `test_family.py`, Latin-1 | 8 failed, 192 passed | **0 failed**, 193 passed, 7 skipped | | the same two, UTF-8 | 200 passed | 200 passed | | the same two, ASCII | 23 failed, 177 passed | 16 failed, 178 passed, 6 skipped | | with `test_bootstrap_spelling.py`, Latin-1 | 13 failed, 394 passed | 1 failed (row 13), 395 passed, 11 skipped | | with `test_bootstrap_spelling.py`, UTF-8 | 407 passed | 407 passed | | with `test_bootstrap_spelling.py`, ASCII | 27 failed, 380 passed | 16 failed, 381 passed, 10 skipped | By test id on the merges: UTF-8 changes nothing; Latin-1 and ASCII change exactly the rows above. The 16 ASCII failures are not among the 13, and fail on main + #1209 as well (see "Left"). **Main moved after these runs**, to `2fde6c3d0`. That commit makes both roots' `bootstrap.py`, `validate-family.py` and `siblings.py` refuse `git-repo-unreadable` where the root's `.git` cannot be read, and changes `tests/test_validate_family_unreadable.py` (one of the 71 files collected above) and adds `tests/test_pinned_root_git_unreadable.py`. It touches none of this PR's three files, and `git merge-tree` of this head with it is clean. The runs above were not repeated on it. Main then moved again, to `674077657` (#1120, `adopt-project.py`). RV1278 re-ran a 20-file gate (the three files, #1258's other 14 test files, `test_adopt_one_byte_locale.py` and #1172's two test files) on a scratch merge of this head with `674077657`: Latin-1 20 failed, 1142 passed, 84 skipped (main: 32 failed, 1141 passed, 73 skipped); UTF-8 1245 passed, 1 skipped on both; ASCII 41 failed, 1124 passed, 81 skipped (main: 52 failed, 1123 passed, 71 skipped). By test id only the rows above change, and every remaining failure fails on main too. ## Mutants Each mutant was applied in a scratch worktree at the head, inside the one test function named. Its row ran under Latin-1 and ASCII. The file was then restored from HEAD and its sha256 checked equal; all 14 were. | Mutant | Row | Latin-1 | ASCII | |---|---|---|---| | M1: the `PRINTED_AS_ITSELF` guard dropped | 1 | **1 failed** | 1 failed | | M2: the same | 2, 3 | **2 failed** | 2 failed | | M3: the same | 4 | **1 failed** | 1 failed | | M4: the same | 5 | **1 failed** | 1 failed | | M5: the same | 6 | **1 failed** | 1 failed | | M6: the `A_BYTE_READ_AS_A_SURROGATE` guard dropped | 8 | **1 failed** | 1 passed: ASCII reads 0xE9 as U+DCE9, so the guard does not skip there and the row judges | | M7: `AGENTS.md` read in the locale's codec again | 7 | **1 failed** | 1 failed | | M8: the first read of `AGENTS-shape.md` in the locale's codec | 7 | 1 passed | **1 failed** (`UnicodeDecodeError`) | | M9: the second read of `AGENTS-shape.md` the same | 7 | 1 passed | **1 failed** | | M10: the read of `CLAUDE.md` the same | 7 | 1 passed | 1 passed | | M11: the `skip_where_the_environment_cannot_carry` guard dropped | 9 | **1 failed** | 1 failed | | M12: the same | 10 | **1 failed** | 1 failed | | M13: the same | 11 | **1 failed** | 1 failed | | M14: the same | 12 | **1 failed** | 1 failed | - **M8 and M9 survive under Latin-1, as expected.** Latin-1 decodes every byte, and the text those two reads are checked for is ASCII. They are killed under ASCII, where #1259 asks the run to be looked at, and where the row now passes. - **M10 is equivalent in every locale.** `CLAUDE.md` is the 16 ASCII bytes `Read AGENTS.md.\n`, which every codec reads alike. It is changed with the other three, so the row reads every file `init` wrote in one way. ## Merge-trees `git merge-tree --write-tree` of this head is clean against: - `origin/main` `42308f26b`; - #1209 `13a2c58cb`; - #1282 `f71c28978` (checked by RV1278 on 2026-11-09); - the two open PRs that touch these files: #1201 `24b6a0af6` (`tests/test_family.py`) and #1171 `8162b874e` (`tests/test_pinned_copy_text.py`). Neither of those two changes a row this PR touches. #1201's hunks are at an import and `test_add_refuses_a_spelling_of_a_member_the_family_already_pins`; #1171's are at `PINNED_IMPORTERS`. ## Left, and outside this issue - **Row 13's tool defect**, above. It is #1283, the issue of its own that lane 4 filed for it. Once #1283 is mended, the row passes under Latin-1 as it is written. - **Under ASCII, 16 rows of the two files still fail,** on main and here alike. #1259 asked that this run be looked at. None of these rows is among the 13, and each passes under Latin-1 and UTF-8. Read from their failure messages only: - 15 rows of `tests/test_family.py` read a UTF-8 file the tool wrote (`family.yaml` and others) with `read_text()` and no encoding, and end in `UnicodeDecodeError`: row 7's kind b. They are `test_init_copies_the_siblings_utility_and_the_makefile_target`, `test_the_holder_says_what_its_bytes_are`, the five `test_validate_finds_*` and `test_validate_accepts_*` rows, three `test_bump_*` rows, three `test_update_shape_*` rows, `test_no_members_still_finds_an_edited_copy` and `test_siblings_skips_a_clone_whose_project_id_is_not_the_rows`. - `tests/test_pinned_copy_text.py::test_a_printable_pin_source_that_is_not_a_repository_is_named_as_typed[caf\xe9]`: the test itself cannot make `caf\u00e9` under ASCII (`os.mkdir` raises `UnicodeEncodeError`), rows 9 to 12's kind. - **22 other Latin-1 failures in the gate's other files** fail on main and here alike, and are not #1259's. They are 12 rows of `test_clone_url_bytes.py`, 2 each of `test_family_member_branch_not_utf8.py`, `test_non_utf8_git_reads.py` and `test_stdout_encoding.py`, and one each of `test_adopt_git_reads.py`, `test_adopt_pins.py` (`[not-utf-8]`), `test_adopt_template_values.py` and `test_bootstrap_leg_moves.py`. They were not run on the merge with #1209. Closes #1259 Lane: openreposhape-4 (openRepoShape-4) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…not text as `_read_as` says what the plan's reader read, "records `commit:` as the number 7", where it spelled it as Python does, `commit: 7` and `True`, so `check` and `execute` name it in the words the plan's other refusals use under the same `plan-pin-malformed` (#1114) (#1198) This PR lands only after the v1.2.0 tag, on Brett's word. ## What `_pin_row_problem` holds each of a pin's five fields (`product`, `repository`, `commit`, `tree_sha256`, `digest_source`) to text. A value that is not text it spelled with Python's `repr`: a number as `commit: 7`, a boolean as `True`, a list as `['a', 'b']` and a mapping as `{'k': 'v'}`. Every other refusal of a plan's value says what the reader read, with `_read_as`: "the number 7", "the boolean true", "a list of 2 item(s)", "a mapping of 1 key(s)". W1020 found the gap while working on #1020. It says it that way now, field by field, in `adopt-project.py`'s `_pin_row_problem`, in the `not_text` branch only: - one field: ``records `commit:` as the number 7, which is not text`` - two or more: ``records `commit:` as the number 7, `tree_sha256:` as the boolean true, which are not text`` What stays as it was: - the code, `plan-pin-malformed`, the remedy, and the sentence's ending, `which is not text`; - every text value's spelling, byte for byte (`commit: '7'`, which is not 40 hex); - a null or a blank: it is "records no `commit:`" under the code it has always had, and no value is spelled there. Every field takes the one site (`PIN_FIELDS`). The docstring and a comment say so. The change is 13 lines added and 4 removed in `adopt-project.py`. ## Behaviour change A pin field that is a number, a boolean, a list or a mapping is named by what it was read as, where it was named as Python spells it. A text value, a null and a blank print as they did. ## Rows `tests/test_adopt_pin_row_values.py` is new, ASCII only, with 45 rows. Each runs `check` and then `execute --yes`, with a stub `gh` first on PATH and `--local-remote-dir`, and asserts one finding, `execute` refusing with that same finding, an empty `gh` log, no remotes directory made and no Traceback. | Group | Rows | On main's code | On this head | | --- | --- | --- | --- | | The matrix: 5 fields by number, boolean, list, mapping | 20 | 20 failed | 20 passed | | The whole sentence: `commit: 7`, and a boolean `digest_source` | 2 | 2 failed | 2 passed | | Edge forms: 0, false, 7.5, -3, 007, `[]`, `{}`, `[a]` | 8 | 8 failed | 8 passed | | Two fields at once, a non-text commit beside bad text, entry 2 | 3 | 3 failed | 3 passed | | Null and blank controls | 6 | 6 passed | 6 passed | | Text controls (`commit: "7"` and `"true"`, another product, no owner, short digest, source by hand) | 6 | 6 passed | 6 passed | | **All** | **45** | **33 failed, 12 passed** | **45 passed** | Every one of the 33 failures is the finding text holding the repr spelling (``records `commit: 7` ``, `True`, `['a', 'b']`, `{'k': 'v'}`, `{}`, `[]`). There is no crash or other cause. The 12 that pass on main are the controls, which pin what must not change. Two existing rows pinned the old spelling, and no others did. Each now expects the new one, and both pass on this head (2 passed): - `tests/test_adopt_pins.py`, the `a-number-commit` row: `` `commit:` as the number 1234567 ``; - `tests/test_adopt_plan_value_order.py`, the `not-text` row: `` `digest_source:` as the number 7 ``. ## Mutants 19 mutants of this head's `adopt-project.py`, all killed. Each was run against the new file (first failure with `-x`, or a whole run where the table says so), and each run was restored with its sha256 checked. | Mutant | Result | | --- | --- | | M1: main's repr form put back | killed, 33 failed and 12 passed | | M2: `!r` inside the new "as" form | killed, 33 failed and 12 passed | | M3: `str()` in place of `_read_as` | killed | | F-repr-product, F-repr-repository, F-repr-commit, F-repr-tree_sha256, F-repr-digest_source: repr put back for one field only | 5 of 5 killed, each by that field's own rows | | M4: "is" in place of "as" | killed | | M5: singular and plural swapped | killed | | M6: only the first field named | killed | | M7: `missing` takes any falsy value (an existing guard; the zero, false and empty rows pin it) | killed | | M8: only a list and a mapping counted as not text | killed | | M9: the ending without "how it was read" | killed | | M10: the code `plan-pin-unrecorded` | killed | | T1 to T4: the text branches unquoted (commit, product and repository, digest, source) | 4 of 4 killed | ## Gate A scratch merge of this head `d38e4e36d` with main `961640c68`: commit `1ef3f0783`, tree `b12197610`, which is this head's own tree. Targeted files only, in the landing gate's environment (a stub `gh` first on PATH, `GH_TOKEN=bogus`, an empty `GH_CONFIG_DIR`, an empty global git config). The set is 47 test files: every one that names `plan-pin-malformed`, `plan-pin-unrecorded`, `_pin_row_problem`, `_read_pins` or `pins:`, the new file, and `test_path_guard_hygiene.py`, `test_repo_hygiene.py` and `test_scaffold_leg_path_collisions.py`; and `test_shape_doctor.py` (448 ids, each in exactly one shard, run from a script that reads each list into an array because 25 ids hold spaces). Every chunk exited 0, with 0 failed. | Chunk | Files | Result | | --- | --- | --- | | f01 | `test_adopt_pins.py` | 150 passed | | f02 | `test_adopt_plan_yaml_quoting.py`, `test_adopt_plan.py` | 606 passed, 1 skipped | | f03 | `test_adopt_execute_refusals.py`, `test_adopt_pin_row_values.py`, `test_adopt_plan_escapes.py`, `test_adopt_plan_value_order.py`, `test_adopt_reencoded_files.py`, `test_adopt_root_symlinks.py`, `test_adopt_shape_pin_and_work_dir.py`, `test_adopt_template_values.py` | 661 passed, 3 skipped | | f04 | `test_bump_remedies_family_root.py`, `test_chain_link_fold.py`, `test_chain_pin_sources.py`, `test_chain_remedy_callers.py`, `test_doctor_gitlink_repairs.py`, `test_doctor_recorded_answers.py`, `test_family_add_member_id.py`, `test_family_makefile_siblings.py` | 255 passed | | f05 | `test_family_tracking_branch.py`, `test_legs_not_a_list.py`, `test_link_source_chain_defaults.py`, `test_manifest_validator.py`, `test_naming_policy.py`, `test_neutral_pin_entry_one_spelling.py`, `test_neutral_pin_validator.py`, `test_non_list_project_fields.py` | 757 passed | | f06 | `test_path_guard_hygiene.py`, `test_pin_annotated_tag.py`, `test_pin_source_env_collisions.py`, `test_pinned_copy_text.py`, `test_reader_refusals_named.py`, `test_repo_hygiene.py`, `test_scaffold_e2e.py`, `test_scaffold_leg_path_collisions.py` | 599 passed | | f07 | `test_scaffold_pin_and_reuse.py`, `test_scaffold_pin_collisions.py`, `test_scaffold_referent_chain_links.py`, `test_setup_project_py.py`, `test_template_text_placeholders.py`, `test_update_shape_add_ignored.py`, `test_update_shape_landing.py`, `test_validate_pins_named_and_spelled.py` | 1078 passed | | f08 | `test_yaml_flow_brackets.py`, `test_yaml_flow_quotes.py`, `test_yaml_indicator_openers.py`, `test_yaml_reader_spaces.py` | 813 passed | | d01 | `test_shape_doctor.py`, 56 ids | 56 passed | | d02 | the same, 56 ids | 56 passed | | d03 | the same, 56 ids | 56 passed | | d04 | the same, 56 ids | 56 passed | | d05 | the same, 56 ids | 56 passed | | d06 | the same, 56 ids | 56 passed | | d07 | the same, 56 ids | 56 passed | | d08 | the same, 56 ids | 53 passed, 3 skipped | The file chunks hold 4919 passed and 4 skipped (f02: `SHAPE_MEDXEHR_CLONE` is unset; f03: the reftable backend needs git 2.45). The doctor shards hold 445 passed and 3 skipped (d08: the PowerShell line is printed only on a Windows host). In all, **5364 passed, 7 skipped, 0 failed.** **Run on the merge with #1125's head.** A scratch merge of this head with #1125's head `9549006fe`: commit `8a291d8b2`, tree `88530bb7`. The new file (45), `test_adopt_pins.py` (150), `test_adopt_plan_value_order.py` (40), `test_adopt_execute_refusals.py` (181) and `test_adopt_check_plan_name.py` (45): **461 passed.** ## Merge-trees `git merge-tree --write-tree`, this head against each, all clean (exit 0), at the heads of 2026-10-23T08:20Z: - `origin/main` `961640c68`; - the 23 open PRs that touch `adopt-project.py`: #1194 `900f77af9`, #1190 `00f959c61`, #1189 `4d40ce9fd`, #1186 `07486a498`, #1180 `b316f4157`, #1178 `c4beba193`, #1177 `5208e874e`, #1171 `8162b874e`, #1170 `24ee133aa`, #1169 `258051022`, #1154 `8a7828332`, #1153 `ff33ba12a`, #1143 `7af5fabc3`, #1141 `7a2711d03`, #1125 `9549006fe`, #1123 `5c3908f8d`, #1122 `c01c4d73d`, #1121 `1c5173758`, #1120 `c55e55e33`, #1119 `bba168bdd`, #1118 `2307036ab`, #1106 `504a1dd65`, #1105 `b28f40de0`; - #1126 `4c1f80cf4`, which touches `tests/test_adopt_pins.py`. ## This PR needs no #1125 #1125 (for #1020) makes `_read_pins` say an entry that is not a pin as `_read_as` says it. Its `adopt-project.py` hunks are at the `_read_pins` docstring and at the non-dict entry's `{row!r}` (about line 625 on main), and they do not touch `_pin_row_problem`. Its test hunks do not overlap the lines this change edits. The two are textually independent: this PR is based on main, not stacked, the merge-tree with #1125's head is clean, and the run above on the merge with its head passed. An entry that is neither a name nor a mapping stays #1020's, in #1125. ## Not in this PR The other `repr` in the pin rows are on a value that is text by then: the later branches of `_pin_row_problem` (spelled as before), a text product in an entry's name, and an entry that is a name. They are not gaps. `docs/release-notes/v1.2.0.md` is left alone. Its lines 297 to 299 mention #901's pins wording, and the release owner may want a line there. ## Out of scope Four other places in `adopt-project.py` put a plan value of any type into a refusal with `!r`, as the pin rows did: `plan-wrong-kind`, `plan-unsupported-mode`, `plan-bad-leg` and `plan-bad-id`. They are not pin rows, so this change leaves them. They were found by reading the code, not by running it. They are filed as #1199, with each site's line and what it would print. Closes #1114 Lane: openreposhape-4 (openRepoShape-4) Co-Authored-By: Claude Opus 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) (#1210) **Stacked on #1125.** This PR's base is `fix/1020-bad-id-first-problem` (#1125's branch, head `9549006f`). It lands after #1125 and stays a draft until then. #1125 makes `check`'s first finding `execute`'s first refusal for a bad `id:` or `org:`. 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.py` that pinned `check`'s old order on a plan hand-edited into another organisation, the relative url before `plan-not-the-source`, a plan `execute` already refused `plan-not-the-source` first on #1125's head; they now expect `plan-not-the-source` first, 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. `execute` refuses its first problem. `check` lists 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: 1. a plan for another repository (`plan-not-the-source`); 2. a name the naming policy refuses (`naming-unclassified`, or `naming-role-mismatch`); 3. a source that has moved on since `plan` (`plan-stale`); 4. an unanswered entry (`plan-unresolved`). Why this order: - **An unanswered entry last.** Each of the first three is mended by running `plan` again, as its remediation says, and a fresh plan takes back every answer given before. An answer given first would be lost. - **Another repository first.** Nothing in such a plan is this source's own: it is mended by `plan` under the source's own name, or from the source it is about. And `execute` must ask the naming policy nothing about the plan's names, and no remote anything, before it refuses it (#499). `_against_its_source` is a generator, so `execute` asks nothing after the first problem, and that still holds. - **A refused name before a moved source.** The name is mended by `plan` given 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. `plan` run again as it was, for the moved source, would leave the name to mend. - **The least change to each command.** The order keeps `execute`'s order for the plan's names (#499, #716) and `check`'s order of a moved source before its entries. Only the pairs that disagreed change. ## Before and after Measured on #1125's head `9549006f` and on this head, with a stub `gh` (exit 97), `GH_TOKEN=bogus`, an empty `GH_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. `check` exits 1 and `execute` exits 2 in every row. | The plan holds | `check` before | `execute` before | both, here | |---|---|---|---| | a moved source and an unanswered entry (#1113) | `plan-stale` | `plan-unresolved` | `plan-stale` | | another repository and an unanswered entry (#1113) | `plan-unresolved` | `plan-not-the-source` | `plan-not-the-source` | | another repository and a moved source (#1113) | `plan-stale` | `plan-not-the-source` | `plan-not-the-source` | | a refused name and an unanswered entry (#1113) | `plan-unresolved` | `naming-unclassified` | `naming-unclassified` | | a refused name and a moved source (not in #1113's table) | `plan-stale` | `naming-unclassified` | `naming-unclassified` | | all four | `plan-stale` | `plan-not-the-source` | `plan-not-the-source` | | another repository and a refused name | `plan-not-the-source` | `plan-not-the-source` | `plan-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: - A plan with one of the four problems: both commands print the same stderr and stdout before and after. - Both commands' stdout is the same before and after in every row. - `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 said `REFUSED 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-dir` that cannot be written Measured on #1125's head and on this head, the two commands agree in every row, and nothing here changes it: - **A bad `id:` or `org:` beside a `--work-dir` this user cannot write in** (`chmod 500`): `plan-bad-id` or `unsafe-value` to both. #1125's review round 1 (RV1125's SHOULD-1) made both commands ask the two before `_work_root`, which settled this case. - **Each of the 11 plans above beside the same `--work-dir`:** `adopt-work-dir-unwritable` first to both. ## What changed, in `adopt-project.py` - **`_against_its_source` and `_Unmended` (new).** `_against_its_source` is the rule. It asks: - `_refuse_a_plan_for_another_repository`; - `_check_names`, given the source only where the plan names no other repository, as `check` gave it (#716); - `_refuse_an_unrunnable_plan`. It yields each problem as an `_Unmended`: the `Refusal` `execute` refuses it with, and `check`'s FINDING lines and remediation for it, in `check`'s words as they were. `check` lists 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_names` and `_refuse_an_unrunnable_plan` in 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: - the names' classification lines on stdout; - the findings about what the disk or GitHub will not hold (#863); - the leg question (#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 runs `check` and then `execute --yes` on one hand-edited plan, both with the same `--local-remote-dir`, and asserts that no leg is made. - **7 pair rows** (the six pairs and all four). Each asserts: - `check` exits 1 and `execute` exits 2; - both name first the same code, the rule's first; - `check` lists every problem the plan holds, in the rule's order. - **4 controls**, one per code: the plan holds that problem alone, and both commands name it. - **Against #1125's head `9549006f`:** - the 6 pair rows that disagreed fail, each because the two commands named different codes, for example `('plan-stale', 'plan-unresolved') != ('plan-stale', 'plan-stale')`; - the `another-and-name` guard row and the 4 controls pass. - **Here:** 11 passed. `tests/test_adopt_relative_submodule_url.py`, 6 rows changed and 1 new (the fix round): - **The 6 rows** are `test_check_keeps_a_relative_url_its_github_leg_resolves_alike` for `[https]`, `[scp]`, `[scp-other-case]`, `[ssh-port]` and `[ssh-github-443]`, and `test_a_credential_in_the_source_remote_is_never_printed`. - Each hand-edits the plan's `org:` to `otherorg`, so the plan names `otherorg/Thing` and the source is `testorg/Thing`: a plan for another repository. - Each expected `check` to list the relative url first and `plan-not-the-source` after it, `check`'s old order. They now expect `plan-not-the-source` first. Their other assertions are unchanged; the credential is still printed nowhere. - **The new row,** `test_check_names_another_repository_first_as_execute_refuses_it`, runs one such plan. It asserts that `check`, with and without `--local-remote-dir`, lists `plan-not-the-source` and then the url, that `execute` refuses `plan-not-the-source`, and that no leg is made. - **Measured on #1125's head** for the six source remotes: `execute` already refused each such plan `plan-not-the-source`, and its output is the same on both heads. Only `check`'s order changed. No spelling of the source's `origin` reads as another repository: with `org:` left as the source's, `check` passes on both heads, as the rows assert. Both files together, 46 rows: - **Against #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-source` where the url was expected first, or the url first in the new row. - **Here:** 46 passed. ## 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. | Mutant | Killed by | |---|---| | M1, `execute`: `_refuse_an_unrunnable_plan` asks an unanswered entry before a moved source (pair 1) | 2: `moved-and-unanswered`, `all-four` | | M2, `check`: lists another repository after the entries (pair 2) | 11: `another-and-unanswered`, `another-and-moved`, `another-and-name`, `all-four`, and the 7 relative-url rows | | M3, `check`: lists a moved source before another repository (pair 3) | 3: `another-and-moved`, `name-and-moved`, `all-four` | | M4, `check`: lists a refused name after the entries (pair 4) | 3: `name-and-unanswered`, `name-and-moved`, `all-four` | | M5, `check`: lists a moved source before a refused name (pair 5) | 2: `name-and-moved`, `all-four` | | M6, the rule: asks a refused name before another repository (both commands) | 2: `another-and-name`, `all-four` | | M7, `execute`: asks `_refuse_what_check_finds` before the rule | 8: the pair rows but `another-and-name`, the `plan-stale` control, and the new relative-url row | | M8, `check`: lists all the rule's problems after the entries | 14: the pair rows but `another-and-name`, the `plan-stale` control, and the 7 relative-url rows | ## Gate Run on the scratch merge `743ebe176`: `origin/main` `961640c68` plus this head `90eca4144` (tree `d71d6f00a`, never pushed). It ran in the landing gate's own environment (a stub `gh`, `GH_TOKEN=bogus`, an empty global git config, `EMAIL` set, the `LANES_*` and `GIT_SSH_COMMAND` variables 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.py` and `test_adopt_submodule_url_answers.py` (they import helpers and the module-scoped `adopter` fixture from the changed test file, so they sit in its shard, r03), `test_reader_refusals_named.py` (it hand-edits a plan's `org:` and checks `check`'s exact findings) and `test_github_name_limits.py`. Every shard exited 0. | Shard | Result | |---|---| | r01 | 600 passed | | r02 | 613 passed | | r03 | 464 passed, 1 skipped (`test_adopt_plan.py::test_plan_on_medxehr_matches_the_rulings`) | | r04 | 547 passed | | r05 | 599 passed, 19 skipped (all in `test_family_init_values.py`) | | r06 | 542 passed | | r07 | 489 passed | | r08 | 531 passed | | d01 to d07 | 56 passed each (`test_shape_doctor.py`) | | d08 | 53 passed, 3 skipped (`test_shape_doctor.py`) | - **r01 to r08:** 4385 passed, 20 skipped (4405 ids). - **d01 to d08:** 445 passed, 3 skipped (448 ids). - **Total:** 4830 passed, 23 skipped, none failed, none errored. Main has moved since this gate: `origin/main` is `ac5f28d2a` (#1188, #1130 and #1098 landed). They change `scaffold-project.py`, `scripts/family.py` and four test files. None of them is a file this PR changes, a module `adopt-project.py` imports, 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 current `origin/main`, every one clean: - **`origin/main` `ac5f28d2a`:** clean, tree `1a65ab9bd`. - **#1125 `9549006fe`:** clean. This branch is on it. - **#1177 `5208e874e`** (`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. - **Every open PR that touches `adopt-project.py` or either test file, 25 of them, #1125 and #1177 among them:** clean, both with this head and three-way on the scratch merge of `ac5f28d2a` and this head, `98afb128a` (`git merge-tree --write-tree <that merge> <its head>`). Since the first run, #1207 is new, and #1119, #1189 and #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: ``` PR head with this head on the scratch merge #1105 b28f40d clean (tree 32fce74c6) clean (tree 490f555f9) #1106 504a1dd clean (tree 3abfa1b6a) clean (tree db57682e9) #1118 2307036 clean (tree 79a3888bf) clean (tree 629f167ca) #1119 195d993 clean (tree a2926127e) clean (tree 6aec4c863) #1120 c55e55e clean (tree 6171a52f8) clean (tree 0cb310664) #1121 1c51737 clean (tree 3acb80467) clean (tree 2771fbfd0) #1122 c01c4d7 clean (tree af9a4c414) clean (tree ef00f52f7) #1123 5c3908f clean (tree eb7cb34b3) clean (tree 4c311748b) #1125 9549006 clean (tree 239df6d) clean (tree 1a65ab9bd) #1141 7a2711d clean (tree e1c8f7169) clean (tree 3afeda790) #1143 7af5fab clean (tree 35cd165de) clean (tree aae00cfc7) #1153 ff33ba1 clean (tree 57da668e8) clean (tree f91ce3d8d) #1154 8a78283 clean (tree 28699ba0c) clean (tree 3e6b1ae98) #1169 1e958ca clean (tree e3ef802be) clean (tree f4566b2c4) #1170 24ee133 clean (tree 94b9291c8) clean (tree 848bb0ed0) #1171 8162b87 clean (tree 65ca8196d) clean (tree f15571ef3) #1177 5208e87 clean (tree 08e3d6a62) clean (tree 111f3c238) #1178 c4beba1 clean (tree 646f02266) clean (tree eae3b5996) #1180 b316f41 clean (tree 25b3d4b6f) clean (tree 85a559171) #1186 07486a4 clean (tree d0fe77836) clean (tree 849f0ef41) #1189 a131fc2 clean (tree 5b1ab0620) clean (tree 9851d22b7) #1190 91a937e clean (tree aa83fae05) clean (tree 18101f50b) #1194 900f77a clean (tree 9d74efa35) clean (tree 46317beae) #1198 d38e4e3 clean (tree 87ca21b8c) clean (tree 7fc45a875) #1207 1c7ca5c clean (tree 1dbab659d) clean (tree 1e44c98f0) ``` ## Left for a follow-up (outside #1113) - **An unanswered entry beside an uncovered path still gives two first problems,** filed as #1197. `check` lists `plan-uncovered` first and `execute` refuses `plan-unresolved` first. Measured the same on #1125's head and on this head. `execute` refuses an unanswered entry before `_refuse_what_check_finds`, while `check` lists it in `_leg_findings`, after the paths and the coverage. Other entry findings ahead of it in `_entry_findings` are likely the same (`plan-unsafe-path` among them), and so is the taken split branch, but those were not measured. Closes #1113 Lane: openreposhape-4 (openRepoShape-4) 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]>
… repository over 100, so `plan --source <50 b's>/Thing` never asks `gh` for a name GitHub cannot hold, no remedy offers `--org <50 b's>`, and `check` and `execute` never clone such a record again (#1129) (#1194) Lane 4's W1129 for #1129, RV1122's NIT-1 on #1122 (#1122 issuecomment-6319493639). RV1194 reviewed it READY at `900f77af` (#1194 issuecomment-6365280794). **It was stacked on #1122,** which landed as `ebb8716`. RS1194 then restacked it onto `main` with three merges (#1122's final head, its squash, then `main`), which carry exactly the reviewed change (#1194 issuecomment-6751617746). "Why stacked" below says why it was stacked. **A fix round followed #1268.** Since #1268, `Source.clone` hands `gh repo clone` `-- --quiet --origin origin`. So FX1194 merged `main` (`106f92ff`) and changed only the rows' helper `cloned_by_gh` to expect that line (+4 -2, #1194 issuecomment-6769522297). RVD1194b reviewed the round READY at `ddc21fb5`: the reviewed change's lines are byte-equal, and the 14 rows fail before the fix and pass after it (#1194 issuecomment-6772772773). ## What `adopt-project.py`, `_github_name`: an owner of more than `GITHUB_OWNER_MAX` (39) characters, or a repository of more than `GITHUB_NAME_MAX` (100), counted once the trailing `.git` is dropped, names no `owner/repo`. The file already imports both limits from `shape_materialize`. ```python if len(owner) > GITHUB_OWNER_MAX or len(repo) > GITHUB_NAME_MAX: return None ``` Every reader of `_github_name` now gives the same answer for such a spelling: | Reader | Used by | Before | Now | |---|---|---|---| | `_source_spec` | `plan`, `check` and `execute` `--source` | taken as GitHub's name: `gh repo clone` asked, or `source-ambiguous` beside a directory of that spelling | a path: read in place where it is one, `source-unresolvable` ("neither a path that exists nor an `org/repo` name") where it is not | | `_repository_in_url` | a url `--source`, `github.com/...` too | `gh repo clone` asked | `source-unresolvable`, "names no `owner/repo` on github.com", before any `stat` | | `_recorded_repository` | `check` and `execute`, a plan's clone gone (`cloned: true`) | "is cloned again from GitHub", `gh repo clone` asked | `source-unresolvable`, "the plan's `source.repository`, ..., names no `owner/repo` on github.com" | | `_held_repository` | `check` and `execute`, a source with no `origin` | held to the record: `plan-not-the-source`, remedy `--org <40 c's>` | holds the plan to nothing, as a record that names no `owner/repo` does | | `_source_there` | beside a directory this user cannot search | #1122: no url | unchanged: no url (the name is None now) | `_refuse_another_repository`'s remedy (`adopt-not-the-source`) is reached only after `_source_spec`, so it never offers `--org <a name GitHub cannot hold>` for an `org/repo` `--source` now. **#1122's guard in `_source_there` is redundant, and is folded in.** `_source_there` is called only by `_source_spec` and `_repository_in_url`, and both take `name` from `_github_name`. So a name past the limits now arrives as None, and the `name is None` branch gives the same refusal #1122's guard gave. The guard is gone, `if name is None:` is back, and the docstring says the limits are asked in `_github_name`. The merge with `main` and with #1122 is clean (see "Merges"). **Why stacked.** The textual merge with #1122 is clean, but the two do not hold together as they stand. A `github.com/` spelling past the limits is now refused by `_repository_in_url` before any `stat`, so four of #1122's rows, which expected `source-unreadable` from `_source_there`, fail on the combination: - `[bare-github-url]`; - `[www-github-url]`; - `[bare-github-url-owner-one-over-EIO]`; - `[bare-github-url-owner-one-over-EACCES]`. This PR moves those three params out of #1122's `_source_there` tests, with a comment pointing to the new file. There they assert the new answer (`source-unresolvable`, no url), with the control at the limit kept: two readings and the url. No refusal code is new or changed, and no help text or `docs/cli.md` sentence changes: `--source`'s help already says `source-unresolvable` refuses "one that is neither a path that exists nor an `org/repo`". ## Behaviour that changes besides the refusal - **A directory here spelled `<40 c's>/Thing`** (or `testorg/<101 r's>`) is read in place, and the plan is written, recording that directory and no repository. Before, it was `source-ambiguous`, which named a GitHub repository that cannot exist. At the limit, it is still `source-ambiguous`. - **A plan whose source has no `origin`, and whose `source.repository` records `<40 c's>/Thing`,** is held to nothing. `check` says `plan ok`, and `execute` goes on. Before, it was held to that record, and the remedy said `--org <40 c's>`, which `execute` then refuses as `adopt-org-too-long`. A record at the limit still holds the plan. - **`github.com/<300 a's>/Thing` beside a `./github.com`** is `source-unresolvable`, "names no `owner/repo` on github.com". #1122 made it `source-unreadable`, "whether a repository is there cannot be told". Both offer no url. ## Before and after Probed with a `gh` first on PATH that logs each call and refuses it (exit 4), and with: - `GH_TOKEN=bogus`, an empty `GH_CONFIG_DIR`; - `GIT_SSH_COMMAND=false`, `GIT_CONFIG_GLOBAL` an empty file, `GIT_CONFIG_NOSYSTEM=1`; - uid 1000, Python 3.12.3, run in an empty directory. Each row is `plan --source <it> --project <repo> --org <owner>`, except where `--org` is said. `main` `961640c6` gave the same answers as #1122's head on every row. | `--source` | #1122 head `c01c4d73` | this head | |---|---|---| | `<50 b's>/Thing`, `--org <50 b's>` (the issue's) | `gh repo clone <50 b's>/Thing` (1 call), `source-unclonable` | `source-unresolvable`, 0 calls | | `<50 b's>/Thing`, `--org testorg` (the issue's) | `adopt-not-the-source`, remedy `--project Thing --org <50 b's>`, 0 calls | `source-unresolvable`, no `--org` offered, 0 calls | | `<40 c's>/Thing` | 1 call | `source-unresolvable`, 0 calls | | `testorg/<101 r's>`, and with `.git` | 1 call each | `source-unresolvable`, 0 calls | | `<40 c's>/<101 r's>` | 1 call | `source-unresolvable`, 0 calls | | `https://github.com/<40 c's>/Thing`, `github.com/<40 c's>/Thing` | 1 call each | `source-unresolvable` ("names no `owner/repo` on github.com"), 0 calls | | `<39 c's>/Thing`, `testorg/<100 r's>`, `testorg/<100 r's>.git` (controls) | 1 call each (`.git` dropped) | the same | | `<39 c's>/Thing`, `--org testorg` (control) | `adopt-not-the-source`, remedy `--org <39 c's>` | the same | ## Tests The landing gate's environment throughout: - `/usr/bin/python3 -m pytest -p no:cacheprovider`, Python 3.12.3; - a stub `gh` first on PATH, `GH_TOKEN=bogus`, an empty `GH_CONFIG_DIR`; - `GIT_CONFIG_GLOBAL` set to an empty file, `GIT_CONFIG_NOSYSTEM=1`; - the test author and committer variables, and `EMAIL`; - `GIT_SSH_COMMAND`, `GIT_ALLOW_PROTOCOL` and the `LANES_*` variables unset. **New file `tests/test_adopt_source_github_limits.py`, 48 rows,** ASCII only. It skips on Windows: the logging `gh` is a `/bin/sh` script, and the moved rows need a POSIX `File name too long`. Each child puts the logging `gh` ahead of the suite's guard, and every `execute` gets `--local-remote-dir`. | Test | Rows | What it asserts | #1122 head | main | this head | |---|---|---|---|---|---| | `test_plan_asks_gh_for_a_name_github_can_hold` (control) | 6 | owner 39, repository 100, 100 + `.git`, both at, a url and a bare url: `gh` logged exactly `repo clone <name> <work>/source-readonly/<repo> -- --quiet --origin origin`, once | 6 pass | 6 pass | 6 pass | | `test_plan_never_asks_gh_for_a_name_github_cannot_hold` | 9 | owner 40 and 50, repository 101 and 101 + `.git`, both over, and four url spellings: the `gh` log empty, exit 2, the `source-unresolvable` line, no plan, no work directory | 9 fail at the `gh` log (`cloning ...`) | 9 fail, the same | 9 pass | | `test_a_github_url_past_the_limits_is_refused_before_any_stat` (moved from #1122) | 4 | `[www.]github.com/<300 a's>/Thing` with a real `File name too long`; `github.com/<40 a's>/Thing` with `stat` refused (EIO, EACCES): `source-unresolvable`, no url; control at 39, both readings and the url | 4 fail at the code (`source-unreadable`, "cannot be told") | 4 fail, the same | 4 pass | | `test_no_remedy_offers_an_org_github_cannot_hold` | 3 | `--org testorg` with owner 40, 50, both over: no `--org <owner>`, no `adopt-not-the-source`; control at 39 offers `--org <39 c's>` | 3 fail at `--org <owner>` offered | 3 fail, the same | 3 pass | | `test_a_directory_github_cannot_name_is_read_in_place` | 2 | `./<40 c's>/Thing`, `./testorg/<101 r's>` repositories here: exit 0, recorded in place, no repository, 0 `gh` calls; control at the limit is `source-ambiguous` | 2 fail at the exit (`source-ambiguous`) | 2 fail, the same | 2 pass | | `test_a_recorded_name_github_can_hold_is_cloned_again` (control) | 4 | `check`, `execute`: the NOTE and 1 `gh` call | 4 pass | 4 pass | 4 pass | | `test_a_recorded_name_github_cannot_hold_is_never_cloned_again` | 6 | `check`, `execute`; owner 40, repository 101, both: the `gh` log empty, the `source-unresolvable` line, no "cloned again" | 6 fail at the `gh` log (the NOTE, "cloned again") | 6 fail, the same | 6 pass | | `test_check_and_execute_read_a_source_name_as_plan_reads_it` | 10 | `check`, `execute` with `--source`: 4 controls at the limits (1 `gh` call), 6 past them (0 calls, `source-unresolvable`) | 6 fail at the `gh` log; 4 pass | the same | 10 pass | | `test_a_record_github_cannot_hold_offers_no_org` | 4 | `check`, `execute` (no `--yes`); a source with no `origin`, record owner 40 and 50: no `--org <owner>`, no `plan-not-the-source`; `plan ok` / `adopt-unconfirmed`; control at 39 keeps `plan-not-the-source` and `--org <39 c's>` | 4 fail at `--org <owner>` offered | 4 fail, the same | 4 pass | Totals for the 48 rows: - **#1122's head:** 34 failed, 14 passed; - **main:** 34 failed, 14 passed; - **this head:** 48 passed. Every row that is not a control fails on both bases, at the assertion that names the defect, not at a setup step. The 14 controls pass on all three. **#1122's file** `tests/test_adopt_unsearchable_source.py`: 40 rows at this head, from 44. Three params moved out: the two url rows, and the url row's EIO and EACCES variants. Before the move, those four rows failed at this head (`source-unresolvable` against `source-unreadable`), and the other 40 passed. ## Mutants Each was applied to this head's `adopt-project.py` (sha256 `d494ba0e...`) by exact substitution of the new guard line, and run against this file, `test_adopt_unsearchable_source.py` and `test_adopt_unenterable_source_and_locale.py` (101 tests). After each one the file was restored from its saved bytes and its sha256 checked. Unmutated, all 101 pass. All 8 were killed. | Mutant | Killed by | |---|---| | M1: owner limit one lower (`> GITHUB_OWNER_MAX - 1`) | 24: the owner-39 controls (plan, `--source`, the recorded clone, the remedy, the directory, the held record, the moved rows' controls), and #1122's 5 owner controls at 39 | | M2: owner limit one higher (`+ 1`) | 15: every owner-40 row (plan, url, `--source`, the recorded clone, the remedy, the directory, the held record, the 2 moved EIO/EACCES rows), and #1122's 2 `owner-one-over` rows | | M3: repository limit one lower (`- 1`) | 15: the repository-100 controls, and #1122's 5 repository controls at 100 | | M4: repository limit one higher (`+ 1`) | 11: every repository-101 row, and #1122's 2 `repository-one-over` rows | | M5: owner limit removed | 25 | | M6: repository limit removed | 15 | | M7: both limits removed (no guard anywhere, since #1122's is folded in) | 46: every refused row here, and 12 of #1122's | | M8: the repository counted with its `.git` (`len(segments[1])`) | 1: `test_plan_asks_gh_for_a_name_github_can_hold[repository-100-dot-git]` | ## Gate Run on the scratch merge `w1129-gate` at `ca06ad25a`: a merge of `main` `961640c6` and this head `900f77af`. Its tree, `90fbea0e`, is the one `git merge-tree --write-tree origin/main HEAD` gives, and `main` has not moved since. The environment is the one under "Tests"; targeted files only, never the full suite. Every run ended with rc=0. **Test files, 23:** | File | Passed | Skipped | |---|---|---| | `test_adopt_source_github_limits` (new) | 48 | 0 | | `test_adopt_unsearchable_source` | 40 | 0 | | `test_adopt_unenterable_source_and_locale` | 13 | 0 | | `test_adopt_check_plan_name` | 45 | 0 | | `test_adopt_source_clone_record` | 100 | 0 | | `test_adopt_template_values` | 78 | 0 | | `test_adopt_work_dir_refusal` | 53 | 0 | | `test_windows_paths` | 46 | 0 | | `test_adopt_clone_claimed` | 42 | 0 | | `test_adopt_late_failure` | 88 | 0 | | `test_adopt_plan_flag_refusals_first` | 89 | 0 | | `test_adopt_temp_work_roots` | 9 | 0 | | `test_adopt_origin_repository` | 30 | 0 | | `test_adopt_plan` | 66 | 1 | | `test_adopt_project_is_the_source` | 23 | 0 | | `test_adopt_relative_submodule_url` | 34 | 0 | | `test_adopt_split_branch` | 47 | 0 | | `test_adopt_values_as_typed` | 40 | 0 | | `test_adopt_plan_escapes` | 59 | 0 | | `test_path_guard_hygiene` | 49 | 0 | | `test_repo_hygiene` | 101 | 0 | | `test_scaffold_leg_path_collisions` | 104 | 0 | | `test_github_name_limits` | 64 | 0 | | **Total** | **1268** | **1** | **`tests/test_shape_doctor.py`, all 448 collected ids, in 8 shards of 56** (the shard lists together hold every collected id exactly once; every `adopt-project.py` change is gated with it): | Shard | Ids | Passed | Skipped | |---|---|---|---| | d01 | 56 | 56 | 0 | | d02 | 56 | 56 | 0 | | d03 | 56 | 55 | 1 | | d04 | 56 | 55 | 1 | | d05 | 56 | 55 | 1 | | d06 | 56 | 56 | 0 | | d07 | 56 | 56 | 0 | | d08 | 56 | 56 | 0 | | **Total** | **448** | **445** | **3** | **Totals: 1713 passed, 4 skipped, 0 failed, 0 errors.** The skips are the host's: three `test_shape_doctor.py` rows that print the PowerShell line and need `powershell.exe` on a Windows host, and one `test_adopt_plan.py` row that needs `SHAPE_MEDXEHR_CLONE`, a read-only clone of MedxSoft/MedxEHR. The gate paused after d02 for disk space and ran d03 to d08 later, on the same scratch merge, whose head did not change. ## Merges `git merge-tree --write-tree`, this head `900f77af` against each of these; all are clean (rc=0, no conflict): | Against | Head | Tree | |---|---|---| | `main` | `961640c6` | `90fbea0e` | | #1122, the base | `c01c4d73` | `e2cea9b3` (this head's own tree) | | #1186 | `07486a49` | `78702414` | | #1180 | `6cd96b8b` | `eff9e4db` | | #1178 | `c4beba19` | `b79abc31` | | #1177 | `5208e874` | `91156ae6` | | #1171 | `8162b874` | `87e2ce31` | | #1170 | `24ee133a` | `f001382d` | | #1169 | `25805102` | `b58ed451` | | #1154 | `8a782833` | `2e67c977` | | #1153 | `ff33ba12` | `070c39b2` | | #1143 | `7af5fabc` | `7237b405` | | #1141 | `7a2711d0` | `c0bcaf88` | | #1125 | `9549006f` | `c16ff99a` | | #1123 | `5c3908f8` | `aba16ad4` | | #1121 | `1c517375` | `6e1f5cb9` | | #1120 | `c55e55e3` | `845f0ab5` | | #1119 | `bba168bd` | `ab6af7c8` | | #1118 | `2307036a` | `1d53a9d9` | | #1106 | `504a1dd6` | `60cd4c67` | | #1105 | `b28f40de` | `b5f065ec` | | #1189 | `8684af86` | `352b9e86` | | #1190 | `00f959c6` | `6335ed44` | These are the open PRs that touch `adopt-project.py`, and #1122 also touches `tests/test_adopt_unsearchable_source.py`. #1189 and #1190 opened, and #1169 and #1171 moved, after the first run of these; the four were merged again at the heads shown, just before the push, and the other heads were read again and had not moved. The merge with #1122 is clean as text, and see "Why stacked" for what it does not settle. ## Out of scope - **The origin url has its own reader.** A local source whose `origin` is `https://github.com/<40 c's>/Thing` is read by `url_repository` in `scripts/repo_shape.py`, a pinned script that shares the reading with `shape-doctor.py`, and not by `_github_name`. It still records that name, and `--org testorg` would be told `--org <40 c's>`. I read this in the code and did not measure it. - **Owner characters.** `_github_name` takes owner characters GitHub gives no owner: `.`, a trailing `-`, and `--`. `_` is let by on purpose, for GitHub Enterprise Managed Users (#863's `GITHUB_OWNER_CHARACTERS`). The brief limited this change to the two lengths. - **The refusal's wording.** `source-unresolvable` for a spelling past the limits says "neither a path that exists nor an `org/repo` name", which is true now, but does not say which limit it broke. Closes #1129 Lane: openreposhape-4 (openRepoShape-4) 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 4 days and 18 hours by commenting |
|



Closes #1128
Stacked on #1120 (base
fix/1035-source-branch-shown, headc55e55e3): it lands after #1120, and only after the v1.2.0 tag.What was wrong
_shownprinted a name as it is whereverstr.isprintable()passed it, and_spelled_characterwrote such a character as it is.str.isprintable()passes 267 of Unicode's Default_Ignorable_Code_Point characters, which a terminal draws as nothing: 263 combining marks, among them U+034F and the variation selectors, and the four Hangul fillers, among them U+3164. Git takes each in a branch or a path, so a source onma<U+034F>inprinted inplan'ssourceline (#1120's) as(main).checked_value'sunsafe-valuerefusal names the value withrepr, which printed U+3164 raw on stderr the same way. RV1120 found both (#1120 issuecomment-6319321596).What changed
scripts/repo_shape.py:DEFAULT_IGNORABLE_RANGES: the property's 27 lines ofDerivedCoreProperties.txt, joined into 17 ranges, 4174 code points. The table is the same in Unicode 14.0.0, 16.0.0 and 17.0.0, and is written into the code with a citation, not asked ofunicodedata. CI runs Python 3.14 and the bench 3.12, and theirunicodedatadiffer.DEFAULT_IGNORABLE, one character of the table as a pattern.code_point_escaped, taken out of_escaped, which writes exactly what it wrote before.visible_repr:reprwith each default-ignorable character written as its code-point escape.checked_value'sunsafe-valuerefusal names the value withvisible_repr:'ma\u3164in', where it said'ma<U+3164>in'.adopt-project.py:_shownspells a name that holds a default-ignorable character, whateverstr.isprintable()says of it:`ma\u034fin`._spelled_characterwrites one as its code-point escape, which the plan's reader reads back as the character._shown's signature, and its output for every other character, are unchanged, so adopt-project.py:plan'ssourceline names the source's branch as_shownnames a path, so a bidi control, a line boundary or a byte that is not UTF-8 in it is spelled and no longer reaches the terminal raw (#1035) #1120's and adopt-project.py:plan written toandcloning <repository> (read only) intoname the caller's--outand--work-dirwith_shown, as the other lines of the report name a path, so a bidi control, a line feed or a tab in either no longer reaches the terminal as it was typed (#1115) #1154's rows still pass.scripts/repo_shape.pyis a shape copy that every root digest-pins, so this change shows every project anupstream-changedrow, as every change to it does. The new names are used inside the file itself:checked_valuecallsvisible_repr. No pinned copy callschecked_value(validate-family.pyonly names it in a comment); the change is inscripts/repo_shape.pybecausechecked_valuelives there, so its refusal cannot change without theupstream-changedrow. No pinned script imports a new name, so the skew rule intest_pinned_copy_text.pyholds, and its list of names a keptrepo_shape.pymay lack,NEWER_THAN_A_KEPT_LIBRARY, now holds the four, so it refuses a pinned script that imports one. No sentence in README.md, AGENTS.md or the handbook describes these helpers.Tests
tests/test_adopt_shown_default_ignorables.py(new, 48 rows, ASCII only; every character outside ASCII is written as an escape):DerivedCoreProperties.txt, listed again line by line in the test, so no row depends on the Python's Unicode data.DEFAULT_IGNORABLEagainst the table, over all 0x110000 code points: not one more, not one fewer (RV1171's N1)._shown,_spelled_characterandchecked_value's refusal.mU+034FaU+3164inU+FE0F, throughchecked_value's refusal and_shown: each is written as its escape and none is raw (RV1171's S1)._shown, through a read back of the plan, and end to end throughplan. Inplan, they appear in thesourceline, the tracking-branch NOTE, a path in the table, and theunsafe-valuerefusal on stderr.plan'ssourceline names the source's branch as_shownnames a path, so a bidi control, a line boundary or a byte that is not UTF-8 in it is spelled and no longer reaches the terminal raw (#1035) #1120'ssourceline (adopt-project.py: follow-ups from RV1120's review of #1120 (#1035):_shownlets 267 invisible characters through, and two cases the tests do not pin #1128 items 2 and 3):feat/caf\u00e9prints as it is;`main`, backticks included, is spelled`\x60main\x60`;`caf\udce9`under autf-8:surrogateescapestdout, where main wrote the byte 0xE9 itself.tests/test_adopt_spelled_unambiguous.py: its two sweeps of every character take the default-ignorables apart and hold each to its escape.tests/test_pinned_copy_text.py:NEWER_THAN_A_KEPT_LIBRARYholds the four new names, so the skew rule refuses a pinned script that imports one (RV1171's N3).Counts for the new file:
961640c68c55e55e3(the 10source-line and item 2-3 rows)_shown,_spelled_characterand the refusal, and the three in one value are raw in both;sourceline, the NOTE, the table and stderr;(`main`)is printed as it is;caf\xe9is on stdout.feat/caf\u00e9.plan'ssourceline names the source's branch as_shownnames a path, so a bidi control, a line boundary or a byte that is not UTF-8 in it is spelled and no longer reaches the terminal raw (#1035) #1120 alone, the 3 failures are U+034F, U+3164 and U+FE0F in thesourceline. Items 2 and 3's three rows pass on adopt-project.py:plan'ssourceline names the source's branch as_shownnames a path, so a bidi control, a line boundary or a byte that is not UTF-8 in it is spelled and no longer reaches the terminal raw (#1035) #1120 alone: they pin adopt-project.py:plan'ssourceline names the source's branch as_shownnames a path, so a bidi control, a line boundary or a byte that is not UTF-8 in it is spelled and no longer reaches the terminal raw (#1035) #1120's code, which is right in each case. They kill RV1120's mutants E (_spelledfor every branch outside ASCII) and N (str.isprintable()alone, with no backtick rule).Sweep
Run with
/usr/bin/python33.12.3 (Unicode 15.0.0), against #1120's headc55e55e3, whose helpers are main's:str.isprintable()(263 Mn, 4 Lo). Raw on the base: 267. Raw on this head: 0._shown,_spelled_characterandvisible_reprgive the same output as the base's_shown,_spelled_characterandrepr: 0 differ.Mutants
Each ran against the new file,
test_adopt_spelled_unambiguous.pyand #1120'stest_adopt_plan_source_branch_shown.py(212 rows). Each file was restored afterwards and its sha256 checked._spelled_characterchecked_valueback onreprvisible_represcapes only the first match (count=1)validate-family.py) importsvisible_reprvalidate-familyrow); passes on the old listGate
On a scratch merge commit of
origin/main038dafba9, #1120'sc55e55e3and this head (39cb15180), in the landing gate's environment with a stubgh:_shown,_spelledorunsafe-value, withtest_tracking_branch_ref.py,test_pinned_copy_text.py,test_adopt_plan_escapes.py,test_stdout_encoding.py,test_non_utf8_name_callers.py,test_path_guard_hygiene.py,test_repo_hygiene.pyandtest_scaffold_leg_path_collisions.py. 9777 passed, 29 skipped, 0 failed.test_shape_doctor.py, 448 ids in 8 shards frommapfilelists: 445 passed, 3 skipped, 0 failed.plan'ssourceline names the source's branch as_shownnames a path, so a bidi control, a line boundary or a byte that is not UTF-8 in it is spelled and no longer reaches the terminal raw (#1035) #1120, this head and adopt-project.py:plan written toandcloning <repository> (read only) intoname the caller's--outand--work-dirwith_shown, as the other lines of the report name a path, so a bidi control, a line feed or a tab in either no longer reaches the terminal as it was typed (#1115) #1154, the rows of adopt-project.py:plan written toandcloning <repository> (read only) intoname the caller's--outand--work-dirwith_shown, as the other lines of the report name a path, so a bidi control, a line feed or a tab in either no longer reaches the terminal as it was typed (#1115) #1154, of adopt-project.py:plan'ssourceline names the source's branch as_shownnames a path, so a bidi control, a line boundary or a byte that is not UTF-8 in it is spelled and no longer reaches the terminal raw (#1035) #1120 and of this PR: 166 passed, 1 skipped.331dc93c7oforigin/main961640c68and8162b874e,test_adopt_shown_default_ignorables.py,test_adopt_spelled_unambiguous.py,test_pinned_copy_text.py,test_adopt_plan_source_branch_shown.py,test_stdout_encoding.py,test_path_guard_hygiene.pyandtest_repo_hygiene.py: 496 passed, 1 skipped, 0 failed.Merge-trees
git merge-treeof this head withorigin/mainis clean. So is each of the 13 other open PRs that touchadopt-project.pyorscripts/repo_shape.py, against both this head and the scratch merge: #1154, #1153, #1143, #1141, #1126, #1125, #1123, #1122, #1121, #1119, #1118, #1106 and #1105.Fix round 1:
git merge-treeof8162b874ewithorigin/mainand with #1105 (the one other open PR that touchestests/test_pinned_copy_text.py) is clean, and so is the scratch merge with #1105.Out of scope: filed separately by the lane
The other helpers that test only
str.isprintable(), or userepr, let the same characters through. They are:repr-based_showncopies invalidate-repository-naming.py,validate-manifest.pyandvalidate-pins.py, andrepo_shape.shown_path;shape_materialize.py's--leadingunsafe-valuerefusal;repo_shape.double_quoted, which writes them raw into the plan file;adopt-project.py's_worded,_line_shown,unwritable_valuesand_refuse_an_unwritable_clone_url.They are filed separately by the lane as #1165 (see #1165), and are untouched here.
🤖 Generated with Claude Code
Lane: openreposhape-4 (openRepoShape-4)
Summary by Sourcery
Make terminal-invisible Unicode characters unambiguous wherever adoption plans and value-refusal diagnostics display repository names.
New Features:
Bug Fixes:
main.Enhancements:
Tests: