Skip to content

bootstrap.py: _kept_name skips a -kept name with a branch stored under it, and a test row for a twin with a slash (follow-up of #962) #1000

Closed

Description

@brettheap

Follow-up of #962 (landed as #984, 2a78ae1a): the two NITs of rv984b's READY re-check (#984 issuecomment-6266764236), left out of #984 as small enough for a follow-up.

1. _kept_name can print a rename git refuses. In templates/assembly-root/scripts/bootstrap.py (_kept_name, the loop near :885 at #984's head), a candidate <twin>-kept is skipped only when a held branch FOLDS to the same name. A branch stored UNDER the candidate is not checked.

  • Scenario: the leg is detached at the pin, Main is packed and holds a commit, and a branch Main-kept/x exists.
  • The printed line is git -C spec branch -m Main Main-kept. Pasted through /bin/sh, it exits 128: error: 'refs/heads/Main-kept/x' exists; cannot create 'refs/heads/Main-kept'. The next run prints the same command again, so the person has to pick a name themselves.
  • On a folding disk, a branch main-kept/x blocks the rename the same way.
  • This is false against the docstring's "so the line that says to rename it can be pasted as it is". It is rare, and the line does state the rule, so a person can recover.
  • Fix: also skip a candidate when any held name starts with _fold(candidate) + "/", and add a test row for it.

2. No test has a twin whose name contains a slash. rv984b's mutant O3 survives with 63 of 63 passing. O3 makes _folded_spelling return ref.rsplit("/", 1)[-1] instead of ref[len("refs/heads/"):].

  • The code is right: with --branch team/main and a packed Team/main, the run is refused; the printed git -C spec branch -m Team/main Team/main-kept works; the next run makes team/main; and Team/main-kept holds the commit.
  • Only a test row is missing: a twin with a slash, which kills O3.

Not claimed. Filed by lane openRepoShape-5.

Lane: openreposhape-5 (openRepoShape-5)

Activity

  1. brettheap commented on Oct 19, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-19T15:44:16Z, for #1000

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

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#1000:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#1000"`, kept where the row or its body names `#1000`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `1000` as a whole token:
       none
    
  2. added this to the v1.2.0 milestone on Oct 19, 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