Skip to content

feat: public batch merge and snapshot install - #10

Merged
St4NNi merged 1 commit into
mainfrom
feat/orset-merge-api
Aug 26, 2026
Merged

feat: public batch merge and snapshot install#10
St4NNi merged 1 commit into
mainfrom
feat/orset-merge-api

Conversation

@St4NNi

@St4NNi St4NNi commented Aug 26, 2026

Copy link
Copy Markdown
Member

Lets an application replicate craqle batches over its own transport and seed replicas from graph snapshots, so nodes that cannot join the irokle topics (Aruna user devices) still converge with the OR-Set semantics of the store.

Changes

  • CraqleNode::merge_batch: merges a batch authored elsewhere with the semantics of the irokle apply path (tombstone check, dot dedupe under the graph write guard, OR-Set apply in op order, diagnostics refresh, post-commit SHACL settlement that never rejects); idempotent by dot.
  • Batch::from_changes: one public builder for the op mapping; the irokle path now uses it too.
  • CraqleNode::install_graph_snapshot: state-based OR-Set join with causal context (a dot the local clock covers but the local quad lacks is a known removal), element-wise clock max, idempotent; a lagging replica's snapshot never resurrects a removed quad.
  • plan_rocrate_document_checked, plan_patch_data, plan_patch_contextual: change sets without applying, same validation as the applying variants.
  • graph_snapshot orders quads and dots deterministically and is documented as a sync mechanism; MergeResult and CrossGraphChange are public.
  • Two nightly clippy findings fixed (as_chunks in the export cursor decoder, the deprecated fetch_update allowed under the current MSRV).
  • Tests: tests/merge_api.rs (merge equality, concurrent add and remove convergence in either order, snapshot idempotence, stale snapshot ignored, planner purity).

References

  • arunaengine/aruna user-nodes and desktop arc: OR-Set metadata graphs and offline devices.

@St4NNi
St4NNi merged commit 9f1b9e4 into main Aug 26, 2026
2 checks passed
@St4NNi
St4NNi deleted the feat/orset-merge-api branch August 26, 2026 15:03
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