Skip to content

fix(release): stamp C++ verifier version - #4347

Merged
codeshaunted merged 1 commit into
canaryfrom
codex/fix-cpp-release-version-stamp
Aug 7, 2026
Merged

fix(release): stamp C++ verifier version#4347
codeshaunted merged 1 commit into
canaryfrom
codex/fix-cpp-release-version-stamp

Conversation

@codeshaunted

@codeshaunted codeshaunted commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Issue Reference

Failed release job: https://github.com/BoundaryML/baml/actions/runs/31158395652/job/92807446666

Changes

  • Stamp the frozen release plan before compiling the C++ consumer verifier.
  • Add a workflow contract test that preserves the ordering between plan materialization, stamping, and CMake compilation.

The native runtime was stamped as 0.15.1-nightly.20260806.a, but the checked-out C++ headers still identified the bridge and required toolchain as 0.15.0.

Testing

  • Unit tests added/updated
  • python3 -m unittest scripts.tests.test_release_pipeline_contract
  • mise exec -- ruff check scripts/tests/test_release_pipeline_contract.py
  • mise exec -- actionlint .github/workflows/verify-cpp-sdk.reusable.yaml

Screenshots

Not applicable.

PR Checklist

  • I have read and followed the contributing guidelines
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings

Additional Notes

No data structures or runtime behavior changed.

Summary by CodeRabbit

  • Bug Fixes

    • Improved C++ release verification by stamping the release plan before version checks and test builds.
    • Helps ensure C++ validation uses the correct frozen release information.
  • Tests

    • Added coverage to verify the release workflow stamps the plan at the correct stage.

@vercel

vercel Bot commented Aug 7, 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 Aug 7, 2026 7:34pm
promptfiddle2 Ready Ready Preview Aug 7, 2026 7:34pm

Request Review

@github-actions

github-actions Bot commented Aug 7, 2026

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.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The C++ verification workflow now stamps release-plan.json before extracting the expected BAML version and configuring C++ tests. A contract test verifies the command sequence and workflow path.

Changes

C++ release-plan verification

Layer / File(s) Summary
Stamp release plan before C++ configuration
.github/workflows/verify-cpp-sdk.reusable.yaml, scripts/tests/test_release_pipeline_contract.py
The workflow stamps the written release plan with scripts/baml-language-version stamp --plan. The contract test verifies the workflow path, command, and ordering before CMake configuration.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: rossirpaulo

Poem

A rabbit stamps the plan with care,
Then checks the C++ path is clear.
Before CMake starts its run,
The frozen version has been spun.
Workflow steps now hop in line.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: stamping the C++ verifier version in the release workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-cpp-release-version-stamp

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.

@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 (1)
scripts/tests/test_release_pipeline_contract.py (1)

663-680: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Cover the complete C++ verification order.

The test does not verify that stamping occurs before the jq version extraction at Line 96 of .github/workflows/verify-cpp-sdk.reusable.yaml. It also checks only the forward-slash CMake command, so it does not cover the Windows command at Line 157. Use the verify job block and assert the order for every CMake path.

Proposed assertion update
-        self.assertLess(
-            workflow.index("scripts/baml-language-version stamp"),
-            workflow.index("cmake -S baml_language/sdks/cpp/bridge_cpp/tests"),
-        )
+        stamp_index = verify.index(
+            "scripts/baml-language-version stamp --plan release-plan.json"
+        )
+        self.assertLess(
+            stamp_index,
+            verify.index(
+                'expected="$(jq -r .canonical_version release-plan.json)"'
+            ),
+        )
+        configure_positions = [
+            match.start()
+            for match in re.finditer(
+                r"cmake -S baml_language[/\\]sdks[/\\]cpp[/\\]bridge_cpp[/\\]tests",
+                verify,
+            )
+        ]
+        self.assertTrue(configure_positions)
+        self.assertTrue(
+            all(stamp_index < position for position in configure_positions)
+        )
🤖 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 663 - 680,
Extend test_cpp_verifier_stamps_the_frozen_release_plan to assert that the
release-plan JSON printf and scripts/baml-language-version stamp occur before
the jq version extraction within the verify job block. Also assert the stamp
precedes both the forward-slash and Windows CMake test commands, using verify
rather than the full workflow for all ordering checks.
🤖 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 `@scripts/tests/test_release_pipeline_contract.py`:
- Around line 663-680: Extend test_cpp_verifier_stamps_the_frozen_release_plan
to assert that the release-plan JSON printf and scripts/baml-language-version
stamp occur before the jq version extraction within the verify job block. Also
assert the stamp precedes both the forward-slash and Windows CMake test
commands, using verify rather than the full workflow for all ordering checks.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d52c8949-e63d-4a93-bca6-0f122f375bb9

📥 Commits

Reviewing files that changed from the base of the PR and between 45ae165 and efe558f.

📒 Files selected for processing (2)
  • .github/workflows/verify-cpp-sdk.reusable.yaml
  • scripts/tests/test_release_pipeline_contract.py

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Binary size checks passed

7 passed

Artifact Platform File Gzip Gated on Baseline Delta Status
baml-cli Linux 🔒 27.8 MB 11.8 MB file 27.4 MB +389.4 KB (+1.4%) OK
packed-program Linux 🔒 18.0 MB 7.4 MB file 17.7 MB +289.8 KB (+1.6%) OK
baml-cli macOS 🔒 21.6 MB 10.3 MB file 21.3 MB +296.4 KB (+1.4%) OK
packed-program macOS 🔒 14.1 MB 6.5 MB file 13.8 MB +227.5 KB (+1.6%) OK
baml-cli Windows 🔒 23.2 MB 10.5 MB file 23.0 MB +271.8 KB (+1.2%) OK
packed-program Windows 🔒 15.0 MB 6.6 MB file 14.8 MB +212.5 KB (+1.4%) OK
bridge_wasm WASM 17.1 MB 🔒 4.7 MB gzip 4.6 MB +44.3 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

@codeshaunted
codeshaunted added this pull request to the merge queue Aug 7, 2026
Merged via the queue into canary with commit a071bd8 Aug 7, 2026
83 checks passed
@codeshaunted
codeshaunted deleted the codex/fix-cpp-release-version-stamp branch August 7, 2026 20:52
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