Skip to content

templates/family-root/scripts/bootstrap.py (#1045): a signal is told only where it is git's last failing code, so a member's crash or kill before a later 128 or 1 ends family bootstrap ok #1056

Closed

Description

@brettheap

Goal: where a git that git's update ran dies of a signal, make bootstrap fails naming it, wherever the update met it, and not only where the signal's code is the update's last.

Depends on #1045 landing (open; closes #998 and #996; stacked on #954). The lines below are at #1045's head b2bbb31c.

State

  • the family root's bootstrap.py: git's update ended by a signal fails the run by name, and B4 with a token in use is told from fetches redone without a trace, so the token reaches no file (#998, #996) #1045's ended_on (templates/family-root/scripts/bootstrap.py:743-760) reads a signal from git's update's exit code alone: 128 + N for N below signal.NSIG, where a git it ran died of signal N, and -N, where git itself was killed. fetch_members asks it of the update's exit code only (:452), and asks the walk (stopped_below) only where that code is exactly 128 (:453-454).

  • Two docstrings say the signal's code is what the update ends with: ended_on's, "git's update goes on past that gitlink and ends with that code" (:747-748), and credential_advice's, "a fetch git could not make ends git's update there with 128, so an update that ends 128 + N met none" (:726-728).

  • Git keeps only the LAST non-zero code. In update_submodules (git 2.47.1, builtin/submodule--helper.c:2742-2774) each gitlink's code replaces ret, and only 128 stops the loop:

    fail:
            if (!code)
                continue;
            ret = code;
            if (ret == 128)
                goto cleanup;
    
  • A member whose nested update dies of a signal (:2700-2704, Failed to recurse into submodule path, then return ret, the child's code), or whose git checkout does (:2389-2394, use "git checkout"'s), gives 128 + N, and git's update goes on to the next gitlink. A later gitlink's 128 or 1 replaces that code, so ended_on sees no signal.

What happens (measured)

Lane 5's probe at b2bbb31c, with git 2.43.0 and git 2.47.1. Each state was made with tests/test_family_bootstrap_stops_named.py's own helpers, in the holder unless said, and run as bootstrap.py --skip-members, offline. A signal ends something in IRRS, the first member git's update comes to; then something fails in IRSS, which it comes to after. Two triggers:

"With the credential" means the fixture's file transport is allowed (cloning); "no credential" means it is refused (isolated).

in IRRS, then in IRSS git git's update bootstrap
P3, then IRSS's pin moved on, no credential (rv996's state) 2.43.0 128 the advice, family bootstrap ok, exit 0
P3, then B4, with the credential 2.43.0 128 the advice, ok, exit 0
the same, in a plain clone of the holder 2.43.0 128 the advice, ok, exit 0
P3, then IRSS's checkout refused (an edit it would overwrite), with the credential 2.43.0 1 the advice, ok, exit 0
killed checkout, then IRSS's pin moved on, no credential both 128 the advice, ok, exit 0
killed checkout, then IRSS's checkout refused, with the credential both 1 the advice, ok, exit 0
killed checkout, then B4, with the credential both 128 UPDATE STOPPED ... git stopped at members/IRSS ..., FAILED, exit 1; no signal said
control: P3 alone, with the credential 2.43.0 139 UPDATE KILLED ... signal 11 (SIGSEGV, exit 139) ..., FAILED, exit 1
control: killed checkout alone, with the credential both 137 UPDATE KILLED ... signal 9 (SIGKILL, exit 137) ..., FAILED, exit 1
  • In each ok row, bootstrap's own FETCH INCOMPLETE (git exit 128) (or exit 1) block prints git's died of signal line, and IRRS's spec and code legs are not checked out after the run (no .git in either): the signal stopped git's update in IRRS before it recursed there.
  • In the rows with the credential, nothing a credential cures is missing, and the advice says to set SHAPE_LEGS_TOKEN.
  • With P3 then B4, B4 is not named either. The walk stops at IRRS, whose own .gitmodules git cannot read (UNTOLD), so stopped_below says nothing. B4 at IRSS alone is named (test_b4_a_commit_the_fetch_did_not_bring_fails_naming_it, both rows passing here on 2.43.0).
  • With SHAPE_LEGS_TOKEN set to a fake token (the family root's bootstrap.py: with SHAPE_LEGS_TOKEN or SHAPE_LEGS_APP_TOKEN set, a member's commit no branch of its remote holds (B4) still ends family bootstrap ok, with the advice to set the token that is already set #996's untraced run), four of the states read the same (P3's on 2.43.0, the killed checkout's on both gits): P3 then B4, P3 then the refused checkout, and the killed checkout then the refused checkout end with the advice and ok, exit 0, the advice saying to set the SHAPE_LEGS_TOKEN that is set; the killed checkout then B4 fails naming B4 alone. The token was in no output.
  • The baseline rows at b2bbb31c pass on 2.43.0: B4 in the holder and in a plain clone, the credential's skip (three rows), a member's .gitmodules git cannot read, P3, and the two signal rows (9 passed).

Direction

Tell a signal wherever git's update met one.

Verify

Found by lane 5's independent review of #1045 (#998, #996), rv996 (#1045 issuecomment-6288783192), and measured by lane 5.

Milestone: v1.2.0 (placement is lane 3's call).

Not claimed.

Lane: openreposhape-5 (openRepoShape-5)

Activity

  1. brettheap commented on Oct 20, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-20T11:01:04Z, for #1056

    Logged in lanes/log/openRepoShape-5.md at 44d4f399e0bda3f6cdc4bf1c59e6d75ccf24912c.

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

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