Repository navigation
tests: check's gh reaches the guard in test_adopt_split_branch.py, "every machine" is said off Windows only, the condition names what ends check first, and the guard's summary names #798's answer (#938) - #966
Conversation
…"every machine" is said off Windows only, and the condition names a refusal that comes first (#938) #881 (#880) rewrote five module docstrings and tests/gh_guard.py to say when `check` asks `gh repo view` of each leg, and lane 5's re-check of it at 1d21a85 left three things for here. Docstrings only: in each file the AST outside the module docstring, and the text after it, are unchanged. 1. `tests/test_adopt_split_branch.py` said a run without `--local-remote-dir` is redirected by `url.<base>.insteadOf` "and its `gh` is never reached". `check` there asks `gh repo view testorg/Northwind-spec|-code --json nameWithOwner` and the session's guard answers it: 86 calls in 31 of its 47 tests (20 make 2, 10 make 4, 1 makes 6), every one of that shape, logged as a probe. `insteadOf` redirects `git` and not `gh`. The docstring now says so, and that the in-process `execute` runs of the file have `run` replaced by `no_gh`, which refuses and records every `gh` command, so none of `execute`'s reaches the guard (the 8 tests that use `no_gh` and run no `check` log 0 calls). 2. "every machine" and an unqualified "NO NETWORK AND NO GITHUB" are said off Windows only, as `tests/test_template_text_placeholders.py` already said of the guard's answer. `tests/gh_guard.py` said `check` "prints, on every machine, the NOTE that it could not ask"; on Windows a bare `["gh", ...]` skips the guard's `gh.cmd` (`tests/conftest.py`, "WHAT REACHES THE GUARD ON WINDOWS IS LESS"), and where a logged-in `gh.exe` is installed it answers instead: no NOTE, and GitHub is reached. `tests/gh_guard.py` now says that; `tests/test_template_text_placeholders.py` opens "NO NETWORK AND NO GITHUB, off Windows". 3. The six docstrings said `check` asks "once the plan's names and `org:` pass". `cmd_check` refuses or reports before it gets there: a plan whose keys have the wrong type is reported before anything is opened, and `Plan.open_source` refuses what it cannot open. `test_check_of_a_plan_whose_branch_was_deleted_is_refused_by_name` (`tests/test_adopt_tracking_branch.py`) passes `plan`, then `check` refuses `source-default-branch-not-local`, exit 2, and the guard logs 0 calls for it. They now say "once nothing before it refuses and the plan's names and `org:` pass", lane 5's wording: `tests/gh_guard.py`, `tests/test_adopt_check_plan_name.py`, `tests/test_adopt_project_is_the_source.py`, `tests/test_adopt_tracking_branch.py`, `tests/test_adopt_origin_repository.py`, `tests/test_template_text_placeholders.py`, and the new sentence in `tests/test_adopt_split_branch.py`. Checked: the 6 test files this touches, `tests/test_gh_guard.py` and `tests/test_no_auto_maintenance.py`, which read the guard, and `tests/test_repo_hygiene.py`: 450 passed, 2 skipped (`tests/test_no_auto_maintenance.py:222`, which skips when the session began with GIT_CONFIG_GLOBAL set, as the probe environment sets it). Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…chine" off Windows only, and the docstring says what a doctor run does on Windows, where the preflight's bare `gh` skips the guard (#938) Follows ed17d56, which said `check`'s NOTE is printed "off Windows" in the same docstring. The paragraph "WHY THE PROBES ARE ANSWERED RATHER THAN REFUSED" still said the `machine` row "says the same thing on every machine" and that "a logged-in operator gets the output CI gets". `tests/conftest.py` ("WHAT REACHES THE GUARD ON WINDOWS IS LESS") says every tool starts `gh` as a bare `["gh", ...]`, which CreateProcess looks up as `gh.exe` alone, so on Windows a doctor run bypasses the guard and asks a real `gh.exe` where one is installed. Both claims are now said off Windows, and the paragraph says what happens on Windows. Docstring only: the AST outside the module docstring, and the text after it, are unchanged against 01a2b01 and ed17d56. `tests/test_gh_guard.py`, `tests/test_template_text_placeholders.py` and `tests/test_repo_hygiene.py`: 231 passed. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Reviewer's GuideDocumentation-only updates align test docstrings and comments with observed File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…heck`, the `machine` row's output is CI's off Windows, the guard's docstrings name #798's `repo view` answer, and one docstring says `check` reads no network for the branches (#938) The independent review of #966 (r938) found it READY with one SHOULD and three NITs. Docstrings and comments only: with every docstring stripped, the AST of each of the 8 files, and the comments of each, are unchanged against 0b292a5 and against 01a2b01. S1. "once nothing before it refuses and the plan's names and `org:` pass" said too much for a mistyped plan: its wrongly typed keys end `check` with exit 1 and findings, before the source is opened or a name is read, and that is no refusal. It is now "once nothing before it ends `check` and the plan's names and `org:` pass", which covers the exit 1 and the exit 2 alike and leaves out plan-stale, split-branch and entry findings, which do not stop the question. In all 7 places: `tests/gh_guard.py`, `tests/test_adopt_check_plan_name.py`, `tests/test_adopt_project_is_the_source.py`, `tests/test_adopt_split_branch.py`, `tests/test_adopt_tracking_branch.py`, `tests/test_adopt_origin_repository.py` and `tests/test_template_text_placeholders.py`, each paragraph rewrapped to the file's width. NIT 4. `tests/gh_guard.py`: "to leave it out; there a logged-in operator gets the output CI gets" has no referent for "there"; it is now "off Windows a logged-in operator gets the output CI gets". NIT 5. `tests/test_adopt_split_branch.py`: the docstring of `test_check_reads_github_as_the_sources_origin_last_fetched_it` said "`check` reads no network", beside a module paragraph saying `check` asks `gh`. It is now "reads no network for the branches". NIT 6. `tests/conftest.py` and `tests/gh_guard.py` still said the guard answers two questions ("`gh --version` and `gh auth status`"; "two answers, one refusal"). `answer()` also answers `repo view <owner>/<name> --json nameWithOwner` (#798), exit 4 and gh's own words, as a `gh` with no login does. The conftest docstring now names it, and the guard's title says three answers, and its "WHAT IT DOES" paragraph says "Asked one of the two `PROBES`, or the `repo view` of #798 below, it answers". Checked: the 9 files `tests/test_adopt_split_branch.py`, `tests/test_adopt_check_plan_name.py`, `tests/test_adopt_project_is_the_source.py`, `tests/test_adopt_tracking_branch.py`, `tests/test_adopt_origin_repository.py`, `tests/test_template_text_placeholders.py`, `tests/test_gh_guard.py`, `tests/test_no_auto_maintenance.py` and `tests/test_repo_hygiene.py`: 450 passed, 2 skipped (`tests/test_no_auto_maintenance.py:222`, which skips when the session began with GIT_CONFIG_GLOBAL set, as the probe environment sets it). Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
(lane openRepoShape-1, 2026-10-18T18:47:18Z) Independent review of #966 by lane 1's reviewer r938 (sonnet), who is not its writer: READY at
#966 takes its turn once its Lane: openreposhape-1 (openRepoShape-1) |
gh reaches the guard in test_adopt_split_branch.py, "every machine" is said off Windows only, and the condition names a refusal that comes first (#938)gh reaches the guard in test_adopt_split_branch.py, "every machine" is said off Windows only, the condition names what ends check first, and the guard's summary names #798's answer (#938)
|
|
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 23 hours and 26 minutes by commenting |



Lane: openreposhape-1 (openRepoShape-1)
Claim: #938 (comment)
A v1.2.0 draft on main
01a2b016, which holds #881. It is #881's follow-up, #938, from lane 5's re-check of #881 at1d21a850. It changes test docstrings and comments only, in 8 files undertests/:ast.dumpof every changed file, outside its docstrings, is unchanged. Line numbers below are at the head,fc4c06a3.What
tests/test_adopt_split_branch.py:21-23no longer says itsgh"is never reached".insteadOfredirectsgit, notgh.--local-remote-dir, once nothing before it refuses and the plan's names andorg:pass,checkasksgh repo view --json nameWithOwneroftestorg/Northwind-specand oftestorg/Northwind-code(adopt-project.pyexecute: each leg repository is asked about only as it is made, so a code leg whose name is taken leaves the spec leg created, on GitHub as under--local-remote-dir, and a--local-remote-dirthat is a file or cannot be written ends in a traceback afterchecksaidplan ok#798). Off Windows, the session's guard answers each as aghwith no login does.executeruns replacerunwithno_gh, so none ofexecute'sghreaches the guard."Every machine" is said off Windows only.
tests/gh_guard.py:28-30(themachinerow: "off Windows a logged-in operator gets the output CI gets"),tests/gh_guard.py:49(the NOTE), andtests/test_template_text_placeholders.py:32("NO NETWORK AND NO GITHUB, off Windows").ghskips the guard'sgh.cmd(tests/conftest.py). Where a logged-ingh.exeis installed, it answers instead.The condition names what ends
checkfirst: "once nothing before it endscheckand the plan's names andorg:pass". That covers a mistyped plan, which endscheckwith exit 1 and findings, and a refusal, which ends it with exit 2. It is in seven places:tests/gh_guard.py:45-46;test_adopt_check_plan_name.py:38;test_adopt_project_is_the_source.py:26;test_adopt_tracking_branch.py:24;test_adopt_origin_repository.py:33;test_template_text_placeholders.py:36-37;test_adopt_split_branch.py.The guard's own summary names adopt-project.py
execute: each leg repository is asked about only as it is made, so a code leg whose name is taken leaves the spec leg created, on GitHub as under--local-remote-dir, and a--local-remote-dirthat is a file or cannot be written ends in a traceback afterchecksaidplan ok#798's answer:tests/gh_guard.py:2("three answers, a refusal, every call logged"),:17-22, andtests/conftest.py:13-17, which now namegh repo view <owner>/<name> --json nameWithOwner, answered as aghwith no login answers it.tests/test_adopt_split_branch.py:732:check"reads no network for the branches".Measured, with the guard's log
test_adopt_split_branch.py: 86 calls in 31 of its 47 tests (20 with 2 calls, 10 with 4, and 1 with 6), as lane 5 counted. Every call isrepo view testorg/Northwind-spec|-code --json nameWithOwner.no_ghand run nocheck: no calls.test_check_of_a_plan_whose_branch_was_deleted_is_refused_by_name(test_adopt_tracking_branch.py:390): no calls, and it exits 2.checkasksgh repo viewonce of each leg once the plan's names andorg:pass, which the session's guard answers, and whatexecute's in-process runs replace (#880) #881's table: 62, 28, 18, 4 and 20.Tests
0b292a53with one SHOULD, the exact condition; round 2 atfc4c06a3makes it and four NITs, and r938 found it READY there.checkasksgh repo viewonce of each leg once the plan's names andorg:pass, which the session's guard answers, and whatexecute's in-process runs replace (#880) #881's gate ran: 450 passed and 2 skipped. Both skips aretest_no_auto_maintenance.py:222, which skips when the session setsGIT_CONFIG_GLOBAL, as the probe environment does.:28round:test_gh_guard.py,test_template_text_placeholders.pyandtest_repo_hygiene.py, 231 passed.git diff --checkis clean.Known limits
tests/conftest.py.tests/test_gh_guard.py:203keeps "on every machine", because that test is markedWINDOWS_SKIP.Closes #938
🤖 Generated with Claude Code
Summary by Sourcery
Clarify the test suite's GitHub CLI guard behavior and adoption-check documentation, including platform-specific limitations and the conditions that trigger repository lookups.
Enhancements: