Skip to content

templates/family-root/scripts/bootstrap.py and validate-family.py: the three family-members-unreadable refusals name family.yaml through each file's own _shown, so U+202E, an ESC or a line feed in a --root no longer reaches the terminal - #1328

Draft
brettheap wants to merge 1 commit into
fix/1288-refusals-shown-morefrom
fix/1317-family-root-scripts-shown

Conversation

@brettheap

@brettheap brettheap commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Goal

The three family-members-unreadable refusals of a family holder's own scripts name the holder's family.yaml through that file's own _shown, as #1310's spelled lines do: as it is, or as repr spells it where a character in it is not printable. They are templates/family-root/scripts/bootstrap.py's two lines in members_of (a members: that is not a list, and an entry that is not a mapping) and templates/family-root/scripts/validate-family.py's one in _run_checks (a members: that is not a list). A U+202E, an ESC or a line feed in a holder's --root, or in a folder above it, no longer reaches the terminal raw from these refusals: a bidi override reordered the line, an ESC reached stderr as the control it is, and a line feed began a line of the path's choosing.

This is the second part of #1317 (v1.2.2): the family root's scripts, which the first part (#1327, scripts/family.py) left for the _shown copies #1310 adds. Stacked on #1310 (fix/1288-refusals-shown-more, head daaa5ad8a): this PR's base is that branch, and the PR restacks onto main after #1284 and #1310 land. It is one commit, 1020728f2, on daaa5ad8a, and leaves #1317 open: the lines a person pastes are the part left (Known limits).

No refusal code changes, no word of any refusal but the path, and no code. A printable holder is named byte for byte as before. The first line of bootstrap.py's members: refusal is re-wrapped so that it stays inside 79 columns, with the same words ("expected a list" moves to the next string). Proof that nothing else moved: each of the two files at daaa5ad8a and at this head, with every _shown(...) call taken off, is one AST (bootstrap.py 2 calls at daaa5ad8a, 4 at the head; validate-family.py 4 and 5; the lane's work/n1317c/proof_ast.py), and a copy of the head with one word changed is not.

The sites (measured before and after)

Real runs, with a stub gh first on PATH, GH_TOKEN=bogus, an empty GH_CONFIG_DIR, GIT_SSH_COMMAND=false, GIT_CONFIG_GLOBAL=/dev/null and GIT_CONFIG_NOSYSTEM=1, of each script from a holder Acme (a git repository carrying the script, bootstrap.py where siblings.py needs it, and repo_shape.py in its scripts/) made under a folder named with U+202E (wd-pl<U+202E>an), then an ESC (wd-<ESC>[31mRED), then a line feed (wd-<LF>WARNING forged-line: pwned), then a printable name (wd <e-acute> and a space). validate-family.py ran with contracts/repository-naming.yaml present (without it the run is refused yaml-unreadable first). 24 runs, every one exit 2 before and after.

For example, the line feed under bootstrap.py's members: 5, before:

REFUSED family-members-unreadable: <D>/wd-
WARNING forged-line: pwned/Acme/family.yaml: `members:` is 5, expected a list

and after:

REFUSED family-members-unreadable: '<D>/wd-\nWARNING forged-line: pwned/Acme/family.yaml': `members:` is 5, expected a list
code site at this head reached by refusal runs raw before raw after
family-members-unreadable templates/family-root/scripts/bootstrap.py:2008, members_of (members: 5) the holder's own scripts/bootstrap.py --root <holder> --no-fetch; its scripts/siblings.py --root <holder> --dry-run, which imports members_of 8 6 of 6 0 of 6
family-members-unreadable templates/family-root/scripts/bootstrap.py:2014 (members: [5]) the same two 8 6 of 6 0 of 6
family-members-unreadable templates/family-root/scripts/validate-family.py:4853, _run_checks (members: 5) the holder's own scripts/validate-family.py --root <holder> 4 3 of 3 0 of 3

Each site is _shown(manifest_path) where it was {manifest_path}; _shown is the file's own, which #1310 added by the skew rule (bootstrap.py:374, validate-family.py:604), so no import from repo_shape.py is added and a holder whose library predates shown_path runs as before. manifest_path is root / "family.yaml" with root resolved, as before: a holder typed relative is named by its absolute path, spelled. The refusals' other text, {rows!r}, {members!r} and {'; '.join(unread)}, spells a value with repr already.

Text that pins these lines. A grep of README.md, AGENTS.md and docs/ (the handbook mirror docs/handbook.html too) for the code and for each changed refusal's words finds none; docs/release-notes/v1.1.1.md names the code as the record of that release. No doc changes, and tests/test_cli_reference.py and tests/test_agents_md_codes.py pass on both gits. In tests/: tests/test_pinned_copy_text.py holds each _shown to shown_path and forbids an import an older library lacks (passes); tests/test_pinned_copy_columns.py (the siblings.py padding rule, no relation) passes; tests/test_family_members_not_a_list.py names the code and pins its printable words through the holder's three scripts and family.py (passes unchanged); #1310's tests/test_refusal_paths_shown_more.py runs these scripts too (passes). No ^id:-style regex reads these two scripts' text: the files that read them as text or bytes (tests/test_family.py:1565, tests/test_adopt_make_bootstrap_followups.py, tests/test_update_shape_kept_helper.py) look at other strings; all three pass at this head on git 2.43.0 (35 ids: 35 passed; 185 ids: 185 passed; 113 ids: 113 passed), run alone under flock where over 100 ids.

Rows

52 new rows in tests/test_family_root_scripts_paths_shown.py, in #1310's style (a_repository and FAMILY_SCRIPTS come from tests/test_refusal_paths_shown_more.py, NAMES, LIBRARY, older_library from tests/test_load_yaml_refusals.py, the folder helpers from conftest):

The new file is ASCII. Every row skips by name where its folder name cannot be made (unsafe_folder; the ESC and line-feed names also by conftest.POSIX_NAMES on Windows). The new file shares no run of 5 or more non-blank lines with another file under tests/ or scripts/ of this tree, and none with itself (measured); against #1327's tests/test_family_root_paths_shown.py, which is on another branch, the longest shared run is 6 lines (imports and the shared assert lines).

Run at daaa5ad8a: the head's test file in the detached tree n1317c-mut, whose bootstrap.py and validate-family.py are #1310's (sha256 8a3752cf7987 and d379d5800e93, equal to git show daaa5ad8a:<path>), git 2.43.0, -rfEs:

rows at daaa5ad at this head
test_each_refusal_..., 5 sites x U+202E, ESC, line feed (15) 15 fail pass
test_a_holder_typed_relative_..., 3 sites x U+202E, ESC, line feed (9) 9 fail pass
test_each_copy_spells_..., 5 sites x U+202E, ESC, line feed (15) 15 fail pass
the same, a printable holder (13, the controls) pass pass

39 of the 52 new rows fail at daaa5ad, every row over a name that does not print, and the 13 printable controls pass.

Mutants

Each applied alone in the detached tree n1317c-mut on this head's two files, the 52 rows run, git 2.43.0, -rfEs; both files put back from saved copies and their sha256 checked after each (7cacaeb167fa and 497296534dd2). 14 mutants, 14 killed, none survived. The rivals (R) are applied to _shown in both files at once.

mutant failed passed
S1 bootstrap.py's members: 5 line (:2008) back to {manifest_path} 15 37
S2 bootstrap.py's members: [5] line (:2014) back to {manifest_path} 15 37
S3 validate-family.py's line (:4853) back to {manifest_path} 9 43
R1 _shown of both files as repr(str(path)), a printable path too 13 39
R2 _shown of both as an escaper of the line feed and the ESC only (no quotes) 39 13
R2b _shown of both spelling (repr) only a path that holds a line feed or an ESC, so U+202E stays raw 13 39
R3 _shown of both without the bidi controls (repr only where a character is not printable and not U+202E) 13 39
T1 bootstrap.py's first line names manifest_path.name, the file alone, not the path 20 32
T2 validate-family.py's line names manifest_path.name 12 40
T3 bootstrap.py's second line names manifest_path.parent, the holder's folder, not family.yaml 20 32
W1 bootstrap.py's first line: "expected a list" to "expected a sequence" 20 32
W2 bootstrap.py's second line: "a member is not a mapping" to "a member is not a dict" 20 32
W3 validate-family.py's line: "expected a list" to "expected a sequence" 12 40
W4 bootstrap.py's second line given a Remediation: line it never had 20 32

Each site's revert (S1-S3) is killed by its own rows (the first row, the relative row that reaches it and the older-library row) and by no other site's. S1 and S2 also fail the siblings.py rows, which reach the same two lines. R1 fails the 13 printable controls (quotes added), R2b and R3 the 13 U+202E rows; R2 fails every row over a name that does not print, since it spells without quotes. T1-T3 fail the printable rows too, so the row asserts the path named, not just that something is spelled. W1-W4 fail printable rows too, so the words around the path are pinned (W4 adds a line, which the exact-one-line assertion catches).

Runs

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, CPython 3.12.3 (CI runs 3.14; no row asserts text that depends on the version), -rfEs, at most 100 ids a call, one basetemp per call; the files of more than 100 ids ran alone under flock. The head was committed before any gate (the tree was clean).

The gate list, 9 calls, 796 ids a leg: the new file; the files that name the code or run these scripts and that #1310 touches (tests/test_family_members_not_a_list.py, tests/test_refusal_paths_shown_more.py, tests/test_pinned_copy_text.py); tests/test_pinned_copy_columns.py; tests/test_cli_reference.py and tests/test_agents_md_codes.py; and the hygiene files and tests/test_no_auto_maintenance.py.

git 2.43.0, head 1020728f2:

file ids result
tests/test_family_root_scripts_paths_shown.py 52 52 passed
tests/test_family_members_not_a_list.py 156 156 passed
tests/test_refusal_paths_shown_more.py 92 92 passed
tests/test_pinned_copy_text.py 89 89 passed
tests/test_pinned_copy_columns.py 55 55 passed
tests/test_cli_reference.py, tests/test_agents_md_codes.py 70 70 passed
tests/test_no_auto_maintenance.py 60 58 passed, 2 skipped
tests/test_path_guard_hygiene.py 121 121 passed
tests/test_repo_hygiene.py 101 101 passed

git 2.47.1 (L/tools/git247/bin/git), head 1020728f2:

file ids result
tests/test_family_root_scripts_paths_shown.py 52 52 passed
tests/test_family_members_not_a_list.py 156 156 passed
tests/test_refusal_paths_shown_more.py 92 92 passed
tests/test_pinned_copy_text.py 89 89 passed
tests/test_pinned_copy_columns.py 55 55 passed
tests/test_cli_reference.py, tests/test_agents_md_codes.py 70 70 passed
tests/test_no_auto_maintenance.py 60 58 passed, 2 skipped
tests/test_path_guard_hygiene.py 121 121 passed
tests/test_repo_hygiene.py 101 101 passed

Skips, named: tests/test_no_auto_maintenance.py:222, 2 on each git, "the session began with GIT_CONFIG_GLOBAL set, and its file includes that one". No other skip.

On a local merge with main. Main moved to dcf63b8b9 and changed validate-family.py and tests/test_validate_family_unreadable.py (#1263). The head merged with main in the detached tree n1317c-mut (a local merge commit, never pushed; its tree is the merge-tree's main line below), and run there on both gits, -rfEs:

git 2.43.0:

file ids result
tests/test_family_root_scripts_paths_shown.py 52 52 passed
tests/test_validate_family_unreadable.py 102 102 passed
tests/test_refusal_paths_shown_more.py 92 92 passed
tests/test_family_members_not_a_list.py 156 156 passed
tests/test_pinned_copy_text.py 89 89 passed
tests/test_pinned_copy_columns.py 55 55 passed

git 2.47.1:

file ids result
tests/test_family_root_scripts_paths_shown.py 52 52 passed
tests/test_validate_family_unreadable.py 102 102 passed
tests/test_refusal_paths_shown_more.py 92 92 passed
tests/test_family_members_not_a_list.py 156 156 passed
tests/test_pinned_copy_text.py 89 89 passed
tests/test_pinned_copy_columns.py 55 55 passed

One lane-set run (#1299's lesson) of the new file on git 2.43.0 under LANES_LANE=openRepoShape-5: 52 passed (52 ids).

Merges

Main and the open PRs' heads were read fresh when the branch was pushed. The head is #1310's head plus one commit, so the merge with #1310's head is the head's own tree. The open PRs that touch these two files are #1310 (the base) and #1319 (validate-family.py); the others listed touch a file the new test file imports from (tests/conftest.py, tests/test_load_yaml_refusals.py) or that #1310 owns. #1327 (the first part of #1317: scripts/family.py and its own test file, no file of this PR) is listed for information; its head and this one merge clean (rc=0, last line below).

head 1020728f23bbaf457317d5848c46d303f9c02fd5 (tree a469ea97f9d2fa82ed9c5cffa2261b32764e940b) on #1310's head daaa5ad8a30101fd08d7a52b72966b89980e6772
origin/main dcf63b8b9b167a1308ce4eb9ba170163efc771a4; origin/fix/1288-refusals-shown-more daaa5ad8a30101fd08d7a52b72966b89980e6772
base #1310 daaa5ad8a: rc=0 tree=a469ea97f9d2fa82ed9c5cffa2261b32764e940b 
main dcf63b8b9: rc=0 tree=7b9967ab88c6ea3ebac900bfe439a73eefe5023f 
#1326 e73592062 (draft; fix/1196-paths-spelled-locale-and-env; tests/conftest.py): rc=0 tree=6371b1ce10e061b5d6c9c8e72c649fce1a8bd129 
#1319 25c52b414 (ready; main; templates/family-root/scripts/validate-family.py): rc=0 tree=c6f52a379afb07ca63fd53c89a3bb0984a683f37 
#1312 5235870f1 (ready; main; tests/conftest.py): rc=0 tree=14c1782d2caa0f639ce5fbb87d0d802393b71db2 
#1310 daaa5ad8a30101fd08d7a52b72966b89980e6772 (draft; fix/1279-refusals-shown; templates/family-root/scripts/bootstrap.py,templates/family-root/scripts/validate-family.py,tests/test_refusal_paths_shown_more.py): the base, above
#1284 86ab76db4 (draft; main; tests/test_load_yaml_refusals.py): rc=0 tree=a469ea97f9d2fa82ed9c5cffa2261b32764e940b 
#1209 01ee69763 (draft; main; tests/conftest.py): rc=0 tree=ac463df194ae1a7c4d4fce616dd616a4df60d16a 
#1327 aa1c71e79 (draft; main; Part of #1317's first part, scripts/family.py): rc=0 tree=decc8357cb81ee3c7889eed0731dbdab9cd07033 

Push read back: git ls-remote origin refs/heads/fix/1317-family-root-scripts-shown gives 1020728 (a new branch; pushed with an explicit refspec, no -u, no force)

Main moved to a6f1374b0 (#1304, which touches scripts/repo_shape.py, scripts/shape_materialize.py and adopt-project.py) after this branch was pushed. When this PR opened, the head merged with it cleanly (git merge-tree --write-tree, rc=0, tree 075bac71c9f6caff50872909dbe91e15fc839e54).

Known limits

Part of #1317
Lane: openreposhape-5 (openRepoShape-5)

🤖 Generated with Claude Code

Summary by Sourcery

Safely spell holder manifest paths in all family-root family-members-unreadable refusals while preserving existing refusal text and behavior.

Bug Fixes:

  • Prevent the family-root scripts’ family-members-unreadable refusals from emitting unsafe root paths containing bidi controls, escape characters, or line feeds directly to the terminal.

Tests:

  • Add coverage for unsafe and printable paths, relative roots, copied scripts, and older library versions across bootstrap, siblings, and validate-family refusal paths.

…e three `family-members-unreadable` refusals name `family.yaml` through each file's own `_shown`, so U+202E, an ESC or a line feed in a --root no longer reaches the terminal

#1310 gave the holder's `bootstrap.py` and `validate-family.py` a `_shown`
(`repo_shape.shown_path`'s rule, written in each file by the skew rule) and
spelled the refusals around these. The three `family-members-unreadable` lines
beside them still printed the path as typed: a bidi override in the holder's
folder name reordered the line, an ESC reached stderr as the control it is, and
a line feed began a line of the path's choosing. Measured at #1310's head
daaa5ad over 20 real runs (all exit 2) of the holder's own `bootstrap.py
--root <holder> --no-fetch`, its `siblings.py --dry-run` (which imports
`members_of`) and its `validate-family.py --root <holder>`: every one of the 15
runs over a name that does not print put that character on stderr raw, and the
5 over a printable name printed it as typed.

Each of the three texts now names `manifest_path` through the file's own
`_shown`: as it is where it prints, as `repr` spells it where a character in it
does not. A printable holder is named byte for byte as before. No refusal
code, no other word and no code changes; `bootstrap.py`'s first line is
rewrapped so that it stays in 79 columns, with the same words.

New tests/test_family_root_scripts_paths_shown.py: one run per refusal and way
in over a folder named with U+202E, an ESC, a line feed and a printable name, a
holder typed relative to the working folder, and each copy beside the
`repo_shape.py` from before #1168.

Not in this part: the lines a person pastes (`siblings-script-missing`'s remedy,
`member-unknown`'s lines and the like), which #1317 leaves as a decision.

Part of #1317

Lane: openreposhape-5 (openRepoShape-5)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@brettheap brettheap added this to the v1.2.2 milestone Nov 11, 2026
@sourcery-ai

sourcery-ai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Use each script’s existing _shown helper for the three family-members-unreadable path messages, preserving the refusal text while spelling unsafe paths.

  • templates/family-root/scripts/bootstrap.py L2009-2010, L2015
  • templates/family-root/scripts/validate-family.py L4854

Tests

Exercise the three refusals through the holder scripts and siblings.py, including unsafe and relative paths and copies paired with an older library.

  • tests/test_family_root_scripts_paths_shown.py L1-194

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

@sonarqubecloud

Copy link
Copy Markdown

@brettheap

Copy link
Copy Markdown
Contributor Author

Independent review of #1328 (Part of #1317) for lane openRepoShape-5, by rv1328 (opus), at 1020728: READY

I found nothing at MUST or SHOULD level. There are two NITs, both about the PR body's text, and two observations that need no action. Every claim the body makes that I measured came out as the body states it.

Findings

MUST: none.

SHOULD: none.

NIT 1: the Known limits bullet "Not surveyed" can now give the survey's result.

NIT 2: Known limits cites C1 to C4 "at #1327's head d5a4fe6", but #1327's head is now aa1c71e.

  • git diff --stat d5a4fe6b4 aa1c71e79 changes only tests/test_family_root_paths_shown.py, so the family.py line numbers still hold.
  • The note that this PR's tree has them "a few lines earlier" is close enough. At daaa5ad, C1's code line is the same line (697), and the C2 and C3 code lines are each one line earlier (6635, 10285, 1205).

Observation 1 (no action): the rows try only U+202E, an ESC and a line feed.

Observation 2 (no action): the skew holds even beside a library older than shown_path.

  • The older-library rows use 51a9c5f, which already defines shown_path (def shown_path at its line 3277). The body says so honestly.
  • I went further and ran the head's copies beside de92614's repo_shape.py. That is the parent of 30676c9, the commit that added shown_path, and it has no def shown_path. python3 -v shows the holder's copy is the one imported.
  • Result over 48 runs: 0 raw, the printable runs byte for byte as at daaa5ad, and every run exits 2.

1. The three sites, by real runs

Method.

  • Probe script: /workspace/projects/.lane-worktrees/openRepoShape-5/work/rv1328/probe.py. Comparison: analyze.py in the same folder.
  • Probe rules: stub gh first on PATH (L/tools/ghstub, exit 97), GH_TOKEN=bogus, an empty GH_CONFIG_DIR, GIT_SSH_COMMAND=false, GIT_CONFIG_GLOBAL=/dev/null, GIT_CONFIG_NOSYSTEM=1, no LANES_* variable, /usr/bin/python3 3.12.3.
  • Each run builds a holder Acme (git init, the script copies, repo_shape.py) under folders named: U+202E (wd-pl U+202E an), ESC (wd- ESC [31mRED), line feed (wd- LF WARNING forged-line: pwned), and printable (wd e-acute and a space).
  • Extras beyond the brief: CR, U+2066, TAB, and a byte that is not UTF-8.
  • Three tools x members: 5 / members: [5] x --root absolute and relative:
    • bootstrap.py --root <holder> --no-fetch
    • siblings.py --root <holder> --dry-run
    • validate-family.py --root <holder>, with contracts/repository-naming.yaml present.
  • The script copies were byte-checked: base bootstrap.py 8a3752cf7987 and validate-family.py d379d5800e93; head 7cacaeb167fa and 497296534dd2. These match the body.

Results with the tree's own library (96 runs at daaa5ad, 96 at the head; logs/analyze-own.txt):

  • Brief's names, at the five refusal sites (bootstrap and siblings each over both manifests, validate-family over members: 5), both --root modes:
    • 30 unprintable runs: all raw at daaa5ad, 0 raw at the head. "Raw" here means any character that is neither a line feed nor printable, or a line starting WARNING forged-line.
    • 10 printable runs: stdout and stderr byte for byte the same at both commits, with the probe folder normalised.
  • Every run exits 2 at both commits.
  • Nothing else changes. In each head run I put the spelled path back to the raw path. The output then equals daaa5ad's byte for byte in every run, except the non-UTF-8 name. At daaa5ad, Python's own backslashreplace already printed that name as \udcff, so it was never raw there; the head only adds the quotes repr gives.
  • CR, U+2066 and TAB: raw at daaa5ad, spelled at the head.
  • Control: validate-family.py over members: [5] is refused shape-pin-missing, spelled since bump-leg.py, family.py, update-shape.py and the roots' validate-manifest.py, bootstrap.py, siblings.py and validate-family.py: fourteen missing, unreadable and wrong-kind refusals and four of check_pin name the path as shown_path does (#1288) #1310. That holds for all 16 runs at both commits, identically.
  • Relative --root: the refusal names the resolved absolute path, spelled. For example, the head prints '<D>/wd-pl\u202ean/Acme/family.yaml': a member is not a mapping: 5.

Beside the older libraries (48 runs each, base and head):

  • old1168 (51a9c5f) and pre610 (de92614): 0 problems, the same pattern. Logs: logs/analyze-old1168.txt and logs/analyze-pre610.txt.

AST proof, re-measured with my own script (ast_check.py, output in logs/ast_check.txt):

  • With every _shown(x) replaced by x, base and head are one AST in each file.
  • _shown calls: bootstrap.py 2 at daaa5ad and 4 at the head; validate-family.py 4 and 5.
  • A copy with one word changed is not equal.
  • The repo_shape imports are identical at base and head.
  • Changed lines stay within 79 columns: bootstrap.py :2009 is 74 columns, validate-family.py :4854 is 77.
  • Site lines: bootstrap.py:2008 and :2014, validate-family.py:4853. _shown is at :374 and :604, as the body says.

2. The skew rule

3. What is left in the two files

Refusal texts were found with an AST survey of every Refusal(...) / unreadable(...) f-string (survey.py, output in logs/survey-*.txt), then each hit was read.

bootstrap.py: no refusal text names the holder path raw.

validate-family.py, refusal texts: none raw.

validate-family.py, lines that name the holder raw inside shell quotes (pasted lines, via shlex.quote(str(root))):

4. The rows

  • At the head: 52 passed (rv1328-g243-new).
  • With daaa5ad's two files swapped into rv1328-mut (rv1328-rows-base243): 39 failed and 13 passed.
    • The 39 are every unprintable row (13 U+202E, 13 ESC, 13 line-break): 15 first-row, 9 relative, 15 older-library.
    • The 13 printable controls pass.
    • Each failure is on the exact stderr-line assertion, after exit 2, no traceback and an empty stdout had passed.
    • Both files were restored and their sha256 checked equal to the head's.
  • Skip by name: I loaded a pytest plugin that makes Path.mkdir refuse a name holding U+202E, ESC or LF (plugins/rv1328_nomkdir.py). Result: 39 skipped, every one reading "this filesystem cannot hold the name: ...", and 13 passed (rv1328-rows-skip243). On Windows the ESC and line-break params also carry POSIX_NAMES.
  • Assertion strength: strong.
    • Each row asserts the exact single stderr line: the code, then the path as named_as gives it (repr(str(path)) or the raw path), then the words after.
    • It also asserts exit 2, an empty stdout, no traceback, no U+202E, no ESC and no forged line.
    • A fix that drops a word, adds a line, names the file or folder instead of the path, or quotes a printable path is killed (W1-W4, T1-T3, R1).
    • Naming the holder as typed is killed: X2 fails the 4 relative bootstrap rows.
    • The only gap is Observation 1, which is covered by the companion row.
  • Other body claims hold:
    • The new file is ASCII.
    • It shares no run of 5 non-blank lines with any file under tests/ or scripts/, nor with itself (dup.py).
    • It imports no fixture.
    • No file pins the two templates' bytes or sha256.

5. Mutants

Each was applied alone in rv1328-mut, the 52 rows run on 2.43.0, and both files restored by sha256 every time. Full output: logs/mutrun.out.

n1317c's 14, all killed, every count identical to the body's table (failed / passed):

mutant result
S1 15 / 37
S2 15 / 37
S3 9 / 43
R1 13 / 39
R2 39 / 13
R2b 13 / 39
R3 13 / 39
T1 20 / 32
T2 12 / 40
T3 20 / 32
W1 20 / 32
W2 20 / 32
W3 12 / 40
W4 20 / 32

Each site's revert fails only its own rows.

My two:

  • X1, a blocklist of the three characters in both _showns: survives the rows (52 passed). Killed by test_pinned_copy_text's _shown parity row (3 failed of 9).
  • X2, bootstrap.py naming the holder as typed (find_repo_root(start); root = start): killed, 4 failed (the relative bootstrap-not-a-list rows, the printable one included).

6. Gates

All runs went through L/tools/run10.sh with -rs only. git-filter-repo 2.47.0 reports --version a40bce548d2c, CPython is 3.12.3, and pytest ran one at a time. Single files over 100 ids ran alone under flock: notalist, pathguard, repohyg, vfunreadable, gitnotrunnable.

At the head 1020728, git 2.43.0 and git 2.47.1 give identical results:

file result
new file 52 passed
test_family_members_not_a_list.py 156 passed
test_refusal_paths_shown_more.py 92 passed
test_pinned_copy_text.py 89 passed
test_pinned_copy_columns.py 55 passed
test_cli_reference.py + test_agents_md_codes.py 70 passed
test_no_auto_maintenance.py 58 passed, 2 skipped
test_path_guard_hygiene.py 121 passed
test_repo_hygiene.py 101 passed

On a local merge with main a6f1374: merge commit 546c6d553 in rv1328-mut, never pushed. Its tree 075bac71c9f6 is the same as the merge-tree's. On both gits: the new file 52 passed, test_validate_family_unreadable.py 102 passed.

Extra (not in the brief): test_validate_family_git_not_runnable.py, which reads both files' text, 111 passed on 2.43.0.

Skips, named: tests/test_no_auto_maintenance.py:222, 2 on each git, "the session began with GIT_CONFIG_GLOBAL set, and its file includes that one". No other skip.

Logs: /workspace/projects/.lane-worktrees/openRepoShape-5/work/rv1328/logs/rv1328-g243-*.log, rv1328-g247-*.log, rv1328-mg*.log, rv1328-x243-gitnotrunnable.log.

7. Merge-trees

Heads were read fresh with ls-remote at 00:30Z; main was re-read at about 00:40Z and was unchanged. All rc=0 (logs/mt.txt, logs/mt-others.txt):

merge of the head with tree
#1310 head daaa5ad a469ea97f9d2 (the head's own tree)
main a6f1374 075bac71c9f6
#1327 head aa1c71e decc8357cb81
#1319 head 25c52b4 (the only other open PR touching validate-family.py) c6f52a379afb

No other open PR touches bootstrap.py or the new test file; 34 PRs were open.

The body's other lines were re-measured and match:

8. The record

Follow-up candidates (candidates only; not filed, not drafted; for Brett Heap's word)

CN1. templates/family-root/scripts/validate-family.py names the holder through shlex.quote(str(root)) in pasted lines. shlex.quote passes U+202E, an ESC and a line feed through raw (measured in-process). The lines:

  • THE LOCKSTEP RULE (_lockstep :221) and _switch_line (:287), which end member-commit-unresolvable's refusal (:1620, + rule at :1628) and the gitlink findings;
  • _bump_to (:2110) in member-id-malformed (:1805, :2175);
  • member-duplicate-id (:2083);
  • _mounted_by_hand (:3543) in member-gitlink-unnamed;
  • _removal_staged_said (:4460) in member-gitlink-removal-staged;
  • the closing findings line (:4911).

They belong with #1317's Scope question on pasted lines, but #1317 does not list them. They bear on this PR only through NIT 1.

rv1317's C1 to C4 and #1317's pasted lines are untouched by this PR. They are pending Brett Heap's rulings.

State

  • Nothing of mine is running. A sibling reviewer's run (rv1329) is live under its own lock; I did not touch it.
  • /workspace/projects/openRepoShape-worktrees/rv1328-review is clean at 1020728.
  • /workspace/projects/openRepoShape-worktrees/rv1328-mut is clean and detached at the local merge 546c6d553, which was never pushed.
  • The branch still reads 1020728 on origin. I made no GitHub writes.
  • My scripts, logs and STATE.md are in /workspace/projects/.lane-worktrees/openRepoShape-5/work/rv1328/.

Lane: openreposhape-5 (openRepoShape-5)

@brettheap

Copy link
Copy Markdown
Contributor Author

(lane openRepoShape-5, 2026-11-11T01:03Z) #1328's body, edited for rv1328's NIT 1 and NIT 2. The head is unchanged, at 1020728f2.

#1328 is READY at 1020728f2 by its independent review: no MUST and no SHOULD. It is stacked on #1310 and restacks onto main after #1284 and #1310 land.

Lane: openreposhape-5 (openRepoShape-5)

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

Development

Successfully merging this pull request may close these issues.

1 participant