Skip to content

shape-doctor.py, family.py and the family root's bootstrap.py and siblings.py: a family holder's members: that is not a list ends in a TypeError, or reads as a family with no members, where validate-family.py refuses family-members-unreadable #864

Closed

Description

@brettheap

Goal: a family holder's members: that is not a list, or that holds an entry that is not a mapping, is read by the doctor, family.py and the family root's bootstrap.py and siblings.py the way validate-family.py reads it, and in its sentence. A members: that is not a list is family-members-unreadable: ... `members:` is 5, expected a list, and an entry that is not a mapping is member-row: a member is not a mapping: 5. It is never a TypeError traceback, never a family with no members, and never an entry the next add, bump or remove deletes without a word.

Found by lane openRepoShape-4's W832 while writing #862 (#832), which took a project manifest's legs: in four readers and left this one: "a family holder's members: 5 ends the doctor in a TypeError at shape-doctor.py:1186". Measured on main 9f235da2, with a stub gh first on PATH, GH_TOKEN=bogus and an empty GH_CONFIG_DIR, on a real holder built as tests/test_family.py's family fixture builds one (two scaffolded members, family.py init, two adds), and, for the list values, also on a holder from init alone, where the family row has no mounted gitlink to name first. Each reader ran in a fresh copy with members: set to one value and committed. Not run: members: false and ''; a real fetch by bootstrap.py (run with --no-fetch --skip-members; the TypeError and the member count both come before either step); update-shape.py check on the pinned copies.

The sentence to say. validate-family.py already says it, in the copy every holder pins: templates/family-root/scripts/validate-family.py:1798-1804 refuses REFUSED family-members-unreadable: <holder>/family.yaml: `members:` is 5, expected a list (exit 2), and :1753-1754 finds FINDING member-row: a member is not a mapping: 5 (exit 1). Neither sentence has a test: git grep -n family-members-unreadable finds the one raise, and tests/test_validate_family_duplicates.py:290 names member-row in a docstring. It is the form of #714's manifest-legs (#826) and #862's legs_unread.

Pinned copies. templates/family-root/scripts/bootstrap.py is pinned in every holder (FAMILY_COPIED_VERBATIM, scripts/shape_materialize.py:525), and so is scripts/siblings.py (:533), which imports members_of from it and has no read of members: of its own. Each edit reaches a holder as an upstream-changed row on its next update-shape.py check (read, not run). shape-doctor.py and scripts/family.py run from a checkout of the standard and are not pinned. No test reads the text of members_of (git grep members_of tests/ finds nothing). Bundle the bootstrap.py edit with #819's, which edits the same file (far from members_of), so each holder takes one row for it.

Lines (path:line at main 9f235da2)

  • shape-doctor.py:1186 (Context.members; its one caller is check_members, :8557): members: 5 ends the whole report, and every other value that is not a list reads as an empty family. Measured, by shape-doctor.py --root <holder>:

    • members: 5: exit 1, nothing on stdout (the same with --json), and TypeError: 'int' object is not iterable at shape-doctor.py:1186, so the family row, which holds the gate's sentence, is never printed. Exit 1 is also the doctor's own INVALID code.
    • members: openXdox and members: {a: b}: ok members no members yet: a family with none is empty, not wrong, with detail {"members": []}, and one row above it FINDING family the project's own scripts/validate-family.py refuses (exit 2): REFUSED family-members-unreadable: ...; the verdict is INVALID (family) (exit 1). The members row is an ok that contradicts the row above it.
    • members: [5], [openXdox] and [null] (a holder from init alone): the same members row, beside FINDING member-row: a member is not a mapping: 5 ('openXdox', None). In the holder that mounts IRRS and IRSS it says no members yet too, with two gitlinks there.
    • A block list of the two real rows and - 5: members says 2 member(s) mounted at their pins; ..., and the family row says FINDING member-row: a member is not a mapping: 5.

    Direction: the members row is n/a, says that family.yaml's members: is not a list, in the gate's words and with the value spelled, and waits on the family row (waits_on), as it already does for a family.yaml that does not load (waiting_row, shape-doctor.py calls an assembly root whose project.yaml does not parse (a merge conflict) NOT A SHAPE ROOT, exit 2, and its NEXT line tells the reader to adopt that assembly root in place while the Triad row calls it a single repository #205) and as shape-doctor.py, bootstrap.py, bump-leg.py and update-shape.py: a legs: that is not a list, or holds an entry that is not a mapping, is said in #714's words, so the doctor's leg rows wait on the manifest row instead of calling the project one with no legs, bootstrap places no leg for it, and bump-leg.py and update-shape.py refuse it by name where each ended in a TypeError (#832) #862's legs_unread_row does for legs:. An entry that is not a mapping is said the same way, and the rows beside it are still checked. --json carries the same.

  • scripts/family.py:313 (Family.members, read by member :328, holding :350 and :353, and every row list the verbs build from it: :4599, :4632, :5266, :6401, :7649, :7730, :7794 and :7900): add, bump and remove end in a TypeError, or say the member is not there, or rewrite the entry away. Measured, by family.py <verb> --family-root <holder> ...:

    • members: 5: bump and remove (and each --dry-run) end in TypeError: 'int' object is not iterable at family.py:313, through Family.member from cmd_bump (:7126) and cmd_remove (:7848); add (and --dry-run) does through Family.holding from _checked_add_target (:4587). Exit 1, nothing printed before the traceback.
    • members: openXdox, {a: b}, [5], [openXdox], [null] (and 0): bump --member IRRS --to <commit> says REFUSED member-unknown: IRRS is not a member of InkRouter with Remediation: `family.py add --member <org>/IRRS` puts it in the family first., and remove --member IRRS says REFUSED member-unknown: IRRS is not a member of InkRouter, both exit 2, of a holder that mounts IRRS at members/IRRS. add --member InkRouter/IRQS refuses before it mounts anything, but says REFUSED family-members-unrecognised: <holder>/family.yaml has 0 `members:` line(s) where exactly one was expected, so this tool will not rewrite it, which is untrue of the line members: openXdox.
    • A block list of - 5 and the two real rows: bump, remove and add all exit 0, say nothing of the entry, and commit a family.yaml without it (git diff HEAD~1 HEAD -- family.yaml shows - - 5; the doctor and bootstrap did not name it either).

    Direction: refuse once, in Family.open, so that every verb stops before it fetches, mounts or rewrites: family-members-unreadable, exit 2, the gate's sentence for a value that is not a list and member-row's for an entry that is not a mapping, with the value spelled. A members: the tool cannot read is not one it may rewrite.

  • templates/family-root/scripts/bootstrap.py:480 (members_of; siblings.py:1200 calls it, and so does family.py siblings, which runs the holder's own siblings.py): a TypeError, or a family with no members. Measured, by the holder's scripts/bootstrap.py --no-fetch --skip-members, scripts/siblings.py --dry-run and family.py siblings --dry-run (the holder sits in a folder named InkRouter, so siblings.py gets past its parent-folder refusal):

    • members: 5: exit 1, nothing on stdout, TypeError: 'int' object is not iterable at bootstrap.py:480 in members_of (siblings.py and family.py siblings: through siblings.py:1200 in _load_family).
    • members: openXdox, {a: b}, [5], [openXdox], [null] (and 0): bootstrap: InkRouter (<holder>) — 0 member(s) ... family bootstrap ok, exit 0; siblings: InkRouter (<holder>) — 0 member(s) and no members declared. A family with none is empty, not wrong: `family.py add` is what puts one here., exit 0 (the same in the holder that mounts two members).
    • A block list of - 5 and the two real rows: — 2 member(s), exit 0, the entry unsaid.

    Direction: members_of refuses family-members-unreadable as it already refuses family-manifest-unreadable for a manifest that is not a mapping (:476-478), exit 2, so make bootstrap, make siblings, make park and family.py siblings stop before they place or fetch anything.

  • (a gate, beside the readers: take it here or split it) templates/family-root/scripts/validate-family.py:1753: --no-members never asks whether an entry is a mapping. member-row is made only in the members-checked loop (:1751-1755), which --no-members returns before (:1744). Measured: the block list of - 5 and the two real rows, validate-family.py --no-members prints family ok: InkRouter (inkrouter), 3 member(s) and exits 0 (without the flag: FINDING member-row: a member is not a mapping: 5, exit 1). --no-members is what CI runs when the members could not be checked out (validate.yml). A non-list members: is refused in both modes (family-members-unreadable, exit 2, measured). Direction: make the member-row finding before the --no-members return. It is a third pinned file (scripts/validate-family.py, :526), so a holder takes one more upstream-changed row, unless it goes into one of the open PRs that edit the same file (bootstrap.py and validate-family.py: a .gitmodules value git dies on as it reads the file fails make bootstrap naming the key, and the family gate names it in every mode, so update = None no longer ends family bootstrap ok (#768) #819, validate-family.py: the wrong-case move back mends .gitmodules, adds --sparse and moves an entry in the way aside, a row's staged removal and a url-less section are findings, and two refusals name a cure that works (#762) #820, family-root README.md and AGENTS-shape.md, and AGENTS.md: the holder's docs say its parent folder is named EXACTLY after its repository, case included, on every disk, and the never to hand-edit the members: block names the row repair validate-family.py asks for, whose commit is the person's #822).

Already behave (measured, nothing to change). With members: absent, members: alone (null) or members: [], in a holder with no mounted member: the doctor is COMPLIANT (exit 0) and its members row says no members yet: a family with none is empty, not wrong; validate-family.py says family ok: InkRouter (inkrouter), 0 member(s); bootstrap.py says 0 member(s) and family bootstrap ok; siblings.py says no members declared. A family with none is empty, not wrong; bump and remove say member-unknown, which is true there; add mounts the member (exit 0) for null and [], and refuses family-members-unrecognised for an absent members:, which is true there too. A test that pins these three keeps the fix from reading members: alone as a fault.

Read and not a line. shape-doctor.py:2946 (family_beside_project, the manifest kinds row for a family.yaml committed beside a project.yaml) already asks isinstance(members, list): with members: 5, [5] or openXdox it does not crash, and its finding says nothing checks the 0 member(s) it pins, a count of zero for a value that is not a list (measured on a scaffolded assembly root with a family.yaml added). The row is a FINDING whatever members: holds, so the verdict does not move.

Verify: a new tests/test_family_members_not_a_list.py, built as #862's tests/test_legs_readers_not_a_list.py and #443's tests/test_non_list_project_fields.py are, over tests/test_family.py's family and holder fixtures (the doctor through tests/test_shape_doctor.py's doctor and rows_of): one table of (YAML spelling, the sentence said) for 5, openXdox, {a: b}, [5], [openXdox], [null] and the block list of a real member and 5, run through the doctor, add, bump, remove, bootstrap.py, siblings.py and family.py siblings, each failing on main and passing with the change (the doctor's members row n/a and waits_on family; each refusal's exit 2 and sentence; the entry left in family.yaml by a refused verb, byte for byte, with no commit made). A mutant that puts each guard back to members or [] is caught. The three controls above pass as they did. Run, one file at a time and never the full suite, the files that read these sites: git grep -l members tests/ names them (tests/test_family.py, tests/test_family_siblings_placement.py, tests/test_doctor_legs_members_next.py, tests/test_doctor_members_spelled.py, tests/test_family_bootstrap_gate_order.py among them). The sites read a parsed value, so nothing differs by platform; measured on Linux only.

Overlaps. #862 (open, head 86f41d90; #832) edits shape-doctor.py right above the first line: it rewrites Context.legs and inserts Context.legs_unread directly above Context.members (its hunks -1181,2 and -1184,0 at its merge base fc867207), and adds legs_unread_row, the n/a shape the first line should copy. Land after it, or rebase onto it. #826 (open, head 680e26ab; #714) touches scripts/validate-repository-naming.py, templates/assembly-root/scripts/validate-manifest.py, templates/assembly-root/scripts/validate-pins.py and tests, and none of these files. Of the 24 open PRs that touch shape-doctor.py, scripts/family.py, the family root's bootstrap.py, siblings.py or validate-family.py, none changes a line that reads members: (measured by a diff of each against main for get("members"), def members, members_of, def holding, def member(, _load_family and family-members-unreadable); #819 pins the same bootstrap.py (bundle, as above), and #849, #846, #828 and #814 edit scripts/family.py elsewhere. No README, handbook or docs/cli.md sentence says how a members: that is not a list is read (git grep -i -e "not a list" -e "no members yet" -e "empty, not wrong" over them), so none is made false.

Parent: #459.

Milestone: v1.1.1. Nothing is lost: all three readers have iterated members or [] since the family shape landed (scripts/family.py and the family root's bootstrap.py in d0df8d32, 2026-09-03; the doctor's in 3d46ab59, 2026-09-10), nothing in v1.1.0 changed these reads, no tool here writes a members: that is not rows or [], and make validate runs the gate first and names the value. It takes a hand edit, and it is not a regression and blocks nothing in v1.1.0.

🤖 Generated with Claude Code

Activity

  1. added this to the v1.1.1 milestone on Oct 17, 2026
  2. brettheap commented on Oct 17, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-4, session 11c6c0ef-495a-4a05-94cf-811b7b0a1012@Eagle, 2026-10-17T22:11:26Z, for #864

    Logged in lanes/log/openRepoShape-4.md at df7ca3fc1e828abd99d1fb4be853c574eb831b17. Posted by hand: the helper's own comment could not be posted.

    The three reads (lane-collision-protocol Rule 1), taken again at 2026-10-17T22:11:57Z:

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#864:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#864"`, kept where the row or its body names `#864`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `864` as a whole token:
       none
    

    Lane 4 writes the DRAFT when a lane-4 writer is free. It lands after lane 4's #862 (#832), which edits the lines just above Context.members.

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