|
| 1 | +# Post-release repairs — the automation that never ran |
| 2 | + |
| 3 | +Two follow-ups from `070_outcome.md`, both landed on `dev`. |
| 4 | + |
| 5 | +## 1. The dev-version bump never fired (#3129) |
| 6 | + |
| 7 | +`070` recorded that the v2.39.0 bump was opened by hand. The reason turned out to be |
| 8 | +worse than a missed run: `.github/workflows/dev-version-bump.yml` had **never executed**. |
| 9 | +`gh api repos/lidge-jun/opencodex/actions/workflows/346296606/runs` returned |
| 10 | +`total_count: 0` — zero runs across v2.37.0, v2.38.0 and v2.39.0, while #3045, #3076 and |
| 11 | +#3127 were all opened by hand. |
| 12 | + |
| 13 | +### Cause |
| 14 | + |
| 15 | +`release.yml` creates the GitHub release with `GH_TOKEN: ${{ github.token }}` |
| 16 | +(`release.yml:350`), and GitHub does not start workflow runs from events raised by the |
| 17 | +default `GITHUB_TOKEN`. A `release: published` listener therefore cannot observe a |
| 18 | +release this repository publishes itself, on any branch. |
| 19 | + |
| 20 | +The workflow's own header blamed something else — the default-branch resolution trap for |
| 21 | +`release` events. That trap is real, and #3013 correctly moved the file to `main` to |
| 22 | +satisfy it, but satisfying it armed nothing. Two plausible explanations for the same |
| 23 | +silence, and the repository acted on the wrong one for three releases. |
| 24 | + |
| 25 | +The tag push is not an escape hatch either: `release.yml` pushes `refs/tags/vX.Y.Z` with |
| 26 | +the same token, and no run exists for those pushes. Confirmed by querying push-event runs |
| 27 | +with a `v2.*` head branch — empty. |
| 28 | + |
| 29 | +### Fix |
| 30 | + |
| 31 | +`release.yml` now **calls** the bump workflow after a successful publish, so the run is a |
| 32 | +child of the release run instead of a reaction to an undelivered event. The bump workflow |
| 33 | +becomes `on: workflow_call` with a `released-version` input. |
| 34 | + |
| 35 | +No new credential: no PAT, no app token, no `contents: write` added to the release job. |
| 36 | +The called workflow keeps its write scopes on its own job, and `Protect dev` still means |
| 37 | +a human merges the PR. Only the ignition changed. |
| 38 | + |
| 39 | +### One thing the tests taught |
| 40 | + |
| 41 | +`bump-dev-version` is declared **first** in `release.yml`, ahead of the jobs it depends |
| 42 | +on. `tests/ci-workflows.test.ts:735` splits the workflow on `- name:` and reads each |
| 43 | +`run:` block to the start of the next one, checking that dispatch inputs never |
| 44 | +interpolate into shell source. A job declared after the last step falls inside that |
| 45 | +window and reads as shell — the test failed on two placements before this one, correctly |
| 46 | +both times. Job order carries no execution meaning (`needs` does), so the placement is |
| 47 | +free and the injection check stays strict rather than being relaxed to accommodate us. |
| 48 | + |
| 49 | +A comment written during this work claimed a preview publish would move `dev` to the |
| 50 | +preview's stable core. Checking it against the script instead of trusting it showed |
| 51 | +`changed=false` — `dev` is normally already at that core when the preview publishes. The |
| 52 | +comment was corrected before commit. |
| 53 | + |
| 54 | +### Activation delay, stated rather than discovered later |
| 55 | + |
| 56 | +A `workflow_call` body resolves from the **caller's** ref, and `release.yml` only runs on |
| 57 | +`main` or `preview`. This takes effect after an ordinary `dev` → `main` promotion carries |
| 58 | +it there; the next release is the first real exercise. Same shape of delay #3013 had, for |
| 59 | +a different reason. |
| 60 | + |
| 61 | +## 2. The server-auth websocket flake (#3128) |
| 62 | + |
| 63 | +`926a8d8c4` cherry-picked out of #3109 onto its own branch, authorship preserved. The |
| 64 | +commit is a two-line test change — pin `codexAccountNamespaces` and route both turns |
| 65 | +through `ws-refresh/gpt-test` — and had no relationship to that PR's combo-compact-failover |
| 66 | +subject. Analysis of the race is in `070`. |
| 67 | + |
| 68 | +## Result |
| 69 | + |
| 70 | +`dev` at `6f415baef`, carrying 2.40.0: |
| 71 | + |
| 72 | +``` |
| 73 | +6f415baef fix(release): call the dev version bump instead of listening for an event that never fires (#3129) |
| 74 | +33d32b6a3 test(auth): pin the websocket refresh account to stop a cross-platform flake (#3128) |
| 75 | +9c8bbbf66 docs(devlog): record the v2.39.0 release train (#3126) |
| 76 | +3e0f99a19 chore(release): move dev to 2.40.0 after the v2.39.0 release (#3127) |
| 77 | +``` |
| 78 | + |
| 79 | +`#3127` should be the last hand-opened bump. Whether it is gets settled by the next |
| 80 | +release, not by this note. |
0 commit comments