lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

commit ac54364e484fb565e65e58581ec9bb2bb750e680
parent 2e3542ef92467fcf11ea5abc825491ab747ab64f
Author: triesap <tyson@radroots.org>
Date:   Mon,  3 Aug 2026 07:46:18 +0000

sync: align package manifest and module root

- Pin the final seven Radroots dependency edges with no adapter dependency.
- Add the exact additive serde feature and publication-frozen package identity.
- Establish the six approved executor-neutral orchestration modules.
- Guard package identity, feature, dependency, and module boundaries.

Diffstat:
MCargo.lock | 1+
Mcrates/sync/Cargo.toml | 14++++++++++++++
Mcrates/sync/README.md | 10+++++++---
Acrates/sync/src/ingest.rs | 1+
Mcrates/sync/src/lib.rs | 9++++++++-
Acrates/sync/src/policy.rs | 1+
Acrates/sync/src/projection.rs | 1+
Acrates/sync/src/pull.rs | 1+
Acrates/sync/src/push.rs | 1+
Acrates/sync/src/status.rs | 1+
Mcrates/sync/tests/package_boundary.rs | 30+++++++++++++++++++++++++++++-
11 files changed, 65 insertions(+), 5 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock @@ -5162,6 +5162,7 @@ dependencies = [ "radroots_storage", "radroots_trade", "radroots_transport", + "serde", ] [[package]] diff --git a/crates/sync/Cargo.toml b/crates/sync/Cargo.toml @@ -14,6 +14,19 @@ publish = false [lib] name = "radroots_sync" +[features] +default = ["serde"] +serde = [ + "dep:serde", + "radroots_event/serde", + "radroots_event_codec/serde", + "radroots_protocol/serde", + "radroots_signing/serde", + "radroots_storage/serde", + "radroots_trade/serde", + "radroots_transport/serde", +] + [dependencies] radroots_event = { workspace = true, default-features = false } radroots_event_codec = { workspace = true, default-features = false } @@ -22,6 +35,7 @@ radroots_signing = { workspace = true, default-features = false } radroots_storage = { workspace = true, default-features = false } radroots_trade = { workspace = true, default-features = false } radroots_transport = { workspace = true, default-features = false } +serde = { workspace = true, optional = true } [lints] workspace = true diff --git a/crates/sync/README.md b/crates/sync/README.md @@ -1,6 +1,10 @@ # radroots_sync -Synchronization orchestration for Radroots. +Executor-neutral local-first synchronization orchestration for Radroots. -This package root is established for the Release V1 refactor. Sync planning, -execution, and reporting are migrated in the subsequent sync checkpoints. +The package owns the shared ingest, pull, projection, push, policy, and status +boundaries. It does not create an executor, spawn workers, install timers, own +process lifecycle, store UI state, or branch on concrete transport adapters. + +Publication remains disabled while behavior is implemented and qualified in +the subsequent Release V1 sync checkpoints. diff --git a/crates/sync/src/ingest.rs b/crates/sync/src/ingest.rs @@ -0,0 +1 @@ +//! Canonical event verification and admission orchestration. diff --git a/crates/sync/src/lib.rs b/crates/sync/src/lib.rs @@ -1 +1,8 @@ -//! Synchronization orchestration for Radroots. +//! Executor-neutral local-first synchronization orchestration. + +pub mod ingest; +pub mod policy; +pub mod projection; +pub mod pull; +pub mod push; +pub mod status; diff --git a/crates/sync/src/policy.rs b/crates/sync/src/policy.rs @@ -0,0 +1 @@ +//! Explicit clocks, identifiers, deadlines, and retry decisions. diff --git a/crates/sync/src/projection.rs b/crates/sync/src/projection.rs @@ -0,0 +1 @@ +//! Projection refresh and rebuild orchestration. diff --git a/crates/sync/src/pull.rs b/crates/sync/src/pull.rs @@ -0,0 +1 @@ +//! Bounded source pagination and ingestion. diff --git a/crates/sync/src/push.rs b/crates/sync/src/push.rs @@ -0,0 +1 @@ +//! Signing, durable enqueue, delivery, and satisfaction orchestration. diff --git a/crates/sync/src/status.rs b/crates/sync/src/status.rs @@ -0,0 +1 @@ +//! Passive synchronization status aggregation. diff --git a/crates/sync/tests/package_boundary.rs b/crates/sync/tests/package_boundary.rs @@ -5,8 +5,23 @@ const ROOT: &str = include_str!("../src/lib.rs"); #[test] fn sync_depends_only_on_final_orchestration_boundaries() { + for required in [ + "name = \"radroots_sync\"", + "version = \"0.1.0-alpha\"", + "publish = false", + "[lib]\nname = \"radroots_sync\"", + "default = [\"serde\"]", + ] { + assert!( + MANIFEST.contains(required), + "manifest is missing `{required}`" + ); + } assert_eq!( - dependency_keys(MANIFEST), + dependency_keys(MANIFEST) + .into_iter() + .filter(|dependency| dependency.starts_with("radroots_")) + .collect::<BTreeSet<_>>(), BTreeSet::from([ "radroots_event", "radroots_event_codec", @@ -17,6 +32,7 @@ fn sync_depends_only_on_final_orchestration_boundaries() { "radroots_transport", ]) ); + assert!(MANIFEST.contains("serde = { workspace = true, optional = true }")); for forbidden in [ "radroots_event_store", "radroots_event_index", @@ -27,6 +43,18 @@ fn sync_depends_only_on_final_orchestration_boundaries() { assert!(!MANIFEST.contains(forbidden)); assert!(!ROOT.contains(forbidden)); } + assert_eq!( + declarations(ROOT, "pub mod "), + BTreeSet::from(["ingest", "policy", "projection", "pull", "push", "status"]) + ); +} + +fn declarations<'a>(source: &'a str, prefix: &str) -> BTreeSet<&'a str> { + source + .lines() + .filter_map(|line| line.trim().strip_prefix(prefix)) + .filter_map(|name| name.strip_suffix(';')) + .collect() } fn dependency_keys(manifest: &str) -> BTreeSet<&str> {