Skip to content

Nightly channel should release nightly - #4296

Merged
2kai2kai2 merged 1 commit into
canaryfrom
kai/nightly-release-nightly
Jul 31, 2026
Merged

2kai2kai2 merged 1 commit into
canaryfrom
kai/nightly-release-nightly

Conversation

@2kai2kai2

@2kai2kai2 2kai2kai2 commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added automated nightly releases based on the newest validated canary build.
    • Added support for manual nightly release runs.
    • Added immutable source tags and explicit canary/nightly release channels.
    • Added safeguards against duplicate, rolled-back, or invalid releases.
  • Bug Fixes

    • Improved nightly versioning across local time boundaries and repeated nightly cuts.
    • Ensured release artifacts reference the correct source commit.
    • Added failure notifications for nightly release issues.
  • Documentation

    • Updated Java Maven nightly versioning guidance to include letter suffixes.

@vercel

vercel Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
beps Ready Ready Preview Jul 30, 2026 11:07pm
promptfiddle2 Ready Ready Preview Jul 30, 2026 11:07pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The release pipeline now separates canary and nightly dispatches, creates source tags tied to exact commits, adds scheduled nightly orchestration, and computes Seattle-local nightly versions with strict tag and ordering validation.

Changes

Release pipeline

Layer / File(s) Summary
Source tagging and canary dispatch
.github/workflows/ci.yaml
CI creates immutable source tags and dispatches canary releases only when an unreleased canary version is detected.
Explicit channel release workflow
.github/workflows/release-baml-language.yml
Release dispatch requires nightly or canary, and newly created release tags target the planned source SHA.
Attested nightly scheduler
.github/workflows/nightly-release.yml, scripts/tests/test_release_pipeline_contract.py
Scheduled and manual nightly runs select CI-green canary commits, enforce ancestry and duplicate-release checks, verify source tags, dispatch nightly releases, and notify Slack on failure.
Timezone-aware nightly versioning
scripts/baml-language-version, scripts/tests/test_baml_language_version.py, baml_language/sdks/...
Nightly naming uses Seattle-local dates, strict date and tag validation, published-version ordering, letter suffixes, and updated Maven documentation.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested reviewers: rossirpaulo, codeshaunted

Poem

A rabbit tags the source just right,
Then hops through canary into night.
Seattle clocks the letters bright,
Green commits guide the moonlit flight.
No duplicate release in sight!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the primary change: enabling the nightly channel to produce nightly releases.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kai/nightly-release-nightly

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

⏭️ Performance benchmarks were skipped

Perf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to canary/main.

To run them on this PR, do any of the following, then push a commit (or re-run CI):

  • Add RUN_CODSPEED=1 to the PR description, or
  • Include run-perf or /perf in the PR title or any commit message.

@vercel
vercel Bot temporarily deployed to Preview – beps July 30, 2026 22:26 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 30, 2026 22:33 Inactive

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/nightly-release.yml (1)

41-45: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Scope actions: write to the job that dispatches.

Only dispatch-nightly needs it; notify-slack already narrows to reads. Moving it to the job level clears the zizmor finding and keeps the schedule-triggered token minimal.

♻️ Proposed permission scoping
 permissions:
-  # `actions: write` dispatches the release; the reads below (CI runs, release
-  # runs, commits, tags) need nothing beyond the default scopes.
-  actions: write
   contents: read

Then in the dispatch-nightly job:

  dispatch-nightly:
    name: Dispatch nightly release
    permissions:
      # `actions: write` dispatches the release; the reads (CI runs, release
      # runs, commits, tags) need nothing beyond the default scopes.
      actions: write
      contents: read
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/nightly-release.yml around lines 41 - 45, Move the
actions: write and contents: read permissions from the workflow-level
permissions block to the dispatch-nightly job. Keep both permissions on
dispatch-nightly, while preserving notify-slack’s read-only permission scope and
minimizing the schedule-triggered token.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yaml:
- Around line 1378-1383: Update the canary-release gating logic around the
release.toml diff check to parse [release].canary_version from HEAD^ and HEAD,
and set cut=true only when those values differ. Keep the existing unchanged-path
output and canary version computation, while ignoring changes to other
release.toml fields such as nightly-version.

In `@scripts/baml-language-version`:
- Around line 358-374: Update the fallback handling in the version lookup flow
around command_output so an empty or tagless git ls-remote result is treated as
a failure, not returned as an empty tag list. Validate the parsed fallback tags
before returning and call fail with the existing collision-prevention message
when none are found; preserve normal filtering and successful non-empty results.

---

Nitpick comments:
In @.github/workflows/nightly-release.yml:
- Around line 41-45: Move the actions: write and contents: read permissions from
the workflow-level permissions block to the dispatch-nightly job. Keep both
permissions on dispatch-nightly, while preserving notify-slack’s read-only
permission scope and minimizing the schedule-triggered token.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 43a5c63b-53d0-4103-9e79-ce86ffd06e0e

📥 Commits

Reviewing files that changed from the base of the PR and between b98f9b1 and 85bd569.

📒 Files selected for processing (9)
  • .github/workflows/ci.yaml
  • .github/workflows/nightly-release.yml
  • .github/workflows/release-baml-language.yml
  • baml_language/sdks/agent-docs/bridge-ref/ref-java-packaging.md
  • baml_language/sdks/java/baml_bridge/PUBLISHING.md
  • scripts/baml-language-version
  • scripts/tests/test_baml_language_version.py
  • scripts/tests/test_release_pipeline_contract.py
  • typescript2/app-website/app/changelog/changelog-list.tsx

Comment thread .github/workflows/ci.yaml Resolved
Comment thread scripts/baml-language-version Resolved
@github-actions

github-actions Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

Binary size checks passed

✅ 7 passed

Artifact Platform File Gzip Gated on Baseline Delta Status
✅ baml-cli Linux 🔒 27.4 MB 11.6 MB file 27.4 MB -8.8 KB (-0.0%) OK
✅ packed-program Linux 🔒 17.7 MB 7.3 MB file 17.7 MB +26.1 KB (+0.1%) OK
✅ baml-cli macOS 🔒 21.3 MB 10.2 MB file 21.3 MB -35.0 KB (-0.2%) OK
✅ packed-program macOS 🔒 13.8 MB 6.4 MB file 13.8 MB -4.6 KB (-0.0%) OK
✅ baml-cli Windows 🔒 22.9 MB 10.4 MB file 23.0 MB -51.3 KB (-0.2%) OK
✅ packed-program Windows 🔒 14.8 MB 6.5 MB file 14.8 MB -7.7 KB (-0.1%) OK
✅ bridge_wasm WASM 16.8 MB 🔒 4.6 MB gzip 4.6 MB -44.1 KB (-1.0%) OK

🔒 = the size this artifact is GATED on (ceiling + delta). Binaries gate on file size (installed binary); WASM gates on gzip (download size). The other size is shown for information only.


Generated by cargo size-gate · workflow run

@2kai2kai2
2kai2kai2 force-pushed the kai/nightly-release-nightly branch from 85bd569 to 67bdb5d Compare July 30, 2026 22:51
@vercel
vercel Bot temporarily deployed to Preview – beps July 30, 2026 22:53 Inactive
@2kai2kai2
2kai2kai2 force-pushed the kai/nightly-release-nightly branch from 67bdb5d to bdb1958 Compare July 30, 2026 22:58
@vercel
vercel Bot temporarily deployed to Preview – beps July 30, 2026 23:00 Inactive
@2kai2kai2
2kai2kai2 enabled auto-merge July 30, 2026 23:02
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 30, 2026 23:07 Inactive
@2kai2kai2
2kai2kai2 added this pull request to the merge queue Jul 30, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (4)
scripts/baml-language-version (1)

284-317: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

Wrap the ZoneInfo lookup so a missing tz database fails legibly.

The comment notes that only version computation needs the tz database, but if it is absent (bare Windows/Alpine Python without tzdata), ZoneInfo(SEATTLE) raises ZoneInfoNotFoundError and the tool exits with a traceback instead of the fail() diagnostics every other error path in this script produces.

♻️ Proposed change
-    local_date = moment.astimezone(zoneinfo.ZoneInfo(SEATTLE)).date()
+    try:
+        seattle = zoneinfo.ZoneInfo(SEATTLE)
+    except zoneinfo.ZoneInfoNotFoundError:
+        fail(
+            f"the {SEATTLE} time zone is unavailable; install the `tzdata` "
+            "package so nightly versions can be named for the Seattle night"
+        )
+    local_date = moment.astimezone(seattle).date()
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/baml-language-version` around lines 284 - 317, Update night_for to
catch zoneinfo.ZoneInfoNotFoundError when resolving SEATTLE and route it through
fail() with a clear message explaining that the timezone database or tzdata
package is required. Preserve the existing timezone-aware validation and date
calculation behavior when the lookup succeeds.
.github/workflows/nightly-release.yml (1)

41-45: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low value

Scope actions: write to the job that dispatches.

notify-slack already declares its own narrower permissions, so the workflow-level grant only matters for dispatch-nightly. Moving it down satisfies least-privilege (and the zizmor excessive-permissions finding) without behavior change.

♻️ Proposed change
-permissions:
-  # `actions: write` dispatches the release; the reads below (CI runs, release
-  # runs, commits, tags) need nothing beyond the default scopes.
-  actions: write
-  contents: read
+permissions: {}

and on the job:

  dispatch-nightly:
    permissions:
      # `actions: write` dispatches the release; the reads (CI runs, release
      # runs, commits, tags) need nothing beyond the default scopes.
      actions: write
      contents: read
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/nightly-release.yml around lines 41 - 45, Move the
workflow-level permissions block from the root of the nightly release workflow
into the dispatch-nightly job, preserving actions: write and contents: read
there. Keep notify-slack’s existing narrower permissions unchanged and remove
the redundant global grant.

Source: Linters/SAST tools

scripts/tests/test_baml_language_version.py (1)

356-371: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Truncating PATH to /usr/bin:/bin can break the interpreter lookup.

The tool is invoked via its shebang, so python3 must be resolvable from this PATH. On runners where Python comes from mise/asdf/a venv rather than /usr/bin, this test fails for reasons unrelated to tag lookup. The bin/ stubs already shadow the real gh/git because self.bin is first, so the rest of PATH doesn't need dropping.

♻️ Proposed change
-        env["PATH"] = f"{self.bin}:/usr/bin:/bin"
+        # `self.bin` is first, so the stubs already shadow any real gh/git.
+        env["PATH"] = f"{self.bin}:{os.environ['PATH']}"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/tests/test_baml_language_version.py` around lines 356 - 371, Update
the environment setup in the test using VERSION_TOOL so PATH preserves the
existing interpreter-resolving entries while keeping self.bin first for the stub
executables. Remove the hardcoded “/usr/bin:/bin” truncation and construct PATH
by prepending self.bin to the existing PATH value.
scripts/tests/test_release_pipeline_contract.py (1)

968-974: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

assertNotIn("FORCE", ...) passes only because the arm's prose uses lowercase force.

The guard's intent is "force cannot reach the rollback arm", but the assertion is case-sensitive and the arm deliberately discusses force in comments. Stripping comments before asserting makes the check express the intent instead of depending on comment casing.

♻️ Proposed change
         self.assertIsNotNone(rollback_arm, nightly_workflow)
-        self.assertNotIn("FORCE", rollback_arm.group(1))
+        rollback_code = "\n".join(
+            line
+            for line in rollback_arm.group(1).splitlines()
+            if not line.lstrip().startswith("#")
+        )
+        self.assertNotIn("force", rollback_code.lower())
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/tests/test_release_pipeline_contract.py` around lines 968 - 974,
Update the rollback-arm assertion in the test around rollback_arm to remove
comments from the matched shell text before checking for FORCE, while preserving
the existing guard extraction and assertNotIn behavior. Ensure the check
validates executable content rather than passing because comments use lowercase
“force”.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/nightly-release.yml:
- Around line 41-45: Move the workflow-level permissions block from the root of
the nightly release workflow into the dispatch-nightly job, preserving actions:
write and contents: read there. Keep notify-slack’s existing narrower
permissions unchanged and remove the redundant global grant.

In `@scripts/baml-language-version`:
- Around line 284-317: Update night_for to catch zoneinfo.ZoneInfoNotFoundError
when resolving SEATTLE and route it through fail() with a clear message
explaining that the timezone database or tzdata package is required. Preserve
the existing timezone-aware validation and date calculation behavior when the
lookup succeeds.

In `@scripts/tests/test_baml_language_version.py`:
- Around line 356-371: Update the environment setup in the test using
VERSION_TOOL so PATH preserves the existing interpreter-resolving entries while
keeping self.bin first for the stub executables. Remove the hardcoded
“/usr/bin:/bin” truncation and construct PATH by prepending self.bin to the
existing PATH value.

In `@scripts/tests/test_release_pipeline_contract.py`:
- Around line 968-974: Update the rollback-arm assertion in the test around
rollback_arm to remove comments from the matched shell text before checking for
FORCE, while preserving the existing guard extraction and assertNotIn behavior.
Ensure the check validates executable content rather than passing because
comments use lowercase “force”.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ff3bd9ea-e2c9-4725-9c37-974af1d449f9

📥 Commits

Reviewing files that changed from the base of the PR and between 85bd569 and bdb1958.

📒 Files selected for processing (8)
  • .github/workflows/ci.yaml
  • .github/workflows/nightly-release.yml
  • .github/workflows/release-baml-language.yml
  • baml_language/sdks/agent-docs/bridge-ref/ref-java-packaging.md
  • baml_language/sdks/java/baml_bridge/PUBLISHING.md
  • scripts/baml-language-version
  • scripts/tests/test_baml_language_version.py
  • scripts/tests/test_release_pipeline_contract.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • baml_language/sdks/java/baml_bridge/PUBLISHING.md

Merged via the queue into canary with commit b0c4bab Jul 31, 2026
82 checks passed
@2kai2kai2
2kai2kai2 deleted the kai/nightly-release-nightly branch July 31, 2026 00:12

This branch was previously deployed

2 inactive deployments
Preview – promptfiddle2 — bdb19586 Deployed Jul 30, 2026 by vercel[bot]
Preview – beps — bdb19586 Deployed Jul 30, 2026 by vercel[bot]
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