Automated flow to bump version${COMMIT_MSG} - #2
Closed
hellovai wants to merge 1 commit into
Closed
Conversation
hellovai
added a commit
that referenced
this pull request
Jan 20, 2026
Complete the BEX garbage collector by closing 5 identified gaps: - Gap #1: Parked VM roots now collected via VM pointer registry - Gap #2: VM stacks updated with forwarding pointers after GC - Gap #3: TLABs invalidated after GC space swap - Gap #6: Handle race condition fixed with EpochGuard Key changes: - Add parked_vms registry to EpochState for tracking VMs at safepoints - Collect roots from all parked VM stacks during GC - Update parked VM stacks with forwarding pointers after copying - Remove cached ObjectIndex from Handle (always resolve through table) - Add gc_in_progress flag to synchronize new calls with GC - Add EpochGuard token for compile-time epoch protection enforcement - Add heap accessor API for safe external code access (read_string, etc.) - Add GC coordination documentation to module docs
6 tasks
antoniosarosi
added a commit
that referenced
this pull request
Feb 18, 2026
…ements Orchestration: - Replace flat build_plan + execution loop with recursive execute_client / execute_client_once — RR counters now advance only at execution time, including nested RR inside fallback branches (fully fixes Codex #2) - Last retry attempt no longer applies local retry sleep (legacy parity) - Extract resolve_primitive helper to deduplicate client resolution Codex review fixes: - #3: Compile-time EmptyStrategy diagnostic for composite clients with no sub-clients (prevents runtime modulo-by-zero crash) - #4: Cross-file UnknownRetryPolicy diagnostic when a client references a retry policy that doesn't exist - #5: Synthetic error HTTP responses now store error message so text() returns error details instead of "already consumed" Parity improvements: - Finish-reason filtering enforced in parse path (sys_llm) - Raw provider finish reason preserved for allow/deny matching - Round-robin start index plumbed through HIR → emit → engine metadata - Cancellation parity TODO added All tests pass: 375 baml_tests, 17 orchestration, 13 llm_render, 79 sys_llm.
meefs
pushed a commit
to meefs/baml
that referenced
this pull request
Mar 2, 2026
…yML#3185) ## Summary Fixes three concurrency bugs in the Go CFFI callback layer that cause deadlocks and process crashes under sustained concurrent load (~100 streaming/call requests in parallel). Discovered during load testing. All changes are in `engine/language_client_go/pkg/` (Go only — no Rust changes). ## Changes ### 1. Replace random callback IDs with atomic counter (`callbacks.go`) `create_unique_id` uses `rand.Intn(1000000)` in a retry loop while holding an exclusive lock. When callback entries leak (see bug BoundaryML#2 below), the ID space fills up, the loop spins longer, and all goroutines needing `callbackMutex.RLock()` starve — full deadlock. Fix: `sync/atomic.Uint32` counter. IDs are unique by construction, no retry loop, lock acquired only after ID is chosen. ### 2. Prevent panics from concurrent callback channel operations (`callbacks.go`, `runtime.go`) `error_callback` and `trigger_callback` can race on the same callback ID — one closes the channel while the other sends. `send on closed channel` panics crash the entire plugin process and all in-flight requests. Go has no atomic check-and-send for channels (`select { case ch <- v: default: }` still panics on closed channels). Fix: `safeSend()`/`safeClose()` helpers that wrap operations with `defer`/`recover()`. Zero overhead in the non-panic path. Also makes callback channels buffered (64 for stream, 1 for object-handle) so that post-cancellation sends don't block forever, which was causing the callback entry leaks that feed bug BoundaryML#1. ### 3. Recover from panics in `on_tick_callback` (`callbacks.go`) `on_tick_callback` invokes user-provided handlers that send on application-level output channels. When the stream consumer closes its channel (context cancelled, iteration done), a concurrent tick panics. This is a different code path from BoundaryML#2 — it's the user's channel, not the internal callback channel. Fix: `defer func() { recover() }()` at the top of `on_tick_callback`. ## Testing Each fix was validated independently using a "leave one out" methodology against a 100k-request stress test (40k call + 20k stream + 40k parse, concurrency 100, mock LLM): | Fix removed | Result | |---|---| | Atomic IDs | Deadlock at ~23k requests | | safeSend/safeClose | 77% success, repeated panics | | on_tick recover | 99.9% success, 22 failures | | All fixes applied | **100% success, 1500+ req/s** | <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Replaced non-deterministic callback IDs with deterministic sequencing to improve reliability. * Introduced buffered callback channels and safer send/close handling to prevent panics, races, and deadlocks. * Added panic recovery and safer cleanup for error paths to ensure callbacks are closed reliably and reduce crashes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: hellovai <vbv@boundaryml.com>
hellovai
added a commit
that referenced
this pull request
Apr 16, 2026
Add test projects and LSP tests covering confirmed issues from PR review: - captured_field_chain: lambda capture roots (#1) and map fallback (#2) - generic_field_chain: generic type substitution (#3, deferred to separate PR) - deep_method_call: chained method call throw target (#5) - completions tests: chained field-access (#7) and lambda param (#8) - semantic token test: type-aware final segment classification (#9) Also accept lambda_advanced MIR snapshot (void→int type fix) and net.rs bytecode updates (call→dispatch_future). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ryanmazzolini
added a commit
to ryanmazzolini/baml
that referenced
this pull request
Apr 21, 2026
BamlRuntime#spawn_and_wait and FunctionResultStream#done called queue.pop with no timeout, so a hung Tokio task or a dropped future would wedge the calling Ruby thread indefinitely. Add a `timeout:` kwarg (default nil = infinite) to both paths; on expiry the pending call-id is removed and BamlError is raised. For streams the timeout is applied per chunk rather than as a total budget so long-running legitimate streams keep working as long as chunks keep arriving within the window. Implemented via stdlib Timeout rather than Queue#pop(timeout:), which is Ruby 3.2+ only (the gemspec still targets >= 3.1). Flagged in thoughts/ryan/reviews/2026-04-20-ruby-cffi-migration-review.md (High BoundaryML#2).
antoniosarosi
added a commit
that referenced
this pull request
May 4, 2026
- pull_semantics: debug_assert on the default `make_closure_with_type_args` so a sink that drops `ntypeargs` fails fast instead of silently modeling the wrong stack shape (#1). - mir/lower: `enclosing_generic_params()` now prepends class-level generics (matching TIR's `enclosing_class_generic_params ++ user` convention), so `reflect.type_of<T>()` and explicit `<T>` calls inside a method on `class Box<T>` lower to `TypeArgRef(N)` instead of silently emitting `Concrete(Void)` (#2, MIR side only — runtime ABI for class type-arg threading via the receiver is still TODO; documented on the helper). Two stdlib snapshots regenerated to reflect the now-correct lowering for `Stream<T,S>::final()` / `__sap_parse_partial<T,S>`. - tir/builder: add `Ty::Type { .. }` arm to `try_resolve_member_on_ty` so unions like `(cond ? type_of<A>() : type_of<B>()).to_string()` resolve via the `TypeValue` companion class (#4). - vm: gate the post-`Call` `type_args` writeback on `frames.len() > frames_before` so completed Native callees don't clobber the caller's frame, and `extend` rather than replace so a closure callee's `captured_type_args` are preserved with call-site args appended (#6, critical). - tests/load_type: tighten the concrete `LoadType` tests to match `Object::Type(ty)` against `Ty::int()`/`Ty::string()` and assert they differ, instead of accepting any `Value::Object(_)` (#7). - type_class / reflect_type_of: document `TypeValue.to_string()` as a stable identity key (package names are unique within a workspace, so the existing `Display` form is unambiguous) and add an end-to-end `map<string, V>` keyed-by-`type_of<T>().to_string()` test as the user-reachable analogue of `map<type, V>` (#8). - conversion: document the runtime gap that class-instance matching in `value_matches_type` and `find_matching_union_member` ignores `Ty::Class` type args because `Object::Instance` carries no resolved class type args — needed for proper union dispatch on parametric classes (#9, runtime side bundled with #2 follow-up).
hellovai
added a commit
that referenced
this pull request
May 31, 2026
Address CodeRabbit review on PR #3615: - baml_rustgen_check::walk now panics on read_dir/read errors instead of silently skipping them — a partial/unreadable source-of-truth must abort the build/regen, never hash a partial tree that could match stale output. (#1) - tools_rustgen status message: "wrote N generated file(s)" instead of the misleading "up to date" (write_all always rewrites). (#4) - Document normalize()'s known whitespace-in-string-literal limitation; the up_to_date regen test is the backstop, so a quote-aware tokenizer isn't worth the complexity. (#2) Not changed: the build.rs "sys_types/src/..." paths flagged critical are correct — assert_generated_matches_baml_std resolves via crates_dir() (CARGO_MANIFEST_DIR/..), not the build script cwd, and CI is green. (#3) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
hellovai
added a commit
that referenced
this pull request
Jun 2, 2026
Three describe cleanups from the audit: - Resolve-once (#2): `describe_top_level` now resolves the symbol's `Definition` a single time and threads it to build_shape / find_dependencies / resolve_type_for_item / class methods+fqn / builtin-signature, replacing ~5 independent `resolve_name_at` calls. Pure refactor — output is byte-identical. - Class dependencies (#1): `collect_ty_deps` matched the canonical `pkg.Name` qtn string against the flat outline's short names, so a class's user-type dependencies never resolved. It now keys on the short name and only surfaces local (user-package) types — builtin/dependency types are well-known noise. Types used only in method signatures are now collected too (e.g. `WrapperMarker` in `-> T | WrapperMarker`). - Harden method pairing (#3): the HIR-method <-> package-interface signature pairing is index-based (the interface is built 1:1 with `class.methods`); `exported_method` now verifies the name at that index so a future reordering can't silently mispair signatures — it falls back to unresolved source types instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sxlijin
added a commit
that referenced
this pull request
Jun 19, 2026
- Generic static methods: bind own TypeVars via _types= (named wire), no class args; engine slots each binding by name into the static frame (class params harmlessly unknown). Fixtures: GenericBox.new<V> + NamedStatic.make<D,E> (distinct names) prove name-keyed slotting. - Instance methods: class TypeVars recovered from the parameterized receiver, method's own via _types=. - Engine: scope the declared-generic-param completeness check to free functions (a static's display_type_params include enclosing class params it never binds; is_class_method gates it); check #2 (no unbound TypeVar in substituted sig) still covers statics. - .pyi: required keyword-only _types for generic methods (own params). - Tests: static new/make, required-ness, unparameterized-receiver negative. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sxlijin
added a commit
that referenced
this pull request
Jun 19, 2026
- Generic static methods: bind own TypeVars via _types= (named wire), no class args; engine slots each binding by name into the static frame (class params harmlessly unknown). Fixtures: GenericBox.new<V> + NamedStatic.make<D,E> (distinct names) prove name-keyed slotting. - Instance methods: class TypeVars recovered from the parameterized receiver, method's own via _types=. - Engine: scope the declared-generic-param completeness check to free functions (a static's display_type_params include enclosing class params it never binds; is_class_method gates it); check #2 (no unbound TypeVar in substituted sig) still covers statics. - .pyi: required keyword-only _types for generic methods (own params). - Tests: static new/make, required-ness, unparameterized-receiver negative. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sxlijin
added a commit
that referenced
this pull request
Jun 21, 2026
- Generic static methods: bind own TypeVars via _types= (named wire), no class args; engine slots each binding by name into the static frame (class params harmlessly unknown). Fixtures: GenericBox.new<V> + NamedStatic.make<D,E> (distinct names) prove name-keyed slotting. - Instance methods: class TypeVars recovered from the parameterized receiver, method's own via _types=. - Engine: scope the declared-generic-param completeness check to free functions (a static's display_type_params include enclosing class params it never binds; is_class_method gates it); check #2 (no unbound TypeVar in substituted sig) still covers statics. - .pyi: required keyword-only _types for generic methods (own params). - Tests: static new/make, required-ness, unparameterized-receiver negative. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.