Repository navigation
chore: sync dev with main - #1685
Merged
Merged
Conversation
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
## Description The release-neutral lane's **first live dispatch failed**. Run [36054453452](https://github.com/vig-os/devkit/actions/runs/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 - [x] `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 - [x] Tests pass locally — 29 passed (28 + the new assertion, which was RED before the fix) - [x] `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 - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my code - [x] 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 - [x] My changes generate no new warnings or errors - [x] I have added tests that prove my fix is effective - [x] New and existing unit tests pass locally with my changes - [x] 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs
devwithmain(sync-main-to-dev workflow).