WIP: SPEC-047 — Loro canonical store + zetld P2P sync daemon (crypto-review vehicle) #79
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "spec/047-loro-p2p"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Orientation
Intent: SPEC-047 — a persistent
zetlddaemon owning each vault's canonical CRDT state (Loro, one doc per note + a namespace manifest), with roster-gated P2P realtime sync over iroh QUIC, MLS group keys, and did:crdt member identity. Markdown on disk becomes a deterministic export of the canonical store; external edits fold back in via a guarded import that never silently discards either side.⛔ DO NOT MERGE — Tier-1 gate open. The auth-core surface (
src/p2p/: SPAKE2 pairing, MLS group, roster, revocation, transport; plussrc/daemon/p2p.rswiring) is implemented and tested but UNREVIEWED (see the module banners). Merging is gated on the human crypto review perplans/IMPL-047.spl:Also pending before merge: the DESIGN-047 cross-model review (non-Anthropic model) and spec approval (SPEC-047 is at 0.22.0-strawman, status Draft). This PR is the review vehicle, not a merge request.
What's in the branch (60 commits)
zetl daemon {start,stop,status,materialise,reimport}lifecycle (idempotent, crash-recovering, flock-serialised startup, Unix-only viacfg(unix)); Loro canonical store (crdt::loro_store, 32-hex DocIds), namespace manifest (rename-preserving, globally collision-safe resolution), guarded import driven by recorded export state (F59 — stale/ambiguous saves stage, never fold), Merkle convergence witness, deterministic materialisation with obsolete-path cleanup and symlink/dot-path hardening.CrdtBackendtrait removed (SPEC-047 §9)..zetl/p2p/endpoint.key); local-only vaults are untouched.34f4366/78badcb.from_source), restoring the client coordinate contract the engine swap broke; red-gated + live-verified. Spec: REQ-507 / ADR-483 / TEST-507a-c; report inbugs/BUG-025-….Evidence
did-crdtadb5c7a+cbcl-rs1e43e47resolve on a clean checkout), test (3356 tests / 83 suites incl. helper-js, golden-HTML, NFR gates, fmt, clippy under Rust 1.97), and thex86_64-pc-windows-gnucross-check.Crypto-review scope (Tier 1)
Start from
specs/SPEC-047-crypto-review-guide.md. The load-bearing surfaces:src/p2p/pair.rs(SPAKE2 overcap::pair),src/p2p/group.rs(openmls composition, leaf-index commit authority, seal/open),src/p2p/identity.rs+roster.rs(did:crdt binding — note upstream did-crdt delta signing is not yet wired),src/p2p/revocation.rs(outbox-before-merge ordering),src/p2p/transport.rs+src/daemon/p2p.rs(roster gate before any stream work; interim file-provisioned admit set — see the SIMPLIFY ceilings). Threat model: SPEC-047 §12; open questions Q1/Q2/Q7/Q11 in §18.Known-open (documented, non-blocking for review)
bugs/BUG-026-…— UTF-16 vs unicode-scalar splice offsets on astral chars (pre-existing, S3, deferred to the M2 WebSocket-attachment slice).// SIMPLIFY:ceilings trace to ADR-481/482.🤖 Generated with Claude Code
https://claude.ai/code/session_01Aa69Feuo9oqkimGfV6ENo1
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.