Skip to content

fix(ci): source the retry helper in the release-neutral opener - #1684

Merged
c-vigo merged 1 commit into
mainfrom
bugfix/1676-opener-retry-helper
Sep 24, 2026
Merged

c-vigo merged 1 commit into
mainfrom
bugfix/1676-opener-retry-helper

Conversation

@c-vigo

@c-vigo c-vigo commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Description

The release-neutral lane's first live dispatch failed. Run 36054453452, at gh pr create:

/home/runner/work/_temp/....sh: line 40: retry: command not found
##[error]Process completed with exit code 127.

retry is a bash function exported through BASH_ENV by the setup-env composite action. The opener's job deliberately skips setup-env — gh is preinstalled and opening a PR needs no toolchain — so the function was never in scope.

prepare-hotfix.yml's PR job had already solved this, and its comment even says so ("the retry helper is sourced from the checkout"). I copied its retry … -- gh pr create call without the source line that makes it work.

Type of Change

  • fix -- Bug fix

Changes Made

Sources .github/scripts/retry.sh from the checkout before the retry call, with the same # shellcheck source=/dev/null directive prepare-hotfix.yml uses, and a comment explaining why this job cannot rely on BASH_ENV.

The test walks every step of the opener job and requires any that calls retry to source the helper, so the coupling is pinned rather than remembered.

Why no existing test caught it: all 28 shape assertions pass what a step says about itself, and the step said retry quite correctly — it was the environment that lacked it. Only running the workflow surfaces this class of defect. That is now twice in this bootstrap: the first was gate 3 refusing the changelog mirror that gates 1 and 2 were widened to admit.

Changelog Entry

No changelog needed. This fixes a defect in an unreleased feature whose own ## Unreleased entry (added in #1678) already describes the lane; a separate entry for "the thing we just added now works" would be noise. Carrying no changelog also keeps this PR trivially release-neutral.

Testing

  • Tests pass locally — 29 passed (28 + the new assertion, which was RED before the fix)
  • just precommit exit 0, including actionlint + shellcheck over the workflow

Manual Testing Details

TDD: test added and confirmed RED (retry called with no source), then fixed, then GREEN. Exit codes read from redirected files, not through pipes.

Not yet proven end-to-end — the opener still has not successfully opened a PR. That is the next step after this merges, and it is the real test.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly — n/a, no behaviour change to document
  • I have updated CHANGELOG.md — n/a, see Changelog Entry above
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

This needs an --admin merge, and it is the bootstrap's second and last bypass. The circularity is unavoidable: the opener is what makes a main PR App-authored and therefore approvable, so a broken opener cannot open the PR that fixes itself. Once this is on main, the lane can carry its own future changes — including re-dispatching for the unbound register amendment on bugfix/1668-unbound-1261-cve-batch.

This PR is release-neutral by the lane's own contract (one workflow file, one test file, no changelog, no assets/), so once the opener works it would qualify to travel by the lane itself.

Refs: #1676

The lane's first live dispatch (run 36054453452) failed at `gh pr create`
with `retry: command not found`, exit 127.

`retry` is a bash FUNCTION exported through BASH_ENV by the setup-env
composite action. The opener's job deliberately skips setup-env -- `gh` is
preinstalled and opening a PR needs no toolchain -- so the function was
simply never in scope. prepare-hotfix.yml's PR job had already solved
this the same way and its comment even says so ("the retry helper is
sourced from the checkout"); I copied the `retry ... -- gh pr create`
call without the `source` line that makes it work.

Sources `.github/scripts/retry.sh` from the checkout, with the same
`# shellcheck source=/dev/null` directive prepare-hotfix.yml uses.

The accompanying test walks every step of the opener job and requires any
that calls `retry` to source the helper, so the coupling is pinned rather
than remembered. No existing shape test could have caught this: they all
assert what a step says about itself, and the step said `retry` quite
correctly -- it was the environment that lacked it. Only running the
workflow surfaced it, which is the second defect this bootstrap has found
that way (the first was gate 3 refusing the changelog mirror).

Refs: #1676
@c-vigo c-vigo added the release-neutral Changes no published artifact; merges to main without a release label Sep 24, 2026
@github-actions

Copy link
Copy Markdown

Release-neutral guard — verdict

This change is release-neutral. Every published derivation is byte-identical to main, so merging it changes nothing any consumer receives and no release is required.

Gate Proved
1 No release content (.vig-os, which carries DEVKIT_VERSION) touched
2 devShells.default, devkitImage, devkitImageEnv derivations unchanged, compared with the changelog normalized
3 Consumer scaffold under assets/ byte-identical
5 No release train in flight

Files carried to main:

  • .github/workflows/release-neutral-open.yml
  • tests/test_workflow_release_neutral.py

Changelog. Untouched — nothing for gate 2 to normalize.

Do not push to this branch after approving — main sets dismiss_stale_reviews_on_push.

@c-vigo
c-vigo merged commit 7e17002 into main Sep 24, 2026
13 of 14 checks passed
@c-vigo
c-vigo deleted the bugfix/1676-opener-retry-helper branch September 24, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-neutral Changes no published artifact; merges to main without a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant