Skip to content

shape-doctor.py: five branches of the unreadable-mount rows (#975) have no test, so mutants MI, MJ, MK1, MK2 and ML survive, and the leg shape files note for a file this user cannot read gives no cure #1175

Closed

Description

@brettheap

Goal: every branch #975 added to the legs and members rows for a mount this user cannot reach is held by a test that fails without it, and the leg shape files note for a leg file it cannot read carries the gate's advice as its WHY, as every other unreadable path does.

Filed by lane openRepoShape-2, from rv975's addendum to its independent review of #975 (#430 slice C) at 3fd80cbe (#975 issuecomment-6278933012), its findings 2 and 3, both NITs and neither holding the landing. #975 landed as d7ee65a. Two parts, one pull request's worth: the tests, and the one note. Line numbers are main 038dafba9's. This was drafted at main dc7cd49b7 (2026-10-20); every line cited reads the same at 038dafba9, and by grep no test added since builds these branches. The mutants were not re-run.

The five surviving mutants

State. rv975 ran 17 mutants over #975's new code. 12 are killed (MA to MH, MM, MO, MP and MR, listed in its addendum). 5 survive, all in branches no test builds, and the code is right by reading. At main 038dafba9 (shape-doctor.py):

mutant site what it removes
MI :7488, in check_legs problem += f", and {unread[0]}": a leg with no gitlink and a mount this user cannot reach loses the mount's line
MJ :10697, in check_members the if MOUNT_UNREAD not in entry guard on the .gitmodules is_file() that decides carried: without it Python 3.12 and 3.13, where is_file() raises a refused stat, raise out of the members row when another member needs make bootstrap
MK1 :10706 why += "".join(f". {sentence}" for sentence in said) in the branch that names the holder's own scripts/bootstrap.py: the advice beside that line
MK2 :10726 the same line in the branch that names the plain git submodule line: the advice beside the checkout line
ML :10667 or bool(refused) in rerun = rerun or lockstep or bool(stuck) or bool(refused). rv975: close to equivalent, because the advice (cannot_read_why, :3564) already ends "Then run this doctor again"

The nearest tests, in tests/test_doctor_unreadable_paths.py: test_beside_a_checkout_line_the_unread_mount_gets_the_advice (:372) does for two legs what MK1 and MK2 need for two members, and test_a_member_this_user_cannot_reach_is_no_drift_beside_one_that_is (:522) uses the session's holder, which has ONE member (tests/test_shape_doctor.py:503, "A family holder with one member"), so no case here has a second member to need a checkout.

Direction.

  • MI: a leg with no gitlink recorded over a mount at mode 000 (or the refused_stat / refusing stand-in): the legs row's reason ends , and <the mount's line>. With the line :7488 removed, it fails.
  • MJ, MK1, MK2: a holder with TWO members, one this user cannot reach and one off its pin, as that test builds it for legs.
    • With the holder's own bootstrap.py runnable (the if checkout and own_bootstrap(...) and not url_less branch): the why ends on the advice for the mount (MK1), and the row is built where the unreachable member's .gitmodules is not asked (MJ; a real chmod 000 reaches it on 3.12 and 3.13, a stand-in whose is_file raises reaches it on every Python).
    • With no runnable bootstrap (the elif checkout branch): the same ending (MK2).
  • ML: the two sentences differ in their words, so a case can tell them apart: beside a refused member and a checkout line, the why holds rerun_sentence("member") (:7195, "Run the doctor again afterwards, because ..."), which the advice's "Then run this doctor again" is not. If the writer finds the term dead after all, drop it and say so in the commit.
  • Run each of the five mutants once: it fails the new test, and the test passes without it.

A leg file this user cannot read: a note with no cure

State. check_leg_shape_files (:7832) returns, for a leg file it cannot read, Row("leg-shape-files", ..., NOTE if unread else OK, summary, None, detail) (:7891-7892): no NEXT and no why. shape_file_state (:7697) turns the OSError into the string cannot be read (<reason>) (:7722, :7730), so the error that cannot_read_why (:3545) needs is not kept past it.

What happens. Measured by rv975, with spec/CLAUDE.md at mode 000: before #975 the verdict was INVALID (leg-shape-files) on both Pythons, because the row crashed ("could not be run"); now it is COMPLIANT, exit 0, on both, with the note CLAUDE.md cannot be read (Permission denied) and nothing that says what to do. rv975 accepts the COMPLIANT: the row gates nothing (an absent or differing leg file is also only a note under COMPLIANT), so no content of that file could change the verdict, and the old INVALID was the row failing, not a judgment. #975's own reason for the note ("the legs row asserts the mount", :7847-7850) covers a whole mount, not one file.

Evidence. rv975's finding 3; tests/test_doctor_unreadable_paths.py:405 (test_a_leg_file_this_user_cannot_read_is_said_not_called_absent), which holds the note and asserts row.next_command is None; and every other unreadable path in #975, which carries the gate's advice as its WHY (cannot_read_why: :2230, :5795, :7555, :11966).

Direction. Keep the OSError of each file this user cannot read (shape_file_state returns it with the string, or the entry holds it) and give the note why=cannot_read_why(...). The verdict stays COMPLIANT and the NEXT stays None, which the test above holds; change that assertion on purpose if a doctor-again NEXT is wanted. The test then also asserts the WHY, word for word against PERMISSION_WHY and OTHER_WHY from tests/test_doctor_unreadable_pin.py.

Related: #430 (the sweep), #975 (landed as d7ee65a), #461 (the tracker for tests).

Size: S.

Lane: openreposhape-2 (openRepoShape-2)

Activity

  1. brettheap commented on Oct 22, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-22T21:09:28Z, for #1175

    Logged in lanes/log/openRepoShape-3.md at b4119f89fb3e6ec2ac8ae7ffed57e120cc360735.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#1175:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#1175"`, kept where the row or its body names `#1175`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `1175` as a whole token:
       none
    
  2. added this to the v1.2.1 milestone on Oct 23, 2026
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