Skip to content

siblings.py: a row pins that the holder's unreadable .git is refused before its unreadable .gitmodules, member_unreadable's two forms fold into one, and the exit-2 paragraph wraps evenly #1287

Open

Description

@brettheap

Found by r1164d, lane 1's independent delta review of #1164 (Part of #1110) after it merged main with #1172 (for #1148). None of the three blocks #1164; each is a NIT of that review.

  1. No row pins which refusal wins when both apply. When the family holder's own .git (bootstrap.py, and the family root's validate-family.py, bootstrap.py and siblings.py: a root whose own .git this user cannot read is a PermissionError traceback on 3.12, or not-a-git-repo where exists() answers False, not refused by name #1148, git-repo-unreadable) and its .gitmodules (family.py, the family root's siblings.py, shape-doctor.py and shape_advisory.py: a name in the root that is a link into a folder this user cannot search is still read as absent at twelve sites (follow-up of #430 slice Z) #1110, gitmodules-unreadable) both cannot be read, templates/family-root/scripts/siblings.py refuses once, as git-repo-unreadable, and never reads .gitmodules. That is the order its docstring's exit-2 paragraph gives. A mutant that asks .gitmodules first in _load_family survives every row (118 passed). This row kills it (1 failed under the mutant, 1 passed at family.py and the family root's siblings.py: a holder's .gitmodules this user cannot read, as through a link into a folder it cannot search, is gitmodules-unreadable, never no section for remove's rollback or no url for make siblings (#1110) #1164's head 16ff9391, on 3.12 and a 3.14-like shim):
@needs_a_mode
def test_a_holder_whose_git_and_gitmodules_cannot_be_read_is_refused_once(
        estate, tmp_path):  # noqa: F811
    """Both at once: the holder's `.git` is asked first (#1148) and the run
    stops there, exit 2, by that one code with nothing printed; its
    `.gitmodules` is never asked (#1110)."""
    holder = estate["holder"]
    locked = linked_into_locked(holder, tmp_path)
    linked_into(holder)

    with at_000(locked), mode_of(holder.parent, "locked", 0):
        result = siblings(holder, "--dry-run")

    assert result.returncode == 2, result.stdout + result.stderr
    assert refusal_detail(result.stderr, "git-repo-unreadable") == [
        "REFUSED git-repo-unreadable: .git: cannot be read "
        "(Permission denied)"]
    assert "gitmodules-unreadable" not in result.stderr
    assert result.stdout == ""

It needs refusal_detail (conftest), needs_a_mode, estate, siblings, at_000, linked_into_locked, linked_into and mode_of, as tests/test_family_gitmodules_unreadable.py and its neighbours import them.
2. Both forms are kept. #1172 gave member_unreadable a code keyword, and #1164 made it delegate to path_unreadable(code, ...). Both PRs' bodies said whichever lands second keeps one form. The merge kept both, because folding them changes lines outside the conflicted hunks. The fold: drop code=, and have _refuse_an_unreadable_root call path_unreadable(ROOT_UNREADABLE, ...) itself.
3. A ragged wrap in siblings.py's exit-2 paragraph: unanswerable question is never an is followed by a line holding only implicit pass..

Filed after v1.2.1's scope froze, so lane 3 places it.

Lane: openreposhape-1 (openRepoShape-1)

Activity

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

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-1, session 300f8f46-004a-4e72-8587-4f192be2e108@Eagle, 2026-11-10T01:29:49Z, for #1287

    Logged in lanes/log/openRepoShape-1.md at 4cef09f31e9f87339667eb8bd16ac611deb5e465.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#1287:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#1287"`, kept where the row or its body names `#1287`:
    1164	family.py and the family root's siblings.py: a holder's `.gitmodules` this user cannot read, as through a link into a folder it cannot search, is `gitmodules-unreadable`, never no section for `remove`'s rollback or no url for `make siblings` (#1110)	fix/1110-family-unsearchable-gitmodules	MERGED
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `1287` 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