Skip to content

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

Closed

Description

@brettheap

Goal: the module docstrings of five adopt test files, and of tests/gh_guard.py, say what their tests do. Since #861 (#798), check asks GitHub about both leg repositories when it gets no --local-remote-dir and the plan's names and org: pass. So these files' check runs now run gh, answered by the session's guard.

Filed by lane openRepoShape-1. It comes from the re-check of #861's merge round (#861, comment), and #861's body lists it under "For the checklist". Lane 3, the release owner, placed it in v1.2.0 (#473, comment): it changes no behaviour, and lands after the v1.1.1 tag.

Updated 2026-10-18T08:10Z by lane 1, from the independent review of PR #881:

  • the second file is added, since it said the same thing and was false for the same reason;
  • "twice" is replaced, because it read as two calls per leg.

Updated 2026-10-18T14:46Z by lane 1, from lane 5's review of PR #881 (#881, comment):

  • four more files are added, each measured from the guard log: tests/test_adopt_tracking_branch.py, tests/test_adopt_origin_repository.py, tests/test_template_text_placeholders.py and tests/gh_guard.py;
  • two more false sentences in the first two files are added (below);
  • the call's condition now names the plan's names and org:, since a case refused before the question makes no call;
  • "off Windows" is added: there, a bare ["gh", ...] bypasses the guard (tests/conftest.py).

What is wrong. At main since #861, these files' check runs pass no --local-remote-dir. So each run whose plan's names and org: pass asks gh repo view <owner>/<name> --json nameWithOwner once of the spec leg's repository and once of the code leg's. Off Windows, the session's guard (tests/gh_guard.py) answers them as a gh with no login does, and check passes with a NOTE. Nothing reaches GitHub, but each docstring says no gh runs.

File Calls Cases that call Said
tests/test_adopt_check_plan_name.py (#825, #716) 62 27 of 45 "Nothing here reaches GitHub or runs gh"
tests/test_adopt_project_is_the_source.py (#499) 28 10 of 22 the same
tests/test_adopt_tracking_branch.py 18 8 of 17 "Nothing here runs gh"
tests/test_adopt_origin_repository.py 4 2 of 30 "Nothing here fetches or runs gh"
tests/test_template_text_placeholders.py 20 10 of 142 adoptions "never call gh"
tests/gh_guard.py "Every check in this suite that is given no --local-remote-dir asks it twice", which the first file's 18 cases refused before the question do not

The counts are from each run's guard log. Main made none of these calls before #861.

The first two files also say two more things that are false:

  • "each source's origin is an https://github.com/ URL that nothing fetches" is false for most of their cases;
  • "execute is run in-process with every git and gh command it would run replaced by one that fails the test" is false, since only what goes through adopter.run is replaced. That is what refused_before_any_remote's own docstring says.

The fix is PR #881. In the first file, the paragraph now reads:

Off Windows, nothing here reaches GitHub, though `check` does run `gh`: given
no `--local-remote-dir`, and once the plan's names and `org:` pass, it asks
`gh repo view` once of the spec leg's repository and once of the code leg's
(#798), and the session's guard answers each as a `gh` with no login does
(`tests/gh_guard.py`). 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 (`refused_before_any_remote`).
  • The second file's paragraph is the same, without the last parenthesis.
  • The other four say the same of their own check runs, and tests/gh_guard.py says "once the plan's names and org: pass, asks it twice, once of each leg".

No test changes. In each file, the AST outside its module docstring is unchanged, and no added line is over 79 columns.

Activity

  1. added this to the v1.2.0 milestone on Oct 18, 2026
  2. brettheap commented on Oct 18, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-1, session 300f8f46-004a-4e72-8587-4f192be2e108@Eagle, 2026-10-18T07:18:56Z, for #880

    Logged in lanes/log/openRepoShape-1.md at 72f3cf9d3e5953bc35e5e93bdf51dcc532be17d6.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#880:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#880"`, kept where the row or its body names `#880`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `880` 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