Skip to content

chore: refresh size-gate baselines#4057

Merged
sxlijin merged 1 commit into
canaryfrom
chore/size-gate-baseline-refresh
Jul 16, 2026
Merged

chore: refresh size-gate baselines#4057
sxlijin merged 1 commit into
canaryfrom
chore/size-gate-baseline-refresh

Conversation

@sxlijin

@sxlijin sxlijin commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Adopted from CI run 79aa0f44e323e356a172e16e6b0f4a42e569959d.

Binary size checks passed

7 passed

Artifact Platform File Gzip Gated on Baseline Delta Status
baml-cli Linux 🔒 22.8 MB 9.7 MB file 22.8 MB +66.0 KB (+0.3%) OK
packed-program Linux 🔒 16.3 MB 6.8 MB file 16.3 MB +24.6 KB (+0.2%) OK
baml-cli macOS 🔒 17.6 MB 8.5 MB file 17.5 MB +49.7 KB (+0.3%) OK
packed-program macOS 🔒 12.6 MB 6.0 MB file 12.6 MB +32 B (+0.0%) OK
bridge_wasm WASM 15.2 MB 🔒 4.3 MB gzip 4.3 MB +4.6 KB (+0.1%) OK
baml-cli Windows 🔒 19.2 MB 8.7 MB file 18.7 MB +425.5 KB (+2.3%) OK
packed-program Windows 🔒 13.5 MB 6.1 MB file 13.5 MB +5.6 KB (+0.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

Summary by CodeRabbit

  • Chores
    • Updated build artifact size baselines across supported platforms.
    • Adjusted size limits for command-line, packaged program, and WebAssembly artifacts.
    • Refreshed recorded build metadata and artifact measurements for size validation.

@vercel

vercel Bot commented Jul 16, 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, Comment Jul 16, 2026 10:21am
promptfiddle Ready Ready Preview, Comment Jul 16, 2026 10:21am
promptfiddle2 Ready Ready Preview, Comment Jul 16, 2026 10:21am

Request Review

@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.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d40a4118-97f7-403c-b532-32e0a7c6c9f5

📥 Commits

Reviewing files that changed from the base of the PR and between 8c29c82 and ebc8b07.

📒 Files selected for processing (5)
  • baml_language/.cargo/size-gate.toml
  • baml_language/.ci/size-gate/aarch64-apple-darwin.toml
  • baml_language/.ci/size-gate/wasm32-unknown-unknown.toml
  • baml_language/.ci/size-gate/x86_64-pc-windows-msvc.toml
  • baml_language/.ci/size-gate/x86_64-unknown-linux-gnu.toml

📝 Walkthrough

Walkthrough

The size-gate ceilings and recorded artifact measurements are refreshed for native targets and WASM, including updated timestamps and source revisions.

Changes

Size-gate baseline refresh

Layer / File(s) Summary
Artifact ceilings and recorded baselines
baml_language/.cargo/size-gate.toml, baml_language/.ci/size-gate/*.toml
Updates hard byte ceilings and recorded file_bytes, stripped_bytes, and gzip_bytes values for native artifacts and bridge_wasm, along with snapshot metadata.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: antoniosarosi, codeshaunted, aaronvg

Poem

I nudge the byte bounds beneath the moon,
Refresh each baseline, humming a tune.
Linux and Windows, Mac stars shine bright,
WASM gets room for its gzip flight.
— A rabbit with a TOML plume 🐇

🚥 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 accurately summarizes the main change: refreshing size-gate baselines.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/size-gate-baseline-refresh

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

Binary size checks passed

7 passed

Artifact Platform File Gzip Gated on Baseline Delta Status
baml-cli Linux 🔒 22.8 MB 9.7 MB file 22.8 MB +0 B (+0.0%) OK
packed-program Linux 🔒 16.3 MB 6.8 MB file 16.3 MB +0 B (+0.0%) OK
baml-cli macOS 🔒 17.6 MB 8.5 MB file 17.6 MB +0 B (+0.0%) OK
packed-program macOS 🔒 12.6 MB 6.0 MB file 12.6 MB +0 B (+0.0%) OK
baml-cli Windows 🔒 19.2 MB 8.7 MB file 19.2 MB +0 B (+0.0%) OK
packed-program Windows 🔒 13.5 MB 6.1 MB file 13.5 MB +0 B (+0.0%) OK
bridge_wasm WASM 15.2 MB 🔒 4.3 MB gzip 4.3 MB -1 B (-0.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

@sxlijin
sxlijin added this pull request to the merge queue Jul 16, 2026
Merged via the queue into canary with commit 89ed703 Jul 16, 2026
52 checks passed
@sxlijin
sxlijin deleted the chore/size-gate-baseline-refresh branch July 16, 2026 19:25
pull Bot pushed a commit to justinlietz93/baml that referenced this pull request Jul 18, 2026
…cellation, co_await (BoundaryML#4078)

Bridge-week step 10 for C++ (async half; error/panic behavior landed in
BoundaryML#4071).

## What

Every generated function gains an **Async sibling** returning
`baml::Future<T, ThrownU>`:

```cpp
auto fut = b::ExtractResumeAsync(text);   // returns immediately
fut.Cancel();                             // optional engine-side cancellation
Resume r = fut.get();                     // blocks + decodes; typed throws as BamlThrown<Union<...>>
```

- `get()`/`wait()`/`wait_for()`/`wait_until()`/`valid()` mirror
`std::future` (STYLE.md carve-out 2); `Cancel()` and the sibling's
`Async` suffix are our vocabulary (Pascal). The suffix follows the
opts-struct convention: verbatim BAML spelling + suffix (`probe` ->
`probeAsync`), allocated through the naming pool.
- **Cancellation**: `Cancel()` calls the v1 ABI's
`cancel_function_call`; the envelope still arrives as a
`baml.panics.Cancelled` panic and `get()` throws `BamlCancelled`.
Destruction detaches (never blocks, never cancels) - Python task-model
parity. No Rust changes.
- **co_await (C++20 only)**: the registry's per-call cell is now a
custom `CallState` (mutex + condvar + continuation slot) instead of
`std::promise`, so the dispatcher thread can resume a suspended
coroutine when the envelope lands. The awaiter is feature-gated
(`__cpp_impl_coroutine` + `__cpp_lib_coroutine`); the header stays
C++17-clean.
- **One call path**: `CallSync` is now literally `StartCall().get()`.

## Tests

- `test_cancellation.cc`: port of python's `test_cancellation.py`
(portable core: null-return baseline + engine-side cancel;
asyncio/BamlCallContext idioms documented as deviations) + C++-specific
future semantics (consume-once, `wait_for` timeout, detach-on-destroy).
- Async cases added to `test_optional_args.cc` (python parity),
`test_raises.cc` (async sibling repeats the doc block), `test_errors.cc`
(typed throw through `get()`).
- `futures_static.cc`: move-only + ThrownU order-canonicality static
asserts.
- `tests/cxx20/test_coawait.cc`: 6 live co_await cases (pending resume,
value, fast path, typed throw into the coroutine, cancellation,
escape-to-join) driven by a minimal completion-latch Task. The harness
builds `tests/cxx20/*.cc` as a second executable only when the toolchain
has C++20, so the main binary keeps proving the SDK compiles as plain
C++17.

All 12 `sdk_test_cpp` fixture tests pass locally (26 C++17 + 6 C++20
cases in function_calls).

Note: the size gate is expected to fail until the stale baselines are
refreshed - canary has drifted ~600 KB since BoundaryML#4057 and every open PR is
at the 3% ceiling (see BoundaryML#4071's report).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
  * Added dual async C++ SDK bindings (`*Async`) alongside sync calls.
* Introduced `baml::Future` for in-flight calls, including cancellation
and optional C++20 `co_await` support.
* Added typed singleton literal support via `BAML_LIT(...)` for more
precise literal and union typing.
* **Bug Fixes**
* Improved literal encoding/decoding and union arm selection to preserve
exact typed literal values.
  * Enhanced async sibling error propagation and cancellation behavior.
* **Tests**
* Expanded C++ coverage for futures (including C++20), cancellation,
typed throws, optional args, and literal/type-shape checks.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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