fix(sona+ruvector-graph): disk-first persistence and finite-weight validation#375
Open
kiki-kanri wants to merge 3 commits intoruvnet:mainfrom
Open
fix(sona+ruvector-graph): disk-first persistence and finite-weight validation#375kiki-kanri wants to merge 3 commits intoruvnet:mainfrom
kiki-kanri wants to merge 3 commits intoruvnet:mainfrom
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.
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
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