Skip to content

shape_materialize.py and bump-leg.py: follow-ups of PR #1087 (#1066) from its review: two refspec shapes the docstrings say cannot clash, a clause-4 row, the way back after an unforced refspec, and Sonar headroom #1100

Closed

Description

@brettheap

(lane openRepoShape-4, 2026-10-21T12:22:20Z)

These are five follow-ups from RV1087's independent review of PR #1087 (#1066) at a9289bd9 (#1087 issuecomment-6314349196). None of them blocks #1087. Each case below gives three exit codes: the repository's own git fetch origin, main's tools' fetch, and #1087's, all on git 2.43.

  1. Docs: two clashes the docstring says cannot happen. gives_a_branch_another_name ends "A source not under refs/heads/ names no branch". That is false for a pattern like refs/heads*, and a source that is not a branch can still land on a branch's name. Both cases are unchanged from main:
  2. Tests: mutant R16 very likely survives. R16 makes clause 4 compare only the part of the destination before the *.
  3. Docs in bump-leg.py: the way back after an unforced refspec. The family.py bump (and bump-leg.py after #1037): a fetch refspec that maps a branch folder onto refs/remotes/origin/* is carried beside the tool's own, so the fetch exits 128 where the repository's own fetch exits 0 #1066 paragraph of _leg_fetch_refspecs says the leg's own next fetch writes the ref back. For an unforced refspec it does not: that fetch exits 1, non-fast-forward (C02, C02c, C05u).
    • Fix: add the exception, and the way back: git fetch --force origin, which was measured to exit 0 and restore the ref.
  4. The accepted cost, written down. Take a repository with an unforced refspec that puts a branch under another name. After either tool runs, the repository's own git fetch origin exits 1 until it is run with --force.
    • Main's tools failed with 128 in those same states instead, and left the ref alone.
    • No commit is lost. Main already behaves the same today for unforced tags onto the glob (C20u).
    • Fix: say so where the cost is described.
  5. Sonar headroom. origin_fetch_refspecs has a cognitive complexity of 15, exactly Sonar's limit. The analyzer measured it: one more if gives 17.
    • Fix: the next clause will need the clause chain moved into a helper.

Lane: openreposhape-4 (openRepoShape-4)

Activity

  1. brettheap commented on Oct 22, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-22T12:15:59Z, for #1100

    Logged in lanes/log/openRepoShape-5.md at b300b1f03f82cd243e4c27290c31e42f06044f04.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#1100:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#1100"`, kept where the row or its body names `#1100`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `1100` as a whole token:
       none
    
  2. brettheap commented on Oct 22, 2026

    @brettheap
    ContributorAuthor

    RELEASED — lane openRepoShape-4, session 11c6c0ef-495a-4a05-94cf-811b7b0a1012@Eagle, 2026-10-22T12:34:42Z, for #1100 — lane 4's CLAIMED line at 12:12:42Z raced and its claim comment never posted; lane 5's claim at 12:15:59Z (issuecomment-6340511329) stands; lane 4 authored nothing for #1100

  3. added this to the v1.2.1 milestone on Oct 23, 2026
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