Skip to content

release: AIngle v0.6.0 — Semantic DAG with signing and cross-node sync#77

Merged
ApiliumDevTeam merged 9 commits intomainfrom
dev
Mar 13, 2026
Merged

release: AIngle v0.6.0 — Semantic DAG with signing and cross-node sync#77
ApiliumDevTeam merged 9 commits intomainfrom
dev

Conversation

@ApiliumDevTeam
Copy link
Contributor

Summary

Production release of AIngle v0.6.0, introducing the Semantic DAG — an append-only causal graph layered on top of the existing triple store. This release brings full traceability, time-travel queries, mandatory cryptographic signing, and cross-node synchronization.

What's included

  • Append-only DAG — Content-addressable DagAction chain (BLAKE3 hashing) with 7 payload variants, pluggable backends (memory + Sled), author/triple indexes, schema versioning, and 4 pruning policies
  • Time-travel & export — Reconstruct graph state at any point via DAG replay; export as DOT (Graphviz), Mermaid, or JSON; ancestry diff between actions
  • GraphDB integration — 18 new feature-gated public methods on GraphDB with full backward compatibility for existing insert()/delete()
  • Raft consensus path — WAL DagAction variant, state machine apply with materialized view, snapshot with dag_tips (backward-compatible)
  • Write path through Raftcreate_triple/delete_triple construct and submit DagActions when the dag feature is enabled
  • 12 REST endpoints under /api/v1/dag/ — tips, action lookup, history, chain, stats, time-travel, diff, export, prune, sync, pull, verify
  • Mandatory Ed25519 signing — Every action signed before Raft submission; unsigned non-Genesis actions rejected; key derived from P2P identity seed
  • Version bump — All 13 product crates updated to 0.6.0 with aligned internal dependency references

Stats

  • 34 files changed, ~5,300 lines added
  • New modules: aingle_graph::dag::* (action, backend, export, signing, store, sync, timetravel, tips, pruning)
  • Feature gates: dag, dag-sign, sled-backend

Test plan

  • cargo build --features dag compiles cleanly
  • cargo test --features dag passes all tests
  • Build without dag feature remains unaffected
  • REST endpoints respond correctly on a test cluster
  • Ed25519 signing works and unsigned actions are rejected
  • Time-travel reconstruction and DOT/Mermaid export verified
  • Pull-based sync between two nodes validated
  • Version numbers confirm 0.6.0 across all product crates

…ith indexes

Core Semantic DAG types: DagAction, DagActionHash (BLAKE3), DagPayload
(7 variants), DagTipSet, DagStore with pluggable backends.

- Content-addressable hashing: blake3(parents || author || seq || ts || payload)
- DagBackend trait with MemoryDagBackend and SledDagBackend implementations
- Author index, affected-triple index, tip persistence
- Schema versioning with forward-compat rejection
- Rebuild indexes from backend on restart
- Pruning with 4 retention policies (KeepAll/KeepSince/KeepLast/KeepDepth)
- Topological sort via Kahn's algorithm
- Feature gates: dag, dag-sign, sled-backend
…nc protocol

- Time-travel: replay DagPayload onto ephemeral GraphDB to reconstruct
  state at any point in DAG history; DagDiff for ancestry comparison
- Export: DagGraph portable structure with DOT (Graphviz), Mermaid, and
  JSON renderers with color-coded node types
- Signing: Ed25519 via ed25519-dalek; sign/verify action hashes;
  DagSigningKey/DagVerifyingKey with hex serialization (dag-sign feature)
- Sync: pull-based protocol — SyncRequest/SyncResponse with
  compute_missing and ingest (no tip mutation)
GraphDB gains optional DagStore field (feature-gated). Existing insert()
and delete() are unchanged — full backward compatibility.

New constructors: memory_with_dag(), sled_with_dag()
New methods: enable_dag(), enable_dag_persistent(), insert_via_dag(),
delete_via_dag(), dag_tips(), dag_action(), dag_history(), dag_chain(),
dag_prune(), dag_at(), dag_at_timestamp(), dag_sign(), dag_verify(),
dag_export(), dag_ingest(), dag_compute_missing(), dag_diff()
…AG tips

- WalEntryKind::DagAction { action_bytes } — serialized bytes to avoid
  circular deps with aingle_graph
- State machine apply_dag_action(): deserialize → DagStore.put() →
  apply payload to materialized view (exhaustive match on all variants)
- ClusterSnapshot gains dag_tips with #[serde(default)] for backward compat
- Snapshot builder reads DAG tips; restore rebuilds tip set
- create_triple and delete_triple construct DagActions when dag feature
  is enabled: determine tips → build action → serialize to WAL → Raft
- AppState gains dag_author (NodeId) and dag_seq_counter (AtomicU64)
- Startup: enable persistent DAG (Sled) or fallback to in-memory;
  create genesis action if DAG is empty; set author from cluster node ID
- Feature gates: dag = ["cluster", "aingle_graph/dag", "aingle_raft/dag"]
12 new endpoints under /api/v1/dag/:
  GET  tips, action/:hash, history, chain, stats, at/:hash, diff, export
  POST prune, sync, sync/pull
  GET  verify/:hash (dag-sign feature)

Includes DOT/Mermaid/JSON export with content-type negotiation,
pull-based cross-node sync, and time-travel state reconstruction.
Every DagAction is now signed with the node's Ed25519 key before Raft
submission. The state machine rejects unsigned actions (Genesis exempt).

- Merge dag-sign into dag feature (signing always enabled with DAG)
- AppState gains dag_signing_key (Arc<DagSigningKey>) loaded from node.key
- Signing key initialized from existing P2P identity seed or generated
- create_triple/delete_triple sign actions before Raft write
- State machine rejects unsigned non-Genesis actions with clear error
- Verify endpoint available at GET /api/v1/dag/verify/:hash
- Transparent to all exposed APIs — no request/response changes
Update version fields and internal dependency references across
all 13 product crates to align with the v0.6.0 release.
feat: Semantic DAG v0.6.0 — append-only causal graph with signing and sync
@ApiliumDevTeam ApiliumDevTeam merged commit c7d9468 into main Mar 13, 2026
21 of 22 checks passed
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