Skip to content

chore: delete watch - #4008

Merged
sxlijin merged 1 commit into
canaryfrom
sam/delete-match
Jul 14, 2026
Merged

sxlijin merged 1 commit into
canaryfrom
sam/delete-match

Conversation

@sxlijin

@sxlijin sxlijin commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Breaking Changes

    • Removed the watch keyword, watch let, and $watch runtime functionality, including watch-related diagnostics, semantic tokens, VM instructions, and watchAccessor type support across SDK interfaces.
  • Language

    • Added keyword recognition for in, is, and instanceof.
    • Updated keyword handling in syntax highlighting/formatting/semantic tokens.
    • Added catch, catch_all, and catch_all_panics keywords.
  • Documentation

    • Updated compiler/runtime docs to reflect removal of watch functionality.
  • Bug Fixes

    • Improved member-based I/O handling.
    • Fixed/covered lambda parameter shadowing behavior with a new regression test.

@vercel
vercel Bot temporarily deployed to Preview – beps July 14, 2026 00:00 Inactive
@vercel

vercel Bot commented Jul 14, 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 14, 2026 3:53am
promptfiddle Ready Ready Preview, Comment Jul 14, 2026 3:53am
promptfiddle2 Ready Ready Preview, Comment Jul 14, 2026 3:53am

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 14, 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: f7964b83-cc58-4b7a-808d-180a9ba6eff6

📥 Commits

Reviewing files that changed from the base of the PR and between 259a60c and 8faf8d4.

⛔ Files ignored due to path filters (13)
  • baml_language/crates/baml_tests/snapshots/baml_src/_root.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/baml_src/lambdas.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/baml_src/watch.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__01_lexer__lexical_scoping.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__02_parser__lexical_scoping.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__03_hir.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__04_5_mir.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__04_tir.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__06_codegen.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__10_formatter__lexical_scoping.snap is excluded by !**/*.snap
  • baml_language/sdks/go/bridge_go/cffi/proto/baml_bridge/cffi/v1/baml_type.pb.go is excluded by !**/*.pb.go
  • baml_language/sdks/nodejs/bridge_nodejs/dist/proto/baml_cffi.d.ts is excluded by !**/dist/**
  • baml_language/sdks/nodejs/bridge_nodejs/dist/proto/baml_cffi.js is excluded by !**/dist/**
📒 Files selected for processing (79)
  • baml_language/crates/baml_builtins2/keyword_docs/baml_keywords.yaml
  • baml_language/crates/baml_cli/src/paint.rs
  • baml_language/crates/baml_compiler2_ast/src/ast.rs
  • baml_language/crates/baml_compiler2_ast/src/disambiguate.rs
  • baml_language/crates/baml_compiler2_ast/src/lower_expr_body.rs
  • baml_language/crates/baml_compiler2_emit/src/analysis.rs
  • baml_language/crates/baml_compiler2_emit/src/emit.rs
  • baml_language/crates/baml_compiler2_emit/src/pull_semantics.rs
  • baml_language/crates/baml_compiler2_emit/src/stack_carry.rs
  • baml_language/crates/baml_compiler2_emit/src/verifier.rs
  • baml_language/crates/baml_compiler2_mir/src/builder.rs
  • baml_language/crates/baml_compiler2_mir/src/ir.rs
  • baml_language/crates/baml_compiler2_mir/src/lower.rs
  • baml_language/crates/baml_compiler2_mir/src/optimize.rs
  • baml_language/crates/baml_compiler2_mir/src/pretty.rs
  • baml_language/crates/baml_compiler2_tir/src/builder.rs
  • baml_language/crates/baml_compiler2_tir/src/builder/associated_projection.rs
  • baml_language/crates/baml_compiler2_tir/src/exhaustiveness.rs
  • baml_language/crates/baml_compiler2_tir/src/interfaces/coherence.rs
  • baml_language/crates/baml_compiler2_tir/src/interfaces/impl_rules.rs
  • baml_language/crates/baml_compiler2_tir/src/normalize.rs
  • baml_language/crates/baml_compiler2_visualization/src/control_flow/from_ast.rs
  • baml_language/crates/baml_compiler_diagnostics/src/diagnostic.rs
  • baml_language/crates/baml_compiler_diagnostics/src/errors/type_error.rs
  • baml_language/crates/baml_compiler_diagnostics/src/to_diagnostic.rs
  • baml_language/crates/baml_compiler_lexer/src/tokens.rs
  • baml_language/crates/baml_compiler_parser/src/parser.rs
  • baml_language/crates/baml_compiler_syntax/src/ast.rs
  • baml_language/crates/baml_compiler_syntax/src/syntax_kind.rs
  • baml_language/crates/baml_exec/src/auto_cli.rs
  • baml_language/crates/baml_fmt/src/ast/statements.rs
  • baml_language/crates/baml_fmt/src/ast/tokens.rs
  • baml_language/crates/baml_lsp2_actions/src/completions_tests.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/semantic_tokens/const_let_else_defer.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/semantic_tokens/watch_let.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_nested.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_when.baml
  • baml_language/crates/baml_project/src/client_codegen.rs
  • baml_language/crates/baml_tests/baml_src/ns_lambdas/lambdas.baml
  • baml_language/crates/baml_tests/baml_src/ns_watch/watch.baml
  • baml_language/crates/baml_tests/projects/compiles/lexical_scoping/lexical_scoping.baml
  • baml_language/crates/baml_tests/tests/incremental_typing_repro.rs
  • baml_language/crates/baml_type/src/family.rs
  • baml_language/crates/baml_type/src/lib.rs
  • baml_language/crates/baml_type/src/normalize.rs
  • baml_language/crates/baml_type/src/runtime_ty.rs
  • baml_language/crates/baml_type/src/template.rs
  • baml_language/crates/baml_type/tests/simplify_sap_tests.rs
  • baml_language/crates/baml_type_macros/src/emit.rs
  • baml_language/crates/baml_type_macros/src/parse.rs
  • baml_language/crates/bex_engine/README.md
  • baml_language/crates/bex_engine/src/conversion.rs
  • baml_language/crates/bex_engine/src/lib.rs
  • baml_language/crates/bex_engine/src/trace_value_encode.rs
  • baml_language/crates/bex_events/src/prof/proto/bamlprof.proto
  • baml_language/crates/bex_sap/src/sap_model/convert.rs
  • baml_language/crates/bex_vm/README.md
  • baml_language/crates/bex_vm/src/debug.rs
  • baml_language/crates/bex_vm/src/lib.rs
  • baml_language/crates/bex_vm/src/package_baml/json.rs
  • baml_language/crates/bex_vm/src/package_baml/resolve.rs
  • baml_language/crates/bex_vm/src/type_match.rs
  • baml_language/crates/bex_vm/src/vm.rs
  • baml_language/crates/bex_vm/src/watch.rs
  • baml_language/crates/bex_vm/tests/call_notifications.rs
  • baml_language/crates/bex_vm/tests/deep_equals_bigint.rs
  • baml_language/crates/bex_vm/tests/watch_gc.rs
  • baml_language/crates/bex_vm_types/src/bytecode.rs
  • baml_language/crates/bex_vm_types/src/errors.rs
  • baml_language/crates/bridge_ctypes/src/ty_decode.rs
  • baml_language/crates/bridge_ctypes/src/ty_encode.rs
  • baml_language/crates/bridge_ctypes/types/baml_bridge/cffi/v1/baml_type.proto
  • baml_language/crates/sys_llm/src/types/output_format.rs
  • baml_language/crates/tools_onionskin/src/compiler.rs
  • baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.d.ts
  • baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.js
  • baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_type_pb2.py
  • baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_type_pb2.pyi
  • baml_language/sdks/python/src/baml_bridge/proto.py
💤 Files with no reviewable changes (33)
  • baml_language/crates/bex_vm/src/lib.rs
  • baml_language/crates/baml_tests/projects/compiles/lexical_scoping/lexical_scoping.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_nested.baml
  • baml_language/crates/baml_compiler_diagnostics/src/diagnostic.rs
  • baml_language/crates/bridge_ctypes/src/ty_decode.rs
  • baml_language/crates/bex_sap/src/sap_model/convert.rs
  • baml_language/crates/baml_cli/src/paint.rs
  • baml_language/crates/baml_compiler_diagnostics/src/errors/type_error.rs
  • baml_language/crates/baml_compiler2_emit/src/pull_semantics.rs
  • baml_language/crates/bex_vm/tests/call_notifications.rs
  • baml_language/crates/bridge_ctypes/types/baml_bridge/cffi/v1/baml_type.proto
  • baml_language/crates/baml_tests/baml_src/ns_lambdas/lambdas.baml
  • baml_language/crates/tools_onionskin/src/compiler.rs
  • baml_language/crates/baml_compiler2_visualization/src/control_flow/from_ast.rs
  • baml_language/crates/baml_fmt/src/ast/tokens.rs
  • baml_language/crates/bex_vm/tests/watch_gc.rs
  • baml_language/crates/baml_compiler2_tir/src/builder.rs
  • baml_language/crates/baml_compiler_diagnostics/src/to_diagnostic.rs
  • baml_language/crates/sys_llm/src/types/output_format.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/semantic_tokens/watch_let.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_when.baml
  • baml_language/crates/bex_vm/src/type_match.rs
  • baml_language/crates/baml_compiler2_mir/src/pretty.rs
  • baml_language/crates/baml_compiler_syntax/src/syntax_kind.rs
  • baml_language/crates/baml_type/src/runtime_ty.rs
  • baml_language/crates/bex_vm/src/watch.rs
  • baml_language/crates/bex_events/src/prof/proto/bamlprof.proto
  • baml_language/crates/baml_tests/baml_src/ns_watch/watch.baml
  • baml_language/crates/baml_compiler2_ast/src/ast.rs
  • baml_language/crates/bex_vm_types/src/errors.rs
  • baml_language/crates/baml_compiler2_tir/src/builder/associated_projection.rs
  • baml_language/crates/bex_vm/src/package_baml/json.rs
  • baml_language/crates/bex_engine/src/trace_value_encode.rs
🚧 Files skipped from review as they are similar to previous changes (42)
  • baml_language/sdks/python/src/baml_bridge/proto.py
  • baml_language/crates/baml_lsp2_actions/src/completions_tests.rs
  • baml_language/crates/bex_vm/tests/deep_equals_bigint.rs
  • baml_language/crates/baml_compiler2_ast/src/disambiguate.rs
  • baml_language/crates/baml_compiler2_tir/src/normalize.rs
  • baml_language/crates/baml_exec/src/auto_cli.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/semantic_tokens/const_let_else_defer.baml
  • baml_language/crates/baml_tests/tests/incremental_typing_repro.rs
  • baml_language/crates/baml_project/src/client_codegen.rs
  • baml_language/crates/baml_type/tests/simplify_sap_tests.rs
  • baml_language/crates/baml_builtins2/keyword_docs/baml_keywords.yaml
  • baml_language/crates/bex_engine/README.md
  • baml_language/crates/baml_compiler2_mir/src/builder.rs
  • baml_language/crates/baml_compiler2_tir/src/interfaces/impl_rules.rs
  • baml_language/crates/baml_compiler2_tir/src/interfaces/coherence.rs
  • baml_language/crates/baml_type/src/template.rs
  • baml_language/crates/bex_vm/README.md
  • baml_language/crates/baml_compiler2_mir/src/ir.rs
  • baml_language/crates/bex_vm/src/package_baml/resolve.rs
  • baml_language/crates/baml_compiler2_emit/src/verifier.rs
  • baml_language/crates/baml_compiler_syntax/src/ast.rs
  • baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.d.ts
  • baml_language/crates/baml_compiler2_mir/src/optimize.rs
  • baml_language/crates/bex_engine/src/lib.rs
  • baml_language/crates/bridge_ctypes/src/ty_encode.rs
  • baml_language/crates/baml_compiler_lexer/src/tokens.rs
  • baml_language/crates/baml_type/src/family.rs
  • baml_language/crates/baml_type/src/lib.rs
  • baml_language/crates/baml_compiler2_emit/src/stack_carry.rs
  • baml_language/crates/bex_vm_types/src/bytecode.rs
  • baml_language/crates/baml_type/src/normalize.rs
  • baml_language/crates/baml_compiler2_ast/src/lower_expr_body.rs
  • baml_language/crates/baml_compiler_parser/src/parser.rs
  • baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_type_pb2.pyi
  • baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.js
  • baml_language/crates/baml_compiler2_emit/src/emit.rs
  • baml_language/crates/baml_fmt/src/ast/statements.rs
  • baml_language/crates/baml_compiler2_emit/src/analysis.rs
  • baml_language/crates/bex_engine/src/conversion.rs
  • baml_language/crates/bex_vm/src/debug.rs
  • baml_language/crates/bex_vm/src/vm.rs
  • baml_language/crates/baml_compiler2_mir/src/lower.rs

📝 Walkthrough

Walkthrough

The change removes watch syntax, watched-local tracking, watch MIR and VM notification infrastructure, WatchAccessor type and wire support, and related tests and documentation. It also introduces explicit stable Borsh discriminants for type-family variants.

Changes

Watch removal and type stabilization

Layer / File(s) Summary
Syntax and formatter support
baml_language/crates/baml_compiler_lexer/..., baml_language/crates/baml_compiler_parser/..., baml_language/crates/baml_fmt/...
watch tokens, watch let parsing, syntax kinds, formatter fields, diagnostics, styling, and keyword documentation are removed.
AST and MIR lowering
baml_language/crates/baml_compiler2_ast/..., baml_language/crates/baml_compiler2_mir/...
Watched-let fields, watched-local scope tracking, watch teardown, and watch accessor lowering are removed from AST and MIR construction.
MIR emission and analysis
baml_language/crates/baml_compiler2_emit/...
Watch statement handling is removed from def-use analysis, optimization, stack simulation, bytecode emission, pretty-printing, and invariant verification.
Type-system cleanup
baml_language/crates/baml_type/..., baml_language/crates/baml_compiler2_tir/..., baml_language/crates/bex_sap/...
WatchAccessor handling is removed from type classification, normalization, matching, conversion, exhaustiveness, SAP conversion, and output formatting.
Stable type discriminants
baml_language/crates/baml_type/src/family.rs, baml_language/crates/baml_type_macros/...
Type-family variants receive explicit Borsh discriminants, macro parsing requires u8 tags, generated member enums reuse master tags, and wire-tag tests are updated.
VM and bytecode runtime
baml_language/crates/bex_vm/..., baml_language/crates/bex_vm_types/..., baml_language/crates/bex_engine/...
Watch graph state, notification execution states, watch instructions, notification yields, watch GC roots, and related unwind behavior are removed.
Wire schemas and SDK bindings
baml_language/crates/bridge_ctypes/..., baml_language/sdks/...
The BamlTyWatchAccessor message and corresponding protobuf, Rust, Node.js, Python, and TypeScript representations are removed.
Tests and documentation
baml_language/crates/baml_tests/..., baml_language/crates/bex_vm/README.md, baml_language/crates/bex_engine/README.md
Watch-specific fixtures and documentation are deleted or updated, and a lambda parameter-shadowing regression test is added.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Suggested reviewers: 2kai2kai2

Poem

I’m a rabbit hopping through code,
Watch leaves fall from every road.
Types now wear tags, neat and bright,
The VM rests through silent night.
Carrots compile—what a delight!

🚥 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 is concise and accurately reflects the main change: removing watch-related functionality.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 sam/delete-match

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.44.1)
baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.js

ast-grep timed out on this file


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.

@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 14, 2026 00:07 Inactive
@sxlijin
sxlijin force-pushed the sam/delete-match branch from 3bb463c to 1662436 Compare July 14, 2026 00:08
@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Binary size checks passed

✅ 7 passed

Artifact Platform File Gzip Gated on Baseline Delta Status
✅ baml-cli Linux 🔒 22.1 MB 9.4 MB file 21.5 MB +553.6 KB (+2.6%) OK
✅ packed-program Linux 🔒 15.8 MB 6.7 MB file 15.6 MB +209.2 KB (+1.3%) OK
✅ baml-cli macOS 🔒 17.0 MB 8.2 MB file 16.6 MB +416.0 KB (+2.5%) OK
✅ packed-program macOS 🔒 12.2 MB 5.9 MB file 12.1 MB +117.3 KB (+1.0%) OK
✅ baml-cli Windows 🔒 18.5 MB 8.4 MB file 18.1 MB +428.0 KB (+2.4%) OK
✅ packed-program Windows 🔒 13.1 MB 6.0 MB file 13.0 MB +104.8 KB (+0.8%) OK
✅ bridge_wasm WASM 14.6 MB 🔒 4.1 MB gzip 4.1 MB +79.4 KB (+2.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

@vercel
vercel Bot temporarily deployed to Preview – beps July 14, 2026 00:09 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 14, 2026 00:18 Inactive

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
baml_language/crates/bex_engine/src/lib.rs (1)

1479-1505: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Handle VmExecState::EarlyYield in $init

vm.exec() can yield at GC safepoints here, but this loop treats EarlyYield as InitFailed. That turns a normal safepoint into an engine-construction failure; handle it the same way as the main VM loop instead of falling through to the error path.

🤖 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 `@baml_language/crates/bex_engine/src/lib.rs` around lines 1479 - 1505, Update
the $init execution loop around vm.exec() to handle VmExecState::EarlyYield as a
normal GC safepoint, matching the behavior of the main VM loop. Resume execution
by continuing the loop, and keep the existing InitFailed handling for other
unexpected states.

Source: Coding guidelines

baml_language/crates/bex_vm_types/src/bytecode.rs (1)

496-498: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Preserve OpCode discriminants.

Deleting Watch/Unwatch/Notify from the middle renumbers every later opcode. lower_to_compact() writes op as u8, and TryFrom<u8> decodes those bytes back, so existing compact bytecode will be misread as different instructions. Keep explicit values or reserved gaps unless this is an intentional format break.

🤖 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 `@baml_language/crates/bex_vm_types/src/bytecode.rs` around lines 496 - 498,
Preserve the existing OpCode discriminant values when removing Watch, Unwatch,
and Notify. Update the OpCode definition so later variants retain their prior
numeric assignments, using explicit values or reserved gaps, and keep
lower_to_compact() and TryFrom<u8> compatible with existing compact bytecode.

Source: Coding guidelines

🧹 Nitpick comments (2)
baml_language/crates/baml_lsp2_actions/src/completions_tests.rs (1)

720-720: 📐 Maintainability & Code Quality | 🔵 Trivial

Run cargo test --lib before merge.

🤖 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 `@baml_language/crates/baml_lsp2_actions/src/completions_tests.rs` at line 720,
Run the library test suite with cargo test --lib and resolve any failures
related to the SimulateHumanGuess(history) completion test before merging.

Source: Coding guidelines

baml_language/crates/baml_compiler2_mir/src/ir.rs (1)

258-285: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

Suppressed instead of fixed: clippy::large_enum_variant on StatementKind.

Adding #[allow(clippy::large_enum_variant)] silences the lint rather than addressing the size skew (likely from Intrinsic { op, args: Vec<Operand> } vs. zero-sized variants like Nop), meaning every Statement — including trivial ones — now pays the largest variant's memory cost. Consider boxing the largest variant's payload if Statement volume is a hot-path memory concern.

🤖 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 `@baml_language/crates/baml_compiler2_mir/src/ir.rs` around lines 258 - 285,
Remove the blanket clippy suppression on StatementKind and reduce its variant
size skew by boxing the large Intrinsic payload, particularly the args
collection, while preserving the existing intrinsic data and construction/access
behavior throughout StatementKind consumers.
🤖 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.

Inline comments:
In `@baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.d.ts`:
- Line 1295: Update the BamlTy.ty union to use the lowercase "function"
discriminant instead of "Function", matching the proto oneof and generated field
casing so ty === "function" type-checks correctly.

In `@baml_language/TEST_INSTRUCTIONS.md`:
- Around line 114-120: Update the testing guidance in TEST_INSTRUCTIONS.md to
reference the existing baml_tests crate instead of the nonexistent baml_test
name, while preserving the surrounding instructions about locating the
syntax-failing base case and adding an appropriately organized test.

---

Outside diff comments:
In `@baml_language/crates/bex_engine/src/lib.rs`:
- Around line 1479-1505: Update the $init execution loop around vm.exec() to
handle VmExecState::EarlyYield as a normal GC safepoint, matching the behavior
of the main VM loop. Resume execution by continuing the loop, and keep the
existing InitFailed handling for other unexpected states.

In `@baml_language/crates/bex_vm_types/src/bytecode.rs`:
- Around line 496-498: Preserve the existing OpCode discriminant values when
removing Watch, Unwatch, and Notify. Update the OpCode definition so later
variants retain their prior numeric assignments, using explicit values or
reserved gaps, and keep lower_to_compact() and TryFrom<u8> compatible with
existing compact bytecode.

---

Nitpick comments:
In `@baml_language/crates/baml_compiler2_mir/src/ir.rs`:
- Around line 258-285: Remove the blanket clippy suppression on StatementKind
and reduce its variant size skew by boxing the large Intrinsic payload,
particularly the args collection, while preserving the existing intrinsic data
and construction/access behavior throughout StatementKind consumers.

In `@baml_language/crates/baml_lsp2_actions/src/completions_tests.rs`:
- Line 720: Run the library test suite with cargo test --lib and resolve any
failures related to the SimulateHumanGuess(history) completion test before
merging.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6c70dccb-5600-4132-9033-9d838bfa4b55

📥 Commits

Reviewing files that changed from the base of the PR and between 30eb1c1 and 1662436.

⛔ Files ignored due to path filters (14)
  • baml_language/Cargo.lock is excluded by !**/*.lock
  • baml_language/crates/baml_tests/snapshots/baml_src/_root.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/baml_src/lambdas.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/baml_src/watch.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__01_lexer__lexical_scoping.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__02_parser__lexical_scoping.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__03_hir.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__04_5_mir.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__04_tir.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__06_codegen.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__10_formatter__lexical_scoping.snap is excluded by !**/*.snap
  • baml_language/sdks/go/bridge_go/cffi/proto/baml_bridge/cffi/v1/baml_type.pb.go is excluded by !**/*.pb.go
  • baml_language/sdks/nodejs/bridge_nodejs/dist/proto/baml_cffi.d.ts is excluded by !**/dist/**
  • baml_language/sdks/nodejs/bridge_nodejs/dist/proto/baml_cffi.js is excluded by !**/dist/**
📒 Files selected for processing (82)
  • baml_language/TEST_INSTRUCTIONS.md
  • baml_language/crates/baml_builtins2/keyword_docs/baml_keywords.yaml
  • baml_language/crates/baml_cli/src/paint.rs
  • baml_language/crates/baml_compiler2_ast/src/ast.rs
  • baml_language/crates/baml_compiler2_ast/src/disambiguate.rs
  • baml_language/crates/baml_compiler2_ast/src/lower_expr_body.rs
  • baml_language/crates/baml_compiler2_emit/src/analysis.rs
  • baml_language/crates/baml_compiler2_emit/src/emit.rs
  • baml_language/crates/baml_compiler2_emit/src/pull_semantics.rs
  • baml_language/crates/baml_compiler2_emit/src/stack_carry.rs
  • baml_language/crates/baml_compiler2_emit/src/verifier.rs
  • baml_language/crates/baml_compiler2_mir/src/builder.rs
  • baml_language/crates/baml_compiler2_mir/src/ir.rs
  • baml_language/crates/baml_compiler2_mir/src/lower.rs
  • baml_language/crates/baml_compiler2_mir/src/optimize.rs
  • baml_language/crates/baml_compiler2_mir/src/pretty.rs
  • baml_language/crates/baml_compiler2_tir/src/builder.rs
  • baml_language/crates/baml_compiler2_tir/src/builder/associated_projection.rs
  • baml_language/crates/baml_compiler2_tir/src/exhaustiveness.rs
  • baml_language/crates/baml_compiler2_tir/src/interfaces/coherence.rs
  • baml_language/crates/baml_compiler2_tir/src/interfaces/impl_rules.rs
  • baml_language/crates/baml_compiler2_tir/src/normalize.rs
  • baml_language/crates/baml_compiler2_visualization/src/control_flow/from_ast.rs
  • baml_language/crates/baml_compiler_diagnostics/src/diagnostic.rs
  • baml_language/crates/baml_compiler_diagnostics/src/errors/type_error.rs
  • baml_language/crates/baml_compiler_diagnostics/src/to_diagnostic.rs
  • baml_language/crates/baml_compiler_lexer/src/tokens.rs
  • baml_language/crates/baml_compiler_parser/src/parser.rs
  • baml_language/crates/baml_compiler_syntax/src/ast.rs
  • baml_language/crates/baml_compiler_syntax/src/syntax_kind.rs
  • baml_language/crates/baml_exec/src/auto_cli.rs
  • baml_language/crates/baml_fmt/src/ast/statements.rs
  • baml_language/crates/baml_fmt/src/ast/tokens.rs
  • baml_language/crates/baml_lsp2_actions/src/completions_tests.rs
  • baml_language/crates/baml_lsp2_actions_tests/Cargo.toml
  • baml_language/crates/baml_lsp2_actions_tests/src/lib.rs
  • baml_language/crates/baml_lsp2_actions_tests/src/memoization.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_nested.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_when.baml
  • baml_language/crates/baml_project/src/client_codegen.rs
  • baml_language/crates/baml_tests/baml_src/ns_lambdas/lambdas.baml
  • baml_language/crates/baml_tests/baml_src/ns_watch/watch.baml
  • baml_language/crates/baml_tests/projects/compiles/lexical_scoping/lexical_scoping.baml
  • baml_language/crates/baml_tests/tests/incremental_typing_repro.rs
  • baml_language/crates/baml_type/src/family.rs
  • baml_language/crates/baml_type/src/lib.rs
  • baml_language/crates/baml_type/src/normalize.rs
  • baml_language/crates/baml_type/src/runtime_ty.rs
  • baml_language/crates/baml_type/src/template.rs
  • baml_language/crates/baml_type/tests/simplify_sap_tests.rs
  • baml_language/crates/baml_type_macros/src/emit.rs
  • baml_language/crates/baml_type_macros/src/parse.rs
  • baml_language/crates/bex_engine/README.md
  • baml_language/crates/bex_engine/src/conversion.rs
  • baml_language/crates/bex_engine/src/lib.rs
  • baml_language/crates/bex_engine/src/trace_value_encode.rs
  • baml_language/crates/bex_events/src/prof/proto/bamlprof.proto
  • baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs
  • baml_language/crates/bex_sap/src/sap_model/convert.rs
  • baml_language/crates/bex_vm/README.md
  • baml_language/crates/bex_vm/src/debug.rs
  • baml_language/crates/bex_vm/src/lib.rs
  • baml_language/crates/bex_vm/src/package_baml/json.rs
  • baml_language/crates/bex_vm/src/package_baml/resolve.rs
  • baml_language/crates/bex_vm/src/type_match.rs
  • baml_language/crates/bex_vm/src/vm.rs
  • baml_language/crates/bex_vm/src/watch.rs
  • baml_language/crates/bex_vm/tests/call_notifications.rs
  • baml_language/crates/bex_vm/tests/deep_equals_bigint.rs
  • baml_language/crates/bex_vm/tests/watch_gc.rs
  • baml_language/crates/bex_vm_types/src/bytecode.rs
  • baml_language/crates/bex_vm_types/src/errors.rs
  • baml_language/crates/bridge_ctypes/src/ty_decode.rs
  • baml_language/crates/bridge_ctypes/src/ty_encode.rs
  • baml_language/crates/bridge_ctypes/types/baml_bridge/cffi/v1/baml_type.proto
  • baml_language/crates/sys_llm/src/types/output_format.rs
  • baml_language/crates/tools_onionskin/src/compiler.rs
  • baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.d.ts
  • baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.js
  • baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_type_pb2.py
  • baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_type_pb2.pyi
  • baml_language/sdks/python/src/baml_bridge/proto.py
💤 Files with no reviewable changes (33)
  • baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_when.baml
  • baml_language/crates/bex_vm/tests/call_notifications.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_nested.baml
  • baml_language/crates/bex_events/src/prof/proto/bamlprof.proto
  • baml_language/crates/baml_compiler_diagnostics/src/errors/type_error.rs
  • baml_language/crates/bex_vm/tests/watch_gc.rs
  • baml_language/crates/baml_tests/projects/compiles/lexical_scoping/lexical_scoping.baml
  • baml_language/crates/bex_vm/src/watch.rs
  • baml_language/crates/baml_tests/baml_src/ns_watch/watch.baml
  • baml_language/crates/sys_llm/src/types/output_format.rs
  • baml_language/crates/baml_compiler2_mir/src/pretty.rs
  • baml_language/crates/baml_compiler2_visualization/src/control_flow/from_ast.rs
  • baml_language/crates/baml_compiler2_tir/src/builder.rs
  • baml_language/crates/bex_vm/src/lib.rs
  • baml_language/crates/bex_vm/src/type_match.rs
  • baml_language/crates/baml_compiler2_ast/src/ast.rs
  • baml_language/crates/baml_cli/src/paint.rs
  • baml_language/crates/baml_fmt/src/ast/tokens.rs
  • baml_language/crates/tools_onionskin/src/compiler.rs
  • baml_language/crates/baml_builtins2/keyword_docs/baml_keywords.yaml
  • baml_language/crates/baml_compiler_diagnostics/src/to_diagnostic.rs
  • baml_language/crates/baml_compiler2_emit/src/pull_semantics.rs
  • baml_language/crates/baml_type/src/runtime_ty.rs
  • baml_language/crates/baml_compiler_diagnostics/src/diagnostic.rs
  • baml_language/crates/baml_compiler_syntax/src/syntax_kind.rs
  • baml_language/crates/bridge_ctypes/src/ty_decode.rs
  • baml_language/crates/bridge_ctypes/types/baml_bridge/cffi/v1/baml_type.proto
  • baml_language/crates/baml_compiler2_tir/src/builder/associated_projection.rs
  • baml_language/crates/bex_sap/src/sap_model/convert.rs
  • baml_language/crates/baml_tests/baml_src/ns_lambdas/lambdas.baml
  • baml_language/crates/bex_vm_types/src/errors.rs
  • baml_language/crates/bex_engine/src/trace_value_encode.rs
  • baml_language/crates/bex_vm/src/package_baml/json.rs

Comment thread baml_language/TEST_INSTRUCTIONS.md Resolved
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 14, 2026 00:30 Inactive
@sxlijin
sxlijin added this pull request to the merge queue Jul 14, 2026
@sxlijin
sxlijin removed this pull request from the merge queue due to a manual request Jul 14, 2026
@sxlijin
sxlijin added this pull request to the merge queue Jul 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 14, 2026
@sxlijin
sxlijin added this pull request to the merge queue Jul 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 14, 2026
@sxlijin
sxlijin force-pushed the sam/delete-match branch from 1662436 to cfceaa5 Compare July 14, 2026 03:08
@vercel
vercel Bot temporarily deployed to Preview – beps July 14, 2026 03:09 Inactive
@sxlijin
sxlijin force-pushed the sam/delete-match branch from cfceaa5 to 259a60c Compare July 14, 2026 03:14
@vercel
vercel Bot temporarily deployed to Preview – beps July 14, 2026 03:15 Inactive
@sxlijin
sxlijin enabled auto-merge July 14, 2026 03:19
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 14, 2026 03:23 Inactive
@sxlijin
sxlijin force-pushed the sam/delete-match branch from 259a60c to 8faf8d4 Compare July 14, 2026 03:34
@vercel
vercel Bot temporarily deployed to Preview – beps July 14, 2026 03:35 Inactive

@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 (2)
baml_language/crates/baml_compiler2_mir/src/lower.rs (2)

3027-3033: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

restore_active_locals and restore_locals_after_scope are now identical.

Both methods do exactly self.locals = saved_locals;. After this PR removed the watch-stack truncation logic, there's no longer any behavioral difference between them, yet lower_catch still calls restore_active_locals (lines 14202, 14264) while every other site calls restore_locals_after_scope. Worth consolidating to one method to avoid confusion about which to call.

♻️ Proposed consolidation
-    fn restore_locals_after_scope(&mut self, saved_locals: HashMap<Name, Local>) {
-        self.locals = saved_locals;
-    }
-
-    fn restore_active_locals(&mut self, saved_locals: HashMap<Name, Local>) {
-        self.locals = saved_locals;
-    }
+    fn restore_locals_after_scope(&mut self, saved_locals: HashMap<Name, Local>) {
+        self.locals = saved_locals;
+    }

And update lower_catch's two restore_active_locals(...) call sites to restore_locals_after_scope(...).

🤖 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 `@baml_language/crates/baml_compiler2_mir/src/lower.rs` around lines 3027 -
3033, Consolidate the identical restore helpers by removing
restore_active_locals and retaining restore_locals_after_scope as the single
method. Update both restore_active_locals call sites in lower_catch to invoke
restore_locals_after_scope, leaving all other local restoration behavior
unchanged.

2920-2935: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Consider a regression test for the catch-binding capture fix.

Switching catch/stack-trace bindings to DefinitionSite::CatchBinding (instead of PatternBinding) fixes what looks like a real bug: a captured catch binding (e.g. catch (e) { ... } where e is used inside a nested lambda) previously couldn't be found via binding_id_for_pattern_site_name, so catch_binding_is_captured would always report false and the binding would never get registered in binding_locals. A small unit test exercising a captured catch binding would guard against regressions.

Based on path instructions ("Prefer writing Rust unit tests over integration tests where possible" for **/*.rs), a focused unit test in this crate would be the preferred form. Want me to draft one?

🤖 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 `@baml_language/crates/baml_compiler2_mir/src/lower.rs` around lines 2920 -
2935, The catch-binding capture fix lacks regression coverage. Add a focused
Rust unit test in the compiler crate exercising a catch binding such as `catch
(e)` referenced from a nested lambda, and assert that capture detection and
local registration use `DefinitionSite::CatchBinding` through
`catch_binding_is_captured` and `record_catch_binding_local`.
🤖 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 `@baml_language/crates/baml_compiler2_mir/src/lower.rs`:
- Around line 3027-3033: Consolidate the identical restore helpers by removing
restore_active_locals and retaining restore_locals_after_scope as the single
method. Update both restore_active_locals call sites in lower_catch to invoke
restore_locals_after_scope, leaving all other local restoration behavior
unchanged.
- Around line 2920-2935: The catch-binding capture fix lacks regression
coverage. Add a focused Rust unit test in the compiler crate exercising a catch
binding such as `catch (e)` referenced from a nested lambda, and assert that
capture detection and local registration use `DefinitionSite::CatchBinding`
through `catch_binding_is_captured` and `record_catch_binding_local`.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 63dfc673-5487-4eb9-80c8-18371d224e21

📥 Commits

Reviewing files that changed from the base of the PR and between 1662436 and 259a60c.

⛔ Files ignored due to path filters (13)
  • baml_language/crates/baml_tests/snapshots/baml_src/_root.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/baml_src/lambdas.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/baml_src/watch.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__01_lexer__lexical_scoping.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__02_parser__lexical_scoping.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__03_hir.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__04_5_mir.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__04_tir.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__06_codegen.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/lexical_scoping/baml_tests__compiles__lexical_scoping__10_formatter__lexical_scoping.snap is excluded by !**/*.snap
  • baml_language/sdks/go/bridge_go/cffi/proto/baml_bridge/cffi/v1/baml_type.pb.go is excluded by !**/*.pb.go
  • baml_language/sdks/nodejs/bridge_nodejs/dist/proto/baml_cffi.d.ts is excluded by !**/dist/**
  • baml_language/sdks/nodejs/bridge_nodejs/dist/proto/baml_cffi.js is excluded by !**/dist/**
📒 Files selected for processing (78)
  • baml_language/crates/baml_builtins2/keyword_docs/baml_keywords.yaml
  • baml_language/crates/baml_cli/src/paint.rs
  • baml_language/crates/baml_compiler2_ast/src/ast.rs
  • baml_language/crates/baml_compiler2_ast/src/disambiguate.rs
  • baml_language/crates/baml_compiler2_ast/src/lower_expr_body.rs
  • baml_language/crates/baml_compiler2_emit/src/analysis.rs
  • baml_language/crates/baml_compiler2_emit/src/emit.rs
  • baml_language/crates/baml_compiler2_emit/src/pull_semantics.rs
  • baml_language/crates/baml_compiler2_emit/src/stack_carry.rs
  • baml_language/crates/baml_compiler2_emit/src/verifier.rs
  • baml_language/crates/baml_compiler2_mir/src/builder.rs
  • baml_language/crates/baml_compiler2_mir/src/ir.rs
  • baml_language/crates/baml_compiler2_mir/src/lower.rs
  • baml_language/crates/baml_compiler2_mir/src/optimize.rs
  • baml_language/crates/baml_compiler2_mir/src/pretty.rs
  • baml_language/crates/baml_compiler2_tir/src/builder.rs
  • baml_language/crates/baml_compiler2_tir/src/builder/associated_projection.rs
  • baml_language/crates/baml_compiler2_tir/src/exhaustiveness.rs
  • baml_language/crates/baml_compiler2_tir/src/interfaces/coherence.rs
  • baml_language/crates/baml_compiler2_tir/src/interfaces/impl_rules.rs
  • baml_language/crates/baml_compiler2_tir/src/normalize.rs
  • baml_language/crates/baml_compiler2_visualization/src/control_flow/from_ast.rs
  • baml_language/crates/baml_compiler_diagnostics/src/diagnostic.rs
  • baml_language/crates/baml_compiler_diagnostics/src/errors/type_error.rs
  • baml_language/crates/baml_compiler_diagnostics/src/to_diagnostic.rs
  • baml_language/crates/baml_compiler_lexer/src/tokens.rs
  • baml_language/crates/baml_compiler_parser/src/parser.rs
  • baml_language/crates/baml_compiler_syntax/src/ast.rs
  • baml_language/crates/baml_compiler_syntax/src/syntax_kind.rs
  • baml_language/crates/baml_exec/src/auto_cli.rs
  • baml_language/crates/baml_fmt/src/ast/statements.rs
  • baml_language/crates/baml_fmt/src/ast/tokens.rs
  • baml_language/crates/baml_lsp2_actions/src/completions_tests.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/semantic_tokens/const_let_else_defer.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_nested.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_when.baml
  • baml_language/crates/baml_project/src/client_codegen.rs
  • baml_language/crates/baml_tests/baml_src/ns_lambdas/lambdas.baml
  • baml_language/crates/baml_tests/baml_src/ns_watch/watch.baml
  • baml_language/crates/baml_tests/projects/compiles/lexical_scoping/lexical_scoping.baml
  • baml_language/crates/baml_tests/tests/incremental_typing_repro.rs
  • baml_language/crates/baml_type/src/family.rs
  • baml_language/crates/baml_type/src/lib.rs
  • baml_language/crates/baml_type/src/normalize.rs
  • baml_language/crates/baml_type/src/runtime_ty.rs
  • baml_language/crates/baml_type/src/template.rs
  • baml_language/crates/baml_type/tests/simplify_sap_tests.rs
  • baml_language/crates/baml_type_macros/src/emit.rs
  • baml_language/crates/baml_type_macros/src/parse.rs
  • baml_language/crates/bex_engine/README.md
  • baml_language/crates/bex_engine/src/conversion.rs
  • baml_language/crates/bex_engine/src/lib.rs
  • baml_language/crates/bex_engine/src/trace_value_encode.rs
  • baml_language/crates/bex_events/src/prof/proto/bamlprof.proto
  • baml_language/crates/bex_sap/src/sap_model/convert.rs
  • baml_language/crates/bex_vm/README.md
  • baml_language/crates/bex_vm/src/debug.rs
  • baml_language/crates/bex_vm/src/lib.rs
  • baml_language/crates/bex_vm/src/package_baml/json.rs
  • baml_language/crates/bex_vm/src/package_baml/resolve.rs
  • baml_language/crates/bex_vm/src/type_match.rs
  • baml_language/crates/bex_vm/src/vm.rs
  • baml_language/crates/bex_vm/src/watch.rs
  • baml_language/crates/bex_vm/tests/call_notifications.rs
  • baml_language/crates/bex_vm/tests/deep_equals_bigint.rs
  • baml_language/crates/bex_vm/tests/watch_gc.rs
  • baml_language/crates/bex_vm_types/src/bytecode.rs
  • baml_language/crates/bex_vm_types/src/errors.rs
  • baml_language/crates/bridge_ctypes/src/ty_decode.rs
  • baml_language/crates/bridge_ctypes/src/ty_encode.rs
  • baml_language/crates/bridge_ctypes/types/baml_bridge/cffi/v1/baml_type.proto
  • baml_language/crates/sys_llm/src/types/output_format.rs
  • baml_language/crates/tools_onionskin/src/compiler.rs
  • baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.d.ts
  • baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.js
  • baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_type_pb2.py
  • baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_type_pb2.pyi
  • baml_language/sdks/python/src/baml_bridge/proto.py
💤 Files with no reviewable changes (30)
  • baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_nested.baml
  • baml_language/crates/baml_compiler2_tir/src/builder.rs
  • baml_language/crates/bridge_ctypes/src/ty_decode.rs
  • baml_language/crates/bex_events/src/prof/proto/bamlprof.proto
  • baml_language/crates/bex_vm/tests/watch_gc.rs
  • baml_language/crates/baml_compiler2_mir/src/pretty.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/syntax/expr/watch_when.baml
  • baml_language/crates/baml_tests/projects/compiles/lexical_scoping/lexical_scoping.baml
  • baml_language/crates/bex_vm/src/watch.rs
  • baml_language/crates/baml_compiler_diagnostics/src/to_diagnostic.rs
  • baml_language/crates/bex_vm_types/src/errors.rs
  • baml_language/crates/baml_builtins2/keyword_docs/baml_keywords.yaml
  • baml_language/crates/baml_compiler2_ast/src/ast.rs
  • baml_language/crates/sys_llm/src/types/output_format.rs
  • baml_language/crates/baml_compiler_diagnostics/src/errors/type_error.rs
  • baml_language/crates/baml_type/src/runtime_ty.rs
  • baml_language/crates/baml_compiler_diagnostics/src/diagnostic.rs
  • baml_language/crates/bex_vm/src/lib.rs
  • baml_language/crates/bridge_ctypes/types/baml_bridge/cffi/v1/baml_type.proto
  • baml_language/crates/bex_vm/tests/call_notifications.rs
  • baml_language/crates/baml_compiler2_emit/src/pull_semantics.rs
  • baml_language/crates/baml_tests/baml_src/ns_watch/watch.baml
  • baml_language/crates/baml_compiler2_visualization/src/control_flow/from_ast.rs
  • baml_language/crates/bex_vm/src/type_match.rs
  • baml_language/crates/baml_tests/baml_src/ns_lambdas/lambdas.baml
  • baml_language/crates/tools_onionskin/src/compiler.rs
  • baml_language/crates/bex_engine/src/trace_value_encode.rs
  • baml_language/crates/bex_sap/src/sap_model/convert.rs
  • baml_language/crates/baml_compiler2_tir/src/builder/associated_projection.rs
  • baml_language/crates/bex_vm/src/package_baml/json.rs
🚧 Files skipped from review as they are similar to previous changes (43)
  • baml_language/crates/baml_compiler2_ast/src/disambiguate.rs
  • baml_language/sdks/python/src/baml_bridge/proto.py
  • baml_language/crates/bex_vm/README.md
  • baml_language/crates/baml_exec/src/auto_cli.rs
  • baml_language/crates/bex_vm/tests/deep_equals_bigint.rs
  • baml_language/crates/baml_fmt/src/ast/tokens.rs
  • baml_language/crates/baml_lsp2_actions/src/completions_tests.rs
  • baml_language/crates/bridge_ctypes/src/ty_encode.rs
  • baml_language/crates/baml_type/tests/simplify_sap_tests.rs
  • baml_language/crates/baml_compiler2_emit/src/verifier.rs
  • baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_type_pb2.py
  • baml_language/crates/baml_compiler2_tir/src/normalize.rs
  • baml_language/crates/baml_cli/src/paint.rs
  • baml_language/crates/baml_compiler2_emit/src/stack_carry.rs
  • baml_language/crates/baml_project/src/client_codegen.rs
  • baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.d.ts
  • baml_language/crates/baml_compiler2_tir/src/exhaustiveness.rs
  • baml_language/crates/bex_vm/src/package_baml/resolve.rs
  • baml_language/crates/bex_engine/README.md
  • baml_language/crates/baml_compiler_lexer/src/tokens.rs
  • baml_language/crates/baml_tests/tests/incremental_typing_repro.rs
  • baml_language/crates/baml_compiler_syntax/src/syntax_kind.rs
  • baml_language/crates/baml_type_macros/src/emit.rs
  • baml_language/crates/baml_compiler2_mir/src/ir.rs
  • baml_language/crates/baml_compiler2_mir/src/builder.rs
  • baml_language/crates/baml_type_macros/src/parse.rs
  • baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto/baml_cffi.js
  • baml_language/crates/baml_type/src/normalize.rs
  • baml_language/crates/baml_compiler2_tir/src/interfaces/impl_rules.rs
  • baml_language/crates/baml_compiler2_emit/src/emit.rs
  • baml_language/crates/baml_type/src/template.rs
  • baml_language/crates/baml_compiler2_tir/src/interfaces/coherence.rs
  • baml_language/crates/bex_vm/src/debug.rs
  • baml_language/crates/baml_type/src/family.rs
  • baml_language/crates/baml_fmt/src/ast/statements.rs
  • baml_language/crates/baml_compiler2_emit/src/analysis.rs
  • baml_language/crates/bex_engine/src/conversion.rs
  • baml_language/crates/baml_compiler2_ast/src/lower_expr_body.rs
  • baml_language/crates/bex_engine/src/lib.rs
  • baml_language/crates/baml_type/src/lib.rs
  • baml_language/crates/bex_vm_types/src/bytecode.rs
  • baml_language/crates/baml_compiler_parser/src/parser.rs
  • baml_language/crates/bex_vm/src/vm.rs

@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 14, 2026 03:42 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 14, 2026 03:53 Inactive
@sxlijin
sxlijin added this pull request to the merge queue Jul 14, 2026
Merged via the queue into canary with commit 856c713 Jul 14, 2026
56 checks passed
@sxlijin
sxlijin deleted the sam/delete-match branch July 14, 2026 04:18
antoniosarosi added a commit that referenced this pull request Jul 14, 2026
Resolved the usual bytecode_format snapshot conflicts by regenerating
with INSTA_UPDATE=always.

Also removed `I::Watch(..) | I::Unwatch(..) | I::Notify(..)` from the
opcode walker match arm in `bex_vm_types/src/relink.rs`: canary commit
856c713 (#4008, "chore: delete watch") deleted those `Instruction`
variants, which broke the relink walker added on this branch (a
semantic conflict git could not surface textually). The arms simply
disappear along with the variants; no behavior change for any
remaining opcode. `cargo test -p bex_vm_types` green (39 passed).

Also applied clippy's `question_mark` rewrite in the new upstream
`baml_lsp2_actions/src/tokens/index.rs` (match-on-parent -> `?`);
semantics-preserving, keeps the nightly-clippy pre-commit hook green.

This branch was previously deployed

3 inactive deployments
Preview – promptfiddle — 8faf8d4b Deployed Jul 14, 2026 by vercel[bot]
Preview – promptfiddle2 — 8faf8d4b Deployed Jul 14, 2026 by vercel[bot]
Preview – beps — 8faf8d4b Deployed Jul 14, 2026 by vercel[bot]
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