Skip to content

validate-repository-naming.py, validate-manifest.py, validate-pins.py, bootstrap.py, repo_shape.py, shape_materialize.py and adopt-project.py: every helper #1165 names asks #1128's default-ignorable table, so ma U+034F in is spelled by its code point wherever a line names it or the plan writes it, and a branch holding one is refused as one no person can see (#1165) - #1325

Draft
brettheap wants to merge 22 commits into
mainfrom
fix/1165-default-ignorables-spelled

Conversation

@brettheap

@brettheap brettheap commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1165

Stacked, then restacked. Built on #1171's head ce1dd661f (for #1128) while #1171 landed, then restacked onto #1171's squash 838358bf9 with 2 merges (#1171's final head c5c02e6dd, the update-branch merge that landed, then its squash 838358bf9; origin/main had not moved past it), carrying exactly the change: the changed lines of git diff ce1dd661f fb50d5165 (the one commit on #1171's head) and of git diff 838358bf9 0c53e651b (the restacked merge against main) have the same sha256, f837ac693bc879a4e77ecad5c187642de5dd5b1b0d7bd50ca71181482e27974f, over the same 8 files. Three commits follow the restack: 504d4ed13, RV1225's site, _unacted, which came to main with #1225 after #1171's last merge of main, so no commit on ce1dd661f could hold it; and 674e4e3d6, tests/test_yaml_reader_spaces.py's older_validator, which the gate found pins the line _branch_finding changes (see Gate); and 39af51527, the validators' _visible_repr escaping as ascii does, for SonarCloud's duplication condition (see SonarCloud). Three more follow for RV1165's review (see Fix round): 561810310, 5102ac4ef and 75ddbdaa9, tests and one comment, no tool changed.

What

#1128 (#1171) wrote Unicode's Default_Ignorable_Code_Point table into scripts/repo_shape.py (DEFAULT_IGNORABLE, 17 ranges, 4174 code points) and taught _shown, _spelled_character and checked_value's refusal to spell those characters. str.isprintable passes 267 of them, which a terminal draws as nothing: 263 combining marks (U+034F, the variation selectors U+FE00 to U+FE0F and U+E0100 to U+E01EF, and others) and the four Hangul fillers (U+3164 among them). Every other helper that asked str.isprintable alone, or spelled with repr, printed or wrote them raw, so ma U+034F in read as main. Each now asks the table, and spells such a character by its own rule:

  1. The repr-based _shown copies (scripts/validate-repository-naming.py, templates/assembly-root/scripts/validate-manifest.py, templates/assembly-root/scripts/validate-pins.py) and repo_shape.shown_path, which shape_materialize.shown_source is: repr's escape, 'ma\u034fin', through _visible_repr (each validator's) or visible_repr (the library's).
  2. shape_materialize.readable_branch took ma U+034F in for a branch, to be compared and handed to gh pr create --base: it is unseen-branch now, and its two refusals name the value with visible_repr. The root's two that hold its rule (repo_shape.py's YAML reader: Unicode spaces are stripped from text YAML keeps, the empty block key and k: {?: 1} still read, and three texts about the reader are one word out of date (what #635 left) #715) move with it, as the issue asks: validate-manifest.py's _branch_finding finds it (manifest-tracking-branch, manifest-leg-branch), named 'ma\u034fin', where it said nothing and the gate said manifest ok; and the assembly root's bootstrap.py _argument_fault faults it as UNSEEN, by its code point, where step (a) made ma U+034F in beside main in every leg.
  3. repo_shape.double_quoted (_escaped) writes it as its code-point escape, "ma\u034fin", in the plan and in the submodules: record, where it wrote it raw; the reader takes it back as the same name. _spelled_character is double_quoted(char)[1:-1] again, so 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's second rule in it is gone, with the same output (the sweep below).
  4. adopt-project.py: _worded names it outside the backticks (`ma`, then the character U+034F, then `in`); _line_shown and shape_materialize's copy spell it with visible_repr; unwritable_values and _refuse_an_unwritable_clone_url name the value with visible_repr; _from_the_remote says the step in words with the name _spelled, as it does for a name that does not print; _first_words and _first_said spell it with _spelled_character. They ask one new local helper, _seen: str.isprintable and no DEFAULT_IGNORABLE character.
  5. The comments' sites. RV1171's N5: _refetch (adopt-project.py: check and execute run with GIT_NO_LAZY_FETCH=1 and refuse a partial-clone source that lacks an object its branches, tags or HEAD reach as source-partial-clone, so neither fetches into the source any more (#1145) #1180) says the step in words. RV1171's N4: _spelled's "THE SPELLING IS THE PLAN'S OWN" holds again, since the plan now writes the escape _spelled prints; and unwritable_values' value is spelled "as unsafe-value spells one", visible_repr. RV1225's finding: _unacted, the helper a REFUSED block spells the command, its directory and its output with, and which adopt-project.py: a refused command's --- output --- block spells each argument and directory that holds a line feed where git names it, adopt-mount-unaddable spells git's output, and rows pin mutants R1, R3 and R10 (#1233) #1311 gives adopt-mount-unaddable, asks the table too.
  6. Docstrings that stated the old rule say the new one: double_quoted, shown_path, shown_source, readable_branch, _branch_finding, _argument_fault, each validator's _shown, _spelled, _spelled_character, _worded, _line_shown (both), _refetch, unwritable_values, _unacted, and submodule_record's sentence on what is spelled by its code point (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 use repr, so a combining mark, a variation selector or a Hangul filler in a name prints raw, and ma U+034F in reads as main #1165 item 4's last bullet).

No other output changes: the sweep below compares every helper's output, base against head, for every code point outside the table.

Measured (base vs head)

Each site handed ma<X>in, X one of U+034F, U+FE0F, U+E0100 and U+3164, on #1171's head ce1dd661f (_unacted on origin/main f39c6707a, where it is) and on this head; Python 3.12.3, Unicode 15.0.0. "Raw" means the character itself is in what the site printed or wrote.

Site Base Head
validate-repository-naming.py _shown raw, ma<U+034F>in 'ma\u034fin'
validate-manifest.py _shown raw 'ma\u034fin'
validate-pins.py _shown raw 'ma\u034fin'
shown_path, shown_source raw 'ma\u034fin'
readable_branch returned the name, no refusal REFUSED unseen-branch: tracking_branch is 'ma\u034fin', which holds U+034F, ...
readable_branch, a leading - unsafe-value, the value raw ... is '-ma\u034fin', which begins with ...
_branch_finding [] (manifest ok) FINDING manifest-tracking-branch: tracking_branch is 'ma\u034fin', which holds U+034F, ...
bootstrap _argument_fault None (the branch made) U+034F, a character that does not print or is white space
double_quoted "ma<U+034F>in" raw "ma\u034fin"
the plan file, end to end - path: "ma<U+034F>in.md" raw - path: "ma\u034fin.md"
_worded `ma<U+034F>in` raw `ma`, then the character U+034F, then `in`
_line_shown (both) `ma<U+034F>in` raw 'ma\u034fin'
unwritable_values 'ma<U+034F>in\n' raw 'ma\u034fin\n'
_refuse_an_unwritable_clone_url raw '/srv/ma\u034fin\n'
_from_the_remote `git branch 'ma<U+034F>in' 'origin/ma<U+034F>in'` a branch named `ma\u034fin` made from origin's branch of that name
_first_words raw fatal: 'ma\u034fin' does not appear
_first_said raw : HTTP 404: ma\u034fin Not Found
_refetch (N5) `git fetch --refetch --no-filter 'ma<U+034F>in'` a git fetch --refetch --no-filter from the remote named `ma\u034fin`
_unacted (RV1225) raw ma\u034fin

The same holds for U+FE0F, U+E0100 (\U000e0100) and U+3164.

The sweep. Every helper above, base against head, over all 0x110000 code points in ma<c>in, run twice: ce1dd661f against the first commit, and origin/main 838358bf9 against this head, _unacted included, with the same digests: for the 1,109,938 that are not default-ignorable, the sha256 of their outputs is the same on both, for every helper; of the 4174 that are, 267 came back raw on the base from each spelling helper and 0 do on the head. _spelled, _spelled_character and _shown give the same output on both for every code point, so dropping #1171's second rule from _spelled_character changed nothing.

The design, and its evidence

  • The table lives in scripts/repo_shape.py (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's DEFAULT_IGNORABLE_RANGES, DEFAULT_IGNORABLE, code_point_escaped, visible_repr). adopt-project.py and scripts/shape_materialize.py import it: they run from the shape repository beside its own library, and shape_materialize.py is in no copy list (its own comment on readable_branch).
  • Four pinned scripts carry their own copy: validate-repository-naming.py, validate-manifest.py, validate-pins.py and the assembly root's bootstrap.py. Each is copied into a root, and runs beside the scripts/repo_shape.py that root kept, which may predate the table: tests/test_pinned_copy_text.py's skew rule lists all four of the table's names in NEWER_THAN_A_KEPT_LIBRARY, so importing one is refused. Each copy is the same 17 ranges as one pattern, in \u escapes (asked of no unicodedata, so 3.12 and 3.14 read one table), with a comment saying why it is written there; the three validators add _visible_repr, repo_shape.visible_repr's twin, which writes such a character as ascii does, \u034f: the escape code_point_escaped writes, as the copy rows check for every default-ignorable code point.
  • The copies are held to the library by two new rows over every code point: each copy's pattern matches exactly the code points repo_shape.DEFAULT_IGNORABLE does, and each validator's _visible_repr is repo_shape.visible_repr for every default-ignorable character. The _shown rows assert each validator's spelling equals shown_path's, test_pinned_copy_text.py's rule for the copies.
  • Pinned copies, digests and sentences. No digest or pin of these files is checked into this repository (a root pins its copies' sha256 when it is scaffolded, so a root sees upstream-changed rows for them, as for every change to them). The test that compares the copies is test_the_pinned_scripts_spell_a_path_as_the_library_does (tests/test_pinned_copy_text.py), which passed unchanged at 39af51527 and holds three more paths since the Fix round (S1). No sentence in README.md, AGENTS.md, the handbook or docs/cli.md describes these spellings. One test pinned a changed line's bytes, tests/test_yaml_reader_spaces.py's older_validator, which rewrites _branch_finding's test in the text to make an older validator: the gate found it (see Gate), and 674e4e3d6 keeps it in step.

Rows

tests/test_default_ignorables_spelled.py (new, ASCII only), 99 rows at 39af51527 and 111 at 75ddbdaa9 (the Fix round's S1 adds 12): one per site and character (U+034F, U+FE0F, U+E0100, U+3164), each asserting the character is in none of what the site prints or writes and that the site names it by its own rule; the plan file end to end (file, stdout and stderr); N4's two sentences; N5's _refetch; RV1225's _unacted and a REFUSED block; and the copies of the table.

Code Result
#1171's head ce1dd661f, the first commit's 91 rows 91 failed, 0 passed
origin/main 838358bf9 (#1171's squash), all 99 99 failed, 0 passed
the restacked merge 0c53e651b, before 504d4ed13 8 failed (RV1225's), 91 passed
504d4ed13, and this head 39af51527 (674e4e3d6 changes no row and no code) 99 passed at each

Every row fails on the base for its own reason: the character raw, no refusal or finding, or (the 7 copy rows) AttributeError, no copy.

Mutants

Each put one site's old test back, ran the new file, and restored the file, its sha256 checked.

Mutant Site put back Rows failed (of 99)
M1 scripts/validate-repository-naming.py: naming._shown asks str.isprintable alone, spells with repr (rerun on 39af51527) 4
M2 templates/assembly-root/scripts/validate-manifest.py: manifest._shown asks str.isprintable alone, spells with repr (rerun on 39af51527) 4
M3 templates/assembly-root/scripts/validate-pins.py: pins._shown asks str.isprintable alone, spells with repr (rerun on 39af51527) 4
M4 scripts/repo_shape.py: shown_path asks str.isprintable alone, spells with repr 16
M5a scripts/shape_materialize.py: readable_branch's check without the table 4
M5b scripts/shape_materialize.py: readable_branch's unsafe-value back on !r 4
M5c scripts/shape_materialize.py: readable_branch's unseen-branch back on !r 4
M6a templates/assembly-root/scripts/validate-manifest.py: _branch_finding's check without the table 4
M6b templates/assembly-root/scripts/validate-manifest.py: _branch_finding's finding back on !r (rerun on 39af51527) 4
M7 templates/assembly-root/scripts/bootstrap.py: _argument_fault without the table 4
M8 scripts/repo_shape.py: double_quoted's _escaped asks str.isprintable alone 32
M9 adopt-project.py: _worded groups by str.isprintable 4
M10 adopt-project.py: adopt._line_shown asks str.isprintable, spells with repr 4
M11 scripts/shape_materialize.py: shape_materialize._line_shown asks str.isprintable, repr 4
M12 adopt-project.py: unwritable_values back on !r 8
M13 adopt-project.py: _refuse_an_unwritable_clone_url back on !r 4
M14 adopt-project.py: _from_the_remote asks str.isprintable 4
M15 adopt-project.py: _first_words keeps what str.isprintable passes 4
M16 adopt-project.py: _first_said keeps what str.isprintable passes 4
M17 adopt-project.py: _refetch asks str.isprintable (N5) 4
M18 adopt-project.py: _seen is str.isprintable alone 32
M19 scripts/validate-repository-naming.py: naming's copy of the table drops U+3164 (rerun on 39af51527) 3
M20 templates/assembly-root/scripts/validate-manifest.py: manifest's copy of the table drops U+3164 (rerun on 39af51527) 4
M21 templates/assembly-root/scripts/validate-pins.py: pins' copy of the table drops U+3164 (rerun on 39af51527) 3
M22 templates/assembly-root/scripts/bootstrap.py: bootstrap's copy of the table drops U+3164 2
M23 scripts/validate-repository-naming.py: naming's _visible_repr keeps ascii's quotes (rerun on 39af51527) 5
M24 templates/assembly-root/scripts/validate-manifest.py: manifest's _visible_repr keeps ascii's quotes (rerun on 39af51527) 9
M25 templates/assembly-root/scripts/validate-pins.py: pins' _visible_repr keeps ascii's quotes (rerun on 39af51527) 5
M26 adopt-project.py: _unacted keeps what str.isprintable passes (RV1225) 8

Every mutant is killed. Each file was restored after its run and its sha256 matched. Dropping #1171's second rule from _spelled_character has no mutant: it is the same output (the sweep).

Gate

At 504d4ed13, the restacked merge with origin/main 838358bf9 plus RV1225's commit, in the landing gate's environment (a stub gh first on PATH, GH_TOKEN bogus, an empty GH_CONFIG_DIR, GIT_SSH_COMMAND=false, LANES_* unset, the filter-repo venv on PATH), in four shards, two at a time. 187 test files, of the head's 349: the new rows; every tests/test_*.py that names a function, constant or refusal code this PR changes (_shown, shown_path, readable_branch, _branch_finding, _argument_fault, double_quoted, _spelled, _worded, _line_shown, unwritable_values, _first_said, _refetch, _unacted, unseen-branch, unsafe-value, plan-unwritable-value, manifest-tracking-branch, and the rest); every one that names validate-repository-naming.py, validate-manifest.py, validate-pins.py or the assembly root's bootstrap.py, or runs them (the validators' and the template copies' tests); and test_repo_hygiene.py, test_path_guard_hygiene.py, test_cli_reference.py, test_shape_doctor.py and test_scaffold_leg_path_collisions.py. A test that only runs adopt-project.py or imports repo_shape is not in it: that is nearly every file.

Shard Files Passed Skipped Failed or errored
0 44 4243 25 5
1 47 2909 11 0
2 48 3547 3 0
3 48 4205 9 0
all 187 14904 48 5

Shard 0's 5 errors, and the fix. At 504d4ed13 shard 0 had 5 errors, all at setup of tests/test_yaml_reader_spaces.py's older_validator fixture, which makes an older validate-manifest.py by replacing _branch_finding's test, if not c.isprintable() or c.isspace()),, in its text: this PR split that line, so the count found 0 ("the validator no longer asks this"). The same file on a clean origin/main 838358bf9 worktree: 513 passed. 674e4e3d6 makes the fixture ask for the line as it now stands, and the file at 674e4e3d6: 513 passed, the 5 among them. 674e4e3d6 changes only that file, so every other shard's result stands for it.

Main moved after the restack, to f7f34fb09 (two commits, 2af1d6644 and f7f34fb09, touching adopt-project.py, tests/test_adopt_check_throwaway_repos.py, tests/test_adopt_plan_paths_spelled.py). git merge-tree of this head with it is clean, and this branch is not merged with it, so the gated head is the one pushed. On a scratch merge of 674e4e3d6 with f7f34fb09, main's two changed test files and the new rows: 390 passed, 6 skipped (case-folding disks only), 0 failed.

39af51527, for SonarCloud, changes only the three validators' _visible_repr. Gated again at 39af51527, two shards: the 33 files of the gate that name a validator by file name or by test name (test_validate_*, test_pin_validator*, test_neutral_pin_validator, test_chain_*, test_link_source_*, test_pin_source_*, test_validator_*, test_doctor_validator_*, test_pinned_* and the like), the new rows, test_yaml_reader_spaces.py, test_repo_hygiene.py, test_path_guard_hygiene.py and test_cli_reference.py: 3286 passed, 0 failed. The sweep at 39af51527 gives every helper the digest it gave at 504d4ed13, and 0 raw.

SonarCloud

  • At 674e4e3d6: failed, one condition, 7.2% duplication on new code (at most 3%). SonarCloud counted one block of 23 lines twice: the copy of the table and its two helpers, with _shown's body, in validate-repository-naming.py (:194) and validate-manifest.py (:485). The copies are there by design (the skew rule), so the copies were made shorter, not shared: 39af51527 drops each validator's _code_point_escaped for ascii(found[0])[1:-1], which is the same escape. A local count of the longest identical run of tokens, strings normalized: 129 tokens between those two files at 674e4e3d6 (flagged), 95 with validate-pins.py (not flagged), 86 at 39af51527. The other block SonarCloud lists for this PR, validate-pins.py :1435 beside validate-family.py :2010, is older code (86bf55304), not new.
  • At 39af51527: passed. Duplication on new code 0.0%, reliability, security and maintainability ratings A, hotspots reviewed 100%, 0 open issues, 0 hotspots.

Fix round (FX1165, for RV1165's S1 and N1 to N5)

RV1165 graded 39af51527 NOT READY (issuecomment-6782728560): S1, a SHOULD, five NITs, and R1, a SHOULD for the restack after #1322. Head 75ddbdaa9: three commits on 39af51527, tests and one comment, no tool changed (git diff 39af51527 75ddbdaa9 is 4 files). Please review the delta only.

  • S1, a table character beside something other than ASCII letters (561810310).
    • test_the_pinned_scripts_spell_a_path_as_the_library_does takes three more paths: "caf\u00e9\u034f" (beside printable non-ASCII), "ma\u034f\x1bin" (beside an ESC) and "ma\u3164in\n" (before a line feed). 11 paths, was 8; tests/test_pinned_copy_text.py is 90 rows, was 87.
    • test_shown_path_and_shown_source_escape_it and test_line_shown_escapes_it take a beside parameter, nothing or an ESC ("\x1b"), so each site is handed ma, the character, in, and ma, the character, an ESC, in, and must name the second 'ma\u034f\x1bin'. The first goes from 4 rows to 8 and the second from 8 to 16, so tests/test_default_ignorables_spelled.py is 111 rows, was 99.
    • The source stays ASCII, with \u and \x escapes: read back, the commit adds no byte above 0x7F and no raw control.
  • X13 to X16 (RV1165's exact old and new strings, from its driver; one replacement each, committed locally on a detached head in a scratch worktree, never pushed; the two files above run: 201 rows). Each file was restored and its sha256 checked (all four equal, the tree clean). Each survived at 39af51527, with 0 rows failed.
Mutant File Change Rows failed (of 201)
X13 scripts/repo_shape.py shown_path escapes the table only where the rest of the name is printable, repr beside a control 6: the 4 escape cases of test_shown_path_and_shown_source_escape_it, and the pinned paths ma\u034f\x1bin and ma\u3164in\n
X14 scripts/validate-repository-naming.py _visible_repr is ascii(text) 1: the pinned path caf\xe9\u034f
X15 adopt-project.py _line_shown escapes the table only where the rest of the line is printable 4: the adopt-project escape cases of test_line_shown_escapes_it
X16 templates/assembly-root/scripts/validate-manifest.py _visible_repr is ascii(text) 1: the pinned path caf\xe9\u034f

Gate at 75ddbdaa9, in the landing gate's environment (a stub gh first on PATH, GH_TOKEN bogus, an empty GH_CONFIG_DIR, LANES_* unset, the filter-repo venv on PATH), at most two pytest runs at a time:

Files Result
tests/test_default_ignorables_spelled.py, tests/test_pinned_copy_text.py, tests/test_adopt_spelled_unambiguous.py, tests/test_yaml_reader_spaces.py 859 passed (111 + 90 + 145 + 513)
the validators' and bootstrap.py's test files, 32 (every test_bootstrap_*.py, test_manifest_validator.py, test_naming_gate_spelled.py, test_naming_policy*.py, test_pin_validator.py, test_neutral_pin_validator.py, every test_validate_pins_*.py, test_validator_child_encoding.py, test_pinned_copy_text.py, test_pinned_copy_columns.py, test_reader_refusals_named.py, test_non_utf8_name_helpers.py, test_tracking_branch_ref.py, test_update_shape_pr_base.py) 2427 passed, 3 skipped, 0 failed (two runs, 1431 and 996)
tests/test_repo_hygiene.py 101 passed
tests/test_shape_doctor.py, tests/test_scaffold_leg_path_collisions.py, tests/test_adopt_shown_default_ignorables.py and tests/test_repo_hygiene.py 701 passed, 3 skipped, 0 failed

Two of those runs, 22 of the 32 files and the last row, were made at the local head 250175cc6, which differs from 75ddbdaa9 only in where three entries stand in one list of tests/test_pinned_copy_text.py (moved up, so that #1310's one-line change beside it merges clean). That file is in the first row, run at 75ddbdaa9, and no other file imports that list.

Merge-trees

git merge-tree --write-tree of this head 75ddbdaa9 with origin/main and with each open PR at its head as fetched on 2026-11-11:

The two conflicts are both in adopt-project.py. #1280 (lane 3's) conflicts in one region of _from_the_remote, where it writes remote for origin and this PR writes _seen(branch) for branch.isprintable(); it took origin/main dcf63b8b9, so origin/main alone merges clean with it now, and whoever restacks keeps _seen(branch). #1320 conflicts with origin/main on its own. #1322 is #1213's PR: db0eb87c3 is the tip of fix/1213-raw-command-output-spelled (fix/1213-raw-command-output-spelled-wip2 476bfdd3c is an older head of it).

#1310 (for #1288) merges clean and still collides. It adds the family root's validate-family.py, bootstrap.py and siblings.py to test_the_pinned_scripts_spell_a_path_as_the_library_does, each with its own _shown, and none asks the default-ignorable table. On a scratch merge of the two heads (never pushed), tests/test_pinned_copy_text.py and the new rows give 3 failed, 200 passed: each of this PR's three new paths, caf\u00e9\u034f, ma\u034f\x1bin and ma\u3164in\n, is spelled by each of those three copies as repr spells it, the character raw, where shown_path escapes it. So whichever of #1310 and #1325 lands second gives those three copies the table (and its _visible_repr), as the three validators have here; this PR does not, since its base has no family-root copy of _shown.

Not in this PR

🤖 Generated with Claude Code
Lane: openreposhape-4 (openRepoShape-4)

Summary by Sourcery

Ensure default-ignorable Unicode characters are detected and visibly escaped wherever repository names are validated, reported, or written to plans.

New Features:

  • Escape Unicode default-ignorable characters consistently when displaying names, branch values, command output, and generated plan content.
  • Reject branches containing default-ignorable characters and report them with visible code-point escapes.

Bug Fixes:

  • Prevent visually indistinguishable names such as ma U+034F in from being treated or displayed as main.
  • Keep generated plan paths and submodule records unambiguous while preserving their original values when read back.

Enhancements:

  • Centralize default-ignorable character handling across repository shape, materialization, adoption, bootstrap, and validation helpers.
  • Keep pinned validator and bootstrap copies synchronized with the shared default-ignorable character table.

Tests:

  • Add comprehensive coverage for default-ignorable characters across validators, branch checks, plan serialization, adoption output, refusal messages, and pinned script consistency.
  • Update compatibility coverage for fixtures that construct older validator versions.

Brett Heap and others added 18 commits October 21, 2026 13:09
… `_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]>
…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]>
…, bootstrap.py, repo_shape.py, shape_materialize.py and adopt-project.py: every helper that spells a name for a line or for the plan asks #1128's default-ignorable table, so `ma` U+034F `in` is spelled by its code point wherever a line names it or the plan writes it, and a branch holding one is refused as one no person can see (#1165)

`str.isprintable` passes 267 of Unicode's Default_Ignorable_Code_Point
characters, which a terminal draws as nothing (U+034F, the variation
selectors, the Hangul fillers). #1171 wrote the table into
`scripts/repo_shape.py`; every other helper that asked `str.isprintable`
alone, or spelled with `repr`, printed or wrote them raw. Each asks the
table now, and spells one by its own rule:

- the three validators' `_shown` and `repo_shape.shown_path` (so
  `shape_materialize.shown_source`): `repr`'s escape, `'ma\u034fin'`;
- `shape_materialize.readable_branch` refuses such a branch as
  `unseen-branch`, and names a refused value with `visible_repr`;
  `validate-manifest.py`'s `_branch_finding` finds it and the assembly
  root's `bootstrap.py` `_argument_fault` faults it, as #715's rule asks
  of all three;
- `repo_shape.double_quoted` writes its code-point escape into the plan
  and the `submodules:` record, which the reader takes back as the name;
  `_spelled_character` is `double_quoted(char)[1:-1]` again;
- `adopt-project.py`'s `_worded`, `_line_shown` (and `shape_materialize`'s),
  `unwritable_values`, `_refuse_an_unwritable_clone_url`,
  `_from_the_remote`, `_first_words`, `_first_said` and `_refetch`
  (RV1171's N5), through a new `_seen`.

RV1171's N4: `_spelled`'s "THE SPELLING IS THE PLAN'S OWN" and
`unwritable_values`' "as `unsafe-value` spells one" hold again. The
validators and `bootstrap.py` carry their own copy of the table, in
`\u` escapes, since a root's `repo_shape.py` may be older than they are;
`tests/test_default_ignorables_spelled.py` holds each copy to the
library's over every code point.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…D block, asks the default-ignorable table too, so U+034F in git's words, a path or an argument is escaped there, `ma\u034fin` (RV1225; #1165)

#1225's `_unacted` came to main after #1171's last merge of main, so it
was not on the head #1165 was built on. It asked `str.isprintable` alone,
as `_first_said` did; it asks `_seen` now. #1311 gives
`adopt-mount-unaddable` the same helper.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… `_branch_finding` holds now that it asks the default-ignorable table, so the older manifest validator #715's update-shape rows run against is still made (#1165)

The fixture writes an upstream commit whose `validate-manifest.py` asks a
branch for a NUL alone, by replacing `_branch_finding`'s test in the text;
#1165 split that line in two, so the fixture's count found nothing and its
five rows errored at setup.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@brettheap brettheap added this to the v1.2.1 milestone Nov 10, 2026
@sourcery-ai

sourcery-ai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Data structures

Extend the shared Unicode spelling rules so default-ignorable characters are escaped in YAML output, visible paths, and checked-value refusals.

  • scripts/repo_shape.py L462-467, L3351-3355 (+2 small edits)

API

Make branch validation refuse visually invisible default-ignorable characters and spell refused branch names safely.

  • scripts/shape_materialize.py L1634-1641, L1659-1664, L3812-3818 (+1 small edits)
  • templates/assembly-root/scripts/bootstrap.py L653-664, L725-728, L737-738
  • templates/assembly-root/scripts/validate-manifest.py L479-509, L1111-1119, L1132-1134

Uses of the API

Update the naming, manifest, pins, and bootstrap copies to use the same default-ignorable table and escape invisible characters in displayed names.

  • scripts/validate-repository-naming.py L157, L188-214, L221-223
  • templates/assembly-root/scripts/validate-pins.py L1534-1560, L1567-1569

Implementation

Apply the visibility rule throughout adoption and materialization messages, branch instructions, and refusal output so invisible characters are escaped rather than shown raw.

  • adopt-project.py L4188-4196, L5224-5229, L5255-5259 (+13 small edits)
  • scripts/shape_materialize.py L80-81, L5943-5948

Tests

Add regression coverage for spelling and rejecting default-ignorable characters across helpers, output, plan serialization, and copied tables.

  • tests/test_default_ignorables_spelled.py L1-386

Update the pinned-copy spelling cases and the older-validator fixture to track the revised branch-check source line.

  • tests/test_pinned_copy_text.py L786-789
  • tests/test_yaml_reader_spaces.py L786-788, L793-796
  • tests/test_adopt_spelled_unambiguous.py L115 (removed lines)

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

….py: each `_visible_repr` escapes a default-ignorable character as `ascii` does, `\u034f`, with no `_code_point_escaped` of its own, so each copy of the table's helpers is shorter and writes the same escape (#1165)

`ascii(char)[1:-1]` is the shortest of `\x`, `\u` and `\U`, in lowercase
hex: `repo_shape.code_point_escaped`'s escape for every character. The
three copies carried eight lines of their own for it, and SonarCloud
counted the copies in the naming gate and the manifest validator as one
duplicated block of 23 lines (7.2% of the new code, over its 3%).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@brettheap

Copy link
Copy Markdown
Contributor Author

RV1165: independent review of #1325 at 39af5152: NOT READY

Lane 4's independent review of #1325 (for #1165), head 39af51527487f1d3cd020de98622939b80f94e9e (unchanged since the brief). I did not write #1325. Bench: /usr/bin/python3 3.12.3 (Unicode 15.0.0), the landing gate's environment (stub gh first on PATH, GH_TOKEN bogus, an empty GH_CONFIG_DIR, LANES_* unset, the filter-repo venv on PATH). Line numbers are at this head.

Summary. The code is right as far as I measured it. The table is Unicode's. The four copies are byte-equal. My own sweep agrees with the writer's. The refusals are within #1165. No text pin breaks, and SonarCloud's gate passed. It is NOT READY for one SHOULD: the rows hand every site only ma, one character, in, so four plausible mutants of the new spellings survive the rows and the existing files that test those functions (S1). One more SHOULD applies to the restack after #1322, not to this head (R1). Five NITs.

What I measured

1. The table and its copies

2. The sites, and my sweep

3. The refusals

4. Template copies and pins

  • No checked-in digest. The sha256 or blob id of any changed file, at the base or the head, appears nowhere in the merged tree (26 keys, git grep).
  • No text pin breaks. I grepped tests/ for each line the PR removes from its seven code files (63 lines of 16 characters or more). There was one hit, tests/test_adopt_spelled_unambiguous.py :115, and it is test logic, not a text pin (N3). The one text pin, older_validator in tests/test_yaml_reader_spaces.py, is kept in step by 674e4e3d6.
  • The copy comparisons are test_the_pinned_scripts_spell_a_path_as_the_library_does (8 paths, none holding a table character), the skew rule above, tests/test_validator_child_encoding.py (bootstrap's encoding copy), and the new rows.
  • The update and doctor paths. update-shape.py, shape-doctor.py and the scaffold compute each copy's digest from the standard's checkout when they run, so a root sees upstream-changed rows for these files, as for any change to them.

5. The rows and the mutants

The rows file has 99 rows (my count: 16 + 16 + 8 + 36 + 8 + 8 + 7).

My mutants, X1 to X16, are beyond the PR's 29. Each was a single exact replacement, committed locally on a detached head in rv1165-mut-wt and run against the rows file. After each, the head was checked out again and the file's sha256 checked; all 16 matched and the tree was clean.

Mutant File Change Rows failed (of 99)
X1 bootstrap.py copy drops the non-printable range U+2060-U+206F 1
X2 validate-manifest.py copy's U+180B-U+180F ends at U+180E 2
X3 shape_materialize.py _line_shown keeps the table's test, spells with repr 4
X4 repo_shape.py shown_path keeps the table's test, spells with repr 16
X5 adopt-project.py _seen asks the table with match, the first character only 12
X6 validate-pins.py _shown asks the table with match 4
X7 repo_shape.py the plan's reader keeps the backslash of an escape naming a printable default-ignorable; the writer's escape kept 8
X8 validate-repository-naming.py _visible_repr escapes before repr, so the backslash is doubled 5
X9 repo_shape.py _escaped escapes one only in the BMP 8
X10 bootstrap.py _argument_fault asks the table of the name, match(branch), not of each character 4
X11 shape_materialize.py readable_branch asks the table of the name, match(text) 4
X12 adopt-project.py _refuse_an_unwritable_clone_url back on !r, unwritable_values kept 4
X13 repo_shape.py shown_path escapes the table only where the rest is printable, repr beside a control 0: survives
X14 validate-repository-naming.py _visible_repr is ascii(text) 0: survives
X15 adopt-project.py _line_shown escapes the table only where the rest is printable 0: survives
X16 validate-manifest.py _visible_repr is ascii(text) 0: survives

The four survivors survive the existing files too. I ran each against the files that test its function, and each passes all of them:

  • X13: 650 passed, in test_pinned_copy_text.py, test_bump_leg_branch_and_push_line.py, test_dry_run_parity.py, test_chain_pin_sources.py, test_load_yaml_refusals.py, test_validate_pins_spelled_and_named.py, test_chain_remedy_callers.py and test_adopt_shown_default_ignorables.py.
  • X14: 467 passed, in test_pinned_copy_text.py, test_naming_gate_spelled.py, test_naming_policy.py and test_naming_policy_line_break.py.
  • X15: 749 passed, in test_adopt_manifest_values.py, test_adopt_plan_yaml_quoting.py, test_adopt_entry_paths.py and test_adopt_shown_default_ignorables.py.
  • X16: 353 passed, in test_pinned_copy_text.py, test_manifest_validator.py, test_reader_refusals_named.py and test_bootstrap_branch_bytes.py.

What the survivors let through, measured:

  • X13 and X15: ma U+034F ESC in is named 'ma<U+034F>\x1bin', the U+034F raw.
  • X14 and X16: caf U+00E9 U+034F is named 'caf\xe9\u034f' by the copy and 'caf<U+00E9>\u034f' by shown_path, so the copy no longer spells as the library does. The same holds for caf U+00E9 ESC.

S1 has the fix.

6. shape_materialize.unacted and #1322

7. Today's main, and the other merge-trees

8. Tests at the head

Run in the rules' environment, at most two pytest runs at a time:

  • The rows file and tests/test_yaml_reader_spaces.py: 612 passed (99 + 513).
  • The validators' and bootstrap.py's files, 30 of them: 2330 passed, 3 skipped, 0 failed. They are every test_bootstrap_*.py, test_manifest_validator.py, test_naming_gate_spelled.py, test_naming_policy*.py, test_pin_validator.py, every test_validate_pins_*.py, test_validator_child_encoding.py, test_pinned_copy_text.py, test_reader_refusals_named.py, test_non_utf8_name_helpers.py, test_tracking_branch_ref.py and test_update_shape_pr_base.py.
  • tests/test_shape_doctor.py, tests/test_scaffold_leg_path_collisions.py and tests/test_repo_hygiene.py: 653 passed, 3 skipped, 0 failed.

9. SonarCloud

  • The quality gate passed at 39af51527. I read it from the newest sonarqubecloud[bot] comment (2026-11-10T20:57:32Z), from gh pr checks 1325 (SonarCloud Code Analysis pass; package, tests and tests-git-bash pass, each check run on 39af51527487), and from SonarCloud's API.
    • project_pull_requests/list gives commit 39af51527487.
    • Every condition is OK: new reliability, security and maintainability ratings 1 (A), duplication on new code 0.0% against at most 3, hotspots reviewed 100%.
    • issues/search finds 0 open issues on the PR's new code, and hotspots/search finds 0 hotspots.

10. The body

Checked against what I measured:

Findings

S1 (SHOULD): the rows do not pin a table character beside anything but ASCII letters, and four plausible mutants survive.

  • Every row hands its site ma<c>in. X13 and X15 make shown_path and adopt's _line_shown escape the table only where the rest is printable, so U+034F next to an ESC prints raw. X14 and X16 replace a validator's _visible_repr with ascii(text), which its own docstring invites ("as ascii escapes it"), so the copy spells caf U+00E9 U+034F differently from shown_path.
  • A mutated copy no longer "spell[s] as shown_path spells", which test_the_pinned_scripts_spell_a_path_as_the_library_does requires of every copy. No row compares the copies on a name that mixes those characters, and that test has none of the table's characters in its 8 paths.
  • Each mutant passes the rows file. Each also passes every existing file that tests its function: X13 650 passed in 8 files, X14 467 in 4, X15 749 in 4 and X16 353 in 4 (section 5).
  • Fix:
    • Add "caf\u00e9\u034f", "ma\u034f\x1bin" and "ma\u3164in\n" to that test's parametrize. This holds the three copies to shown_path on a table character beside a control and beside printable non-ASCII, and kills X13, X14 and X16.
    • Add a beside-a-control input, ma<c>\x1bin, to test_shown_path_and_shown_source_escape_it and test_line_shown_escapes_it, which kills X15.
    • Then check that X13 to X16 fail.

R1 (SHOULD on the restack after #1322, not on this head): give shape_materialize.unacted the table.

N1 (NIT): body corrections.

N2 (NIT): templates/assembly-root/scripts/bootstrap.py :658 cites "(#715)" for the skew rule's reason.

N3 (NIT): tests/test_adopt_spelled_unambiguous.py :115-119, test_a_character_is_spelled_as_the_plan_writes_it.

N4 (NIT): the title says "every helper that spells a name for a line or for the plan asks #1128's default-ignorable table".

N5 (NIT, follow-up candidates for Brett Heap, not filed): two more raw routes for the body's "Not in this PR" list, beside validate-pins.py :943.

  • shape_materialize.manifest_misreads's {str(values[key])!r} (:6007), in the same sentence as _line_shown and {reading!r} (:5937). It is reachable only from a standard copy that writes the line bare.
  • shape_materialize.leg_path_problem's {value!r} (:5508, :5512), which --spec-path/--code-path reach before checked_value refuses the value.

Paths

My clone is /workspace/projects/openRepoShape-worktrees/_lane4-scratch/rv1165-clone. Its worktrees are rv1165-head-wt, rv1165-base-wt, rv1165-mut-wt (at the head, clean), rv1165-merge-wt and rv1165-m1322-wt. Scripts and logs are in /workspace/projects/openRepoShape-worktrees/_lane4-scratch/tools/run/rv1165/. No scratch commit was pushed.

Lane: openreposhape-4 (openRepoShape-4)

Brett Heap and others added 3 commits November 11, 2026 00:13
….py: a default-ignorable character is handed to `shown_path`, `shown_source`, both `_line_shown` and each pinned copy of `_shown` beside an ESC, beside a printable non-ASCII character and before a line feed, so a site or a copy that escapes the table only where the rest of the name is printable, or that spells with `ascii`, fails a row (RV1165's S1; #1165)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…AULT_IGNORABLE` cites #610, which made the skew rule, for the reason it holds the table rather than imports it, not #715, the branch rule (RV1165's N2; #1165)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…_as_the_plan_writes_it` asserts `_spelled_character(char) == double_quoted(char)[1:-1]` for every code point it sweeps, the default-ignorables included, since `double_quoted` escapes them and the carve-out that said it did not is gone (RV1165's N3; #1165)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@brettheap brettheap changed the title validate-repository-naming.py, validate-manifest.py, validate-pins.py, bootstrap.py, repo_shape.py, shape_materialize.py and adopt-project.py: every helper that spells a name for a line or for the plan asks #1128's default-ignorable table, so ma U+034F in is spelled by its code point wherever a line names it or the plan writes it, and a branch holding one is refused as one no person can see (#1165) validate-repository-naming.py, validate-manifest.py, validate-pins.py, bootstrap.py, repo_shape.py, shape_materialize.py and adopt-project.py: every helper #1165 names asks #1128's default-ignorable table, so ma U+034F in is spelled by its code point wherever a line names it or the plan writes it, and a branch holding one is refused as one no person can see (#1165) Nov 11, 2026
@sonarqubecloud

Copy link
Copy Markdown

@brettheap

Copy link
Copy Markdown
Contributor Author

FX1165: RV1165's S1 and N1 to N5 on #1325. New head 75ddbdaa. Please review the delta only.

Head 75ddbdaa93b7e74839dd01e7435b2115e404834b, pushed without force (was 39af51527): three commits, 4 files, tests and one comment, no tool changed. git diff 39af51527 75ddbdaa is the delta. No new case failed at the head, so no tool was touched.

S1 (561810310).

  • test_the_pinned_scripts_spell_a_path_as_the_library_does takes three more paths: "caf\u00e9\u034f", "ma\u034f\x1bin" and "ma\u3164in\n".
  • test_shown_path_and_shown_source_escape_it and test_line_shown_escapes_it take a beside parameter, nothing or an ESC, so each site is also handed ma, the character, an ESC, in, and must name it 'ma\u034f\x1bin'.
  • Counts: tests/test_default_ignorables_spelled.py 99 -> 111 rows (4 -> 8 and 8 -> 16); tests/test_pinned_copy_text.py 87 -> 90. All pass at the head.
  • The source stays ASCII with \u and \x escapes: read back with /usr/bin/python3 -I, the added lines hold no byte above 0x7F and no raw control, and tests/test_default_ignorables_spelled.py holds none at all.

X13 to X16, RV1165's exact old and new strings, one replacement each, in a scratch worktree on a detached head (never pushed), the two files above run (201 rows). Each file restored, sha256 checked (all four equal), tree clean:

Mutant Change Rows failed (of 201) at 75ddbdaa At 39af51527
X13 repo_shape.shown_path escapes the table only where the rest is printable 6: the 4 escape cases of the shown_path row, and the pinned paths ma\u034f\x1bin, ma\u3164in\n 0
X14 validate-repository-naming.py _visible_repr is ascii(text) 1: the pinned path caf\xe9\u034f 0
X15 adopt-project.py _line_shown escapes the table only where the rest is printable 4: the adopt-project escape cases of the _line_shown row 0
X16 validate-manifest.py _visible_repr is ascii(text) 1: the pinned path caf\xe9\u034f 0

N2 (5102ac4ef). templates/assembly-root/scripts/bootstrap.py :658 cites #610. A template file: committed before it was gated, and no test pins that comment's text.

N3 (75ddbdaa9). The default-ignorables carve-out and its comment are gone from test_a_character_is_spelled_as_the_plan_writes_it: it asserts _spelled_character(char) == double_quoted(char)[1:-1] for every code point it sweeps. tests/test_adopt_spelled_unambiguous.py: 145 passed.

N4. The title now says "every helper #1165 names asks #1128's default-ignorable table", with the rest and the (#1165) end kept.

N1 and N5 (the body). Edited from the live body (Sourcery's summary section kept as it stands). The opening paragraph names 674e4e3d6 for older_validator; _not_a_name is at :284; the Merge-trees list gives today's heads (#1322 db0eb87c3, origin/main dcf63b8b9, and every open PR). "Not in this PR" lists, as follow-up candidates for Brett Heap, never filed: shape_materialize.manifest_misreads's {str(values[key])!r} (about :6007) and shape_materialize.leg_path_problem's {value!r} (about :5508 and :5512). The body also says 111 rows now, and that test_the_pinned_scripts_spell_a_path_as_the_library_does holds three more paths. Closes #1165 is the first line, and closingIssuesReferences reads [1165].

R1 is not done, as briefed: main has no unacted yet. The body's "Not in this PR" now says that after #1322 lands, #1325 is updated to give shape_materialize.unacted the table, with rows through unacted and CommandFailed.loudly.

Gate at the head, in the rules' environment (stub gh first on PATH, GH_TOKEN bogus, an empty GH_CONFIG_DIR, LANES_* and GIT_SSH_COMMAND unset, the filter-repo venv on PATH), at most two pytest runs at a time:

  • the rows file, tests/test_pinned_copy_text.py, tests/test_adopt_spelled_unambiguous.py and tests/test_yaml_reader_spaces.py: 859 passed (111 + 90 + 145 + 513), at the head;
  • the validators' and bootstrap.py's 32 test files: 2427 passed, 3 skipped, 0 failed;
  • tests/test_repo_hygiene.py: 101 passed, at the head; with tests/test_shape_doctor.py, tests/test_scaffold_leg_path_collisions.py and tests/test_adopt_shown_default_ignorables.py: 701 passed, 3 skipped, 0 failed.
  • 22 of the 32 files, and the last group, ran at the local head 250175cc6, which differs from the pushed head only in where three entries stand in one list of tests/test_pinned_copy_text.py; that file ran at the head, in the first group.

Merge-trees at 75ddbdaa: origin/main dcf63b8b9 clean, and 30 of the 32 other open PRs clean. The two conflicts are in adopt-project.py: #1320 9d71536d1, which conflicts with origin/main on its own, and #1280 47c547984, which took origin/main dcf63b8b9 and now merges it clean, so its conflict is with this PR, in one region of _from_the_remote (lane 3's remote for origin against _seen(branch)). It conflicted with 39af51527 too, so this round did not add it; whoever restacks keeps _seen(branch).

One thing to schedule, not fixed here: #1310 (for #1288). It merges clean (my first version of the S1 paths conflicted with its one-line change in the same list, so they sit at the top of it now). But on a scratch merge of the two heads (never pushed), tests/test_pinned_copy_text.py and the new rows give 3 failed, 200 passed: #1310 adds the family root's validate-family.py, bootstrap.py and siblings.py to that test, and each one's _shown spells all three new paths as repr does, the character raw, where shown_path escapes it. Whichever of #1310 and #1325 lands second needs those three copies to ask the table. The body's Merge-trees section says so.

SonarCloud at 75ddbdaa93b7e74839dd01e7435b2115e404834b: Quality Gate passed (new reliability, security and maintainability ratings 1, duplication on new code 0.0%, hotspots reviewed 100%), 0 new issues, 0 hotspots. CI tests and tests-git-bash were still pending when this was posted.

Lane: openreposhape-4 (openRepoShape-4)

@brettheap

Copy link
Copy Markdown
Contributor Author

RVD1165: delta review of FX1165's round at 75ddbdaa: READY

Lane 4's delta review of FX1165's round on #1325 (for #1165), head 75ddbdaa93b7e74839dd01e7435b2115e404834b (still the PR's head when I posted). I did not write it. The question was whether the round settles RV1165's S1 and N1 to N5 (issuecomment-6782728560) and changes nothing else. It does. No MUST, no SHOULD. Three NITs, none blocking (D1 to D3). R1 is not graded here: it belongs to the update after #1322 lands, as briefed, and the body says so.

Bench: /usr/bin/python3 3.12.3, the landing gate's environment (stub gh first on PATH, GH_TOKEN bogus, an empty GH_CONFIG_DIR, GIT_SSH_COMMAND=false, LANES_* unset, the filter-repo venv on PATH), at most two pytest runs at a time, basetemps under /tmp.

The eleven checks

# Check Result
1 Ancestry PASS
2 The diff PASS
3 S1: rows pass, X13 to X16 fail at the head and pass at the base PASS
4 N2: the comment cites #610 PASS
5 N3: no carve-out, asserts equality for every swept code point PASS
6 N4, N1 and N5: title and body PASS (one stale item, D2)
7 #1310 on a scratch merge measured; information for lane 5
8 Tests at the head PASS
9 Today's main PASS
10 SonarCloud and CI PASS (tests pending)
11 FX1165's comment PASS (one stale item, D3)

1. Ancestry: PASS

git log --format='%H %P %an' 39af51527..75ddbdaa9 lists exactly three commits, a straight chain, each with one parent: 561810310 (parent 39af51527), 5102ac4ef (parent 561810310) and 75ddbdaa9 (parent 5102ac4ef). Author and committer of each is Brett Heap, with the estate's service address; each ends with the Sonnet 5.5 co-author trailer.

2. The diff: PASS

git diff --stat 39af51527 75ddbdaa9: 4 files, 18 insertions, 12 deletions: templates/assembly-root/scripts/bootstrap.py (1/1), tests/test_adopt_spelled_unambiguous.py (0/5), tests/test_default_ignorables_spelled.py (13/6), tests/test_pinned_copy_text.py (4/0). I read every changed line.

  • bootstrap.py: the one changed line is the comment (#715) to (#610). ast.dump of the file at 39af51527 and at the head is equal, so no code changed. No other tool file is in the diff.
  • Bytes: the 18 added lines hold 0 bytes above 0x7F, 0 raw controls, no tab and no CR (/usr/bin/python3 -I). The rows file holds 0 non-ASCII lines.
  • Nothing else references the changed test ids (git grep over the head).

3. S1: PASS

  • At the head, the rows file and tests/test_pinned_copy_text.py: 201 passed (111 + 90). Collected: test_the_pinned_scripts_spell_a_path_as_the_library_does 11 paths (was 8), test_shown_path_and_shown_source_escape_it 8 (was 4), test_line_shown_escapes_it 16 (was 8).
  • Mutants. X13 to X16 are RV1165's exact old and new strings. Each was one replacement in the working tree of a scratch worktree on a detached head, the two files run, then git checkout -- <file>, the sha256 compared with the head's blob, the tree checked clean. X17 to X19 are my own, beyond RV1165's four.
Mutant File Change Failed at 75ddbdaa9 (of 201) Failed at 39af51527 (of 186)
X13 scripts/repo_shape.py shown_path escapes the table only where the rest is printable 6: the 4 escape cases of the shown_path row, and the pinned paths ma\u034f\x1bin and ma\u3164in\n 0 (survives)
X14 scripts/validate-repository-naming.py _visible_repr is ascii(text) 1: the pinned path caf\xe9\u034f 0 (survives)
X15 adopt-project.py _line_shown escapes the table only where the line is printable 4: the adopt-project escape cases of test_line_shown_escapes_it 0 (survives)
X16 templates/assembly-root/scripts/validate-manifest.py _visible_repr is ascii(text) 1: the pinned path caf\xe9\u034f 0 (survives)
X17 (mine) templates/assembly-root/scripts/validate-pins.py _visible_repr is ascii(text), the third validator 1: caf\xe9\u034f not run
X18 (mine) scripts/shape_materialize.py _line_shown printable-gated, the mirror of X15 4: the shape_materialize escape cases not run
X19 (mine) adopt-project.py _spelled_character keeps a printable default-ignorable raw 1: test_a_character_is_spelled_as_the_plan_writes_it (run on that row alone) not run

The sha256 after each of the seven restores equals the head blob's (X15 and X19 share adopt-project.py): repo_shape.py 5e905f00, validate-repository-naming.py f220e2ca, adopt-project.py 4684ccfa, validate-manifest.py a5182818, validate-pins.py e60b291d, shape_materialize.py 54550667. The base counts confirm RV1165's finding: at 39af51527 the same four mutants give 186 passed (99 + 87) each. FX1165's table (6, 1, 4, 1 and 0, 0, 0, 0) reproduces exactly.

4. N2: PASS

bootstrap.py :658 now reads (#610). The skew rule is test_no_pinned_script_imports_what_an_older_library_lacks ("THE SKEW RULE") in tests/test_pinned_copy_text.py; git log -S finds it first in 30676c907, whose subject ends (#610) (#634), and bootstrap's three earlier skew sentences (:399, :484, :1434) already cite (#370, #610). #715 is the YAML reader's Unicode-space issue, not the skew rule.

5. N3: PASS

The if DEFAULT_IGNORABLE.match(char): block and its comment are gone from test_a_character_is_spelled_as_the_plan_writes_it. The loop now asserts adopter._spelled_character(char) == double_quoted(char)[1:-1] for each of the 65,539 code points it sweeps (the 65,540 minus the backtick), with no other carve-out. The docstring has no stale claim. DEFAULT_IGNORABLE and code_point_escaped are still imported and still used by the other test in the file (:203, :207), so no unused import. The file: 145 passed. X19 above fails this row.

6. N4, N1 and N5, the title and the body: PASS

7. #1310 on a scratch merge: information for lane 5, not a finding against this round

8. Tests at the head: PASS

In a clone checked out at 75ddbdaa9:

Files Result
the rows file, test_pinned_copy_text.py 201 passed (111 + 90)
test_adopt_spelled_unambiguous.py, test_yaml_reader_spaces.py, test_repo_hygiene.py 759 passed (145 + 513 + 101)
the 13 test_bootstrap_*.py, test_validator_child_encoding.py, test_pinned_copy_columns.py, test_bom_reads.py 886 passed, 3 skipped, 0 failed
scratch merge 8f2073403 of origin/main a6f1374b0 and the head: the rows file, test_pinned_copy_text.py, test_adopt_spelled_unambiguous.py, test_yaml_reader_spaces.py 859 passed (111 + 90 + 145 + 513)

I did not re-run FX1165's larger 32-file group (2427 passed) or its 701 group; bootstrap.py changed only a comment (the AST is equal), and the 886 above cover its test files.

9. Today's main: PASS

git merge-tree --write-tree origin/main 75ddbdaa9, main at a6f1374b0 (#1304 has landed since the body's list): clean, tree 7f6cb296b. It differs from main in exactly the PR's 11 files (+601/-71); 8 equal the head's blobs, and the 3 that differ (adopt-project.py, scripts/repo_shape.py, scripts/shape_materialize.py) carry main's own changes since 838358bf9.

10. SonarCloud and CI: PASS, with tests pending

  • Quality Gate passed at 75ddbdaa9. The newest sonarqubecloud[bot] comment (6783314599, 00:33:44Z) says 0 new issues, 0 accepted issues, 0 security hotspots, 0.0% duplication on new code. SonarCloud's API agrees: project_pull_requests/list gives commit 75ddbdaa9, analysis 00:32:41Z, gate OK; new reliability, security and maintainability ratings 1, duplication 0.0, hotspots reviewed 100; issues/search 0 open; hotspots/search 0.
  • gh pr checks 1325: SonarCloud Code Analysis pass, package pass, tests-git-bash pass, tests pending (run 42932165516, in progress since about 00:33Z when I last read it). No check has failed.

11. FX1165's comment (6783360779): PASS

Every fact it states reproduces: the head and the 3 commits; the file counts; 99 to 111 rows (4 to 8, 8 to 16) and 87 to 90; all pass at the head; the ASCII claim; the X13 to X16 table; N2, N3 (145 passed), N4; the body edits; 859 = 111 + 90 + 145 + 513; 101 for test_repo_hygiene.py; the #1310 collision (3 failed, 200 passed, and why); SonarCloud. One item is stale (D3).

Findings (all NITs, none blocking)

Paths

My clone is /workspace/projects/openRepoShape-worktrees/_lane4-scratch/rvd1165-clone; worktrees rvd1165-mut-wt (at the head, clean) and rvd1165-merge-wt (a scratch merge, local only), both beside it. Scripts and logs: /workspace/projects/openRepoShape-worktrees/_lane4-scratch/tools/run/rvd1165/. Nothing was pushed.

Lane: openreposhape-4 (openRepoShape-4)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant