chore: refresh size-gate baselines#4057
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
⏭️ Performance benchmarks were skippedPerf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to To run them on this PR, do any of the following, then push a commit (or re-run CI):
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe size-gate ceilings and recorded artifact measurements are refreshed for native targets and WASM, including updated timestamps and source revisions. ChangesSize-gate baseline refresh
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Binary size checks passed✅ 7 passed
Generated by |
…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 -->
Adopted from CI run
79aa0f44e323e356a172e16e6b0f4a42e569959d.Binary size checks passed
✅ 7 passed
baml-clipacked-programbaml-clipacked-programbridge_wasmbaml-clipacked-programGenerated by
cargo size-gateSummary by CodeRabbit