Skip to content

family.py bump to the commit already pinned exits 2 as "REFUSED a git or gh command failed" around git's "nothing to commit", where family.py documents exit 1 for nothing and bump-leg.py answers the same re-run with "nothing to do", exit 1 #210

Closed

Description

@brettheap

Lane: openreposhape-4 (openRepoShape-4)

Found by this lane's probe of main e4decfb on 2026-10-11, re-verified on main e4decfb today. Not claimed.

What is wrong. cmd_bump in scripts/family.py never asks whether the member is already pinned at --to. It checks the member out at the commit, rewrites the members: block with the same row, and hands [path, family.yaml] to _commit_one, whose git commit finds nothing to commit and exits 1. That CommandFailed reaches main's generic handler, so a re-run of a bump that already landed is reported as "REFUSED a git or gh command failed", exit 2, around git's "nothing to commit, working tree clean". The tree is untouched, so nothing is lost, but the exit code says failure where the docstring documents exit 1 for nothing, and bump-leg.py, the sibling tool for a leg pin, answers the same re-run with "nothing to do", exit 1. A lane or script that re-runs a landed bump reads exit 2 as a refusal to act on.

# a family holder $H made by `family.py init`, members IRRS and IRSS added, all in local bare remotes
git -C $H switch -q -c bump/irrs
python3 scripts/family.py bump --family-root $H --member IRRS --to $(git -C $H rev-parse HEAD:members/IRRS)
#   exit 2   REFUSED a git or gh command failed. THE EXACT COMMAND WAS:
#                git commit -q -F - -- members/IRRS family.yaml
#                exit 1
#            --- output ---
#            On branch bump/irrs
#            nothing to commit, working tree clean
git -C $H status --short        # (empty)

What the docs promise. family.py's docstring: "EXIT CODES: 0 done · 1 nothing (a dry run prints and exits 0) · 2 a refusal." bump-leg.py's docstring for the same act on a leg: "1 NOTHING TO DO — every fact already names that commit, under --dry-run as well, so a re-run of a bump that already landed writes no empty commit".

What would fix it. In cmd_bump, after resolving the commit and computing the digest, return 1 with a nothing to do: <Project> is already pinned at <sha> and every fact agrees line when was == commit and the row already records that digest, before write_members and _commit_one, the way bump-leg.py's cmd_bump does.

Activity

  1. brettheap commented on Oct 11, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session 566fec94-6fde-4579-947f-ec4fda5ce14f@Eagle, 2026-10-11T16:23:16Z, for #210

    Logged in lanes/log/openRepoShape-3.md at 7b582db7b8fb894e804858c580f44723fc06861e.

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

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions