connor / loot

connor/loot

Changes touching this path

  • loot-first in Rust: land policy behind a Forge seam (#218) — new loot-first bin crate (ledger/forge/policy/orchestrator), in-process Workspace reads via loot-cli lib split, typed pr-map owner + shared ferry::WipState; every policy decide-tested against a fake forge. Build+test only; shadow-run, real land, and ps1 deletion remain operator-gated. 58c28888 · dbf3dbe6…
  • Run the pre-land gate in the landing position's tree, not the shared root (#287) orchestrator::paths() derived its one `root` from ws.dot() -- always the SHARED store's .loot -- so a land from a lane ran `cargo test` (and the relay push) in the primary checkout's possibly-stale tree. The #284 land was validated only because the operator had run the suite in the lane by hand. Same shared-vs-position confusion as the #229 mirror-gitdir and gh-cwd dogfood fixes. Fix: split Paths.root into `position` (Workspace::root(), new accessor: the lane dir from a lane, the checkout on the primary) and `checkout` (the shared .loot's parent). The pre-land cargo test now runs in `position` -- the tree about to be signed. relay_push decision: it now also runs in `position`, deliberately. loot push discovers .loot from its cwd and a lane's .loot points at the shared store, so the push ships the same store from either dir -- but from the position it reads the tip this land just signed (has_unsigned_tip) and records its push op in the landing position's own oplog instead of writing the primary's (ADR 0034 single-writer). The spawned binary is now resolved beside the running loot-first (one cargo build produces the pair) with the old target/release fallback, because a lane tree carries no release build of its own. The drift guard's git reads and init-hook stay on `checkout` on purpose: only the primary has a .git; run from a lane dir every probe would fail and silently mute the guard. Tests: loot-first regression pair (lane position vs checkout, primary degenerate case) built on a real spawned lane via temp-dir helpers; loot-cli locks root()-vs-dot() semantics at the Workspace seam. 46f1b598 · dbf3dbe6…diff
  • primary catch-up: adopt landed main (post #287) 7e3bbe42 · dbf3dbe6…diff
  • the pre-land perf gate: counters block at 0 percent, timing warns, and a lane pins itself (#637) 52a2341e · dbf3dbe6…diff
  • loot-first: exec the perf gate from a binary built from the position (#712) The gate measured in-process, exercising whatever loot-core was compiled into the running loot-first.exe while PinnedCheckout stamped the point with the position revision — and nothing rebuilds before the gate, so a stale binary reported perf: no move for a revision that provably moved a counter (#638's live find). The alarm failed OFF, silently. Now loot-first land builds loot-perf-gate from the landing position's own tree (cargo build --release --locked -p loot-perf --bin loot-perf-gate — cargo's staleness check is the provenance proof) and execs it. A land mode on the bin (--land <change> --stash <file>) keeps the split the record demands: the verdict decides before cargo test, and the would-be record line is stashed outside the tree for the land to append verbatim as its last act, so the recorded bytes are produced end to end by the position's own code. loot-first deliberately no longer links loot-perf: no compiled-in harness, no way to measure the wrong code. --locked keeps #698 held: a stale Cargo.lock is refused, never rewritten into the signed change; target/ stays outside the seal (verified live — loot status clean across the build). Measured cost: +0.16 s build on an already-built position, 3.1 s when the gate's own crates changed, 12.6 s from a stone-cold lane — against the unchanged 2.2-2.6 s measurement and the multi-minute cargo test that follows. 0d9c6195 · dbf3dbe6…diff
  • the three surfaces describing the perf gate stop disagreeing about what an absent metric means, because an explained absence is reported and exits 4 exactly as an unexplained one does, and each surface now points at the one that owns a fact rather than restating it — including the exit code itself, named once in loot-perf and read from that name by both the gate binary and the land (#1403) dc3ccf75 · dbf3dbe6…diff
  • user-declared gates arrive as data rather than as hooks, and the decision the ticket owed splits rather than picking one of its three options, because the gate vocabulary is two halves with different properties. The mechanism moves down into loot-cli, since its value is concentrated in the fake - a FakeSpawner that panics on an unstubbed step is what turns no process spawned from a claim into a failure, and two fakes drift with a fake that has quietly stopped intercepting being indistinguishable from one that works; loot-first keeps a re-export shim so no orchestrator caller changed. The phase axis is duplicated deliberately because it is not the same axis: loot-first asks about two trees, one of which only a land produces, while the CLI asks about two commitments, and a shared enum would carry four variants of which each consumer must refuse two - a rule nothing checks, where two small enums are checked by the type system. A new crate was rejected on arithmetic rather than taste, since loot-first already depends on loot-cli and there is no pair needing a bridge; loot-core was rejected because only half of #1682's criterion transfers, and that half is now a census asserting the engine spawns nothing rather than a sentence. A gate runs after the capture and can never prevent it: it does not decide whether the tree is recorded, only whether it is signed or sent, so a refusal costs the signature and nothing else, which is the ordering #174 already chose. On the confidentiality boundary the absolute form of the criterion is unachievable by any mechanism that runs a command in the working tree, and saying so is better than a strong claim that will not hold - loot surface writes and never deletes, so a path whose grant lapsed stays on disk as stale plaintext readable by cat, grep, the editor and every process running as the operator. The guarantee is therefore the narrow checkable one, that a gate is granted no read the operator does not already have, held up by four facts each of which a regression would have to break first: the runner never sees a Workspace, nothing is materialized, a Step carries program args and cwd with no environment channel, and there is no shell. A fifth fact answers a different attack - the declaration is untracked, so a pull cannot write one, which is git's own reason for never transporting hooks and matters more here since ADR 0075 has the forge holding proposals. This ticket also understated the surface that already exists: loot resolve --tool hands a user command decrypted plaintext today via LOOT_BASE and its siblings, so gates are not the first such door but they are the one that opens none (#1538) 44d4869a · dbf3dbe6…diff
  • review sweep 7 fix-up: loot-first now reads loot --version --json with a JSON parser, so the relay push is decided on a single JSON object whose top-level contract fits a u8 and whose top-level version is a string, in any key order and beside other fields, while a duplicated field, trailing text or a looser number refuses the push. the pusher= path now percent-encodes control characters as well as percent signs and whitespace, and workflow.md says so. land-change gains the relay=REFUSED recovery (catch the primary up, cargo build --release, check the contract loot --version --json prints against the major the landed commit declares, then loot push, and record the push output on the issue), says the refused block names both majors on a mismatch and a read failure otherwise, and stops counting the relay and branch states. afk-loop agrees that a FAILED or REFUSED land stands and owes a push, gains that push as a step, and counts the ticket done once the push is recorded on the issue. format.rs, ADR 0066 and ADR 0083 note that a land carrying a FORMAT_MAJOR bump normally comes out relay=REFUSED rather than FAILED, and the --version usage line, the print_out and dispatcher comments and a verdict test name follow. both new pins went red before the change (2 passed, 2 failed), the control-character pin went red with that arm removed (1 passed, 1 failed), and a serde_json Value reader went red on the duplicated field (1 passed, 1 failed). the workspace suite is green (#1979) ce994e1d · dbf3dbe6…diff
  • loot-hygiene (#2128, map #2099 ticket 4): the land text gates move from loot-first into a crate with no dependency that builds for wasm32, re-exported as loot_first::hygiene so every gate row, checkout test and AGENTS.md path reads unchanged; a new crate rather than loot-codec because three consumers now read it, loot-first, loot-cli and loot-wasm, and the wasm one is the fact ADR 0076 §2 no-new-crate reasoning did not have. Corpus::from_entries files an in-memory tree under exactly the allowlist the directory walk applies, top-level files plus SOURCE_ROOTS filtered by TEXT_EXTENSIONS minus SKIP_DIRS and SKIP_PATHS, through one filing rule both constructors share, and a link resolves against the entry set with dot and dotdot folded, so a Worker with no directory answers what the land answers. CORPUS_CHECKS is the table a .lootpipeline check step names, keyed by the land gate names and pinned to them, holding the floor-free halves: the land refusals still refuse a vacuous walk first because a mis-rooted land must not read as clean, but a three-file repo is not mis-rooted, so a check answers about the files it was handed. loot pipeline now runs check steps in-process over one corpus walk per run, a finding is failed and exits 2, an unknown name cannot start and names the set and exits 1, and the ? deferral #2127 shipped this morning is retired the same day with the ADR 0023 amendment saying so. loot-wasm links the crate and a wasm-bindgen test runs the three checks from entries under node. Measured: the site wasm is 475667 bytes before and after, unchanged, because nothing exported calls the crate; native the three checks over a 1120-file synthetic corpus take 0.8 ms in release and 28.0 ms under wasm in node; through the release binary on this repo, roughly 1355 covered files and 20 MB by an approximate count, the three checks cost 160 ms warm against a 73 ms listing and 6.5 s on a cold page cache. Two lands worth of censuses read off their refusals: the destination allowlist row for the moved file, and no other. Five pins broken once by a named mutation, red at 0 passed 1 failed then green at 1 passed: from_entries skipping widened, link resolution made true, the table key misspelled, a finding made a pass, an unknown check made a pass; the fifth sweep needed a second pass because its first restore string matched twice and left the mutation applied, caught by the full run that followed. 66 test binaries green across loot-hygiene, loot-cli and loot-first. No wire, format or store byte moves, no migration (#2128) 858575e1 · dbf3dbe6…diff
  • a land takes into main the ticket changes on the forge that landed main lacks (ADR 0098 §4, the sync half of §5, the #2390 half of §6, and §9): under the harbor after its finalize it asks its remote, when that answers as a forge, for its heads, takes in what they reach, and judges each change they reach that landed main does not; one signed by a key in the own key set of this identity and writing only under tickets/ is folded onto landed main ahead of the ferry reconcile, so the lane is carried onto it, the re-gate sees the tree as it lands and git main takes the lane commit alone, and any other fails the land closed naming the change and its paths outside tickets/. a sync push the forge refuses because a web write arrived during the land now merges that write onto landed main under the subject fold N ticket changes from the forge, with no gate and no git commit, catches the primary up and pushes again, a bounded number of times; the #2390 check accepts a primary ahead of landed main only by ticket-only changes the forge holds; a ticket file both the lane and the forge wrote bounces for loot resolve, or refuses before the pass naming loot pull-grants in the primary when the lane cannot open both sides, and a pass whose carry stops short of the fold projects nothing; a fold merge refuses a file landed main and the forge both wrote. the verdict gains folded=N before pusher=. ADR 0098, the ADR 0063 amendment, CONTEXT.md, workflow.md, the land-change skill, GATES and SOURCE_ROOTS say so, and the pin no_gate_input_reads_the_ticket_root covers the walk of the text gates only. six tests against an in-process forge, whose sync runs in-process, pin it beside four sync unit tests and four forge_fold tests; red under seventeen named mutations, each restored, over twelve loot-first pins and four loot-cli pins: no fold at the land (10 passed and 2 failed), the judgment ignoring paths (9 and 3, and 3 and 1 in loot-cli), an unsigned change read as own (3 and 1 in loot-cli), writes read against any parent (2 and 2 in loot-cli), no race fold (10 and 2), no adopt before a retried push (10 and 2), the #2390 allowance off the forge or without the judgment (11 and 1 each), a pass short of the fold projecting (11 and 1), no check for collisions the lane cannot open (11 and 1), a fold merge picking a side (3 and 1 in loot-cli), the race count dropped (11 and 1), the text walk reaching tickets (11 and 1), the token not the count (10 and 2), the race judging nothing (11 and 1), no attempt bound (11 and 1), and an ancestor head not skipped (3 and 1 in loot-cli). cargo test green, 4671 passed over 143 binaries with 13 ignored. client only, no deploy; loot-first changes, so the primary release binaries owe a rebuild (#2429) 357a8716 · dbf3dbe6…diff
  • a web ticket write no longer fails the land in a repo holding a Restricted path outside tickets/, and a fold keeps the holders main records (map #2422): the wire redacts a Restricted path holder list (#521), so the browser change carries each such path as Restricted([]), and forge_fold compared entries with ==, so the operator first web ticket read as writing docs/pitch/zk-host.md and every land after it would fail closed. what a change writes, what two lines collide on and what a forge head changes outside tickets/ now compare address and seal (forge_fold::same_entry over Visibility::same_seal, #1005). a fold no longer takes such a change as it is: its merge records fold_tree, the side that wrote each path since the fork and main own entry elsewhere, read off addresses and opening nothing, which replaces merge_tips in mint_fold_merge, a descendant is taken as it is only when that is the tree it holds, and fold_onto refuses a tip that does not record the main entry outside tickets/, address and seal alike. read against the live forge, the judgment takes the operator change (1 forge-only change, 0 refused, the overlay reads 1 and keeps out 0) and the fold merges it with 0 paths outside tickets/ recorded otherwise. item 4 found no defect in the web read: a native run of the browser read over the live head with the mailbox keys lists the ticket open with nothing unopened, and nothing was changed for it. pinned by a judgment and fold test and a fold_tree test in forge_fold, a forge_view test where a browser-filed ticket over a held path reads in the browser and in a lane, and two loot-first land tests that build the ticket with the browser builder over a base holding a Restricted path, one taken in at the intake and one racing the sync, each asserting main keeps the holders. red under named mutations, each restored: entries compared with == (21 passed and 3 failed over forge_fold and forge_view, 0 and 2 over the land tests), a descendant always taken as it is (22 and 1, 1 and 1), that and the fold check relaxed to same_seal (22 and 1, 1 and 1), and fold_tree taking the web entry where main did not write (21 and 2, 0 and 2). cargo test green, 4744 passed over 145 binaries with 13 ignored. no site change and no deploy owed; this land runs with the lane-built loot-first and loot (#2488) d27f227f · dbf3dbe6…diff
  • an npm gate skips npm ci when it would install what node_modules already holds: after an npm ci of its own passes, the site and sdk gates write a stamp into node_modules, from the new loot_first npm_install, holding a blake3 hash of the npm ci arguments, package.json, package-lock.json, .npmrc, the hidden lockfile node_modules/.package-lock.json and the output of npm version --json, and the next pass skips the install only when those match and the rule npm itself uses to trust its hidden lockfile holds (every package and scope folder listed and no newer than it, every listed package on disk, no links), less the time of node_modules itself, which the site tools move. any doubt runs npm ci as before, with the offline classification unchanged, and every later step runs on every pass. measured driving the rows against this lane: the site gate 33.06 and 33.18 s with npm ci and 21.94 to 22.25 s skipped, the sdk gate 5.96 and 6.14 s against 5.00 to 5.10 s. running the npm gates beside cargo test is parked in the ADR 0071 amendment: faster on this desktop at CARGO_BUILD_JOBS=4 (234.9, 283.9, 232.9 and 230.8 s against 257.9, 274.2, 266.3 and 265.8 s in series), but the workspace suite walks site/src while build:wasm rewrites site/src/wasm. pinned in 5 new orchestrator tests; red under named mutations, each restored, over those 5: never skipping (0 passed and 5 failed), stamp inputs not compared (3 and 2), the npm version left out of the stamp (4 and 1), the trust rule unchecked (4 and 1), folder times unchecked (4 and 1), an unlisted folder accepted (4 and 1), and the whole npm rule with the time of node_modules (3 and 2). cargo test green, 4805 passed over 144 test result lines with 14 ignored. no deploy owed; lands use it once the primary loot-first is rebuilt (ywuxnuxp) 66b5db04 · dbf3dbe6…diff
  • the loot-cli, loot-forge and loot-first tests that drive the real client against a relay or forge in their own process stand a 600 s transfer floor where they stood the production 30 s: the in-process host helpers of the verbs::sync and forge_view unit tests, of the loot-forge http and runners tests and of the loot-first land tests set the per-thread floor, loot-forge and loot-first turn on loot-net test-floor in their dev-dependencies, the custody_lock, relay_reads and shallow tests pass the floor to the loot they spawn, the inline relays and forge in verbs::sync use its helpers, and the requests the tests send by hand, the counting proxy included, wait as long; with a 31 s stall injected into the first stow, grant and runner registration of each in-process host, 58 tests failed before (26 of 47 in the loot-cli unit tests, 5 of 22 in its integration tests, 24 of 32 in loot-forge, 3 of 5 in loot-first) and the same tests passed after; TRANSFER_IDLE is unchanged, test-floor reaches no release build, the gated counters do not move, and the suite is green at 2093 passed (wwmqpnvz) 684ea10f · dbf3dbe6…diff
  • files the two amend edges xysopyyo left open: a non-root amend gates its capture against its parent tree rather than the version it replaces (vzuzpspr), and loot edit of a root change on a pinned position loses the pin (vlsmounz) 4d1ef5fb · dbf3dbe6…diff
  • restore the 71 files 430a057a reverted to 385bcb40's bytes: a tickets-only land (vzuzpspr, vlsmounz) recorded stale copies in the Mac primary, which held the desktop's newer versions sealed with keys it had not pulled, and a loot fetch there had left the disk behind loot's view; the keys are pulled now, the lane equals 385bcb40 outside tickets/ but for that land's benchmark entry, and mmzxtyyt records the mechanism Perf-Baseline: reset 430a057a's baseline measured the reverted code; restoring 385bcb40's brings object_gets, store_file_reads and graph_sorts back down 7806746e · dbf3dbe6…diff
  • a .lootattributes that is not UTF-8, such as the UTF-16 Windows PowerShell 5.1 writes with >, is now a malformed rule naming its encoding at the disk load, the ferry ingest and the recorded-tree vet, so loot new and a ferry ingest of a self-authored commit refuse instead of signing plan.txt internal with exit 0, and a line opening with a byte-order mark, which made the first rule match nothing, is malformed too; the unreadable recorded rules refusals carry the code unreadable_attrs, which the SDK classes as a guard error and the tests assert, and ADR 0038 states the costs of passing over a signed parent rules file and an unsigned ingested parent, and its wrap is fixed; the new cases went red without the fix (0 passed, 2 failed), again with the disk load reading text (1 passed, 1 failed), with the ferry reading text (1 passed, 1 failed) and with the byte-order mark unrecorded (1 passed, 1 failed), the code assertions went red without the code (0 passed, 3 failed), the gated counters do not move, the SDK typecheck passes, and the suite is green at 2103 passed (ymmvvvxq) 9d623289 · dbf3dbe6…diff
  • a program gate pass is recorded under .loot/git-mirror/proofs against the sealed tree it judged (the manifest addresses and tiers, the loot-first binary, the machine and tool fingerprint, the keyring read after the snapshot) and a land looks it up instead of running the gate again, loot-first prove records the pre-land passes ahead of the land, the verdict reads tests, site and sdk as proven when every run was a lookup, ADR 0106 written and ADR 0055 amended; with the key ignoring the tree, the hit pin and the proof pin went red (2 failed), with a settle that ignores a moved tree 1 of 4 proof tests failed, with a degraded outcome recorded 1 failed, with the lookup removed 1 failed, and the full suite is green at 2108 passed, 0 failed (lokxnpso) bc2b0616 · dbf3dbe6…diff
  • the integration tests of loot-cli, loot-core, loot-net, loot-first and the database-free half of loot-forge link as one test binary each (tests/all.rs declaring the files in place, autotests = false, and emit_snapshot, wake_proxy, oplog_record_cost and the live-database forge files kept as binaries of their own because they set environment variables, install a global allocator or share a Postgres cluster), so the integration-test binaries drop from 82 to 25 and the test executables from 107 to 50 with every test kept (the same 389 integration tests by name and 2231 passed, 6 ignored, now 2232 with the new guard), a touch of loot-core then relinks 41 binaries instead of 98 in about 6 s against about 12 s on the Mac and the gate-style run of the units takes about 18 s against 19 to 37 s under load 20 and more; the site gate type-checks through tools/typecheck.mjs, one incremental tsc -p per referenced project beside the others with its build info in node_modules/.cache/tsc keyed on file content, taking the step from 7.8 s to 1.2 s on a repeat pass, and runs build:wasm through tools/build-wasm.mjs, which skips wasm-pack while src/wasm carries a stamp of the cargo-metadata closure of loot-wasm, the lockfile, the toolchain pin and the output hash, taking it from 1.1 s to 0.14 s, so a repeat site gate runs in about 9.8 s against about 16.6 s (medians of 4 interleaved runs, a cold pass unchanged within noise); orchestrator.rs is untouched because the gate is still npm run gate; test_files_run in loot-first fails the suite for a tests/*.rs that no binary builds, red with a stray file in loot-net (0 passed, 1 failed), typecheck.test.ts pins that a cached failure, an old-timed edit and an unreadable cache never turn a failing project green, red with a failure forgiven when a cache exists (1 failed), and build-wasm.test.ts pins what refuses the skip, red with the dependency closure dropped (7 passed, 1 failed) and with the output hash dropped (7 passed, 1 failed); the suite is green at 2232 passed in cargo test and 357 passed in the site gate (pvqwkyso) 572b273c · dbf3dbe6…diff
  • the settle record splits its sync into sync_steps, each with its seconds and its requests to loot hosts (check, adopt, push, the push deposit when the pushing loot reports it, and fold), and carries harbor_held_requests, the requests this process and its sync loot children sent while it held the harbor; the adopt and push children run teed with LOOT_NET_TIMING=1 through the new Step::net_timed, and their request lines are counted from their stderr; loot push runs its deposit as loot_net::span deposit, which writes its time and request count under LOOT_NET_TIMING=1; loot-net counts every request it sends (requests_sent); ADR 0076 names the timing flag as the step environment value it allows; against a local dev forge a push of a 17-file change sent 10 requests, 3 of them the deposit; a measurement that decides nothing, so no test was owed; the suite is green at 2266 passed, 0 failed, 6 ignored (vlovrlqp) 053eb44e · 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.