Repository navigation
fix(sona+ruvector-graph): disk-first persistence and finite-weight validation - #375
kiki-kanri wants to merge 3 commits into
Conversation
…failure safety Reorder create_edge, delete_edge, and delete_edges_batch to persist to storage BEFORE updating in-memory edges and indexes. On storage failure, memory and indexes remain coherent — caller receives an Err without partial mutations.
Validate weights are finite before mutation to prevent loading corrupted weights into internal state. Add transaction pattern docs explaining the validation-then-commit approach. Includes tests for NaN/Inf detection in both down_proj and up_proj, plus test ensuring original state is preserved on validation failure.
|
Status check (2026-11-09), thanks @kiki-kanri. Neither half is on main yet: |
|
Thanks @kiki-kanri. Now that #1435 has merged, this is rebased as #1472 and credited to you via Co-Authored-By. Your |
|
Landed in #1472 (merge 25acde1, on main), credited to you via Co-Authored-By: |
|
ok thanks! |
…edge deletes Port of ruvnet#375 onto main after ruvnet#1435. ruvector-sona: `MicroLoRA::set_weights` now rejects NaN/Inf in either projection before mutating state, so loading corrupt weights from disk or another system cannot poison the adapter. Adds tests for NaN/Inf in each projection and for state preservation on a failed load; the new doc example imports `ruvector_sona::MicroLoRA` so it compiles as a doctest. ruvector-graph: `delete_edge` and `delete_edges_batch` persisted the deletion after removing the edge from memory and indexes, so a storage error left memory and disk disagreeing. Both now persist first and only then mutate memory and indexes. `delete_edge` holds the DashMap entry across the storage call, matching how ruvnet#1435 made `create_edge` disk-first; the batch path drops exactly the removed values from the indexes. ruvnet#375's `create_edge` hunk is dropped because ruvnet#1435 already landed the same ordering. Adds a test that single and batch deletes (with missing and repeated IDs) leave no type or adjacency membership behind. Co-Authored-By: kiki-kanri <a470666@gmail.com> Co-Authored-By: claude-flow <ruv@ruv.net>
Ships ruvnet#1472 (from ruvnet#375): MicroLoRA::set_weights rejects NaN/Inf; GraphDB edge deletes are disk-first. ruvector-graph: add homepage https://ruv.io, docs.rs link, 5 keywords (the crates.io limit) and categories. README install snippets said 0.1.1; now "2.3". The quickstart used `Graph`/`GraphConfig` and struct-literal nodes, none of which exist; rewritten against GraphDB/NodeBuilder/EdgeBuilder and run against this tree. `cargo publish --dry-run` passes; packaged file list matches 2.3.4. ruvector-sona: version only (metadata and quickstart were updated in 0.2.4). CHANGELOG entry for both. Co-Authored-By: claude-flow <ruv@ruv.net>
Summary
Two reliability-focused improvements for
sonaandruvector-graph:MicroLoRA::set_weightswith transaction pattern documentation and comprehensive testscreate_edge,delete_edge,delete_edges_batch) to persist to storage BEFORE updating in-memory state, ensuring storage failures cannot leave the graph in a partially mutated stateChanges
feat(sona): add NaN/Inf validation to MicroLoRA::set_weights
Validate weights are finite before mutation to prevent loading corrupted weights into internal state. Add transaction pattern docs explaining the validation-then-commit approach. Includes tests for NaN/Inf detection in both
down_projandup_proj, plus test ensuring original state is preserved on validation failure.refactor(ruvector-graph): reorder edge ops to disk-first for storage failure safety
Reorder
create_edge,delete_edge, anddelete_edges_batchto persist to storage BEFORE updating in-memory edges and indexes. On storage failure, memory and indexes remain coherent — caller receives anErrwithout partial mutations.Commits
55853249feat(sona): add NaN/Inf validation to MicroLoRA::set_weights55420091refactor(ruvector-graph): reorder edge ops to disk-first for storage failure safety