Change Ledger
One row per change, not per commit. The pusher declares which versions are live; this walks their ancestry, newest first, and bands each change by what this server can actually read. Nothing here is merged, rewritten, or picked for you.
1 declared head · 2209 changes walked
- AI skill: diagnose-visibility — why a path isn't visible (#403)nothing readable · 1 sealed · by lock: 1 internal
- AI skill: ticket-to-lane — claim ritual automation (#402)nothing readable · 1 sealed · by lock: 1 internal
- AI skill: diagnose-divergent — explain the ! marker and resolve it (#407) Also narrow .lootignore's bare `.claude/` rule to `.claude/worktrees/` (matching .gitignore) so `.claude/skills/` is tracked by loot — prerequisite for the whole AI-skills wave (#402-#407); the bare rule silently hid every skill file.nothing readable · 2 sealed · by lock: 2 internal
- loot bisect: binary-search history to find a regression (#390) (conflict resolution: crates/loot-cli/src/workspace.rs)nothing readable · 1 sealed · by lock: 1 internal
- loot bisect: binary-search history to find a regression (#390) (conflict resolution: crates/loot-cli/src/main.rs)nothing readable · 1 sealed · by lock: 1 internal
- loot bisect: binary-search history to find a regression (#390) (conflict resolution: crates/loot-cli/src/lib.rs)nothing readable · 1 sealed · by lock: 1 internal
- adopt: catch up to landed main 873af425merge · 2 parents
No path recorded as touched by this change.
- loot grep: content search across history via the key oracle (#391) (conflict resolution: crates/loot-cli/src/main.rs)nothing readable · 1 sealed · by lock: 1 internal
- loot bisect: binary-search history to find a regression (#390)nothing readable · 6 sealed · by lock: 6 internal
- adopt: catch up to landed main e0eb02e0merge · 2 parents
No path recorded as touched by this change.
- SDK: inject transport/runner seams + map binary error codes (#432, #433, #434) Three architecture-review deepenings that make the two LootRepo adapters' decision logic testable without a live relay or the real binary, and replace stderr regex-scraping with the binary's coded error channel. #432 — RelayTransport seam. A narrow dumb-pipe (`post`) + default HttpRelayTransport, injected via `connectRelay(url, id, { transport })`. All interpretation stays adapter-side: response classification (401→AuthError+pubkey, non-2xx/connection-fail→TransportError) is a pure helper, and the push visibility-resolution + GuardError enforcement is extracted to a pure `resolvePushVisibilities`. New relay.unit.test.ts proves error classification, path-scoping, decode, and compose/guard against a fake transport — the WASM core exposes no bundle encoder, so decode/path-scoping replay golden `/fetch` bytes captured from a real relay (test/fixtures, regenerate with gen-relay-fixtures.mjs after a format bump). Relay integration trimmed to the read + write round-trip smokes (read.behavior/write.behavior); push-errors.behavior deleted. #433 — LootRunner seam. `run` (buffered, never throws on non-zero) + `spawn` (streaming) + default SubprocessRunner, injected via `openRepo(path, { runner })`. Physical error-mapping, arg composition, and pull streaming are unit-tested against a fake runner (physical.unit.test.ts); physical integration trimmed to the read + write round-trip smoke. #434 — map binary error codes → LootErrorCode. physical.ts reads `error.code` from the binary's `{"error":{"code","message"}}` under --json and maps it in one place (demotion/mis_seal/seal_wip→guard; unsupported_format/no_repo/unknown_flag →setup; not_found→not-found; else generic); all stderr prose regexes dropped. `run`/`pull` append --json, so the CLI's `new`/`describe` verbs now accept --json (not --porcelain — no consumer) to emit coded failures. loot's engine has no conflict-family slug (it accumulates forks rather than rejecting), so conflict stays deferred/generic — ConflictError remains exported for when a slug lands.nothing readable · 12 sealed · by lock: 12 internal
- CLI: thread typed engine errors through Workspace so slugs travel (#430 follow-up) #430 laid the CliError plumbing but the taxonomy stayed inert on live verb paths: workspace.rs methods returned Result<_, String>, stringifying RepoError before the verb's `?`, so every engine variant collapsed to code "error" at the --json boundary. Convert that boundary: impl Workspace / Snapshotted / lanes methods return Result<_, CliError>; engine (self.repo.*) sites use .map_err(CliError::from) so code() is preserved; the MisSeal/SealWip guards propagate the typed RepoError instead of .to_string(). Non-RepoError sources (io, format!, bare strings) stay code "error", messages byte-for-byte intact. Workspace::open/init stay Result<_, String> (open_repo() stamps the CLI-level no_repo slug), keeping the loot-first ripple to two boundary conversions. New emit_snapshot test proves a real RepoError::UnsupportedFormat reaches --json stderr as {"code":"unsupported_format"} on `loot apply <garbage>`, with the non-json `loot: <message>` line unchanged. Also: share loot_core::verdict::json_string (drop error.rs's byte-identical twin) and collapse the emit_snapshot run_with_code/run_stderr_with_code helpers into one run_streams. Known residual: the ferry.rs bridge path still flattens engine errors to "error" (deliberate scope boundary — git2 errors ride its String contract). cargo test --workspace green.nothing readable · 8 sealed · by lock: 8 internal
- loot blame: line-level authorship annotation (#389)nothing readable · 3 sealed · by lock: 3 internal
- loot grep: content search across history via the key oracle (#391) (conflict resolution: crates/loot-cli/src/main.rs)nothing readable · 1 sealed · by lock: 1 internal
- loot grep: content search across history via the key oracle (#391) (conflict resolution: crates/loot-cli/src/lib.rs)nothing readable · 1 sealed · by lock: 1 internal
- SDK: restore OverlayEntry as a discriminated union (#429 follow-up) The #429 extraction flattened repo.ts's tight put|remove union into a single shape with optional payload, which regressed the fold site to a non-null assertion (builder.put(path, pending.payload!, …)). Make OverlayEntry<P> a discriminated union again so the push loop narrows on kind and reads payload without the `!`. Pure type change; tsc clean, 45 SDK tests green.nothing readable · 2 sealed · by lock: 2 internal
- CLI: machine error channel — coded CliError + RepoError::code() under --json (#430) Give the binary a machine error channel so its error taxonomy travels as data instead of the SDK regex-matching stderr prose. RepoError::code() (in loot-codec) maps each of the 10 variants to a stable slug and is the source of truth. A new CliError { code, message } (loot-cli/src/error.rs) carries it: From<RepoError> (code from the variant), From<String>/&str (code "error"), and to_json() emitting {"contract":N,"error":{"code","message"}}. Verbs now return Result<_, CliError>; the dispatcher's fail() emits the JSON error object to stderr under --json and the byte-for-byte-unchanged `loot: <message>` otherwise. CLI-level failures carry codes: no_repo (open_repo) and unknown_flag (the flag gate). Scope note: Workspace already stringifies RepoError internally (its methods return Result<_, String>), so no live verb path yet propagates a typed RepoError to the dispatcher — engine failures emit code "error" (message intact) while no_repo and unknown_flag flow as real codes. From<RepoError> is in place and unit-tested; threading typed engine errors through Workspace is a larger follow-up. cargo test --workspace green.nothing readable · 5 sealed · by lock: 5 internal
- loot grep: content search across history via the key oracle (#391)nothing readable · 5 sealed · by lock: 5 internal
- SDK: extract deep WorkingOverlay both LootRepo backends compose (#429) Both LootRepo adapters shared only the interface — the capture-first pending-change behaviour (Pending type, overlay/message/guard fields, the added/modified/removed ternary, the two push preconditions, the guard union) was copied into RelayRepo and PhysicalRepo. Extract it once into a pure, synchronous WorkingOverlay<P>: RelayRepo composes WorkingOverlay<Uint8Array>, PhysicalRepo composes WorkingOverlay<string> (abs path). status/diff become one-liners over classify + message; push walks entries() to compose its own change. Relay's client-side visibility resolution + GuardError enforcement and the private keyring stay in the relay adapter. classify(committed) is pure and unit-tested with hand-built inputs (13 tests, no relay, no binary). CONTEXT.md gains the SDK-tier Working overlay entry linking [[Working change]]. SDK suite 45 green (32 pre-existing + 13 new).nothing readable · 5 sealed · by lock: 5 internal
- loot-net: hint a relay redeploy when a format-version rejection means the relay is behind (#431)nothing readable · 2 sealed · by lock: 2 internal
- Slice 6 review fixes: stream pull, distinct setup error, clean empties (#428) Addresses the code-review findings on 4ca54a2: - pull() now STREAMS the child's stdout via spawn (was buffered via execFile then yielded once) — satisfies the read/pull streaming AC. - Missing/incompatible binary gets its own SetupError (code "setup"), distinct from generic failures and the deferred-private path; an old binary lacking `surface --json` / reading an older format maps to it too. - allowReveal is rejected with a clear error rather than silently dropped (physical slice 6 authors public content; reveal isn't mappable); guard mapping centralized in guardArgs. - Empty-repo machine output no longer string-matches the "nothing to surface" error: new Workspace::surface_tree() returns None on a headless repo, so cmd_surface emits an empty tree cleanly (no prose-scraping). - read()'s ENOENT→NotFound handling deduped into a shared streamFile helper (was repeated in the collector and the iterator). Acknowledged, kept (documented in code): the client-side overlay/baseline for status kinds (loot has no kinded-delta machine output, so capture-first can't "map directly" for status); read streams the materialized file rather than a `loot` stdout (no cat verb); the faithful status/overlay mirror of RelayRepo. Green: loot-cli 243, 32 SDK tests, tsc clean. Refs #428.nothing readable · 5 sealed · by lock: 5 internal
- TS SDK slice 6: physical mode openRepo over the shared LootRepo interface (#428) The second backend: openRepo(path) drives an on-disk .loot/ checkout by shelling out to the installed loot binary, returning the IDENTICAL LootRepo the in-memory mode defines — so calling code is backend-agnostic. The binary owns all crypto/codec; physical mode adds none (no WASM). - CLI (sanctioned tiny machine-output addition, #428): `loot surface --porcelain`/`--json` emit the current readable tree as path+visibility (loot-core `verdict::surface_{porcelain,json}`), so `list()` never scrapes human text. An empty repo is an empty tree, not an error. - sdk/src/physical.ts: openRepo → PhysicalRepo via child_process. list() parses `surface --json`; read() streams the materialized file (a real byte stream) → NotFound on ENOENT; edit/remove write the working copy (capture-first) and record a client-side overlay so status/diff report kinds (added/modified/removed) against a committed baseline captured at open + refreshed on push — loot folds a described change into the current tree, so surface alone can't tell add from modify. describe/push shell out (`describe -m`, `new`); guards map to --allow-demote. Errors map to the shared taxonomy (missing binary → setup error; parent-moved → ConflictError; non-repo → NotFoundError). - Seam: `runReadContract` extracted to sdk/test/read-contract.ts and now runs VERBATIM against BOTH backends (connectRelay and openRepo) — the proof they are interchangeable behind one interface. physical.behavior.test.ts adds a write round-trip + error surface. 32 SDK tests; loot-core/loot-cli green. Deferred (documented): physical private-visibility authoring (a .lootattributes rule) and pull-with-remote behavior — public content covers the AC and the in-memory backend covers private. Refs #428, #422.nothing readable · 7 sealed · by lock: 7 internal
- 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.nothing readable · 12 sealed · by lock: 12 internal
- @ TS SDK slice 5: streaming pull of new changes (#427) Add `pull(): AsyncIterable<Uint8Array>` to `RelayRepo`: POST the sessionsnothing readable · 4 sealed · by lock: 4 internal
- SDK slice 3 (#425): typed error model on the write path Map relay/loot failures to typed LootError subclasses so callers branch on `code` instead of string-matching: - push(): a 401 from /stow (loot-net handle_stow -> unwrap_envelope maps a non-allow-listed key to BadSignature/UNAUTHORIZED) now throws AuthError (code "unauthorized") carrying the offending signing pubkey. The SDK signs every envelope in WASM, so a 401 means the key isn't enrolled. No pre-check, auto-enroll, or downgrade (#383) -- attempt and report. Other non-2xx and fetch failures stay TransportError. - Add ConflictError (code "conflict") to errors.ts and export it. It is NOT thrown: /stow is append-only and accepts concurrent forks without rejecting a moved parent (loot-core stow_accumulates_concurrent_forks_without_conflict), and capture-first push re-snapshots heads at push time so it never builds on a stale parent. Clean detection needs an optimistic-concurrency model slice 2's overlay doesn't carry -- deferred, documented, not faked. - AuthError gains an optional `pubkey` (hex) for the allow-list case. Seam 1: push-errors.behavior.test.ts drives a real relay seeded with a foreign key -> AuthError(unauthorized) with pubkey; an unreachable relay -> TransportError. tsc clean; vitest 12/12 (2 new + 10 existing).nothing readable · 4 sealed · by lock: 4 internal
- Slice 2 review fixes: dedup envelope framing, rename, precondition errors (#424) Addresses the code-review findings on 8e70ef8: - loot-wasm: extract `envelope_bytes` — the `/stow` framing is now written once and shared by `Identity::wrap_envelope` and `ChangeBuilder::finish` (was duplicated). Parity vectors unchanged (byte-identical), confirming the dedup is behavior-preserving. - Rename `set_parent`/`setParent` -> `add_parent`/`addParent`: it appends (push loops over merge heads), so "add" matches the accumulate semantics. - sdk push() preconditions (no describe / nothing pending) now throw a plain Error, not `LootError("conflict", …)` — "conflict" means a real same-path bounce, not a caller usage bug. - Seam 1: assert the landed change carries its describe message on the wire (AC#5's "the message is visible"), since the v1 surface has no `log` verb. - Honest comment on carry's visibility collapse (public-only in slice 2; grant-id preservation is slice 4). Green: native + `wasm-pack test --node` parity; 10 SDK tests. Refs #424.nothing readable · 4 sealed · by lock: 4 internal
- TS SDK slice 2: author & push a signed public change (#424) The write half of the in-memory loop: a pre-registered key edits files and pushes a signed full-tree change to the relay, read back to confirm. All composition (change-id fold, dual signatures, bundle encode, /stow envelope) stays in Rust/WASM (#381); TS owns only the capture-first overlay. Prefactor: - Move the change-id fold into loot-codec (change_id module: compute_change_id_raw / change_signing_message / mint_change_id / canonical_predecessors); loot-core's compute_change_id(&Change) delegates. Behavior-preserving (loot-core 296 tests unchanged). - loot-codec: seal_uncompressed (the wasm author path can't run zstd). - loot-identity: public Identity::from_seed(&[u8;32]) (the flagged #383/#424 ctor, native side). loot-wasm: - Identity.sign + wrapEnvelope ([0x01][pubkey][sig][bundle], sig over bundle). - ChangeBuilder: carry(unchanged) / put(edited, seals uncompressed public) / finish() -> {envelope, changeId, versionId} — folds, signs the finalize message, encodes the Sync frame, wraps the envelope, all in Rust. - Golden parity (Seam 2) extended: frozen pubkey, signature, envelope bytes, and change-id fold — green natively and under wasm-pack test --node. sdk/: - Capture-first overlay: edit/remove mutate an in-RAM overlay that IS the pending change; describe names it; status/diff report it; push composes via ChangeBuilder (carry unchanged paths, put edited, skip removed) and POSTs the envelope to /stow, returning the durable change-id. - Seam 1: a write behavior suite drives a real relay whose allow-list holds the SDK key; the SDK authors the first change and reads it back through a fresh connection (4 tests). Full SDK suite: 9 green. Slice 2 authors PUBLIC content stored UNCOMPRESSED (valid + readable; zstd's C won't build for wasm, and fzstd is decompress-only). Deferred: unauthorized error mapping (slice 3), private/grant writes (slice 4). Refs #424, #421.nothing readable · 11 sealed · by lock: 11 internal
- Exclude sdk/ npm deps + generated wasm from loot capture (#423) The .lootignore already excluded site/node_modules; the new sdk/ package needs the same, or `loot` captures sdk/node_modules (1000+ files) and sdk/wasm/ (wasm-pack output) into the working change — which a ferry then tries to sign into history.nothing readable · 1 sealed · by lock: 1 internal
- Slice 1 review fixes: prove path-scoping, reusable suite, SDK docs (#423) Addresses the code-review findings on de6e281: - Add sdk/README.md — states plainly that loot hides CONTENT, not path names or tree shape ("don't put secrets in path names"), documents usage and the build:wasm step. Closes the missing-docs AC. - Make path-scoping observable: the behavior suite now seeds TWO public files and asserts at the wire level that a scoped /fetch returns the requested object's bytes but NOT the sibling's — while the sibling's address is still visible (structure is public, content is scoped). - Make the read suite backend-parameterized: assertions live in runReadContract(makeRepo) so #422's physical openRepo reuses them verbatim. - Honest streaming: ReadStream now documents that a sealed object is one AES-GCM unit yielded as a single chunk (not chunked streaming), which the iterable shape grows into for later slices. Left as-is: currentTree resolves heads in TS — that's the #381-sanctioned thin store-orchestration (only crypto/codec must stay Rust), not drift. Refs #423.nothing readable · 3 sealed · by lock: 3 internal
- TS SDK slice 1: in-memory public read against a real relay (#423) Completes the slice-1 tracer bullet on top of the landed WASM core: an in-memory agent connects to a relay and reads a public file byte-for-byte with no .loot/ on disk. The single passing read() exercises the whole stack — WASM codec + fetch transport + client-side path-scoping + AES decrypt + host-side zstd inflate. - loot-wasm: add encode_fetch_request so the /fetch wire framing (version marker + have/wants) stays single-sourced with the binary; frozen-vector parity added (native + wasm-pack test --node). - sdk/ (@millerbyte/loot-sdk, ESM): connectRelay(url, identity) -> LootRepo with list() and streaming read()/.bytes(). Transport speaks the relay HTTP wire via fetch(); loot-net never crosses. Client-side path-scoping (#380): a metadata fetch resolves path->oid, a scoped fetch pulls just that object's bytes (both have=[], since the relay gathers objects+keys from the changes not in `have`). zstd inflate is host-side (fzstd) — the wasm core has no zstd. Typed errors (LootError/TransportError/NotFoundError/AuthError, #382). - Seam 1: a vitest suite drives the real `loot serve` relay, seeded via the real `loot` CLI (init -> author -> new -> push); 4 tests green (list, byte- for-byte read, streaming, NotFound). The wasm pkg is built by `npm run build:wasm` (gitignored, regenerated from crates/loot-wasm). Deferred to later slices: write path, private/grant read, physical backend. Refs #423, #421.nothing readable · 10 sealed · by lock: 10 internal
- Harden the golden-parity harness: freeze native wire bytes, kill drift (#423) Code review flagged the parity harness (Seam 2) on both axes: it re-encoded the Frame and re-encrypted inside the test, so under `wasm-pack test --node` the same wasm build both produced and consumed the bytes — a symmetric miscompilation would cancel and pass. The native/wasm assertion blocks had also drifted (wasm checked a subset). - Feed the system-under-test FROZEN bytes produced by the native build: a native-encoded Frame bundle and a native AES-GCM ciphertext (plus the existing blake3 address). The wasm side only *decodes*/decrypts them, so nothing it encodes is fed back into it — a codec/decrypt miscompilation now fails the parity check. - The native run regenerates those bytes and hard-asserts they still match the frozen constants, so a deliberate wire-format change trips loudly with a copy-paste replacement. - Both entry points now call ONE shared assertion block (check_address / check_decrypt / check_bundle) over values resolved through each build's own surface, so native and wasm can no longer diverge. Green natively and under `wasm-pack test --node`. Refs #423.nothing readable · 1 sealed · by lock: 1 internal
- 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.nothing readable · 15 sealed · by lock: 15 internal
- Evidence (#359): a three-lane wave lands with zero orchestrator surgery The terminal ticket of map #354. Prove the destination live: a real wave of lanes over one shared store reviews and reconciles with no respawn+copy, no hand-merge, no folklore. A hermetic, re-runnable PowerShell script drives the wave through real `loot` verbs; its captured run is committed beside it. - docs/evidence/scripts/wave-proof-lanes-demo.ps1 + runs/wave-proof-lanes-demo.txt (run 2026-07-21, 23 checks, all pass). Seven acts on three lanes forked from one base: (1) three reviews open as pure projections, three review/<lane> refs, main unmoved; (2) an interleaved out-of-wave land moves main mid-wave; (3) a stale-anchor review refreshes byte-identically (op=up-to-date, same sha, WIP intact) — the REFUSE_REVIEW_STALE_ANCHOR respawn family is structurally gone; (4) the #418 seal-WIP guard: bare `loot ferry` and no-arg `loot adopt` both refuse to seal described WIP, and --seal-wip seals on purpose + prints the recovery round; (5) the colliding lane catches up over the moved tip, bounces on the shared path, and reconciles IN-LANE with the resolution folded into its subject (#337); (6) a disjoint lane catches up with no merge cost. - The harbor land-bounce and the #349 "already-projected -> proceed" path live inside `loot-first land` (shells to gh), so they cannot run hermetically. ACT 7 runs `cargo test -p loot-first --lib` live (69 passed) — harbor_guard_*, already_projected_line_ahead_of_origin_reads_as_landable, the gate suite — as the cited proof of the GitHub-facing layer. docs/evidence/wave-proof-lanes.md is candid about what is proven live vs cited. - docs/agents/concurrent.md gains the explicit "Running a wave" framing (#358's "Nothing new": N lanes fire land, queue on the harbor, carry handles the moved tip — no wave verb, no orchestrator), pointing at the evidence run. The script gates on the release build's exit code, not just the binary's presence, so a failed rebuild can't run a stale binary and claim the guard.nothing readable · 4 sealed · by lock: 4 internal
- Build the seal-WIP guard (#418): refuse a bare sync verb that seals live described WIP Graduated from #356's "Prevent + hint" resolution (map #354). After ADR 0039 (#362) made review a pure projection, the only way to strand a described working change as a PR-less signed line is a *deliberate* bare sync verb. Guard that path at its source. - New typed refusal RepoError::SealWip { subject, verb } in loot-core, a sibling of MisSeal/Demotion, on the ADR 0030/0038 guard+override pattern. Overridable with --seal-wip on both verbs. - ferry seal path: thread seal_wip through ferry::run -> reconcile_onto; the Merge-with-wip arm (the ONLY place a bare ferry seals — land pre-finalizes, adopt folds through fold_line_in) refuses unless overridden. reconcile_onto now returns the sealed subject so the caller reports the seal from the seam that decided it, not a post-state heuristic. - adopt seal path: thread seal_wip through adopt_harbor; refuse before fold_line_in when a described line diverged. The clean fast-forward and redundant-capture drop return earlier, so a no-op catch-up never trips. - Fires ONLY on a described line the sync would actually fold: an un-described one stays the #275 refusal; a break-glass ferry / no-op sync (no live described WIP) is untouched. - On override the verb prints the follow-up-round recovery recipe (SEAL_WIP_RECOVERY, one shared seam); the review "nothing to review" and land "not in the pr-map" paths print it too when sealed_unlanded_anchor() detects a signed line ahead of mirror main with no PR. - tag's ferry passes seal_wip=false — it is not a finalizer, so it refuses rather than silently seal live WIP while cutting a release. - docs/agents/concurrent.md §"One seal path remains" rewritten to describe the guard; CONTEXT.md gains the "Seal-WIP guard" vocabulary entry. Tests: guard at both seams (refuse without / seal with --seal-wip), un-described stays #275, no-wip catch-up untripped, full ferry::run break-glass + no-op pass untripped, sealed_unlanded_anchor signal. Full suite green (loot-core 337, loot-cli 243, loot-first 69); the describe_contention CPU-load flake passes in isolation.nothing readable · 8 sealed · by lock: 8 internal
- Research (#381): Rust-to-TS bridging — WASM for the crypto/codec core, subprocess for physical modenothing readable · 1 sealed · by lock: 1 internal
- Research (#380): path-scoped object fetching needs no new wire protocolnothing readable · 1 sealed · by lock: 1 internal
- Pass-2 candidate 2: give the pure extracted modules their own test surface Pass 1's extractions created clean interfaces but left their tests behind in the god-files ("the interface is the test surface" unmet). Add #[cfg(test)] modules to the pure/cheap ones: - policy.rs: the glob dialect (`*` stops at `/`, `**` crosses), Attributes first-match-wins + public_by_fallthrough (the mis-seal consent test), is_catchall, is_secret_name, Ignore subtree pruning + policy-file protection, parse_visibility. This security-relevant dialect was previously exercised only transitively through workspace.rs. - reports.rs: DeltaClass::gutter (the frozen #306 +/M/- mapping) and WorkingRow::version_hex. - kv.rs already shipped with its own tests (candidate 5). Surfaced a real finding while writing the secret-name test: SECRET_NAMES's `.env*` is anchored at the basename start, so the suffix style `prod.env` is NOT caught (only `.env`, `.env.local`, …). Left as-is and documented in the test — widening the set is a security-policy call, not a test-backfill. Stateful modules (negotiation, lanes) stay covered through the engine.rs / workspace.rs suites: isolated tests there need the same repo/workspace fixtures those suites already build. loot-cli lib green (237).nothing readable · 2 sealed · by lock: 2 internal
- Pass-2 candidate 5: unify the key=value config codec into loot-cli::kv ferry::parse_kv and workspace::parse_config_text were byte-for-byte identical (trim, skip #/blank, split_once('=') → BTreeMap), and three call sites hand-rolled the matching `{k} = {v}\n` encode (ferry::write_kv, Config::save, GlobalConfig::save). One `kv::{parse, encode}` module now owns the dialect; ferry (git_config / git_identity_map spine files), the per-repo .loot/config, and the global config all call it. Behaviour-preserving; the module carries its own round-trip/comment-skip/ordering tests (4). loot-cli lib suite green (227, +4 kv). This is the non-blocked core of pass-1's candidate 6 — pure text, no WipState → loot-cli-ledger cross-crate coupling.nothing readable · 4 sealed · by lock: 4 internal
- Candidate 5: extract the CLI report DTOs into workspace::reports The plain-data report values Workspace verbs return for the CLI to render — WorkingRow, EditReport, DeltaClass, PathDelta, ConflictSide, ConflictView, AdoptReport, AdoptCatchupReport, PullReport, StepReport, BurnReport — were a ~210-line contiguous block in the 8,000-line workspace.rs, so a verb-output tweak meant editing the god-file even when no engine logic changed. Lift them into a workspace::reports child module and re-export (`pub use reports::{…}`) so workspace::EditReport etc. stay stable for main.rs and render.rs — zero external churn. Pure data relocation, no behaviour change; loot-cli lib (223), bin (55), emit_snapshot (3), and cli_smoke (8) suites all green. With the lane DTOs (f1bcaa6) this covers candidate 5's DTO-locality goal. A handful of report DTOs (HistoryRow/HistoryView/GraphHistory/BuoyResolution, IngestAct, SnapshotOpts) stay in workspace.rs for now — they are separated by impl-carrying types (Remotes, Snapshotted), not a clean block, and the win is already banked. Candidate 5's prose-into-Shape half is deliberately not done: emit.rs keeps human rendering out of emit/verdict by design (R5/#181, needs the peer registry) — that is an ADR-level call, not a mechanical extraction.nothing readable · 2 sealed · by lock: 2 internal
- Candidate 5 (slice): move lane report DTOs into workspace::lanes The lane report DTOs (SpawnedLane, LaneStatus, SweepOutcome) and their registry-side free helpers (reap_lane_dir, gen_lane_handle — called only from the lane methods) still sat in workspace.rs after candidate 2 moved the lane *methods* out. Relocate them into workspace::lanes so the lane concept has full locality, and re-export the three public DTOs (`pub use lanes::{...}`) so workspace::LaneStatus etc. stay stable — main.rs's imports are untouched. loot-cli suite green (the lone describe_contention failure was the known load-dependent flake: it passed on re-run, and this change touches neither the describe/snapshot path nor any concurrency logic). Scope note on candidate 5: this is its clean, non-conflicting slice. Two parts were deliberately NOT done: - prose-into-Shape: emit.rs's human rendering is kept OUT of emit/verdict by a deliberate decision (R5/#181) because it needs the peer registry for attester names; folding prose into the shapes would re-litigate that ADR- like call and belongs in a design discussion, not a mechanical move. - the broader report-DTO migration (EditReport, PathDelta, ConflictView, AdoptReport, PullReport, StepReport, BurnReport, HistoryRow/View, …) is ~15 structs interleaved with impl-carrying types (Graph, Remotes, Snapshotted) and referenced by render.rs — a fiddly scattered move worth its own pass, unlike this cohesive lane-local block.nothing readable · 2 sealed · by lock: 2 internal
- Candidate 2: extract the lane-registry lifecycle from Workspace The lane registry lifecycle — spawn_lane/spawn_lane_as, name_lane, lane_list, lane_statuses (+ peek_lane), remove_lane, lane_gc (+ reap_entry), and the placement/id helpers (find_lane, ensure_lane_name_free, default_lane_dir, lane_key_taken, free_lane_id) — was ~340 lines inside the 8,600-line workspace.rs, the ADR 0034/0035 single-owner and heartbeat rules living as scattered methods (the exact class whose enforcement drifting caused the lane-gc near-miss). Lift it into a workspace::lanes child module (the codebase-design review's candidate 2, last Strong-strength item). Pure relocation, no interface/behaviour change: these stay Workspace methods in a child module, reaching the private position/store/root via super::*, the same shape as the engine's Custody (#323) and negotiation extractions. find_lane is pub(super) because merge_lane (kept in the parent) resolves its source through it. The lane *convergence* verbs — merge_lane and adopt_harbor — deliberately stay with the reconcile code: they are folds, not registry lifecycle. The lane report structs (SpawnedLane/LaneStatus/SweepOutcome) stay in workspace.rs so main.rs's imports are untouched. Full loot-cli suite green, lane spawn/gc/name/rm/statuses tests included.nothing readable · 2 sealed · by lock: 2 internal
- Candidate 4 (part 1): extract the engine's sync-negotiation face engine.rs's own doc calls DagRepo "a thin composition… no storage or merge logic itself," but the object-level sync-negotiation face — apply_with, offered_objects, negotiation_have, closure_complete, missing_objects, bundle_wanted, bundle_wanted_batched, and the shared bundle_impl builder — sat inline as one more impl DagRepo block (~250 lines) among ten. Lift it into an engine::negotiation child module (the codebase-design review's candidate 4), the same mechanical shape as the Custody #323 extraction. Pure relocation, zero interface/behaviour change: the methods are still DagRepo's, and a child module reaches the engine's private object store, change graph, and custody exactly as they did inline (super::*). bundle_impl becomes pub(crate) because bundle_full in the engine proper still delegates to it. loot-core (337) and loot-net (20) suites green. Deferred (candidate 4 part 2): decoupling bundle_codec from engine::ChangeNode with a byte-identical wire node type. That one touches the wire format, so it carries the "must not bump FORMAT_MAJOR, prove byte-identical" constraint and is worth its own focused pass — especially with the relay already rejecting v8.nothing readable · 2 sealed · by lock: 2 internal
- Candidate 3: extract the visibility-policy module from Workspace CONTEXT.md calls .lootattributes "the user-facing surface of loot's thesis," but its whole machinery lived as private helper types at the bottom of the 8,759-line workspace.rs, reachable by tests only through a full Workspace. Lift it into one cohesive crate::policy module (the codebase-design review's candidate 3): - Glob + glob_match (the shared dialect: * stops at /, ** crosses it) - Ignore (.lootignore parsing + file/dir pruning) - Attributes (.lootattributes rules + visibility_for + the mis-seal gate's public_by_fallthrough consent test) - SECRET_NAMES + is_secret_name + is_catchall (ADR 0038 §1 mis-seal gate) - parse_visibility, and the ATTRS/IGNORE filenames Pure move, no behaviour change: Workspace imports these from crate::policy and consults them at snapshot and the signing seams exactly as before; the engine still receives already-resolved visibilities. workspace.rs drops ~230 lines of policy machinery; the thesis surface now has locality and one home. Full loot-cli suite green (mis-seal gate, glob-dialect, and characterization tests included). Follow-up worth doing: migrate the pure glob/is_catchall/is_secret_name unit tests from workspace.rs's test module into policy.rs so the interface is also the test surface; they currently reach across via a crate::policy import.nothing readable · 3 sealed · by lock: 3 internal
- Candidate 1a: verbs return an Emit shape, not stdout (in-process seam) Every cmd_* verb now returns Result<Box<dyn Emit>, String> instead of printing to stdout itself; main.rs's dispatcher renders the shape once with the resolved OutFmt and prints it. This is the deepening the architecture review's top recommendation called for: the verb interface becomes an in-process test surface, so a test can assert on a verb's output as a value without spawning CARGO_BIN_EXE_loot (the friction tests/emit_snapshot.rs documents: "there is no in-process seam to call"). - emit.rs: add a Message shape (prose/silent verbs — one rendering across every OutFmt) and make Status own its data so a shape can outlive the verb's Workspace. - main.rs: Verb.run signature + dispatcher; ~50 verbs converted to build and return their shape. Machine verbs return their existing emit shape; prose verbs accumulate their former stdout into a Message. print_step / print_surface_listing now return String so verbs can compose them. Streaming verbs (push, serve) keep direct progress prints and return an empty Message. - clone folds init_repo's now-returned summary into its own output; pull folds its post-reconcile surface listing into the shape's Human field. - New test exercises the seam directly; the emit_snapshot characterization tests confirm byte-identical output. Keystone for candidates 1b (CliError) and 5 (prose-into-Shape).nothing readable · 2 sealed · by lock: 2 internal
- Drop an unused binding the #362 land's pre-land gate warned on The carry-at-land workspace test kept a leftover `let ours` from the test it was modeled on; every cargo test run printed the warning.nothing readable · 1 sealed · by lock: 1 internal
- ADR 0039 build: pure-projection review + carry-at-land (#362) Review mode (`ferry --with-wip` / `loot-first review`) is now a pure projection: no ingest, no dock reconcile, no mirror-main advance, no spine rewrite - it mints the provisional commit from the lane's own anchor marks and pushes only review/<position>. A lane behind git main reviews normally; REFUSE_REVIEW_STALE_ANCHOR is deleted with the fold it guarded (#292/#302), and the #349 review-mode trigger is structurally gone. Reconcile lives only at the signing verbs, and its diverged-line shape is now the carry (DagRepo::carry_line): a self-authored suffix replays onto landed main as superseding versions - same change id, same subject, single parent, stale original kept as predecessor - so landed history stays exactly one commit per change with no ferry:
- ↳ supersedes
9315a59f· not stored here - Kept, not rewritten: a carry replays a suffix as a new version and the one it replaced stays addressable. That is the difference between a carry and a rebase.
nothing readable · 12 sealed · by lock: 12 internal - ↳ supersedes
- ADR 0038: record the resolve_conflict audit + override ceremony gotcha (#369) The #353 amendment claimed seam coverage without recording the one audited signing path outside the seam: Workspace::resolve_conflict signs immediately without the mis-seal gate - safe by construction (a conflicted path exists on both parent lines, so it is never a first seal, and first-seal scoping would keep the gate silent), now stated so the amendment is not read as every-signing-path-runs-the-gate. Also records the ceremony gotcha found in #353: describe --allow-reveal alone does not complete the override - it must ride the finalizing verb (loot new --allow-reveal). Docs-only.nothing readable · 1 sealed · by lock: 1 internal
- Rotate ritual warns per expiring re-grant: expiry does not travel (#368) Decision on #368: accept + document loudly (option 3). Routing re-grants through the tag-3 sealed path conflicts with the wave-runs-first abort safety of the rotation ceremony (the new key does not exist yet when the wave is minted, and rotation is deliberately offline/file-based); the tag-1 wire extension was already rejected in #352. The ritual output now names each re-grant bundle that carries an expiry and warns that the expiry is recorded only in the rotating machine's manifest - the applying machine records none (tag-1 limitation, #352), so the applied copy is effectively unexpiring - and points at the one wire that enforces expiry: the original grantor re-issuing via loot grant --relay (#20). Docstrings on RotateRegrant, rotate_regrants, and cmd_id_rotate no longer overclaim that the expiry travels.nothing readable · 2 sealed · by lock: 2 internal
- pull_via: one metadata-only fetch when wants is empty (#370) A change whose objects the puller already holds never ingested: the change delta only travels in fetch responses, and an empty wants list made zero fetch round-trips. Live shape (found by the #340 evidence run): a sealed grant pre-delivers the object ciphertext, so the grantee's next pull strands on nothing-new while the relay is ahead; a pure-deletion change (no new objects at all) strands the same way. pull_via now makes one metadata-only fetch(have, []) when wants is empty - the empty-wants bundle the server half already serves. Because that bundle also re-delivers every change the head-id negotiation cannot name as held, the branch keeps the applied outcomes only when the fetch actually moved the head set, so a genuinely up-to-date pull still reports nothing-new. Tests: grant-pre-delivered object ingests; pure-deletion change ingests; the existing nothing-new re-pull contract holds.nothing readable · 1 sealed · by lock: 1 internal
- Bound the already-projected trailer walk to origin/main..main (#367) The #349 escape hatch's third condition grepped the Loot-Change-Id trailer over ALL history reachable from mirror main. A tip already pushed (trailer reachable from origin/main) plus a sibling's unpushed projection ahead of it passed all three conditions - and the land would push the sibling's projected-but-unlanded line: the green lie the reachability condition exists to block. The walk is now bounded to the unpushed span origin/main..main, per the spec's wording: projected and reachable from mirror main but not pushed. Adds the missing test: tip already pushed + sibling projection ahead -> refuse.nothing readable · 1 sealed · by lock: 1 internal