Repository navigation
scripts/family.py: family-root-missing, both family-members-unreadable lines and siblings-script-missing's message name the holder's path as shown_path does, so U+202E, an ESC or a line feed in a --family-root no longer reaches the terminal - #1327
brettheap wants to merge 2 commits into
Conversation
…able` lines and `siblings-script-missing`'s message name the holder's path as `shown_path` does, so U+202E, an ESC or a line feed in a --family-root no longer reaches the terminal #1288 spelled `family-unreadable` and `family-wrong-kind` in `Family.open`. The refusals beside them still printed the holder's path as typed: a bidi override in its 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 main f39c670 over 76 real runs of `add`, `bump`, `remove` and `siblings` (all exit 2): every one of the 57 runs over a name that does not print put that character on stderr raw, and the 19 over a printable name printed it as typed. Each of these five texts now names its path through `shown_path`, which `family.py` already imports: 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 and no other word changes, and no code does. New tests/test_family_root_paths_shown.py: one run per site 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 a row that holds `siblings-script-missing`'s remedy as it was. Not in this part: `siblings-script-missing`'s remedy and `member-unknown`'s lines, which name the holder in a command a person pastes and which #1317 leaves as a decision, and the family root's own `bootstrap.py` and `validate-family.py`, which wait for #1310's `_shown` copies. Part of #1317 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Reviewer's GuideUISpell the holder paths safely in all five family refusal messages while preserving their surrounding wording.
TestsAdd regression coverage for unsafe and printable holder names, relative roots, all affected refusal sites, and the unchanged siblings remediation.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Independent review of #1327 (Part of #1317) for lane openRepoShape-5, by rv1317 (opus), at d5a4fe6: READY Verdict: no MUST and no SHOULD. There are 3 NITs, 1 observation and 4 follow-up candidates, all listed below. Every claim here comes from my own runs. Work folder: /workspace/projects/.lane-worktrees/openRepoShape-5/work/rv1317 (STATE.md, probes/, mut/, logs/). I made no GitHub writes. 1. The five sites, measured by real runs
2. Raw paths still left in scripts/family.py
3. The AST check
4. The rows
5. Mutants (mut/mutrun.py, logs/mutrun.out)
6. Gates (logs/gate243.out, logs/gate247.out)
7. Merge-trees (heads read fresh, logs/merge-trees.txt)
8. The record
NITs and observation
Follow-up candidates (for Brett Heap's word; not filed or drafted)
Trees: /workspace/projects/openRepoShape-worktrees/rv1317-review is clean at d5a4fe6. /workspace/projects/openRepoShape-worktrees/rv1317-mut is clean, detached at the local merge ecbdff4c3. Nothing of mine is still running. Lane: openreposhape-5 (openRepoShape-5) |
…s `family-unreadable` and `family-wrong-kind` in `Family.open`, not #1288 (an open issue), so it is true on main whichever of #1310 and #1327 lands first The docstring's first sentence said "#1288 spelled `family-unreadable` and `family-wrong-kind` in `Family.open`". On main #1288 is open and those two refusals still print the holder's path as typed: only #1310, #1288's draft, spells them. If this PR landed before #1310, the sentence would be untrue on main. It now says "#1310 spells" them, which holds whichever lands first. Line 5 of the docstring is the only line that changes: no row, no import and no other word of the file, and no change to scripts/family.py. rv1317's N1. Part of #1317 Lane: openreposhape-5 (openRepoShape-5) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
|
Delta check of #1327 (Part of #1317) for lane openRepoShape-5, by rv1317b (sonnet), d5a4fe6..aa1c71e: READY Verdict: no MUST and no SHOULD. There are 2 NITs and 1 observation, all in the new body text and none in the code. Every claim below comes from my own runs or reads, and I made no GitHub writes. My folder is 1. The diff
2. The commit
3. Gates (
4. The body (live, read at 23:28Z,
No other PR touches the new test file. This matches the body, labels included (#1312 is "ready").
5. Merge-trees (git 2.43.0,
In the #1310 merge, Findings
Lane: openreposhape-5 (openRepoShape-5) |
|
(lane openRepoShape-5, 2026-11-10T23:34Z) #1327's body, edited for rv1317b's NIT 1, NIT 2 and its observation. The head is unchanged, at
#1327 is READY at Lane: openreposhape-5 (openRepoShape-5) |



Goal
Five refusal texts in
scripts/family.pyname the holder's path the wayshown_pathdoes: as it is, or asreprspells it where a character in it is not printable. They arefamily-root-missing(Family.open, foradd,bumpandremove, andcmd_siblings, forsiblings), both lines offamily-members-unreadablein_checked_members_readable, andsiblings-script-missing's message. A U+202E, an ESC or a line feed in a--family-root, or in a folder above it, no longer reaches the terminal raw there: 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 first part of #1317 (v1.2.2): its refusal texts in
scripts/family.py. #1310, #1288's draft, spellsfamily-unreadableandfamily-wrong-kindin the same function; these are the refusals that stand beside them. It began as one commit,d5a4fe6b4, on mainf39c6707a(Round 1 below adds a second), and leaves #1317 open: the family root's own scripts and the lines a person pastes are the parts 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. Proof:
scripts/family.pyat the head and at main, with everyshown_path(...)wrap taken off both, are one AST (21 wraps at main, 26 at the head; the lane'swork/n1317/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
ghfirst on PATH,GH_TOKEN=bogus, an emptyGH_CONFIG_DIR,GIT_SSH_COMMAND=false,GIT_CONFIG_GLOBAL=/dev/nullandGIT_CONFIG_NOSYSTEM=1, offamily.pyover a--family-rootfolder 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). 76 runs, every one exit 2 before and after.f39c6707a: each of the 57 runs over a name that does not print put the U+202E or the ESC on stderr raw, or ended theREFUSEDline atwd-and began a lineWARNING forged-line: pwned/....siblings-script-missing) are clean in the message and still carry the name in the remedy'supdate-shape.py check --rootline, which this part leaves as it was (Known limits). The 19 printable runs print stderr byte for byte as at main.For example, the line feed under
family-root-missing, fromsiblings, before:and after:
family-root-missingscripts/family.py:559,Family.openadd,bump,bumpwith no--dry-run,remove; the folder empty, or not therefamily-root-missingscripts/family.py:10612,cmd_siblingssiblingswith and without--dry-run; the folder empty, or not therefamily-members-unreadablescripts/family.py:779,_checked_members_readable(members: 5)add,bump,removefamily-members-unreadablescripts/family.py:785(members: [5])add,bump, andremove, which reaches it too (rv1317 measuredremove: 6 runs, raw at main and clean at the head; the 8 runs and the counts in this row are n1317's, foraddandbump, as measured)siblings-script-missingscripts/family.py:10633, the message'sthere is no <script>siblingswith and without--dry-run, over a holder with afamily.yamland noscripts/siblings.pyEach site is
shown_path(...)of the path the text already named (path,root / MANIFEST,script), and the string around it is re-wrapped to keep to the file's line length.family.pyalready importsshown_path(:238), so no copy is made. The twofamily-root-missingrefusals name<root>/family.yamlwithrootresolved, as before: a holder typed relative is named by its absolute path, spelled.Text that pins these lines. A grep of
README.md,AGENTS.md,docs/(the handbook mirrordocs/handbook.htmltoo) for the three codes and for each changed refusal's words finds none;docs/release-notes/v1.0.0.md,v1.1.1.mdandv1.2.0.mdname some of the codes as the record of those releases. No doc changes.tests/test_cli_reference.pyandtests/test_agents_md_codes.pypass on both gits. Intests/, five files name these codes (test_family_py_unreadable.py,test_family_refuse_up_front.py,test_family.py,test_family_members_not_a_list.py,test_family_siblings_placement.py); all are in the gate and none changes.Rows
72 new rows in
tests/test_family_root_paths_shown.py:test_each_refusal_names_the_holder_as_shown_path_names_it, 13 runs x 4 names (52): each asserts exit 2, no traceback, nothing on stdout, exactly oneREFUSEDline that isREFUSED <code>: <the words before><the path, named as shown_path names it><the words after>, aRemediation:line that begins as the code's does, and no U+202E, no ESC and no line startingWARNING forged-linein what the refusal says. The 13 runs are the table's:family-root-missingsix ways (add,bumpover a folder that is not there,bumpwith no--dry-run,remove,siblings,siblingsover a folder that is not there),family-members-unreadablefive ways,siblings-script-missingtwo ways.test_a_holder_typed_relative_is_named_absolute_and_spelled, 4 runs x 4 names (16): the same assertions with--family-roottyped relative to the working folder, for bothfamily-root-missingfunctions,family-members-unreadable'sFamily.openandsiblings-script-missing. The refusal names the absolute path, spelled: not the text as typed.test_siblings_script_missing_keeps_its_remedy_as_it_was, 4 names (4): the remedy'supdate-shape.py check --root <holder>isshlex.join's, as before, for every name. It pins what this part leaves to family.py, bootstrap.py, validate-family.py:family-root-missing,family-members-unreadable,siblings-script-missingprint the holder's path as typed andmember-unknownpastes it raw, so a bidi control, an ESC or a line feed in it reaches the terminal (follow-up to #1288) #1317's Scope question, so that the part that changes it changes the row.The new file is ASCII: its folder names come from
conftestandtest_load_yaml_refusals, which build theirs from escapes andchr(). Every row skips by name where its folder name cannot be made (unsafe_folder; the ESC and line-feed names also byconftest.POSIX_NAMESon Windows). The new file shares no run of 5 or more non-blank lines with another file undertests/orscripts/, and none with itself (measured).Run at main: the head's test file in the detached tree
n1317-mutover main'sscripts/family.py(sha2565fceaddf7901), git 2.43.0,-rfEs:family.py54 of the 72 new rows fail at main, every row over a name that does not print, and the 18 printable controls pass.
Mutants
Each applied alone in the detached tree
n1317-muton this head'sscripts/family.py, the 72 rows run, git 2.43.0,-rfEs; the file put back from a saved copy and its sha256 checked after each (b9f724a798fd). 15 mutants, 15 killed, none survived.Family.open'sfamily-root-missingback to{path}cmd_siblings'sfamily-root-missingback to{root / MANIFEST}family-members-unreadable, amembers:that is not a list, back to{path}family-members-unreadable, an entry that is not a mapping, back to{path}siblings-script-missing's message back to{script}repr(str(path)), a printable path toorepronly where a character is not printable and not U+202E)Family.opennames the holder as typed (Path(root_spec) / MANIFEST), not as resolvedcmd_siblingsnames it as typed (Path(args.family_root) / MANIFEST)siblings-script-missingnames the holder, not the script--rootvalue spelled too (out of this part)family-root-missinginFamily.open: "family root" to "family folder"siblings-script-missing: "holder's own copy" to "holder's own file"Family.openremedy: "creates one" to "makes one"Each site's revert (S1-S5) is killed by its own rows and the relative rows that reach it, and by no other site's (S5 also fails the remedy row, which asserts the message too). R1 fails the 18 printable controls (quotes added) and R3 the 18 U+202E rows; R2 fails every row over a name that does not print, since it spells without quotes. T1 and T2 fail only the relative rows (4 each: three names and the printable control), which is what those rows are for. T4 fails only the remedy row, for the three names that do not print. W1-W3 fail printable rows too, so the words around the path are pinned as well.
Runs
Every run through the lane's runner: a stub
ghfirst on PATH (and the suite's ownghguard ahead of it),GH_TOKEN=bogus, an emptyGH_CONFIG_DIR,GIT_SSH_COMMAND=false,GIT_CONFIG_GLOBAL=/dev/null, a blank git identity, git-filter-repo 2.47.0 (CI's pin;--versionsaysa40bce548d2c) 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 four files of more than 100 ids ran alone underflock.The gate list, 11 calls, 1010 ids a leg: the new file; the five files that name these codes (
tests/test_family_py_unreadable.py,tests/test_family_refuse_up_front.py,tests/test_family.py,tests/test_family_members_not_a_list.py,tests/test_family_siblings_placement.py); and the hygiene five andtests/test_no_auto_maintenance.py.git 2.43.0, head
d5a4fe6b4:git 2.47.1 (
L/tools/git247/bin/git), headd5a4fe6b4: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.One lane-set run (#1299's lesson) of the new file on git 2.43.0 under
LANES_LANE=openRepoShape-5: 72 passed (72 ids).Merges
Read fresh for Round 1 at 2026-11-10T23:24Z. The head is two commits on main
f39c6707a(d5a4fe6b4, thenaa1c71e79). Main is nowdcf63b8b9, as fetched at 2026-11-10T23:24Z: 5 commits sincef39c6707abygit log --oneline f39c6707a..origin/main(#1171's838358bf9, #1185's2af1d6644, #1237'sf7f34fb09, #1263'sa98fe7cb4and #1265'sdcf63b8b9), where this body said three before (#1171's was missed). None of them touchesscripts/family.py, the new test file,tests/conftest.pyortests/test_load_yaml_refusals.py(git diff --name-only f39c6707a origin/main). #1171's838358bf9changesscripts/repo_shape.pyamong other files;shown_pathis the same function atf39c6707aand atdcf63b8b9. The head merges with main cleanly. The only open PR that touchesscripts/family.pyis #1310 (draft, basefix/1279-refusals-shown); none touchestests/test_family_root_paths_shown.py. #1284, #1312, #1326 and #1209 are the open PRs that touch a file the new test file imports from (tests/test_load_yaml_refusals.pyandtests/conftest.py). Every merge is clean, #1209's too at its new head (it conflicted with main alone at13a2c58cb, when this branch was pushed).Round 1
rv1317's independent review of
d5a4fe6b4came back READY, with no MUST and no SHOULD (its report is posted on this PR as issuecomment-6781117827). This round answers its N1, N2 and O1: one new commit and this body.scripts/family.pyis byte for byte as it was atd5a4fe6b4, and no row changes. The PR is now two commits on mainf39c6707a:d5a4fe6b4, which the Goal's "one commit" and every measurement above describe, andaa1c71e79.aa1c71e797494ddf9d19a19981241f9a54c58f46: line 5 of the docstring oftests/test_family_root_paths_shown.pysaid "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 still print the path as typed, so a bidi control, an ESC or a line feed in it reaches the terminal raw (follow-up to #1279) #1288 spelledfamily-unreadableandfamily-wrong-kindinFamily.open". 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 still print the path as typed, so a bidi control, an ESC or a line feed in it reaches the terminal raw (follow-up to #1279) #1288 is open, and on main those two refusals still print{path}raw (scripts/family.py:576and:579-580at maindcf63b8b9;:577and:580-581at this head): only 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 ofcheck_pinname the path asshown_pathdoes (#1288) #1310, 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 still print the path as typed, so a bidi control, an ESC or a line feed in it reaches the terminal raw (follow-up to #1279) #1288's draft, spells them. If this PR landed first, the sentence was untrue on main. It now says "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 ofcheck_pinname the path asshown_pathdoes (#1288) #1310 spells" them, which holds whichever of 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 ofcheck_pinname the path asshown_pathdoes (#1288) #1310 and this PR lands first. One line changed (git diff --stat d5a4fe6b4 aa1c71e79: 1 file, 1 insertion, 1 deletion).f39c6707a. It now names main as fetched for this round,dcf63b8b9, and counts 5 bygit log, 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 inplan's lines and in theunsafe-valuerefusal, so a branchma<U+034F>inno longer prints asmain(#1128) #1171's838358bf9among them. The merge-tree block is re-run at the new head.family-members-unreadablerow at:785(members: [5]) namedaddandbump, andremovereaches it too. The row now names it, says rv1317 measured it (6 runs: raw at main, clean at the head), and keeps n1317's counts as they were measured.Gates at
aa1c71e79, through the lane's runner (-rsalone, CPython 3.12.3, git-filter-repo 2.47.0 (a40bce548d2c)), one pytest at a time, at most 100 ids a call except the two files that hold more, 511 ids a leg, rc=0 on both gits. The Runs section above is d5a4fe6's and stands.L/tools/git247/bin/git)tests/test_family_root_paths_shown.pytests/test_cli_reference.pyandtests/test_agents_md_codes.pytests/test_pinned_copy_text.pytests/test_no_auto_maintenance.pytests/test_path_guard_hygiene.py(alone, underflock)tests/test_repo_hygiene.py(alone, underflock)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.Known limits
family-members-unreadablelines oftemplates/family-root/scripts/bootstrap.py(members_of) andvalidate-family.pyneed the_showncopies 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 ofcheck_pinname the path asshown_pathdoes (#1288) #1310 adds to those files; main does not have them. They are a later part of family.py, bootstrap.py, validate-family.py:family-root-missing,family-members-unreadable,siblings-script-missingprint the holder's path as typed andmember-unknownpastes it raw, so a bidi control, an ESC or a line feed in it reaches the terminal (follow-up to #1288) #1317, after 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 ofcheck_pinname the path asshown_pathdoes (#1288) #1310 lands.siblings-script-missing's remedy (update-shape.py check --root <holder>, quoted byshlex.join, measured still raw above and pinned bytest_siblings_script_missing_keeps_its_remedy_as_it_was),member-unknown's two lines, and the callers family.py, bootstrap.py, validate-family.py:family-root-missing,family-members-unreadable,siblings-script-missingprint the holder's path as typed andmember-unknownpastes it raw, so a bidi control, an ESC or a line feed in it reaches the terminal (follow-up to #1288) #1317 lists under "Read, not probed". family.py, bootstrap.py, validate-family.py:family-root-missing,family-members-unreadable,siblings-script-missingprint the holder's path as typed andmember-unknownpastes it raw, so a bidi control, an ESC or a line feed in it reaches the terminal (follow-up to #1288) #1317's Scope paragraph calls them a decision to make, not a given: family.py, scaffold-project.py and bump-leg.py:init's plan rows and seven refusals name a holder, a folder, a lock, a remote path or a root as it is, so an ESC, a line break or U+202E in a path reaches the terminal as #692's refusals no longer let it #766 left such lines raw inside their shell quotes on purpose, and 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 ofcheck_pinname the path asshown_pathdoes (#1288) #1310'spin_rows_remediationis the first place that spells one.exc.loudly's(in <cwd>)(adopt-project.py, scaffold-project.py, update-shape.py, scripts/family.py and scripts/bump-leg.py:_init_refusednamesgit init's arguments raw, two refusals print git's or gh's output raw, andexc.loudlyprints a command, its directory and its output raw outside adopt-project.py (W1195's leftovers; follows #1152 and #1195) #1213).Not in this PR
rv1317's follow-up candidates, for Brett Heap's word. None is filed, and none is drafted for filing. Lines are at this head (
scripts/family.pyis as it was atd5a4fe6b4). C1 and C2 are in neither #1310 nor #1317's later parts as Known limits names them; C3 belongs to #1317's Scope question, which does not list it; C4 predates this PR.family-members-unrecognised(Family.rewritten,scripts/family.py:697-698) names<holder>/family.yamlraw ({self.path}). Rows reach it byadd(tests/test_family_add_refusals.py:443-470) and bybumpandremove(tests/test_family_dry_run.py:787-809).member-git-dir-cached(scripts/family.py:6636-6637) names<holder>/.git/modules/members/<P>raw (cached.as_posix()), and so does_deletion's display line "It is this directory:" (:6556). Itsrm -rfline is quoted for the shell. rv1317 measured both in process at the head: U+202E and an ESC go out raw, and a line feed forges a line. Existing rows reachmember-git-dir-cached(tests/test_family_add_refusals.py:553-590).family-branch-not-utf8(scripts/family.py:1212-1213) andfamily-index-locked(:10294-10295) are raw on purpose under Tracking: setup, scaffold, family and the shared helpers, creating projects and families #459. family.py, bootstrap.py, validate-family.py:family-root-missing,family-members-unreadable,siblings-script-missingprint the holder's path as typed andmember-unknownpastes it raw, so a bidi control, an ESC or a line feed in it reaches the terminal (follow-up to #1288) #1317's Scope paragraph cites them as the precedent but does not list them.tests/pins:family-root-missing's "neither of those is a family." (scripts/family.py:564),cmd_siblings' "not at the family folder around it." (:10616) and the sentence after "as upstream-added." insiblings-script-missing's remedy, "When the human says to take it ..." (:10643-10647). The rows check aRemediation:line only by its opening words, so a mutant that drops one survives (rv1317's X5: 72 passed).Part of #1317
Lane: openreposhape-5 (openRepoShape-5)
🤖 Generated with Claude Code
Summary by Sourcery
Safely render holder paths in family refusal messages without changing their wording or remediation behavior.
Bug Fixes:
Tests: