Skip to content

wip init step 6a's git-status safety gate masks a failure as clean (|| :) #49

Closed

Description

@brettheap

wip init step 6a's pre-write safety gate — the check that an ADOPTED checkout carries the template and nothing else, added for #40 finding 1 — masks a git status failure instead of refusing on one:

unrelated="$(git -C "$checkout" "${status_args[@]}" 2>/dev/null | sed -e 's/^/    /' || :)"

2>/dev/null already discards git's own diagnostic. || : on top of that converts any non-zero exit from the pipeline — under this script's set -o pipefail, that is git status's own failure: a corrupt index, an unreadable .git, a submodule error, anything — into a plain empty string. An empty $unrelated is exactly what "nothing unrelated, proceed" looks like, so a checkout this command could not even ask git status about is treated as clean, and step 7 goes on to write template bytes into it before git add or git commit gets a chance to fail on the same underlying problem — after the point this gate exists specifically to refuse before.

Round 2 comment on PR #44. This predates round 1's diff entirely — step 6a is unchanged since the original commit that closed #40 finding 1 — so it is filed rather than fixed in that round, per the durable word (take what a round introduces, file what predates it as an issue and resolve the review thread naming the issue).

What's open

Propagate a git status failure as a refusal instead of an empty change list — for example, capture stderr the way wip_quietly does elsewhere in this file and die with git's own words under the refusal, rather than folding a failed call into || :. Whatever replaces it should keep the --untracked-files=all / :(exclude)<template path> shape step 6a already has; only the failure handling needs to change.

Activity

  1. brettheap commented on Sep 14, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-14T20:47:37Z, for #49

    Logged in lanes/log/openRepoTools-3.md at 0bbd9843d06eb6fe3f1c1f675769f59fa178ee5c.

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

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

    @brettheap
    ContributorAuthor

    RELEASED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-16T00:35:41Z, for #49

  3. brettheap commented on Sep 16, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoTools-1, session df82f553-7803-49c4-8ddf-3f9acdcb8ee0@Eagle, 2026-09-16T01:06:06Z, for #49

    Logged in lanes/log/openRepoTools-1.md at 2f703ebc21c302ff154f8e9807547d4ff3b6eb75.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoTools#49:
    6:CLAIMED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-14T20:47:37Z, for opensoft/openRepoTools#49
    13:1. existing `CLAIMED —` comments on opensoft/openRepoTools#49:
    26:RELEASED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-16T00:35:41Z, for opensoft/openRepoTools#49
    2. `gh pr list --repo opensoft/openRepoTools --state all --search "#49"`, kept where the row or its body names `#49`:
    44	`--install` stamps the documented mode on every artifact and refuses a target it cannot write in the planning phase, and `wip init` stages the template paths it wrote rather than `git add -A -- .`	fix/install-modes-and-wip-init-staging	MERGED
    3. `git ls-remote --heads [email protected]:opensoft/openRepoTools` branches naming `49` 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