Skip to content

fix(ci): accept a next-minor release line in the nightly release check - #6945

Merged
kovtcharov-amd merged 2 commits into
mainfrom
fix/release-check-next-minor
Nov 7, 2026
Merged

kovtcharov-amd merged 2 commits into
mainfrom
fix/release-check-next-minor

Conversation

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

The nightly release check filed #6915 because main reads 0.26.0 while the last final release is v0.25.4. It treated only two versions on main as valid: the last release, or the next patch (0.25.5). A minor cut from main, with v0.26.0-rc1 through rc7 tagged, is a normal state. The check now accepts it, closes the issue, and drafts no patch, since main is no longer patch-shaped. A next minor or major with no RC tag, a skipped minor, or a non-final version still files the issue. version.py is unchanged.

Closes #6915

Test plan

  • pytest tests/unit/test_release_version_state.py: covers 0.26.0 after v0.25.4 with RCs, the unchanged steady and staged states, and the mismatch cases. The CLI is run against a real git repo with tags.
  • pytest tests/unit/test_auto_issue.py: each guard still records its condition before marking itself passed.
  • actionlint and shellcheck on the scope step; util/check_workflow_triggers.py and util/check_ci_path_coverage.py pass.
  • python util/release_version_state.py v0.25.4 0.26.0 in a checkout of current main prints next-line.
  • After merge, dispatch Nightly Patch Release. It should report "main is on the v0.26.0 release line" and close Release check: version.py on main doesn't match any expected version #6915.

After v0.25.4 shipped and main moved to 0.26.0 with v0.26.0 RCs tagged,
the nightly patch-release check filed "version.py on main doesn't match
any expected version" (#6915). It only knew two valid states: main reads
the last release, or the next patch.

A next minor or major whose RC is tagged is now a third valid state. The
check clears the issue and drafts nothing, because main is no longer
patch-shaped. A bump with no RC tag, a skipped minor, or a non-final
version still files the issue.
@kovtcharov-amd kovtcharov-amd self-assigned this Nov 7, 2026
@github-actions github-actions Bot added devops DevOps/infrastructure changes tests Test changes labels Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Verdict: Approve

The nightly release check opened a false-alarm issue (#6915) whenever main had moved on to the next minor (0.26.0, with RCs tagged) after the last final release (v0.25.4). This PR treats that as a valid state: the false alarm closes, no patch release gets drafted, and every case that really is wrong still opens the issue. The classification logic is correct, it fails loudly on a tag it can't parse, and it is tested against a real git repo with tags.

There are no blocking issues. One point is worth knowing: while main sits on a next-minor line, the job stays quiet and drafts no patches. That's intended, but it means no automated patch will ship for the old line until the minor's final is tagged.

Real-world evidence

N/A: this changes CI and a repo script only, with no user-facing surface. I ran the classifier locally: 0.25.4 → steady, 0.25.5 → staged-not-tagged, 0.26.0 (with v0.26.0-rc1) → next-line, and 0.27.0, 1.0.0 without an RC, and 0.26.0rc1 all → mismatch. That matches the PR's claims. pytest isn't installed on this runner, so I didn't run the new test file here. The workflow change itself rests on static review until the post-merge dispatch in the test plan.

🔍 Technical details

Issues found

🟢 The quiet next-line exit could stall without anyone noticing (.github/workflows/nightly-patch-release.yml, the new next-line branch). The job records no condition, so a minor line that is abandoned after its RCs (RCs tagged, final never shipped) leaves the nightly job silently skipping forever. That's fine for now. If it ever matters, record a low-priority condition once the newest RC is older than N days.

Checked

  • fetch-depth: 0 on the scope job's checkout brings tags, so git tag --list v* in the script sees the RCs.
  • PREV is already validated as vX.Y.Z by Guard 1b before the script runs, so the script's ValueError can't fire in the workflow. It is still a loud failure if it ever does (set -e).
  • guard_passed runs for both version guards before the next-line exit. That closes Release check: version.py on main doesn't match any expected version #6915 without wrongly closing later guards (CI-green, scope), which never ran. This matches the "only a guard that actually ran" rule.
  • The RC regex escapes main_version and anchors -rc\d+$, so v0.26.0-rc1-hotfix and v0.26.1-rc1 correctly don't vouch for 0.26.0. Both cases are covered by tests.
  • The new test sits in tests/unit/, which test_unit.yml collects.
  • Docs: no doc states the old two-state guard. docs/plans/release-train.mdx only says Guard 4 "assumes a steady-state main", which is a plan note and still broadly true.

Strengths

  • The decision moved out of inline bash into a small Python function you can test. The workflow now only switches on the printed state.
  • The tests cover each mismatch case that could hide a real problem: a skipped minor, landing past .0, a non-final version, and an RC of a different version.

A hung git would otherwise stall the nightly check until the job times
out. It now fails after 60 seconds and says to run from a checkout with
its tags fetched.
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit 2fb039f Nov 7, 2026
33 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the fix/release-check-next-minor branch November 7, 2026 17:50
kovtcharov-amd added a commit that referenced this pull request Nov 12, 2026
Main moved 865 commits: v0.26.0 RCs, the chat agent folded into the
flagship (#6139, #7035), #5197 fixed on main, and the nightly patch check
taught the next-minor line (#6945).

- Flagship version files follow core (0.26.0); the chat targets, held
  lines and chat floors go, since that package no longer exists.
- The flagship's SPEC.md version header is now a stamped target, so it
  stops drifting from the package version.
- The eval-baseline workflow keeps main's version; #5197 already landed.
- v0.26.0 keeps main's curated notes, not the stub.
- nightly-patch-release.yml stays retired, with release_version_state.py
  and the tests that read the workflow: once the bot moves main to the
  next minor before its rc1, the nightly would file a mismatch issue
  every night.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops DevOps/infrastructure changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release check: version.py on main doesn't match any expected version

1 participant