connor / loot

connor/loot

Changes touching this path

  • Extract loot-codec + wasm core; de-risk the in-memory SDK boundary (#423) Slice 1 (the tracer bullet) is a multi-session build; this lands its riskiest integration — the Rust→WASM crypto/codec boundary — proven end-to-end, per the #381 "verify spikes before building" mandate. Spike result (ADR 0040): zstd-sys will not build for wasm32 (needs clang for its C), while aes-gcm/blake3/ed25519/getrandom-js do. So: - Extract `loot-codec`: a no-fs, wasm-buildable crate holding the byte format, sync-bundle codec, sealed content (AES-GCM + blake3), and the leaf types (Oid/Visibility/RepoError/ChangeNode). loot-core depends on it and re-exports every item at its original path — a pure relocation, proven by the unchanged, still-green workspace (767 tests pass). - zstd is an optional loot-codec feature (default on for the native host; off for wasm). A new zstd-free `sealed::decrypt` single-sources the AES-GCM step so native `open` and the wasm core share decrypt code; public content is inflated host-side in JS. - `loot-wasm`: wasm-bindgen exports (bundle decode, decrypt, blake3 address) over a pure native-testable `core`, plus the minimal diskless identity (generate/fromSeed/publicKey) on ed25519 directly — not loot-identity, whose OpenSSH/passphrase machinery is native-only (#383). - Golden-parity harness (loot-wasm/tests/parity.rs) runs identical assertions natively and under `wasm-pack test --node`, freezing native-computed vectors; both green. Remaining for slice 1 (next sessions): the TS package, fetch transport + client-side path-scoping, host-side zstd, and the live-relay behavior suite. Refs #423, #421. ADR 0040. 491cf780 · dbf3dbe6…
  • Slice 4 (#426): author private (sealed) content — visibility + guards Adds the authorship/sealing side of private content to the in-memory TS SDK, plus same-session read-back. Cross-session grant delivery stays deferred (#383). ECIES to wasm (single-sourced, no drift): move the key_seal composition (ECDH over X25519 + ChaCha20-Poly1305, the "loot grant key wrap 2024" KDF, ed25519→ x25519 derivation, 80-byte wire format) into the wasm-buildable loot-codec. loot-identity::key_seal now delegates to it, preserving its IdentityError surface so loot-cli/loot-net callers are untouched. loot-wasm's Identity gains x25519PublicKey / sealKeyToSelf / unsealKey. ChangeBuilder::put now seals Restricted content: the content key is ECIES-wrapped to the author (never rides in the bundle), so the relay stores only ciphertext. AuthoredChange exposes the private grants (oid → wrapped key) for the SDK's RAM keyring; read() unwraps via the wasm identity to read own content back. SDK guard model: edit(path, bytes, { visibility }) inherits the path's current visibility (new path → public); describe/push take { allowDemote, allowReveal } and a visibility change without the matching guard is refused (GuardError). list()/read() report each entry's visibility. Seams: parity.rs freezes the deterministic x25519 pubkey + a native ECIES wrapped-key vector and asserts native AND wasm unseal it (round-trip + wrong- identity refusal). private.behavior.test.ts drives sealing-stores-ciphertext, same-session read-back, keyless-reader refusal, and the guard cases. ac8b8ef5 · dbf3dbe6…diff
  • the crates.io door closes on a premise the ticket had backwards: only 3 of 13 crates refused to publish, so ADR 0045's stated position was held up by nobody having typed the command (#672) 36e46da6 · dbf3dbe6…diff
  • the no-false-absence guard 1527 landed was BYPASSABLE, and the bypass was neither of the two escape routes its doc ruled out: buoy and bisect return from main before the notice single call site, so assemble measured the frontier and threw it away unprinted, and a plain loot buoy on a shallow position exits 2 with no buoy - a REFUSAL-SHAPED false absence, which the comment four lines up calls the shape an operator most needs the line for. the repair is SHAPE rather than a third bullet: main is now a two statement wrapper and the whole former body is dispatch(), which is the only expression in main that produces an exit code, so every exit code the binary emits is that call return value and a return anywhere inside it - any depth, any verb, ahead of the table or behind it - returns INTO the notice. a new early return is not a new escape route, it is the SAME route, and because nothing is enumerated nothing has to be maintained. that matters because the old doc argued unbypassability by ENUMERATING escape routes and closing each, which reads as exhaustive, is not, and failed on the first route nobody listed - the same shape as a hand written count beside a derived number, which this run watched go stale three times. the residual is STATED rather than enumerated away: a process that never returns through main, process::exit or abort or panic, which is a property of process TERMINATION and not of the verb table, so nothing a verb does BY RETURNING can miss the notice. a census pinning exactly one raw exit was considered and refused, because that walker own consumer count is itself a derived-and-pasted census and adding a consumer churns it. the failed enumeration is kept as HISTORY, marked as the thing that failed, with the shape argument replacing it, and a THIRD site carrying the same claim was found in CONTEXT.md glossary which the ticket never named. FRONTIER_WIDTH stops being a process global read by verbs that hold the authority: both callers now ask their own workspace, and the public spelling no longer compiles from outside the module, which is the narrowing made structural rather than promised. three pins that asserted nothing are gone. the re-encoding privacy pin is DELETED because no byte seam is reachable - the transport is a TYPED seam, so the test re-encoded its own recorded id vectors and asserted the codec is linear in their length, true for every possible input - and its doc now records what it did against what it claimed, with the criterion standing on the other two pins, which carry positive controls. the partition pin is read out of the RENDERED sentence now rather than from literal triples the constructor never saw. two mutations make the case by experiment: moving the notice back to the end of dispatch reddens the new pin while log and show stay GREEN, and re-adding the old partition body under a scratch name PASSES, so vacuity is demonstrated rather than argued. an eighth pin was written and then deleted, because a mutation proved the existing assertion already sits on the live case (#1828) b5eb05df · dbf3dbe6…diff
  • the Tickets list read opens its keys in batches while the object cache is read, in slices that yield to the page, and its cache read no longer waits for the unlock or for a write: loot_codec::envelope::unwrap_envelopes checks many signatures in one batch verification and verifies each alone when the batch does not hold, loot-wasm openSealedGrants passes each grant the gates of openSealedGrant over it, and Keyring.keysFor opens the keys of the list through it 32 at a time and asks keyForSettled for the rest; the object cache read is read-only and the write after it marks what was used, the entries of the list are read as soon as the route answers, under the identity the vault record names, and the read yields every 8 ms (pace.ts). measured in headless chrome over the 2,161 list objects of this repo: key opening 283 to 295 ms before and 205 to 208 after, the longest task 362 to 379 ms before and 80 to 81 after, which is the fold call and stays one task, and the cache read 138 to 177 ms before and 38 to 48 after. the read leaves the measures tickets.unlock, tickets.engine, tickets.cache-read, tickets.keys and tickets.fold. refusal.tsx now states that loot-wasm exports no encrypt, held by a test to the generated surface, where it listed the exports. red under named mutations, each restored: keysFor without the batch (1 failed and 22 passed), without the lone asks after it (1 and 22), a pacer that never yields (1 and 1), a yield to the microtask queue (1 and 1), a cache read that marks uses (1 and 2), a mark for an entry gone (1 and 2), eviction before the marks (1 and 2), the read ahead ignored (1 and 15), read ahead under any identity (1 and 15), keys opened after the objects (1 and 15), no fold measure (1 and 15), an encrypt export (1 failed of 1), a batch that passes unchecked (0 passed and 1 failed in cargo), and openSealedGrants over unverified envelopes (0 and 1 in cargo, 1 and 22 in vitest over the rebuilt wasm). cargo test green, 4888 passed over 144 test result lines with 15 ignored, the site gate green at 958 passed, and the SDK suite 176 passed. CONTEXT.md says so. the wasm gains merlin for the batch, 16.6 KB gzip. owes a site deploy (nqrklwsv) 2bc00291 · dbf3dbe6…diff
  • a Lock drops the identity, publishes the lock and tells the other tabs before it awaits the wipe, and tells them again once the wipe settles, where it told them only after the wipe, so a wipe waiting behind another tab upgrade left them unlocked for as long; a tab older than the device database has its open refused with StaleBuild, whose sentence the unlock card shows before and on an unlock: the page must be reloaded from a current build, where a stale tab after a rolled-back deploy read the account tier as unreachable. the Tickets measures take a MEASURE const, the span from the keys to the index is named tickets.keys-to-index for what it spans where it was tickets.fold, and the address width is named once as ADDRESS_BYTES. the ClerkProvider census reads aliased and namespace imports and refuses a use that is not a tag, the workbench frame says Unlocking again once the header is in, refusal.tsx names what defines the set of sealing calls rather than two of them, CONTEXT.md no longer calls every private surface client-rendered, and loot-codec and CONTEXT.md say its batch feature compiles merlin into every build of it. red under named mutations, each restored: the broadcast only once the wipe settles (3 failed and 6 passed), the lock published only once it settles (1 and 8), no broadcast once it settles (2 and 7), the VersionError passed through (4 and 5), the span measured from the fold (1 and 20), the engine measure not left (1 and 20), the frame ignoring unlocking (1 and 9), an aliased provider without the prop (1 and 9), and the census without aliases (2 and 8). cargo test green, 4897 passed over 144 test result lines with 15 ignored, and the site gate green at 981 passed. ADR 0096 says so. owes a site deploy (qrsypwtv) 8caf1999 · dbf3dbe6…diff

Renames are not followed. loot's tree maps a path to an address, so a rename is a delete and an add. This list is the history of the name, not of the bytes.