Repository navigation
attention: validate config and input lengths; catch panics at NAPI boundary (+ graph storage decode limit) - #1365
Merged
Merged
Conversation
…I boundary ruvector-attention: - MultiHeadAttention::compute checks key/value counts and lengths; add MultiHeadAttention::try_new. - FlashAttention::compute rejects block_size 0 and ragged values. - EdgeFeaturedConfig::validate / EdgeFeaturedAttention::try_new; head_dim no longer divides by zero; compute_with_edges checks node, value and edge widths. - RoPEConfig::validate / GraphRoPE::try_new / try_apply_rotary; compute checks key lengths; apply_rotary and distance_to_position no longer underflow. - compute_with_mask in every mechanism rejects a mask whose length differs from the key count. ruvector-attention-node (@ruvector/attention): - New validate module: dims, counts, allocation sizes, finite numbers and query/key/value lengths are checked before calling into Rust and rejected with a JS Error. - Every sync binding is #[napi(catch_unwind)], so a remaining panic surfaces as a JS Error instead of aborting the process. - test/input-validation.test.js covers each case (node --test). Versions: ruvector-attention 2.3.1, ruvector-attention-node 2.3.1, @ruvector/attention 2.2.3. Co-Authored-By: claude-flow <ruv@ruv.net>
…node 2.1.2 - storage: decode nodes, edges and hyperedges with a 64 MiB bincode limit so a corrupt length prefix in a database file returns an error instead of a huge allocation. - cypher parser: regression test for 5k nested parentheses and a 200k NOT chain (both return a nesting error). - @ruvector/graph-node: test/cypher-nesting.test.js checks query()/querySync() reject the same inputs; bump to 2.1.2 to ship the current parser. - ruvector-graph 2.3.4. Co-Authored-By: claude-flow <ruv@ruv.net>
Defaults to true, so tag pushes and existing dispatches behave as before. Co-Authored-By: claude-flow <ruv@ruv.net>
GitHub now rejects the macos-14 configuration ('macos-14-arm64-us-default' is
not supported), which cancels every darwin build job. macos-15 is arm64 like
macos-14, so the x86_64-apple-darwin targets keep cross-compiling as before.
Co-Authored-By: claude-flow <ruv@ruv.net>
…n is rejected) Co-Authored-By: claude-flow <ruv@ruv.net>
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.
Summary
@ruvector/attention / ruvector-attention
Error.#[napi(catch_unwind)]so a remaining Rust panic is rethrown as a JSError.MultiHeadAttention::compute,FlashAttention::compute(block size, ragged values),EdgeFeaturedAttention::compute_with_edges,GraphRoPE::compute_with_positions, and mask length checks incompute_with_mask. Adds non-breakingtry_new/validate/try_apply_rotaryhelpers.ruvector-graph / @ruvector/graph-node
query()/querySync()in the Node package).Versions
ruvector-attention2.3.1,ruvector-attention-node2.3.1,@ruvector/attention2.2.3ruvector-graph2.3.4,@ruvector/graph-node2.1.2Tests
cargo test -p ruvector-attention -p ruvector-graph(all green, new unit tests in multi_head/flash/edge_featured/rope/storage/parser)node --test crates/ruvector-attention-node/test/andnode --test npm/packages/graph-node/test/against local buildscargo +1.98.1 clippy -p ruvector-attention -p ruvector-attention-node -p ruvector-graph --all-targets --no-deps -- -D warnings,cargo fmt --all --check,cargo deny check🤖 Generated with claude-flow