test: cover uncaught JSON parse diagnostics - #4398
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe CLI end-to-end test now covers malformed numeric input passed to ChangesJSON parse exit-code regression
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to This change only updates CLI regression coverage for JSON parse diagnostics, with no production behavior change; no actionable merge-blocking risk remains beyond normal checks and review. Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
@coderabbitai review |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c2cd96b2fb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
⏭️ 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):
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Binary size checks passed✅ 7 passed
Generated by |
|
Closing as superseded: B-356 was already fixed by #4308 ( |
Summary
Updates the CLI end-to-end regression test for B-356 to use the issue's exact failure mode: an uncaught
baml.json.JsonParseErrorfrom parsing invalid JSON.The production path already captures
ErrorContextfor uncaught throws. This test now verifies thatbaml testrenders the thrown class, exact message, and BAML source stack instead of printing only a bare failure line, while continuing to reject leaked internal Rust span details.Validation
cargo test -p baml_cli --test exit_code_e2e test_json_parse_error_prints_rendered_error_context -- --exact --nocapturecargo test -p baml_cli --lib test_command::testscargo fmt --all -- --checkgit diff --checkLinear: B-356
Summary by CodeRabbit