Skip to content

feat: integrate craqle 0.3 and irokle 0.3 - #486

Merged
St4NNi merged 16 commits into
mainfrom
feat/craqle-irokle-main
Sep 24, 2026
Merged

St4NNi merged 16 commits into
mainfrom
feat/craqle-irokle-main

Conversation

@St4NNi

@St4NNi St4NNi commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Description

Integrates the Craqle 0.3.0 and Irokle 0.3.0 releases into Aruna. Irokle 0.3 changed the sync wire protocol: requests are answered in bounded pages, pushes to peers that do not hold a topic get a receipt, and one data message holds at most 256 operations. Aruna's hand-written sync client could no longer talk to peers, so document sync now uses Irokle's own paged client. Craqle 0.3 changed its search tie order, added new error kinds and a process-wide store memory budget; Aruna now follows all three.

Aruna's local SPARQL queries now run through Craqle's own query engine instead of copying every visible graph into an in-memory dataset.

Existing node databases migrate on first start. Irokle upgrades its Fjall schema 1 to schema 2 in place. Craqle rebuilds its search and query indexes in the background, and topics with version 1 replication cursors replay from their start (arunaengine/craqle#14); without that fix every node that had applied a replicated record failed to open. A store written with the current main versions (200 crates, one deleted) opens with this branch, keeps all data and the deletion, reconciles, finds every crate by search after the reindex and accepts new writes. The search reindex is bounded by disk syncs, about 60 s for 200 crates on the test disk, so search results are partial for a while after the upgrade. Upgrade all nodes together: Irokle 0.3 speaks irokle/sync/2, so older nodes cannot sync documents with upgraded ones.

This PR targets main directly; the ARC interface branch (feat/arc-interface) follows on top of it.

Changes

  • Pin irokle f3770c5 (0.3.0) and craqle 1d82db8, the craqle main merge of fix: replay topics with version 1 cursors instead of failing open craqle#14: the write latency and retention consistency fixes of fix: keep single writes fast as the store grows craqle#13 and the version 1 cursor replay. Released 0.3.0 made metadata writes about 10x slower than 0.2 as a node accumulated receipts; with the fixes, seeding 10,000 documents takes 5.4 s instead of 52 s on 0.2 and 639 s on 0.3.0.
  • Resolve spareval with matching md-5, sha1 and sha2 digest versions; cargo update -p craqle alone picks a mix that does not compile.
  • Sync document topic batches and bootstrap pulls through IrohNet::sync_topics_now, which pages requests, stages topics this node does not hold yet and applies acknowledgements. The bootstrap still checks the peer's summary for the document event type before pulling data.
  • Treat WouldBlock from Irokle as progress: Irokle has scheduled the pages left after its budget.
  • Keep the peer sync timeout around each Irokle batch sync; Irokle bounds every exchange but not the wait for one of its outbound slots.
  • Remove the hand-written summary, data and acknowledgement rounds and Aruna's second eviction forwarding path. Irokle forwards evictions to the same sink.
  • Report a full eviction journal from the per-topic sync errors.
  • Mirror Craqle's new search hit order (exact score, then a hash of graph and subject) in search paging, so page boundaries neither skip nor repeat tied hits.
  • Cut node-side candidate lists in that same order before truncation: profile-only search (empty query with conforms_to) no longer truncates by document id, and reference preflight collects every visible reference, keeps the first limit in watermark order and reads titles only for those. Otherwise a deeper fetch could reveal a hit sorting before the previous watermark and drop it for good.
  • Retry Craqle storage, cancellation, dependency and resource-limit failures instead of parking materialization jobs.
  • Release the inbound handler when the net handle shuts down. The handler owned the node context, so stopped nodes never dropped their Craqle stores; with Craqle's memory budget, test processes that start many nodes ran out of store budget.
  • Name craqle-shacl-core/0.3 as the SHACL evaluator.
  • Evaluate document-scoped queries with CraqleNode::query_in_graphs_with_options and realm-wide queries with CraqleNode::query_with_options, reusing Aruna's graph authorizers.
  • Pass Aruna's row and result byte limits and its cancellation token to Craqle; keep the SELECT/ASK and no-SERVICE validation, the missing-graph check and the final result size check.
  • Map Craqle query limits, cancellation and invalid queries to invalid input, everything else to a backend error.
  • Remove the snapshot copy, the spareval evaluation and result collection code, and the direct spareval dependency.
  • Start the CI MinIO server from the Chainguard image. The pinned quay.io image now requires authentication, so the s3-backend job failed before any test ran.
  • Advance the workspace to 3.0.0-alpha.93.

@codecov

codecov Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.84058% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.23%. Comparing base (7c6e94f) to head (3ff1426).

Files with missing lines Patch % Lines
operations/src/metadata/handle/query.rs 82.60% 8 Missing ⚠️
operations/src/metadata/handle/search.rs 20.00% 4 Missing ⚠️
net/src/document_sync/reconcile/cursor.rs 92.00% 2 Missing ⚠️
operations/src/metadata/api/preflight.rs 94.59% 2 Missing ⚠️
operations/src/metadata/handle/entity_convert.rs 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #486      +/-   ##
==========================================
+ Coverage   88.20%   88.23%   +0.02%     
==========================================
  Files         883      883              
  Lines      382184   381887     -297     
==========================================
- Hits       337119   336969     -150     
+ Misses      45065    44918     -147     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@St4NNi
St4NNi merged commit 65db182 into main Sep 24, 2026
19 checks passed
@St4NNi
St4NNi deleted the feat/craqle-irokle-main branch September 24, 2026 19:14

This branch was successfully deployed

1 active deployment
coverage — 3ff1426e Deployed Sep 24, 2026 by St4NNi via Generate Coverage Report #733
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