hephaestus/crates/heph-core/Cargo.toml
Erich Blume 455f172a54
Some checks failed
Build / validate (pull_request) Failing after 4s
heph-core: body text-CRDT via yrs (sync 8d)
Replace last-writer-wins for node bodies with the yrs text CRDT, so
concurrent edits to different regions of a body merge instead of one
clobbering the other (tech-spec §5, §12).

- New crate::crdt module wraps yrs: a device authors under a stable
  client_id derived from its sync origin; a whole-buffer write is diffed
  (common prefix/suffix, char-boundary safe) into the doc and the yrs
  delta is captured; merge is commutative/idempotent.
- nodes::create/update/journal maintain the body_crdt BLOB and put the
  yrs delta in the node.create/node.set op payload (body_crdt field).
  Recurrence's local checklist reset goes through the same path to keep
  body and body_crdt consistent (still records no op, as before).
- apply::node_upsert merges the body delta through the CRDT regardless of
  HLC order and drops body-conflict recording; titles + task scalars stay
  LWW with the conflict queue.
- convergence test now asserts disjoint concurrent body edits both survive
  and enqueue no conflict.

97 tests green; clippy -D warnings + fmt + prek clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 09:06:17 -07:00

24 lines
586 B
TOML

[package]
name = "heph-core"
description = "Hephaestus core: data model, storage backend, query engine, extraction, recurrence, and sync."
edition.workspace = true
version.workspace = true
license.workspace = true
publish.workspace = true
authors.workspace = true
rust-version.workspace = true
[dependencies]
rusqlite.workspace = true
ulid.workspace = true
thiserror.workspace = true
pulldown-cmark.workspace = true
rrule.workspace = true
yrs.workspace = true
chrono.workspace = true
serde.workspace = true
serde_json.workspace = true
[dev-dependencies]
proptest = "1"
tempfile = "3"