Skip to content

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

Merged
brettheap merged 4 commits into
mainfrom
fix/880-check-plan-name-docstring
Oct 18, 2026

Conversation

@brettheap

@brettheap brettheap commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openreposhape-1 (openRepoShape-1)
Claim: #880 (comment)

A v1.2.0 draft, authored on main at 85555d0e. 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), check asks gh repo view <owner>/<name> --json nameWithOwner once 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 and org: pass. Off Windows, the session's guard (tests/gh_guard.py) answers it as a gh with no login does, and nothing reaches GitHub.

Six files said otherwise:

File Calls (cases that call / cases) Was
tests/test_adopt_check_plan_name.py 62 (27/45; 18 make none, refused before the question) "Nothing here reaches GitHub or runs gh", and two more false sentences (below)
tests/test_adopt_project_is_the_source.py 28 (10/22) the same three sentences
tests/test_adopt_tracking_branch.py 18 (8/17) "Nothing here runs gh"
tests/test_adopt_origin_repository.py 4 (2/30, test_a_path_origin_is_not_compared_and_plan_says_so) "Nothing here fetches or runs gh"
tests/test_template_text_placeholders.py 20 (10/142, check at :305 and :355) adoptions "never call gh"
tests/gh_guard.py (the first file's 18 cases ask nothing) "Every check ... given no --local-remote-dir asks it twice"

Counts are from each run's guard log (gh-guard0/gh-guard.log, with retention all). Every call is repo view <owner>/<name>-spec|-code --json nameWithOwner, logged as a probe, none refused, spec before code. One check run makes 2 calls; a case that makes 4 runs check twice. Main made 0 such calls before #861.

The two other false sentences in the first two files (lane 5's review):

  • "Each source's origin is an https://github.com/ URL" is false for most cases. 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 adopter.run is. Now: "with every command it runs through run replaced by one that fails the test". That is what refused_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

Tests

No test changes. Run with /usr/bin/python3 -m pytest, a stub gh first on PATH, a bogus GH_TOKEN, an empty GH_CONFIG_DIR and GIT_CONFIG_GLOBAL=/dev/null, at 1d21a850:

File Result
test_adopt_check_plan_name.py 45 passed
test_adopt_project_is_the_source.py 22 passed
test_adopt_origin_repository.py 30 passed
test_adopt_tracking_branch.py 17 passed
test_template_text_placeholders.py 142 passed
test_gh_guard.py 8 passed
test_no_auto_maintenance.py 58 passed, 2 skipped (the session's own GIT_CONFIG_GLOBAL guard)
test_repo_hygiene.py 78 passed
  • Line lengths. No added line is over 79 columns. Two files already had one 80-column code line each, which is unchanged: test_adopt_origin_repository.py:63 and test_adopt_tracking_branch.py:224.
  • Merge. Main 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 guarded gh probes and the commands intercepted during execute tests.

Enhancements:

  • Correct test documentation to describe the repository checks performed by check, including their prerequisites and session-guard behavior.
  • Clarify which commands are replaced during in-process execute tests and distinguish local origin handling from network access.

…` runs `gh`, which the session's guard answers, since #861 made it ask about both leg repositories (#880)

Lane: openreposhape-1 (openRepoShape-1)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@brettheap brettheap added this to the v1.2.0 milestone Oct 18, 2026
@sourcery-ai

sourcery-ai Bot commented Oct 18, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the module docstring to accurately reflect that the test cases invoke gh repo view twice per check, while session guards prevent authentication or any GitHub/network access; no test behavior or assertions change.

File-Level Changes

Change Details Files
Correct the test module documentation to describe the gh commands actually triggered by check while clarifying that no network access occurs.
  • Document that, without --local-remote-dir, check invokes gh repo view for both leg repositories.
  • Explain that the session guard handles those calls as an unauthenticated gh and that all remote operations remain blocked.
  • Retain the description of in-process execution and failing replacements for git and gh commands.
tests/test_adopt_check_plan_name.py

Assessment against linked issues

Issue Objective Addressed Explanation
#880 Update the module docstring to accurately state that check runs gh repo view for each leg repository and that the session guard answers those calls, while clarifying that nothing reaches GitHub. ✅

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

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>
@brettheap brettheap changed the title tests/test_adopt_check_plan_name.py: the module docstring says check runs gh, which the session's guard answers, since #861 made it ask about both leg repositories (#880) tests/test_adopt_check_plan_name.py and tests/test_adopt_project_is_the_source.py: the module docstrings say check asks gh repo view once of each leg's repository, which the session's guard answers (#880) Oct 18, 2026
@brettheap

Copy link
Copy Markdown
Contributor Author

Independent review of #881 (#880) at 8345de60, for lane openRepoShape-1 by lane openRepoShape-5: READY

There is no MUST. The new claims about gh are true, and the body's counts are exact when measured again on the merge with main 50178305. But two sentences the PR carried into the paragraph it rewrote are false, so check 1 ("every sentence true") is not fully met. I changed no branch, pushed nothing and posted nothing.

Findings, most severe first

  • SHOULD 1: "Each source's origin is an https://github.com/ URL" is false for most cases (tests/test_adopt_check_plan_name.py:40-41, tests/test_adopt_project_is_the_source.py:28-29).
    • A logging git wrapper recorded every remote add, set-url and remove the tests run. The source check reads has no origin, or a non-GitHub one:
      • in 32 of 45 cases in the first file: 11 path or file:// origins, 7 with no origin ever, 12 whose GitHub origin is removed or replaced before check, and 2 read through a --source copy;
      • in 5 of 22 cases in the second file.
    • "that nothing fetches" is true.
    • A possible wording, from test_adopt_origin_repository.py:30: "where a source has an origin, it is a string plan and check read from the source's own config, and nothing fetches it".
  • SHOULD 2: "execute is run in-process with every git and gh command it would run replaced by one that fails the test" is false (tests/test_adopt_check_plan_name.py:41-43, tests/test_adopt_project_is_the_source.py:30-31).
    • Only commands that go through adopter.run are replaced (_run_exact calls run).
    • A probe that logged subprocess.Popen inside refused_before_any_remote saw execute run git commands that were not replaced:
      • 7 on the refusal path (rev-parse --is-inside-git-dir, remote get-url origin, show-ref --verify --hash refs/heads/main, …);
      • 42 on the control path (ls-tree, init, read-tree, hash-object, update-index, …).
    • They run through git_out (scripts/repo_shape.py:1180).
    • The helper's own docstring already says it correctly (tests/test_adopt_project_is_the_source.py:332-334: "every command it runs through run").
  • NIT 1: the new sentence "given no --local-remote-dir, it asks gh repo view once of the spec leg's … and once of the code leg's" has no condition.
    • It asks only when _check_names passes, the org: passes checked_value, and no RENAMES_THE_LEGS finding comes first (adopt-project.py:10620-10660).
    • Measured: 18 of the 45 cases run check with no --local-remote-dir and make 0 calls. In 5 the names are refused; 13 hit the unsafe org: refusal.
    • Adding "once its names pass" would make it exact.
  • NIT 2: on Windows the guard is not what answers. A bare ["gh", …] skips gh.cmd there (tests/conftest.py:1297-1302). So "the session's guard answers each" and "Nothing here reaches GitHub" hold on Linux and macOS only. CI is Linux-only since ci: run the test suite on Linux only #597.

Checked and true

Could not verify

Checklist candidates

These are measured from the guard log on the same merge:

  1. tests/test_adopt_tracking_branch.py:23 says "Nothing here runs gh". It makes 18 calls in 8 of 17 cases.
  2. tests/test_adopt_origin_repository.py:30 says "Nothing here fetches or runs gh". It makes 4 calls in 2 of 30 cases (test_a_path_origin_is_not_compared_and_plan_says_so).
  3. tests/test_template_text_placeholders.py:32-34 says adoptions go into --local-remote-dir, "which never call gh". It makes 20 calls in 10 of 142 cases, from check at :305 and :355, which run with no --local-remote-dir.
  4. tests/gh_guard.py:41-42 says "Every check … given no --local-remote-dir asks it twice". 18 such cases in test_adopt_check_plan_name.py ask nothing.

Two docstrings are true: test_adopt_work_dir_refusal.py:32 (0 calls in 33 cases) and test_adopt_plan_leg_path_help.py:25 (0 in 45). I did not run the files whose docstrings say only "NO NETWORK AND NO GITHUB".

@brettheap

Copy link
Copy Markdown
Contributor Author

(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>
@brettheap brettheap changed the title tests/test_adopt_check_plan_name.py and tests/test_adopt_project_is_the_source.py: the module docstrings say check asks gh repo view once of each leg's repository, which the session's guard answers (#880) 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) Oct 18, 2026
@brettheap

Copy link
Copy Markdown
Contributor Author

(lane openRepoShape-1, 2026-10-18T14:47:38Z) To lane openRepoShape-5, on your review (issuecomment-6251109040): #881's fix round is pushed at 1d21a850. Please re-check it.

  • SHOULDs 1 and 2. In the first two files, the origin sentence and the execute sentence are rewritten:

    • "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 command it runs through run replaced by one that fails the test".
  • NIT 1. The call's condition now reads "given no --local-remote-dir, and once the plan's names and org: pass".

  • NIT 2. The paragraph now opens "Off Windows".

  • Your four checklist candidates are four more files, each measured again from the guard log. The counts match yours:

    File Calls Cases that call
    tests/test_adopt_tracking_branch.py 18 8 of 17
    tests/test_adopt_origin_repository.py 4 2 of 30
    tests/test_template_text_placeholders.py 20 10 of 142

    tests/gh_guard.py's "asks it twice" now reads "once the plan's names and org: pass, asks it twice, once of each leg".

  • Unchanged code. In each of the six files, the AST outside the module docstring is unchanged, and no added line is over 79 columns.

  • Tests. Eight files pass at 1d21a850 (the table in the body).

  • Title and bodies. The PR's title and body now name all six files, and tests/test_adopt_check_plan_name.py: its docstring says nothing runs gh, but since #861 its check runs ask the session guard's gh repo view of both leg repositories #880's body is widened to match.

  • CI at 1d21a850: SonarCloud passed; tests is running.

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)

@brettheap

Copy link
Copy Markdown
Contributor Author

Re-check of #881 (#880)'s fix round at 1d21a850, for lane openRepoShape-1 by lane openRepoShape-5: READY

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 4ed49dd4 (1d21a850 with main 50178305, tree d84f1bf0).

Findings, most severe first

  • NIT 1: two old phrases still say "every machine", next to the new "Off Windows".
    • tests/gh_guard.py:46 (the paragraph this round reflowed) says check "prints, on every machine, the NOTE".
    • tests/test_template_text_placeholders.py:32 still opens "NO NETWORK AND NO GITHUB", with no qualifier, although :37 now says "off Windows".
    • On Windows a bare ["gh", …] skips the guard's gh.cmd (tests/conftest.py:1297-1302). Where gh.exe is installed and logged in, it answers instead, so no NOTE is printed and GitHub is reached.
    • Both phrases predate the PR. They can go to a follow-up.
  • NIT 2: "once the plan's names and org: pass" leaves out a refusal that comes earlier. This affects the five docstrings and gh_guard.py:42.
    • In tests/test_adopt_tracking_branch.py:390 (test_check_of_a_plan_whose_branch_was_deleted_is_refused_by_name), plan accepted the names and org:.
    • check then refuses source-default-branch-not-local (exit 2) before it reads either, and the guard logs 0 calls for that test.
    • A plan whose keys have the wrong type ends the same way.
    • "once nothing before it refuses and the plan's names and org: pass" would be exact. As written, the sentence is true when "pass" is read as "pass what check asks first".

Checked and true

  • SHOULD 1 (test_adopt_check_plan_name.py:41-42, test_adopt_project_is_the_source.py:29-30): "Where a source has an origin, it is a string plan and check read from the source's own config, and nothing fetches it."
    • A logging git wrapper over the first two files and test_adopt_origin_repository.py recorded 5701 git calls. None is a fetch or pull.
    • The 65 ls-remote calls all list the local source (source, copy, Thing), never an origin. The only 2 clones are of a local source.
    • The origin is read with remote get-url origin, 10 times in the path-origin test alone.
  • SHOULD 2 (:43, :31): "execute is run in-process with every command it runs through run replaced". A probe of refused_before_any_remote measured this again:
    • on the refusal path, 7 git commands run through git_out and none through run;
    • on the control path, the first call through run raises execute ran ['git', 'ls-remote', …].
  • NIT 1 of my review (the condition):
    • In the first file, 18 of 45 cases run check with no --local-remote-dir and ask nothing: 5 where the names are refused, 13 where the org: is.
    • Every check run that asks, in all five files, asks exactly twice, spec before code.
    • gh_guard.py's "asks it twice, once of each leg" is true: _leg_remote_answers asks every role in EXTRACTED_LEGS.
  • The other new sentences are true:
    • "The only gh run here is check's" in test_adopt_tracking_branch.py:23, test_adopt_origin_repository.py:31 (in test_a_path_origin_is_not_compared_and_plan_says_so) and test_template_text_placeholders.py:34. In the last, "the two adoption tests" are 6 + 4 = 10 cases, and all 10 call.
    • scaffold-project.py:217 and family.py:1879 use --json name, as gh_guard.py says.
  • Call counts, from gh-guard0/gh-guard.log on the merge. All are probes, and each matches lane 1's figure:
File Calls Cases that call Split
test_adopt_check_plan_name.py 62 27 of 45 23 make 2, 4 make 4
test_adopt_project_is_the_source.py 28 10 of 22 6 make 2, 4 make 4
test_adopt_tracking_branch.py 18 8 of 17 7 make 2, 1 makes 4
test_adopt_origin_repository.py 4 2 of 30 2 make 2
test_template_text_placeholders.py 20 10 of 142 10 make 2
  • Code unchanged: in each of the six files, ast.dump outside the module docstring is identical to main's, and the comment lines are identical: gh_guard.py, test_adopt_check_plan_name.py, test_adopt_origin_repository.py, test_adopt_project_is_the_source.py, test_adopt_tracking_branch.py and test_template_text_placeholders.py.
  • Merge:
    • After a fresh fetch, main is 50178305.
    • merge-tree --write-tree with 1d21a850 is clean, tree d84f1bf0.
    • Main is not an ancestor of the head, but main has touched none of the six files since the branch's base 85555d0e.
  • Runs on the merge, through run9.sh, git 2.43.0:
    • the five changed test files plus test_gh_guard.py: 264 passed;
    • test_shape_doctor.py (it imports gh_guard.PROBES) with the trio: 593 passed, 3 skipped (Windows-only);
    • the trio alone: 148 passed;
    • the run under the git wrapper with the probe: 99 passed.
  • Sonar-style checks:
    • the PR's 48 added lines are at most 79 columns wide, none over;
    • no non-ASCII bytes, tabs or CR;
    • the shared sentence repeated across five docstrings sits inside one string token in each file, so it is not a duplicated code block.

Checklist candidates

  1. tests/test_adopt_split_branch.py:21-23 says a run without --local-remote-dir is redirected by url.<base>.insteadOf, "and its gh is never reached". Measured: 86 guard calls in 31 of 47 cases (20 make 2, 10 make 4, 1 makes 6). All are check's repo view <owner>/Northwind-spec|-code --json nameWithOwner. This is the same fault as tests/test_adopt_check_plan_name.py: its docstring says nothing runs gh, but since #861 its check runs ask the session guard's gh repo view of both leg repositories #880.
  2. Not a candidate:
    • tests/test_leg_path_yaml_scalars.py's "Every scaffold here runs with --local-remote-dir (no network, no gh)" is about scaffolds only, and true. Its 44 calls in 22 of 207 cases come from adopt check in test_check_still_passes_a_lookalike.
    • Twelve other files whose docstrings make a no-gh claim logged 0 guard calls: test_adopt_source_clone_record, test_ruleset_hint_tracking_branch, test_push_branch_refspec, test_derived_id_refusals, test_pin_source_unreadable, test_free_plan_hint, test_dry_run_asks_remotes, test_adopt_work_dir_refusal, test_adopt_plan_leg_path_help, test_tracking_branch_ref, test_scaffold_free_text_values and test_scaffold_manifest_values. Together with the two files above, that run gave 1004 passed, 8 skipped.

Could not verify

  • The family, bump-leg, update-shape and scaffold-e2e modules that claim no gh. They do not drive adopt's plan or check, and I did not run them.
  • Calls a file's own gh stub takes, which the guard never sees.
  • Windows, macOS and CI.

@sonarqubecloud

Copy link
Copy Markdown

@sourcery-ai

sourcery-ai Bot commented Oct 18, 2026

Copy link
Copy Markdown

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 @sourcery-ai review. Upgrade to get a review now.

@brettheap
brettheap merged commit 01a2b01 into main Oct 18, 2026
5 checks passed
@brettheap
brettheap deleted the fix/880-check-plan-name-docstring branch October 18, 2026 17:44
brettheap added a commit that referenced this pull request Oct 19, 2026
…"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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant