Skip to content

fix(release): a newer beta no longer blocks promoting a tested beta - #1897

Merged
frahlg merged 2 commits into
masterfrom
g2-fix-stable-after-newer-beta
Oct 27, 2026
Merged

frahlg merged 2 commits into
masterfrom
g2-fix-stable-after-newer-beta

Conversation

@frahlg

@frahlg frahlg commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Item G2-fix of the stable plan.

Problem

scripts/check-native-release-order.py refuses any tag that ranks below a published release, betas included. native-release.yml runs it before the stable branch.

Concrete case: sites test v0.158.0-beta.3 for a week. Meanwhile master ships v0.159.0-beta.1. Dispatching stable v0.158.0 with source_beta=v0.158.0-beta.3 then fails with v0.158.0 is older than published v0.159.0-beta.1. Between 13 and 27 October about 30 betas shipped, so every stable attempt would hit this.

Fredrik decided on 27 October that betas keep shipping while a stable candidate is tested (no beta freeze). The plan's decision 1 recommended a freeze; this PR follows the owner's choice. The plan's gate G6 ("No newer beta is published") and its G2-fix line ("Write the beta freeze into AGENTS.md") are now stale and need the same change.

The old order check also kept a rule the updater relied on: the first release GitHub lists is the newest. resolveChannel took the first match. Once a stable can be promoted after newer betas, GitHub lists it above them, and every beta box would take the stable and skip the newest beta until the next beta shipped.

Master's AGENTS.md also gave no hotfix path for the native line.

Change

  • The check ignores betas when the target is a stable. It still refuses a stable older than a published stable, and still refuses a beta older than any published release. The workflow already checks that source_beta is a published v0.X.Y-beta.N of the same version.
  • resolveChannel on beta keeps the higher of the first stable and the first beta listed, and stops at the first beta. Since no beta may rank below a published release, nothing listed after it can rank higher, so the walk stays as short as before. Stable boxes still stop at the first stable.
  • AGENTS.md, Releases: newer betas may ship while sites test the candidate, and beta boxes still take the highest release. A hotfix lands on master, ships as the next beta and promotes the same way. The workflow runs only from master, and a beta tag must match package.json there, so no patch branch exists.
  • Changeset (patch) for the updater change.

Tests

  • go test -race ./internal/selfupdate/ ./cmd/ftw/, go vet, go build ./...: pass.
  • New TestCheck_BetaPrefersNewerBetaListedBelowPromotedStable serves [v0.158.0, v0.159.0-beta.1, v0.158.0-beta.3]. On the old updater, boxes on v0.157.2-beta.1 and v0.158.0-beta.3 were offered v0.158.0, and a box on v0.159.0-beta.1 saw v0.158.0 as latest. Now all three see v0.159.0-beta.1, and a stable box still gets v0.158.0.
  • New TestCheck_BetaWalksPastStableToTheFirstBetaAndStops: a stable on page 1 and a beta on page 2 give the beta, and page 3 is never fetched. It fails on the old updater.
  • python3 -m unittest discover -s scripts -p 'test_*.py': 59 tests pass. On master, test_newer_beta_does_not_block_tested_stable errors (the audit repro, caa-67). New Python tests pin the rules the updater relies on: after a late stable, the next beta passes and a beta on the promoted line is refused; a newer stable on a later page blocks; a draft stable does not.

Risk

Low. Promoting an older line after a newer beta exists is now possible. Nothing ties a stable to a recent line beyond the workflow's source_beta checks. Beta boxes never downgrade (the updater's isNewer guard). Stable boxes get the stable as before. The schema check still compares the stable with the release below it.

The updater fix helps only boxes that run it. It must be in the candidate beta. A beta box still on an older beta when the stable ships will take the stable, then the next beta.

🤖 Generated with Claude Code

The native release-order check refused a stable whenever any newer
beta was published. Betas ship several times a day, so a candidate
that ran on sites for a week could never be promoted. A stable is now
refused only when a newer stable exists; betas keep the old rule.

AGENTS.md says so and describes the real hotfix path: the workflow
runs only from master, so a fix ships as the next beta and promotes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@frahlg frahlg added the no-changeset PR intentionally exempt from the changeset requirement (dev tooling / non-shipping) label Oct 27, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 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-10-27T13:34:58.829258Z 026be85 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.

A stable may now be promoted after newer betas ship, so GitHub lists it
above a higher beta. resolveChannel took the first match, so every beta box
got the stable and skipped the newest beta until the next beta shipped.

The walk now keeps the higher of the first stable and the first beta, and
stops at the first beta. The release-order check refuses any beta below a
published release, so nothing listed after it can rank higher. Stable
boxes still stop at the first stable.

Tests: the reviewer's ordering fails on the old code and passes now, a
paged list stops at the first beta, and the Python checker pins the rules
the walk relies on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@frahlg frahlg removed the no-changeset PR intentionally exempt from the changeset requirement (dev tooling / non-shipping) label Oct 27, 2026
@frahlg frahlg changed the title ci(release): a newer beta no longer blocks promoting a tested beta fix(release): a newer beta no longer blocks promoting a tested beta Oct 27, 2026
@frahlg
frahlg merged commit 676085a into master Oct 27, 2026
23 checks passed
@frahlg
frahlg deleted the g2-fix-stable-after-newer-beta branch November 11, 2026 09:22
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