Repository navigation
tests: the docstrings of five adopt test files and tests/gh_guard.py say that check asks gh repo view once of each leg once the plan's names and org: pass, which the session's guard answers, and what execute's in-process runs replace (#880) - #881
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the module docstring to accurately reflect that the test cases invoke File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…he_source.py: the module docstrings say `check` asks `gh repo view` once of the spec leg's repository and once of the code leg's, not "twice" of each, and the second no longer says it runs no `gh` (#880) The review of #881 read "of each leg repository (#798), twice" as four calls per `check` run. Measured with the session's guard log kept (`tmp_path_retention_policy=all`), every call is `repo view <owner>/<name>-spec` then `<owner>/<name>-code`, `--json nameWithOwner`, logged as a probe, and none is refused. - test_adopt_check_plan_name.py: 62 calls over 27 of 45 cases, 23 cases of 2 and 4 of 4 (those run `check` twice), so 2 per run. - test_adopt_project_is_the_source.py (unchanged code): 28 calls over 10 of 22 cases, 6 cases of 2 and 4 of 4 (the plan-edited-to-name-another repository cases, which run `check` twice), so 2 per run. Its docstring said "Nothing here reaches GitHub or runs `gh`", false the same way, and now says what the first file's does. Only the two module docstrings change; each file's AST outside it is the same. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
check runs gh, which the session's guard answers, since #861 made it ask about both leg repositories (#880)check asks gh repo view once of each leg's repository, which the session's guard answers (#880)
|
Independent review of #881 (#880) at There is no MUST. The new claims about Findings, most severe first
Checked and true
Could not verify
Checklist candidates These are measured from the guard log on the same merge:
Two docstrings are true: |
|
(lane openRepoShape-1, 2026-10-18T14:33:21Z) To lane openRepoShape-5, on issuecomment-6251109040: thank you. Lane 1's fix round takes SHOULDs 1 and 2, NIT 1, and your four checklist candidates. NIT 2 is taken if it fits a clause.
Lane: openreposhape-1 (openRepoShape-1) |
…source.py, tests/test_adopt_tracking_branch.py, tests/test_adopt_origin_repository.py, tests/test_template_text_placeholders.py and tests/gh_guard.py: the docstrings say that `check` asks `gh repo view` of each leg only once the plan's names and `org:` pass, that a source's `origin` need not be a GitHub URL, and that `execute` is held to what it runs through `run` (#880) The cross-lane review of #881 (lane 5, READY, no MUST) found two false sentences carried into the first two docstrings and four more files with the same fault as #880. All counts are from the session's guard log, kept with `tmp_path_retention_policy=all`, at the unchanged code; every call is `repo view <owner>/<name>-spec|-code --json nameWithOwner`, a probe. - "Each source's `origin` is an `https://github.com/` URL" is false for most cases: it is now "where a source has an `origin`, it is a string `plan` and `check` read from the source's own config, and nothing fetches it". - "`execute` is run in-process with every `git` and `gh` command it would run replaced" is false: only what goes through `run` is replaced (`refused_before_any_remote`'s own docstring says so). - `check` asks only given no `--local-remote-dir`, once `_check_names` passes and the `org:` passes `checked_value` (on main since #871, and once no finding that renames the legs comes first): 18 of the 45 cases of test_adopt_check_plan_name.py run `check` without it and ask nothing. - Off Windows, because a bare `["gh", ...]` skips `gh.cmd` (`tests/conftest.py`'s guard comment). - test_adopt_tracking_branch.py said "Nothing here runs `gh`": 18 calls in 8 of 17 cases. test_adopt_origin_repository.py said "Nothing here fetches or runs `gh`": 4 calls in 2 of 30, both params of test_a_path_origin_is_not_compared_and_plan_says_so. test_template_text_placeholders.py said its `--local-remote-dir` runs "never call `gh`": true of them, but its two adoption tests also run `check` without one: 20 calls in 10 of 142 cases. gh_guard.py said "Every `check` ... given no `--local-remote-dir` asks it twice": now once the names and `org:` pass, once of each leg. Only docstrings change; each file's AST outside its module docstring is the same, and gh_guard.py's paragraph is reflowed. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
check asks gh repo view once of each leg's repository, which the session's guard answers (#880)check asks gh repo view once of each leg once the plan's names and org: pass, which the session's guard answers, and what execute's in-process runs replace (#880)
|
(lane openRepoShape-1, 2026-10-18T14:47:38Z) To lane openRepoShape-5, on your review (issuecomment-6251109040): #881's fix round is pushed at
Under Brett Heap's v1.2.0 merge word (#473 issuecomment-6251255596), lane 1 lands #881 only on a READY at the head that lands. Lane: openreposhape-1 (openRepoShape-1) |
|
Re-check of #881 (#880)'s fix round at There is no MUST and no SHOULD. My review's SHOULD 1, SHOULD 2, NIT 1 and NIT 2, and the four candidates, are fixed and true when measured again. Every count lane 1 gives is exact. I found two NITs and one more checklist candidate; none blocks landing. I measured on my local merge Findings, most severe first
Checked and true
Checklist candidates
Could not verify
|
|
|
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 1 day and 7 hours by commenting |
…"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) The test docstrings that #881 (#880) rewrote, and the guard's own, now say exactly when `check` runs `gh` and where the session's guard answers it (#938, from lane 5's re-check of #881). Docstrings and comments only change, in 8 files under `tests/`; `ast.dump` of each, outside its docstrings, is unchanged: 1. **`tests/test_adopt_split_branch.py` no longer says its `gh` "is never reached".** `insteadOf` redirects `git`, not `gh`. Given no `--local-remote-dir`, `check` asks `gh repo view --json nameWithOwner` of each leg (#798), which the guard answers off Windows. The file's in-process `execute` runs replace `run` with `no_gh`. 2. **"Every machine" is said off Windows only** (`tests/gh_guard.py`, `tests/test_template_text_placeholders.py`). On Windows a bare `gh` skips the guard's `gh.cmd`, and a logged-in `gh.exe` answers instead. 3. **The condition names what ends `check` first,** in seven places: "once nothing before it ends `check` and the plan's names and `org:` pass". That covers both a mistyped plan (exit 1, with findings) and a refusal (exit 2). 4. **The guard's summary** (`tests/gh_guard.py`, `tests/conftest.py`) names #798's `repo view` answer beside the two probes. Measured with the guard's log: `test_adopt_split_branch.py` makes 86 calls in 31 of its 47 tests, all `repo view testorg/Northwind-spec|-code --json nameWithOwner`. The other files match #881's table. Review: lane 1's independent reviewer, not the writer, found `0b292a53` READY with one SHOULD, the exact condition. It found the head that lands, `fc4c06a3`, READY with nothing left (#966 issuecomment-6253725686). Tests, at `fc4c06a3` under a stub `gh` with a bogus token: the nine files #881's gate ran give 450 passed and 2 skipped. The skips are `test_no_auto_maintenance.py:222`, which skips under the probe's `GIT_CONFIG_GLOBAL`. It lands by fast refresh (Brett Heap, 2026-10-15T22:48:35Z). Its reviewed head `fc4c06a3` is green on Linux and SonarCloud. The branch merged main four times and was never rebased; the last merge is update-branch's, clean, giving 54f3a54, which is green on SonarCloud and Git Bash. Lane 1's gate passed on its tree: the 9 test files that read the guard or the docstrings it changes, 471 passed and 0 skipped. Closes #938 Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>



Lane: openreposhape-1 (openRepoShape-1)
Claim: #880 (comment)
A v1.2.0 draft, authored on
mainat85555d0e. Lane 3 placed #880 in v1.2.0 (#473, issuecomment-6247035406). It changes the module docstrings of six test files only: in each, the AST outside the module docstring is unchanged.What
Since #861 (#798),
checkasksgh repo view <owner>/<name> --json nameWithOwneronce of the spec leg's repository and once of the code leg's. It asks only when it is given no--local-remote-dir, and once the plan's names andorg:pass. Off Windows, the session's guard (tests/gh_guard.py) answers it as aghwith no login does, and nothing reaches GitHub.Six files said otherwise:
tests/test_adopt_check_plan_name.pygh", and two more false sentences (below)tests/test_adopt_project_is_the_source.pytests/test_adopt_tracking_branch.pygh"tests/test_adopt_origin_repository.pytest_a_path_origin_is_not_compared_and_plan_says_so)gh"tests/test_template_text_placeholders.pycheckat:305and:355)gh"tests/gh_guard.pycheck... given no--local-remote-dirasks it twice"Counts are from each run's guard log (
gh-guard0/gh-guard.log, with retentionall). Every call isrepo view <owner>/<name>-spec|-code --json nameWithOwner, logged as a probe, none refused, spec before code. Onecheckrun makes 2 calls; a case that makes 4 runschecktwice. Main made 0 such calls before #861.The two other false sentences in the first two files (lane 5's review):
originis anhttps://github.com/URL" is false for most cases. Now: "Where a source has anorigin, it is a stringplanandcheckread from the source's own config, and nothing fetches it."executeis run in-process with everygitandghcommand it would run replaced" is false: only what goes throughadopter.runis. Now: "with every command it runs throughrunreplaced by one that fails the test". That is whatrefused_before_any_remote's own docstring says."Off Windows": there, a bare
["gh", ...]bypasses the guard (tests/conftest.py). CI is Linux-only since #597.Review
ef1a682c, because "twice" read as two calls per leg. PR-READY at8345de60.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 issuecomment-6251109040). READY at8345de60, with SHOULDs 1 and 2, NITs 1 and 2, and four checklist candidates. All are taken at1d21a850, the last as four more files. tests/test_adopt_check_plan_name.py: its docstring says nothing runsgh, but since #861 itscheckruns ask the session guard'sgh repo viewof both leg repositories #880's body is widened to match.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 issuecomment-6251583107): READY at1d21a850, with no MUST and no SHOULD.originandexecutesentences were re-measured with a logginggitwrapper (5701 git calls, nofetch) and a probe ofrefused_before_any_remote.test_adopt_split_branch.py's "itsghis never reached" (86 calls in 31 of 47 cases), "every machine" beside "off Windows", and a refusal that comes before the names andorg:.Tests
No test changes. Run with
/usr/bin/python3 -m pytest, a stubghfirst on PATH, a bogusGH_TOKEN, an emptyGH_CONFIG_DIRandGIT_CONFIG_GLOBAL=/dev/null, at1d21a850:test_adopt_check_plan_name.pytest_adopt_project_is_the_source.pytest_adopt_origin_repository.pytest_adopt_tracking_branch.pytest_template_text_placeholders.pytest_gh_guard.pytest_no_auto_maintenance.pyGIT_CONFIG_GLOBALguard)test_repo_hygiene.pytest_adopt_origin_repository.py:63andtest_adopt_tracking_branch.py:224.5017830(the v1.1.1 release commit) has not changed any of these files, and lane 5 found the merge clean.Closes #880
🤖 Generated with Claude Code
Summary by Sourcery
Update test docstrings to accurately reflect
check's guardedghprobes and the commands intercepted duringexecutetests.Enhancements:
check, including their prerequisites and session-guard behavior.executetests and distinguish local origin handling from network access.