Skip to content

feat: support revised nightly releases (nightly-YYYY-MM-DD-revK)#12461

Merged
kim-em merged 1 commit intomasterfrom
feat/nightly-revisions
Feb 13, 2026
Merged

feat: support revised nightly releases (nightly-YYYY-MM-DD-revK)#12461
kim-em merged 1 commit intomasterfrom
feat/nightly-revisions

Conversation

@kim-em
Copy link
Collaborator

@kim-em kim-em commented Feb 13, 2026

This PR adds support for manually re-releasing nightlies when a build issue or critical fix requires it. When a workflow_dispatch triggers the nightly release job and a nightly-YYYY-MM-DD tag already exists, the CI now creates nightly-YYYY-MM-DD-rev1 (then -rev2, etc.) instead of silently skipping.

Lake ToolchainVer

  • Extend ToolchainVer.nightly with an optional rev : Option Nat field
  • Parse -revK suffixes from nightly tags in ofString
  • Ordering: nightly-YYYY-MM-DD < nightly-YYYY-MM-DD-rev1 < -rev2 < nightly-YYYY-MM-DD+1
  • Round-trip: toString (ofString s) == s for both variants

CI workflow

  • "Set Nightly" step probes existing tags on workflow_dispatch to find next available -revK
  • Scheduled nightlies retain existing behavior (skip if commit already tagged)
  • Changelog grep updated from nightly-[-0-9]* to nightly-[^ ,)]* to match -revK suffixes

lean-bisect

  • Updated NIGHTLY_PATTERN regex, sort key, error messages, and help text

Companion PRs

🤖 Prepared with Claude Code

@kim-em kim-em requested a review from tydeu as a code owner February 13, 2026 00:02
@kim-em kim-em added the changelog-lake Lake label Feb 13, 2026
This PR adds support for manually re-releasing nightlies when a build issue or
critical fix requires it. When a `workflow_dispatch` triggers the nightly release
job and a `nightly-YYYY-MM-DD` tag already exists, the CI now creates
`nightly-YYYY-MM-DD-rev1` (then `-rev2`, etc.) instead of silently skipping.

Changes:
- Extend `ToolchainVer.nightly` with an optional `rev : Option Nat` field
- Update `ToolchainVer.ofString` to parse `-revK` suffixes from nightly tags
- Update `blt`/`ble` ordering: base < rev1 < rev2 < next day
- Update CI "Set Nightly" step to probe existing tags on `workflow_dispatch`
- Update changelog grep to match `-revK` suffixes
- Update `lean-bisect` regex, sort key, and help text

Companion PRs needed for mathlib4 workflows and documentation site.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mathlib-lean-pr-testing
Copy link

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 6cbaada1bffe010d584da42878ebee02b3aaa940 --onto 4cdc199f772977113bd6c1bf87a6c02b78d5c4d3. You can force Mathlib CI using the force-mathlib-ci label. (2026-02-13 01:04:19)

@leanprover-bot
Copy link
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase 6cbaada1bffe010d584da42878ebee02b3aaa940 --onto 03dc334f73259e1bae0b8f2b80a39a82e1de3df6. You can force reference manual CI using the force-manual-ci label. (2026-02-13 01:04:21)

Merged via the queue into master with commit d7e57b6 Feb 13, 2026
21 checks passed
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Feb 13, 2026
…35220)

This PR updates nightly workflow scripts to handle revised nightly toolchains (`nightly-YYYY-MM-DD-revK`). When multiple nightlies are released for the same date, the revision suffix ensures correct ordering and matching in tag grep patterns, version extraction regexes, and deduplication checks.

Changes:
- `nightly_bump_and_merge.yml`: update tag grep pattern and use `sort -rV` for correct version ordering
- `nightly_detect_failure.yml`: update JS/Python regexes and warning message to handle `-revK` suffix

Companion to leanprover/lean4#12461

🤖 Prepared with Claude Code
github-merge-queue bot pushed a commit that referenced this pull request Feb 13, 2026
This PR fixes two issues discovered during the first test of the revised
nightly release workflow
(#12461):

**1. Date logic:** The `workflow_dispatch` path used `date -u +%F`
(current UTC date) to find the base nightly to revise. If the most
recent nightly was from yesterday (e.g. `nightly-2026-02-12`) but UTC
has rolled over to Feb 13, the code would look for `nightly-2026-02-13`,
not find it, and create a fresh nightly instead of a revision. Now finds
the latest `nightly-*` tag via `sort -rV` and creates a revision of
that.

**2. Mathlib trigger:** The "Update toolchain on mathlib4's
nightly-testing branch" step was broken in two ways:
- Workflow renamed: `nightly_bump_toolchain.yml` →
`nightly_bump_and_merge.yml` (leanprover-community/mathlib4#34827)
- `MATHLIB4_BOT` PAT expired after mathlib migrated to GitHub Apps
(leanprover-community/mathlib4#34751)
- Replace with `actions/create-github-app-token` using the
`mathlib-nightly-testing` app, matching the pattern used in mathlib4's
own workflows.

🤖 Prepared with Claude Code

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
kim-em added a commit to kim-em/mathlib4 that referenced this pull request Feb 14, 2026
…eanprover-community#35220)

This PR updates nightly workflow scripts to handle revised nightly toolchains (`nightly-YYYY-MM-DD-revK`). When multiple nightlies are released for the same date, the revision suffix ensures correct ordering and matching in tag grep patterns, version extraction regexes, and deduplication checks.

Changes:
- `nightly_bump_and_merge.yml`: update tag grep pattern and use `sort -rV` for correct version ordering
- `nightly_detect_failure.yml`: update JS/Python regexes and warning message to handle `-revK` suffix

Companion to leanprover/lean4#12461

🤖 Prepared with Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-lake Lake toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants