Repository navigation
Tags
Tags
Split out effect config (#381) * subduction_core: hand-write Debug for IoError and ListenError `#[derive(Debug)]` bounds every type parameter, so both errors demanded `Debug` on `Async`, `Store`, `Conn`, and `WireMsg`, though they only hold those types' error values, which are already `Debug`. That leaked a spurious `Store: Debug` bound into `SyncHandler`'s `Handler` impl and everything generic over it. The manual impls need no bounds and print the same output. * subduction_core: bundle node effects into one effects type `Subduction` took a type parameter per side effect (storage, policy, signer, timer, spawner), and `SyncHandler` repeated most of them. Every node and handler type was long, the two could drift apart, and each new effect would have added a parameter everywhere. Replace them with one effects type `E`, named through a capability trait per effect in the new `effects` module: - `HasStorage`, `HasStoragePolicy`, `HasConnectionPolicy`, `HasSigner`, `HasSpawner`, and `HasTimer` name each component as an associated type. Storage and policy errors are associated types too, so callers write `E::StorageError` instead of a projection. - `Effects<Async>` is all of them (blanket-implemented). `SendableEffects` and `LocalEffects` add the per-form thread-safety bounds, so generic code states one bound instead of one per slot. - `effects::config::Config<Store, Policy, Sign, Timer, Sp>` is the stock phantom implementation. `Subduction::new` and the builder infer it; `Subduction::with_effects` takes a custom effects type. Each consumer bounds `E` only by what it uses: `SyncHandler` needs storage, storage policy, and spawner, and no longer takes a signer or timer. Along the way: - Split `StorageTasks` out of `NodeTasks`, so building a powerbox needs only storage and policy. - Drop `ListenerFuture`'s phantom component parameters. - Drop the `Send + Sync` timer requirement on `Local`. - Require `ConnectionDisallowed: Send` on `Sendable` nodes, so spawned `add_connection` calls are `Send`. - Migrate all workspace call sites to local `Config` aliases (`CliEffects`, `WasmEffects`, `Cfg`), and describe the design in `HACKING.md`. Breaking: `Subduction`, `SyncHandler`, `ListenerFuture`, and `NodeTasks` change their generic parameters, `SyncHandler`'s `Metric` has no default, and `NodeTasks::storage_powerbox` moves to `StorageTasks`.
Bump hickory, rustix, tokio and quinn-udp for RustSec advisories (#396) `cargo audit` fails on the current lockfile. Each bump is a patch release within the existing semver range, so no manifest changes: - hickory-net, hickory-proto, hickory-resolver 0.26.1 -> 0.26.3 - quinn-udp 0.5.15 -> 0.5.16 (RUSTSEC-2026-0538) - rustix 1.1.4 -> 1.1.6 - tokio 1.53.1 -> 1.53.3
subduction_core: don't forward requests to peers who are denied access Problem: in Subduction::load_and_watch when we request sync for a document we don't take account of whether the peer we are requesting the document from has access to the document. This has the effect of announcing document IDs we care about to peers who are denied access. Solution: use `StoragePolicy::authorize_fetch` to check whether a peer has access to a document before requesting it from them.
subduction_tokio: expose load-and-watch streams on node handles Add the admission-checked load_and_watch adapter and reuse the core stream, coordination, and task registry. Local replay and writes work offline; ongoing loading follows current/future connections and reconnects even for cached data. There is no storage-only method or boolean mode in the erased core adapter. Document recovery, cancellation, and lifecycle admission. Exercise local replay, independent stream cancellation, shutdown termination, and closed admission.
PreviousNext