From 399290e07e7aa127d843a75aed79f38bebc344bd Mon Sep 17 00:00:00 2001 From: Lann Martin Date: Thu, 10 Sep 2026 20:31:48 -0400 Subject: [PATCH] Simplify unstable APIs and remove historical baggage --- Cargo.toml | 9 +- README.md | 4 +- apps/hostile/src/lib.rs | 36 +-- apps/todomvc/src/lib.rs | 98 ++----- docs/design.md | 256 +++++-------------- e2e/fake-drive.ts | 2 +- e2e/run.ts | 327 ++++++++---------------- runtime/component/src/component.rs | 15 -- runtime/crates/engine/Cargo.toml | 5 - runtime/crates/engine/src/doc.rs | 6 +- runtime/crates/engine/src/lib.rs | 38 +-- runtime/crates/engine/src/storage.rs | 19 +- runtime/crates/engine/src/us.rs | 4 +- runtime/crates/engine/src/vault.rs | 25 +- runtime/crates/engine/tests/converge.rs | 68 +---- runtime/crates/kernel/src/apps.rs | 9 +- runtime/crates/kernel/src/checkpoint.rs | 26 +- runtime/crates/kernel/src/device.rs | 26 +- runtime/crates/kernel/src/drive.rs | 7 +- runtime/crates/kernel/src/lib.rs | 20 +- runtime/crates/kernel/src/pairing.rs | 17 +- runtime/crates/kernel/src/seal.rs | 71 ++--- runtime/crates/kernel/tests/kernel.rs | 35 +-- runtime/wit/internal.wit | 12 +- visor/src/component.rs | 21 +- visor/src/kernel.rs | 5 +- visor/src/lib.rs | 6 +- visor/src/state.rs | 21 +- visor/src/ui.rs | 25 +- visor/src/voice.rs | 14 +- web/boot.ts | 7 +- web/frame.ts | 30 +-- web/mount.ts | 18 +- web/platform/no-node-datachannel.ts | 26 +- web/platform/sockets.ts | 31 +-- web/translate.ts | 7 +- web/worker.ts | 2 - wit/app.wit | 17 +- 38 files changed, 335 insertions(+), 1030 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3f67575e..7f859149 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,8 +22,7 @@ publish = false # KEK derivation behind a passphrase. Both with default features off: the # `getrandom` default would pull a second randomness source into a component # that already has one seam for it (`Rng` over `wasi:random`), and -# `password-hash` (PHC strings) is unused — the kernel stores its own -# parameter record. +# `password-hash` (PHC strings) is unused. aes-gcm = { version = "0.11", default-features = false, features = ["aes", "alloc"] } argon2 = { version = "0.6", default-features = false, features = ["alloc"] } # docs/design.md "Sync engine: subduction sans-IO": the engine drives @@ -85,19 +84,19 @@ stream-dom-guest = { git = "https://github.com/polymorph-components/polymorph-st # on `digest` 0.10, which is `sha2` 0.10's — a newer hmac would pull a second # `digest` into the graph and not accept this `Sha256` at all. hmac = { version = "0.12", default-features = false } -# The pairing code's alphabet (PAIRING.md §1): `BASE32_NOPAD_VISUAL` is the +# The pairing code's alphabet: `BASE32_NOPAD_VISUAL` is the # confusable-free base32 variant, which is what makes a 79-character code # something a person can read off one screen and type into another. # `default-features = false` + `alloc`: the `std` default buys only `Error` # impls this never surfaces. data-encoding = { version = "2.11", default-features = false, features = ["alloc"] } -# The pairing ceremony's hash (PAIRING.md §2): BLAKE3 for the nonce +# The pairing ceremony's hash: BLAKE3 for the nonce # commitment and for the SAS transcript, byte-for-byte as the contract # spells it. Not sha2 — the contract names BLAKE3 and two devices must # derive the same six digits. `default-features = false` keeps it `no_std` # and portable-Rust, so the wasm32-wasip2 build needs no C toolchain. blake3 = { version = "1.8", default-features = false } -# docs/design.md Milestones M3c: every app-tree commit blob crosses the wire +# docs/design.md "Read-back and partitions": every app-tree commit blob crosses the wire # and rests in storage as a keyhive envelope, so a relay or a store holds # ciphertext only. Pinned by full sha (unreleased, moving) at the rev the # design was written against. All three crates are pure Rust — ed25519-dalek, diff --git a/README.md b/README.md index 8794926a..1fa1e1ee 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,13 @@ confinement. | `e2e/` | Playwright scenarios | | `docs/` | `design.md`, the authority for everything above | -`docs/design.md` is the authority for rulings, contracts and milestones; +`docs/design.md` is the authority for architecture and contracts; read it before arguing with anything here. Run `just --list` for the available recipes; `just e2e` runs the Playwright suite against a local iroh relay. -**Status (M0–M4 landed):** three realms with TodoMVC; devices with two +**Implemented:** three realms with TodoMVC; devices with two tiers of rest, sealed OPFS checkpoints and a swept index; `tasks` as an automerge document synced between devices over subduction and the iroh relay; pairing by code + SAS into a device group that is the sync policy; diff --git a/apps/hostile/src/lib.rs b/apps/hostile/src/lib.rs index d35c60de..093fa819 100644 --- a/apps/hostile/src/lib.rs +++ b/apps/hostile/src/lib.rs @@ -1,30 +1,9 @@ -//! The frame-teardown fixture: an app that names a tag the policy refuses. -//! -//! docs/design.md "M1" records the gap this fills — "the frame-teardown -//! integration test waits for a hostile fixture component — M2". Every other -//! app in this repository is well-behaved, so the path from a policy -//! rejection through the receiver's stream abort, `web/frame.ts`'s error -//! report, `shell.close-frame` and `apps.abort` to a `session-ended` event in -//! the strip has never been exercised end to end. This crate is the one input -//! that exercises it. -//! -//! It is not an attack: it is a single `