Skip to content

adopt-project.py, shape_materialize.py and standard.py: a docstring says adopt's Free-plan words are unchanged where an internal root's note changed, an internal root on a Free plan is told it is private, and a docstring line is 104 characters #994

Closed

Description

@brettheap

Goal: three small statements in the source are made true: the adopt docstring that says its Free-plan words are unchanged, the Free-plan hint's sentence for an internal root, and the 104-character line in prepare's docstring.

Filed by lane openRepoShape-3, from RV969's review of #969, its NITs 3 and 6 (comment 6253804676), and RV947's round-2 review of #947, its NIT-6 (comment 6252870935), on #969 and #947. Lane 3 left each for a later change that touches the file; none changes behaviour but the second.

State. Read at origin/main ae63d450; #969 and #947 are both merged.

  1. RV969 NIT 3, adopt-project.py:11631-11636. The docstring of _free_plan_hint_by_the_root (:11606) ends: "free_plan_secrets_note, which the scaffold and family.py ask too, and where ROOT_VISIBILITY_UNREAD now lives, says FREE_PLAN_UNREAD there; the words adopt printed before are unchanged." Since scaffold-project.py, family.py init and shape_materialize.py: the plan names the tracking branch, and on disk the visibility; an unread root or reused leg is said to be unread, the root before the plan; every holder gets the members' NOTE (#913) #969 (scaffold-project.py, family.py init and shape_materialize.py: the plan and the visibility NOTEs go by values GitHub did not give, misword an internal root, skip a public holder's credential NOTE, and name no tracking branch #913, L2-93), free_plan_secrets_note (scripts/shape_materialize.py:1943-1979) answers an INTERNAL root whose plan is unread with FREE_PLAN_UNREAD_INTERNAL (:1813), not FREE_PLAN_UNREAD (:1796). So adopt's words did change for that case.
  2. RV969 NIT 6, scripts/shape_materialize.py:1970-1971. if plan == "free": return FREE_PLAN_HINT.format(org=org, repo=root, what=f"{root} is"). FREE_PLAN_HINT (scripts/repo_shape.py:1351) reads "{what} private, so ...", so an internal root on a plan read as free is told "acme/Atlas is private". This predates scaffold-project.py, family.py init and shape_materialize.py: the plan names the tracking branch, and on disk the visibility; an unread root or reused leg is said to be unread, the root before the plan; every holder gets the members' NOTE (#913) #969 (RV969: "optional"). The case is one scaffold-project.py, family.py init and shape_materialize.py: the plan and the visibility NOTEs go by values GitHub did not give, misword an internal root, skip a public holder's credential NOTE, and name no tracking branch #913's own reading says GitHub does not give: internal visibility exists only for an organisation an enterprise account owns, which is not on the Free plan (the comment at scripts/shape_materialize.py:1806-1812).
  3. RV947 NIT-6, src/openreposhape/standard.py:698. Line 698 of prepare's docstring (:693) is 104 characters, where the rest of its paragraph wraps at about 76. It is the third line of the paragraph :696-701, and the sentence "git must be there, because the standard is a clone;" sits on it with no re-wrap. Lane 3 left it "for the next PR that touches standard.py, rather than restart tests here". Nothing enforces a line length (RV947: "No test enforces line length"; pyproject.toml is the only one of pyproject.toml, setup.cfg, tox.ini and .flake8 here, and it sets no line-length, max-line-length or E501); the other four lines in the file over 79 characters are 81 (:181, :339, :375, :426).

What happens. Measured at ae63d450, and at 1951e6aa6 (main before #969) by an archive of that commit, calling free_plan_secrets_note("acme", "acme/Atlas", <visibility>) with organisation_plan replaced by a function that answers the plan named (a stub gh exit 97 first on PATH, GH_TOKEN=bogus, an empty GH_CONFIG_DIR); each answer cut after its first sentences:

plan unread, root internal   at 1951e6aa6: NOTE this run could not read acme's plan from GitHub, so it cannot say whether the Free-plan
                                           secrets hint applies. acme/Atlas is internal, so it applies when acme is on the GitHub Free plan: ...
                             at ae63d450 : NOTE this run could not read acme's plan from GitHub, but the Free-plan secrets hint does not hang
                                           on it: acme/Atlas is internal, which GitHub gives only to a repository of an organisation an
                                           enterprise account owns, and that organisation is not on the GitHub Free plan. ...
plan free,   root internal   at both:      NOTE acme is on the GitHub FREE plan, where ORGANISATION Actions secrets are delivered only to PUBLIC
                                           repositories. acme/Atlas is private, so org-level SHAPE_LEGS_APP_ID / ...
plan unread, root private    at both:      NOTE this run could not read acme's plan from GitHub ... acme/Atlas is private, so it applies when
                                           acme is on the GitHub Free plan: ...

The first row is item 1: adopt's note for an internal root with an unread plan is not the words it printed before. The second is item 2. The third is the case the docstring was right about.

Evidence.

  • The probe above, and the lines.
  • RV969's NITs 3 and 6, and RV947's round-2 NIT-6 (the round-1 comment issuecomment-6252705614 holds NITs 1 to 5; the sixth is in the round-2 comment).
  • adopt-project.py, scripts/shape_materialize.py and src/openreposhape/standard.py are not pinned copies. scripts/repo_shape.py, which holds FREE_PLAN_HINT, is one, so item 2 must not change that text: (b) below passes what and leaves it alone. No project re-pins.

Direction.

  1. Reword the last sentence at adopt-project.py:11634-11636: where the plan is unread, an internal root is told FREE_PLAN_UNREAD_INTERNAL since scaffold-project.py, family.py init and shape_materialize.py: the plan names the tracking branch, and on disk the visibility; an unread root or reused leg is said to be unread, the root before the plan; every holder gets the members' NOTE (#913) #969, and every other case is in the words adopt printed before.
  2. Choose one. (a) Leave the branch and say in a comment at shape_materialize.py:1970 why an internal root on a Free plan should not arise, and why "private" stands if it does. (b) Pass the visibility through the what argument the caller already supplies, so the sentence is true of an internal root without touching repo_shape.py: for example what=f"{root} is internal, which this hint treats as", which reads "acme/Atlas is internal, which this hint treats as private, so org-level ...". The author decides; (b) is one line and a row.
  3. Re-wrap src/openreposhape/standard.py:696-701 at about 76 characters, no word changed.

Verify.

  • grep -n "words adopt printed before are unchanged" adopt-project.py finds nothing, and the new sentence agrees with the first row of the probe.
  • For (b), the probe's second row prints no "is private" for an internal root; for (a), the comment is there. tests/test_plan_visibility_notes.py, tests/test_free_plan_hint_reads.py and tests/test_adopt_free_plan_hint_root.py pass, with a row for an internal root on a free plan if (b).
  • awk 'length($0) > 100' src/openreposhape/standard.py prints nothing, and tests/test_openreposhape_package.py passes (a docstring changed; no code).
  • One file at a time under a stub gh.

Size: S.

Lane: openreposhape-3 (openRepoShape-3)

Activity

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

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-20T05:05:12Z, for #994

    Logged in lanes/log/openRepoShape-3.md at dc28c492ec071e24c9a472544161ab8ba068240b.

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

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