Skip to content

fix(sona+ruvector-graph): disk-first persistence and finite-weight validation#375

Open
kiki-kanri wants to merge 3 commits intoruvnet:mainfrom
kiki-kanri:graph-sona-fixes
Open

fix(sona+ruvector-graph): disk-first persistence and finite-weight validation#375
kiki-kanri wants to merge 3 commits intoruvnet:mainfrom
kiki-kanri:graph-sona-fixes

Conversation

@kiki-kanri
Copy link
Copy Markdown
Contributor

Summary

Two reliability-focused improvements for sona and ruvector-graph:

  • sona: Add NaN/Inf validation to MicroLoRA::set_weights with transaction pattern documentation and comprehensive tests
  • ruvector-graph: Reorder edge operations (create_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 state

Changes

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_proj and up_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, 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.

Commits

  • 55853249 feat(sona): add NaN/Inf validation to MicroLoRA::set_weights
  • 55420091 refactor(ruvector-graph): reorder edge ops to disk-first for storage failure safety

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