Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe emitter now returns an internal error for out-of-range object operands instead of panicking. A cache regression test checks that a poisoned reused unit falls back to fresh compilation and produces byte-identical output. ChangesCache safety
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The stale-cache path now returns a recoverable error and is covered by a fallback-to-fresh-compilation regression test. No remaining merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit checks the bounds with care Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
⏭️ 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):
|
Binary size checks passed✅ 3 passed
Generated by |
c1d43de to
a371be0
Compare
Summary
LoweringError::InternalfailuresContext
Fixes B-1643.
The reported reproduction used a cache created by an earlier local compiler build, made a length-changing BAML edit, then observed
baml testpanic in compilation-unit decomposition whilebaml checkstayed green. Clearing.bamlcaches made the test pass.PR #4801 already made compiler identity content-addressed and added the general reuse-to-fresh fallback, and PR #4804 moved this path into the current multi-root compiler structure. One unchecked object operand lookup remained in that path, so malformed or incompatible cached units could panic before the fallback received an error.
Reproduction and verification
The new CLI regression test compiles and stores a multi-file project, makes a length-changing source edit, poisons a reused unit with an out-of-range object operand to model an incompatible same-version artifact, verifies diagnostics stay clean, and asserts cache reuse falls back to byte-identical fresh output without panicking. The focused compiler regression first reproduced the raw out-of-bounds panic at the historical lookup and now verifies it returns a typed internal error.
cargo test -p baml_compiler2_emitcargo test -p bex_cachecargo test -p baml_cli bytecode_cache::testscargo clippy -p baml_compiler2_emit -p baml_cli --all-targets -- -D warningscargo fmt --package baml_compiler2_emit --package baml_cli --checkSummary by CodeRabbit