Skip to content

Release tooling: fix the push race, add --yes - #114

Merged
bryanroscoe merged 1 commit into
mainfrom
chore/release-push-race
Sep 17, 2026
Merged

bryanroscoe merged 1 commit into
mainfrom
chore/release-push-race

Conversation

@bryanroscoe

Copy link
Copy Markdown
Owner

Two of the three changes from #84, rebased onto current main. #84 is 89 commits behind and conflicts in v2/release.sh.

Push racemerge-updater and refresh-screenshots both commit to the default branch and can finish at the same time; neither rebased before pushing, so the loser got a non-fast-forward rejection. That is what failed the v2-2.1.0 gallery job. Both now rebase and retry up to five times, then fail loudly.

Verified under set -euo pipefail: succeeds on recovery, gives up after five, and the [[ ]] && { exit 1; } guard does not trip set -e on the non-final attempts (it is a non-final element of an AND-OR list).

--yes / -y — auto-confirms the three gates for non-interactive use. Piping yes stays blocked by the auto-mode classifier, which is correct; this is the sanctioned way to skip them deliberately. The three prompts collapse into one confirm helper. Verified: proceeds under --yes and a typed y, aborts on n and on empty stdin, so it still fails closed.

Deliberately not included

The v2-desktop- tag rename. It is the only real conflict in #84 and it is load-bearing in ways worth doing on its own:

  • the Homebrew tap's bump-tap job rewrites the cask from the tag
  • docs/RELEASE-DECISION-2026-09-09.md and v2/CHANGELOG.md are written throughout in v2-X.Y.Z terms
  • CLAUDE.md documents the v2-* convention in several places
  • Release tooling: --yes flag, desktop- tag prefix, push-race fix #84 argues auto-update is unaffected because the updater endpoint is a fixed URL. That is plausible and probably right, but it is exactly the kind of thing that would silently break every existing install if it were wrong

Renaming the release namespace immediately before the first release in three months — with four issue reporters waiting to confirm fixes — is avoidable risk. Better as its own change, after the beta ships.

#84 can stay open for that piece, or be closed and redone.


Written by Claude, Bryan's AI coding assistant, and posted on his behalf.

Two of the three changes from #84, rebased onto current main. That PR is 89
commits behind and its third change — renaming the tag prefix from `v2-` to
`desktop-` — is deliberately left out; see the PR description.

**Push race.** `merge-updater` and `refresh-screenshots` both commit to the
default branch and can finish at the same time, and neither rebased before
pushing, so whichever lost got a non-fast-forward rejection. That is what
failed the v2-2.1.0 gallery job. Both now rebase and retry, up to five times,
then fail loudly. Verified the loop under `set -euo pipefail`: it succeeds on
recovery, gives up after five, and the `[[ ]] && { exit 1; }` guard does not
trip `set -e` on the non-final attempts.

**`--yes` / `-y`.** Auto-confirms the three gates for non-interactive use.
Piping `yes` into the script stays blocked, which is correct — this is the
sanctioned way to skip the gates on purpose. The prompts collapse into one
`confirm` helper; verified it proceeds under `--yes` and on a typed `y`, and
aborts on `n` and on empty stdin, so it still fails closed.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-17T02:57:20.150337Z f37a02e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f37a02eb7b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +394 to +396
if git push origin "HEAD:$branch"; then break; fi
echo " push attempt $attempt rejected; rebasing on origin/$branch…"
git pull --rebase origin "$branch"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Prevent older release runs from overwriting the updater manifest

When two v2 tag workflows overlap and both merge-updater jobs check out before either pushes, the newer release can publish first, after which the older run's rejected push is rebased and retried successfully. That places the older latest.json on top of the newer one, so the fixed updater endpoint stops advertising the newest release indefinitely. The workflow has no cross-run concurrency or version check, so retry only after confirming the rebased manifest is not older, or serialize release publication by version.

Useful? React with 👍 / 👎.

@bryanroscoe
bryanroscoe merged commit 3642f0b into main Sep 17, 2026
5 checks passed
@bryanroscoe
bryanroscoe deleted the chore/release-push-race branch September 17, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant