Skip to content

family.py, bootstrap.py, validate-family.py: family-root-missing, family-members-unreadable, siblings-script-missing print the holder's path as typed and member-unknown pastes it raw, so a bidi control, an ESC or a line feed in it reaches the terminal (follow-up to #1288) #1317

Open

Description

@brettheap

Follow-up to #1288. It is filed from #1310's Known limits (#1310 is the draft PR for #1288, stacked on #1284), which says: "family-root-missing in scripts/family.py (Family.open, line 559, and the siblings subcommand, line 10611) still names <root>/family.yaml raw; measured at this head, an ESC in --family-root reaches stderr." The independent review of #1310 (NIT 1, #1310 issuecomment-6773301382) found more refusals beside it that print a path raw, among them family-members-unreadable in the family root's own bootstrap.py and validate-family.py. The other candidate that Known limits names, _by_hand's other lines in update-shape.py, is filed on its own.

What #1288/#1310 do, and what is left. #1288's table makes fourteen missing, unreadable and wrong-kind refusals name the path as shown_path does, or through the tool's own _shown where the skew rule wants a shipped copy to carry one. For scripts/family.py they are family-unreadable and family-wrong-kind in Family.open; for the holder's bootstrap.py and validate-family.py, family-manifest-missing, family-manifest-unreadable and the two shape-pin refusals. The refusal that stands in front of family.py's two, in the same function, is family-root-missing, and it prints the same path raw. Beside the ones #1288 lists, the same tool and the same two holder scripts have family-members-unreadable (the holder's members: is not a list, or holds a row that is not a mapping; #864 gave all three files the same words), and family.py has siblings-script-missing and the lines member-unknown pastes, which name the holder through shell_quoted (repo_shape.py:3765: it quotes a word, it does not spell it, so a quote passes an ESC and a line feed through).

Measured. The runs were real, with a stub gh first on PATH, GH_TOKEN=bogus, an empty GH_CONFIG_DIR, GIT_SSH_COMMAND=false and GIT_CONFIG_GLOBAL=/dev/null, with the holder in 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), and a printable name (wd <e-acute> and a space). For family.py the folder is --family-root itself; for the two holder scripts it holds a git repository Acme with the script and repo_shape.py copied into its scripts/, and --root names Acme. Line numbers are at main f2a6527e9 (#1289's squash, 2026-11-10T14:12Z). 92 runs, every one exit 2. Each of the 66 runs over a name that does not print, in the rows below, puts the U+202E or the ESC on stderr raw, or ends its line at wd- and begins a line WARNING forged-line: pwned/...; each of the 23 printable runs prints the folder as typed. The three runs of remove's member-unknown, which names no path, are the control and print no raw character. 68 of the 92 were run again at #1310's head 6b9a4ece5 and answered the same.

code site reached by runs raw
family-root-missing scripts/family.py:558-559, Family.open add, bump, remove, each with and without --dry-run; the folder empty, or not there 36 27 of 27
family-root-missing scripts/family.py:10609-10610, cmd_siblings siblings with and without --dry-run; the folder empty, or not there 16 12 of 12
family-members-unreadable scripts/family.py:777-778 (members: 5) and :783-784 (members: [5]), _checked_members_readable add, bump, remove (:777); add (:783); a family.yaml of kind family-manifest 16 12 of 12
family-members-unreadable templates/family-root/scripts/bootstrap.py:1999-2001 (members: 5) and :2005-2006 (members: [5]), members_of the holder's own scripts/bootstrap.py --root <holder> --no-fetch 8 6 of 6
family-members-unreadable templates/family-root/scripts/validate-family.py:4991-4993 (members: 5), _run_checks the holder's own scripts/validate-family.py --root <holder>, with contracts/repository-naming.yaml present (without it the run is refused yaml-unreadable first) 4 3 of 3
siblings-script-missing scripts/family.py:10630 (the message's there is no {script}) and :10637-10638 (the remedy's shlex.join([... "--root", str(root)])) siblings --dry-run over a holder with a family.yaml and no scripts/siblings.py 4 3 of 3
member-unknown scripts/family.py:9595 (_family_line) and :2341 through :1237 (_switch_command): the REFUSED line names no path, its remedy names the holder twice bump --dry-run for a member the holder lacks, a family.yaml with members: [] 4 3 of 3

For example, family-root-missing over the line-feed folder, from siblings:

REFUSED family-root-missing: <D>/wd-
WARNING forged-line: pwned/family.yaml does not exist, so this is not a family root
Remediation: `family.py init --org <org> --family <Name>` creates one; point --family-root at the HOLDER ...

Read, not probed: these also spell the holder through shell_quoted into a line a person pastes, as member-unknown's does (measured above), and no run of mine reached them.

  • _family_line's other callers: scripts/family.py:2373 (_add_command, init's NEXT STEPS), :6592 and :6595 (member-already-present), :6742 and :6745 (member-duplicate-id, in add), :8895 (member-duplicate-id, in bump).
  • _switch_command's other callers: scripts/family.py:1281 and :1317.

Not a regression. Neither #1284 (136b38d12..86ab76db4) nor #1310 (86ab76db4..6b9a4ece5) touches any line above. The text around each site (a window of the lines around its token) is byte for byte the same at 86ab76db4, 6b9a4ece5 and main; only the line numbers move. 136b38d12..86ab76db4 also carries main's own merges (its scripts/family.py hunks include the _family_line and _off_the_tracking_branch helpers), and the two sites that use them are absent at 136b38d12 and identical at main. #1310's own changes to scripts/family.py are two lines of Family.open (:576, :580, family-unreadable and family-wrong-kind). In the two holder scripts #1310 adds a _shown (bootstrap.py:374, validate-family.py:604 at its head) and spells the refusals around the family-members-unreadable lines, and leaves those three lines as they were.

Expected. No refusal code changes, and no word of any refusal but the path.

Acceptance. One row per site in the table, and one per caller under Read, not probed once it is probed. Each row runs the real tool over a folder whose name holds U+202E, an ESC and a line feed (skipping by name where the filesystem cannot make the folder, as #1310's rows do), and holds: exit code as before; no raw U+202E or ESC on stdout or stderr; no forged line; the printable run byte for byte as now. The rows for bootstrap.py and validate-family.py also run each copy beside the repo_shape.py of 51a9c5f10, from before #1168, as #1310's rows do. Each row fails on main and passes with the fix. The rows that pin the printable words today stay as they are: 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 and tests/test_family_siblings_placement.py name these codes.

Scope, for whoever takes this. The refusal texts (the first five rows, and siblings-script-missing's message) are the core and follow #766 and #1288 exactly. The pasted lines (siblings-script-missing's remedy, member-unknown's, and the callers under Read, not probed) are a widening: #766 (closed) named the holder through shown_path in seven refusals of init and _checked_branch and left the lines a person pastes raw inside their shell quotes on purpose, and the code says so (scripts/family.py:1201, :1274, :10276, each citing #459; scripts/bump-leg.py:1759 for its root). #1310's pin_rows_remediation is the first place that spells such a line, so applying its rule here is a decision to make, not a given; the issue can be cut to the refusal texts and the pasted lines filed apart. The two holder scripts' rows wait for #1310 either way.

Related, not overlapping. #1213 (open) names exc.loudly's (in <cwd>) and command line raw in several tools; none of the lines above is in its table. No open pull request touches these lines: of the 32 open at main f2a6527e9, #1310 is the only one that edits scripts/family.py or the holder's bootstrap.py, and it edits none of the lines named above (only Family.open's :576 and :580, and the new _shown copies); #1263 edits validate-family.py in _checked_out, _refuse_an_unreadable_git_dir and _check_member_tree and #1296 edits siblings.py, neither near these lines.

Lane: openreposhape-5 (openRepoShape-5)

Activity

  1. added this to the v1.2.2 milestone on Nov 10, 2026
  2. brettheap commented on Nov 10, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-11-10T18:30:55Z, for #1317

    Logged in lanes/log/openRepoShape-5.md at 742bf2bc5ebc44bb0f8817d529510eee41189b95.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#1317:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#1317"`, kept where the row or its body names `#1317`:
    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 and four of `check_pin` name the path as `shown_path` does (#1288)	fix/1288-refusals-shown-more	OPEN
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `1317` as a whole token:
       none
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions