Repository navigation
siblings.py: member_unreadable has one form and _refuse_an_unreadable_root asks path_unreadable for its own code, and a row holds that a holder whose .git and .gitmodules cannot both be read is refused once as git-repo-unreadable (#1287) - #1296
brettheap wants to merge 2 commits into
Conversation
…able_root` asks `path_unreadable(ROOT_UNREADABLE, ...)` itself; a row pins that a holder whose `.git` and `.gitmodules` cannot both be read is refused once, as `git-repo-unreadable`; the exit-2 paragraph wraps evenly (#1287) templates/family-root/scripts/siblings.py: - `member_unreadable` no longer takes `code=` (#1172's form): it is `path_unreadable("member-unreadable", ...)` and nothing else. `_refuse_an_unreadable_root` calls `path_unreadable(ROOT_UNREADABLE, spelled(shown), exc, ROOT_UNDONE)` with the arguments it passed before, so every refusal's text is byte for byte what it was. - The exit-2 paragraph's last sentence is one line again, not `unanswerable question is never an` over a line of `implicit pass.`. tests/test_family_gitmodules_unreadable.py: one row, r1164d's, for a holder whose `.git` (#1148) and `.gitmodules` (#1110) both cannot be read: exit 2, `git-repo-unreadable` once, nothing printed, `.gitmodules` never asked. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…mber_unreadable`'s whole refusal in its order, which the fold of its two forms took from the holder's `.git` rows (#1287) Before the fold the holder's own `.git` went through `member_unreadable`, so the pinned-root rows (whole text) were the only rows that saw the order of `what` and `then` in its delegate line: base's `then, what` swap failed 6 of them. The `.git` now goes straight to `path_unreadable`, and every row that reaches `member_unreadable` checks the remediation by substring, so the same swap passed all 176 rows of the three files that name it. The row asks `member_unreadable` for a permission's refusal, with its default `then` and with one given, and holds the code, the detail and the whole remediation. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Reviewer's GuideImplementationUnify
TestsAdd coverage that an unreadable holder
Assert that
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
|
(lane openRepoShape-1, 2026-11-10T02:26:20Z) r1287's independent review of #1296 at Lane 1 takes the NITs as follows:
#1296 lands after the v1.2.1 tag, in v1.2.2's order. Lane 1 asks lane 3 for its place on #473. Independent review of PR #1296 (r1287)Verdict: READY. I found no MUST and no SHOULD. There are 4 NITs, none on the code. I changed no tracked file and posted nothing. My review worktree FindingsMUSTNone. SHOULDNone. NIT
Checked and confirmedThe diffI read all of
CallersI ran
Probe comparison (byte-identical)I ran the writer's
My extras, in
Six of my probe ids fail on base and on head alike: The shim was loaded in 40 processes per revision for the probes and 109 for the shim gate. The two rows
MutantsEvery mutant file was restored in a The body's six mutants, re-made from its table (178 rows over
My own mutants (each over those three files plus
Totals: the writer's 6 are 6 of 6 killed. Mine are 10 of 11 killed. The one survivor, Pytest summary linesAll run on head
b2, b3, b5 and b6 are the body's own calls 2, 3, 5 and 6, rerun to check its counts. The body
Not covered
Lane: openreposhape-1 (openRepoShape-1) |



Three NITs from r1164d's delta review of #1164 (a slice of #1110), after it merged main with #1172 (for #1148), plus one row the fold itself needs. The three are in
templates/family-root/scripts/siblings.pyand its tests; no refusal's text, code or exit code changes.What
1. A row pins which refusal wins when both apply. When the holder's own
.git(#1148,git-repo-unreadable) and its.gitmodules(#1110,gitmodules-unreadable) both cannot be read,siblings.pyrefuses once, asgit-repo-unreadable, and never asks.gitmodules. That is the order its docstring's exit-2 paragraph gives, and no row held it.93040699):_load_familywithsubmodule_urls(Path(start).resolve())moved ahead of_refuse_an_unreadable_root(start)(r1164d's mutantmprec) passes both files that hold these refusals: 118 passed.test_a_holder_whose_git_and_gitmodules_cannot_be_read_is_refused_onceintests/test_family_gitmodules_unreadable.py, word for word from siblings.py: a row pins that the holder's unreadable.gitis refused before its unreadable.gitmodules,member_unreadable's two forms fold into one, and the exit-2 paragraph wraps evenly #1287. Under the mutant its run saysREFUSED gitmodules-unreadable: .gitmodules: cannot be read (Permission denied), not the onegit-repo-unreadableline it asserts.2.
member_unreadable's two forms are one. #1172 gave it acodekeyword and #1164 made it delegate topath_unreadable(code, ...); both PR bodies said whichever landed second keeps one form.member_unreadable(named, exc, what, then=..., code="member-unreadable")returnedpath_unreadable(code, named, exc, what, then), and_refuse_an_unreadable_rootcalledmember_unreadable(spelled(shown), exc, ROOT_UNDONE, code=ROOT_UNREADABLE).member_unreadable(named, exc, what, then=...)returnspath_unreadable("member-unreadable", named, exc, what, then), and_refuse_an_unreadable_rootraisespath_unreadable(ROOT_UNREADABLE, spelled(shown), exc, ROOT_UNDONE): the arguments it passed before, withthenleft topath_unreadable's own default, the very stringmember_unreadablepassed.Every call of the two, by
astover the file at head:member_unreadabletracking_branch,project_id,dispatch,_print_pinned_rowmember_unreadablerun_member_bootstrapthen)path_unreadablemember_unreadablepath_unreadable_refuse_an_unreadable_rootpath_unreadablesubmodule_urls(gitmodules-unreadable, #1110)No call passes
code=any more and none passed a fifth positional. Two tests callmember_unreadable, both intest_family_siblings_bootstrap_unreadable.py: the summary count row passes three, and this PR's member row passes three or four (its ownthen). Nothing else in the repository names either function:scripts/family.py's_member_unreadableis a different function and is not touched.3. The ragged wrap. The exit-2 paragraph's last sentence was
unanswerable question is never anover a line holding onlyimplicit pass.. It is one line now,unanswerable question is never an implicit pass., after the line above it, which stays as it was. No test reads the paragraph:tests/test_pinned_copy_text.pyreadssiblings.pyonly for the names it imports fromrepo_shape(anastwalk), and--helptakes__doc__.splitlines()[0], sodocs/cli.mdis the same.4. One row the fold needs. Before the fold, the holder's
.gitwent throughmember_unreadable, so the pinned-root rows (they hold a refusal's whole text) were the only rows that saw the order ofwhatandthenin its delegate line: swapping them in base'sreturn path_unreadable(code, named, exc, what, then)failed 6 of them. After the fold the.gitno longer reaches that line, and every row that does reach it checks the remediation by substring, so the same swap passed all 176 rows of the three files.test_a_member_refusal_keeps_its_parts_in_their_order(intests/test_family_siblings_bootstrap_unreadable.py) asksmember_unreadablefor a permission's refusal, with its defaultthenand with one given, and holds the code, the detail and the whole remediation. It passes on base too (2 passed): it holds what was already so.Why
linked_intoandmode_of, whichtest_root_git_unreadable.pyandtest_validate_pins_unreadable_workflows_dir.pyown and the file did not import; every other helper it uses (needs_a_mode,estate,siblings,refusal_detail,at_000,linked_into_locked) it already had. It sits after themake parkrow and before the control. The module docstring gains three lines naming the order and the row.member_unreadable's name and its five callers, so no call site changes. Only the holder's.gitmoves, straight to the function that already served.gitmodules; that is the one placecode=was used. The docstrings follow:member_unreadableno longer sayscodeis the refusal's, andpath_unreadable's names both holder codes it serves,git-repo-unreadableandgitmodules-unreadable..gitis refused before its unreadable.gitmodules,member_unreadable's two forms fold into one, and the exit-2 paragraph wraps evenly #1287 was filed after v1.2.1's scope froze. It lands after the v1.2.1 tag, in v1.2.2's order.Tests
Probe environment throughout: a stub
ghfirst on PATH,GH_TOKEN=bogus-w1287, an emptyGH_CONFIG_DIR,GIT_CONFIG_GLOBAL=/dev/null,GIT_SSH_COMMAND=false,EMAILset to a placeholder for the task,env -u LANES_LANE; at most two pytest calls at once, each under 9 minutes. CPython 3.12.3 here; CI runs 3.14.The fold is byte-identical: 25 scenarios, base
93040699against the fold's head61b11d85. (templates/family-root/scripts/siblings.pyis the same blob,b0520f52a95e, at the PR's headf5134979, which adds only the row of item 4.) A scratch probe (not in this PR), run in a scratch clone at each revision, records what a person sees: the wholestr(Refusal)in process and the stderr and stdout of realsiblings.pyruns. The tmp path is written<B>, and 12-to-40-digit hex (a scaffolded fixture's commit shas, which differ every run) is written<sha>..gitunreadable, a real run.gita link into a folder at mode 000;--dry-run, a real run and--make help --dry-run: each exit 2, stdout empty, stderrREFUSED git-repo-unreadable: .git: cannot be read (Permission denied)and its remediationmembers/IRSSat 000 and at 444 before placement,members/IRSS/.gitbeside a placed clone, a clone'sMakefileand itsproject.yamlas links into a locked folder: each exit 2,REFUSED member-unreadable: <path>: cannot be read (Permission denied)member_unreadablesite, in processtracking_branch,project_id,run_member_bootstrap,dispatch,_print_pinned_row, each withstatrefusedmember_unreadableitselfEACCES,EIOand a bareOSError()(nostrerror), each with the defaultthenand with its own_refuse_an_unreadable_rootitself.gitat the start of the walk (named.git) and above it (named whole)The 25 records, sorted, are equal with
cmp: sha25655c9201ccd2e1f977c46325263dd4bca0e266ecf5c1c84c4112cfc64eeb35f3cfor both. An earlier pass differed only in the shas in a layout table's stdout (on main at 1b22764c4033against5ca287558f5b, two fixtures built a minute apart), which is why they are normalised.Mutants of the fold, 6 killed of 6, each run in a scratch clone at head
f5134979overtest_family_gitmodules_unreadable.py,test_pinned_root_git_unreadable.pyandtest_family_siblings_bootstrap_unreadable.py(178 rows), the file put back and proved bygit hash-objectequal to head's blob (b0520f52a95e) and an emptygit status:_refuse_an_unreadable_rootpasses"member-unreadable"forROOT_UNREADABLE[siblings])member_unreadablepasses"git-repo-unreadable"(the default changed)test_family_siblings_bootstrap_unreadable.py, the new member row's two among them_refuse_an_unreadable_rootpasses""forROOT_UNDONEmember_unreadabledropsthenfrom the delegatetest_a_bootstrap_whose_stat_is_refused_is_refused_not_skippedand the new member row[given]_refuse_an_unreadable_rootnamesstr(dotgit), notspelled(shown)member_unreadabledelegates withthen, whatswapped[default]and[given](without it: 176 passed, a survivor)The row's mutant,
mprec: base (no row) 118 passed; head 1 failed, 118 passed (above).The gate, call by call, at head
f51349796(committed first; the tree was clean):test_family_gitmodules_unreadable.py,test_pinned_root_git_unreadable.pytest_family_py_unreadable.py,test_validate_family_unreadable.pytest_family_siblings_bootstrap_unreadable.py,test_family_hand_mount_git_rm_lines.py,test_validate_family_git_not_runnable.py(every other file namingmember-unreadable)test_root_git_unreadable.py(namesgit-repo-unreadable)test_pinned_copy_text.pytest_scaffold_leg_path_collisions.py,test_path_guard_hygiene.py,test_no_auto_maintenance.pytest_agents_md_codes.py,test_cli_reference.py,test_repo_hygiene.pysitecustomizeshim (is_file,existsandis_diranswer False to anyOSError, loaded in 91 processes)The two skips are
test_no_auto_maintenance.py:222, which skips when the session began withGIT_CONFIG_GLOBALset; the probe environment sets it. The full suite was not run.Known limits
needs_a_moderow beside it, is skipped on Windows and as root. In process nothing in the file holds the order where a mode cannot be made.member_unreadablesites and the holder's.gitis not re-checked by it.Not in this PR
it is moved), a,bootstrap that went red. With,siblingsmust never read as success`). The issue names the exit-2 paragraph only.scripts/family.py's_member_unreadable, its own function, and every other refusal.--helpline changes.Closes #1287
Lane: openreposhape-1 (openRepoShape-1)
🤖 Generated with Claude Code
Summary by Sourcery
Ensure unreadable repository and member paths produce consistent, correctly prioritized refusals.
Bug Fixes:
.gitand.gitmodulesare both inaccessible are refused once with thegit-repo-unreadablestatus.Enhancements:
member-unreadablecode and use the path refusal directly for unreadable holder repositories.Tests: