connor / loot

connor/loot

Changes touching this path

  • the tree writers no longer remove the file they just wrote on a recorded case-only rename: materialize_target and materialize_promoted wrote the target tree and then removed each old path the new tree no longer holds by name, so where the filesystem folds case, as this windows machine and a default macos volume do, the removal took off disk what the write had just put there, and loot undo over such a rename reported pruned 1 path off disk, left the directory empty and made the next status read the recorded path as deleted, which loot move and converge did too, each reproduced by hand with the pre-change binary. both writers now prune through loot_core::disk_entry::prune_unwritten, the one home for the file and directory-entry rule apply-patch has taken since #2007 and #2014: an old path that is the directory entry of a path just written is renamed onto the written spelling, which keeps the bytes and gives the last name component the recorded case, the old name of a hard link is still removed by name, NotFound is a path that was not on disk rather than a path pruned, and any other removal failure is an error naming the path, where materialize_promoted discarded the error and materialize_target counted a failed removal as pruned either way. the identity helpers move out of apply_patch.rs into the new module, drop_empty_parents is shared with the view prune, and the prune makes no filesystem call beyond its removals unless an old path and a written path fold alike. the new pins went red with the entry rule removed (cli 1 passed, 3 failed; core 4 passed, 1 failed), with the old path kept and not renamed (cli 1 passed, 3 failed; core 4 passed, 1 failed) and with the removal error discarded and counted anyway (core 3 passed, 2 failed; the cli pins stay green, since none of them fails a removal). the perf gate dry run reads every counter the same before and after and says no move, ADR 0022 carries the amendment, ADR 0082 section 4 says where the rule lives, CONTEXT.md names it beside the apply-patch rule and in the re-pointing entry, and the workspace suite is green (#2011) de9fb5b0 · dbf3dbe6…
  • cherry-pick, revert and a surface that settles a stale-disk debt no longer destroy a case-only rename where the filesystem folds case, and the first no longer records the loss: #2011 routed two tree writers through loot_core::disk_entry and wrote that every writer which removes a path it may just have written asks that module, while two that did not were sitting in the tree as the sentence was written. Workspace::apply_change_delta, the one core cherry-pick and revert share, walked the merged actions as a BTreeMap and so wrote A.txt and then removed a.txt by name, which where case folds is the file it had just written, and it snapshots, so loot revert over a recorded case-only rename reported both paths converged over an empty directory and minted a change recording 1 deletion. Workspace::stale_debt_the_surface_left, the one scoped deletion a surface is allowed, compared the written set by name, and a case-only rename preserves the bytes, so the digest guard that exists to protect the operator matched the file the surface had just written: loot surface printed the path it had surfaced, left the directory empty, and the next loot status read it as deleted, which is the reproduction #2011 declined on the false reading that a surface prunes nothing. Each was reproduced by hand through the spawned binary first and then as a new spawned pin, and the pair went red over an empty listing before the change (4 passed, 2 failed) and is green after (6 passed); with the delta writer put back to removing by name they go red again (5 passed, 1 failed) and so does the new census (0 passed, 1 failed), and the stale-debt prune put back reddens the same two with the same counts. Both writers prune through prune_unwritten now. Which working-tree removals are weighed stops being a sentence: workspace.rs carries a census that reads every removal joined onto a working-tree root out of loot-cli/src and loot-core/src, names what each one removes and what the walk cannot see, and it named the offending function under each of those two mutations, went red at its own classifier control with ROOTS emptied and went red with a name dropped from its expected set (0 passed, 1 failed each). one_entry refuses a path that is or passes through a symbolic link now, since file_id follows links and on Windows two paths with one id were otherwise one entry, so fs::rename would have moved a link over the file it points at; the check is the symlink_on apply-patch already made, moved into the module, pinned with a junction here and red without it (5 passed, 1 failed). The hard-link pin names its links A.txt and a.txt so the fold map reaches the entry rule at all, where old.txt and new.txt never called it, and it skips a filesystem that folds case with a note; it stays unix-only and its red-first has not run here, though the body type-checks and runs on windows with the cfg lifted (7 passed). The four case probes become one loot_core::disk_entry::folds_case, and with it answering no the entry pin and two apply-patch case pins go red (5 passed, 1 failed; 18 passed, 2 failed). enclosing_fn moves into source_walk beside the #1929 census that asked it first and strips any visibility, after pub(super) made the new census name the wrong function. ADR 0022 carries the correction and its prunes-nothing claim is gone, ADR 0082 section 4 states where the probe and the link refusal live, CONTEXT.md names both writers and the census, the surface.rs and materialize_target notes stop claiming the two prunes answer the same set of failures, and the rewrap leftovers in ADR 0022, CONTEXT.md and the account page are fixed. The perf gate dry run reads every counter the same before and after and says no move both times, the site gate is green, and the workspace suite is green (3824 passed) (#2018) baec4112 · dbf3dbe6…diff
  • a test is kept only for a bug whose damage outlives its detection (ADR 0105, docs/agents/testing.md): disclosure, durable bytes, signed history, silent-pass refusals and machine contracts keep their tests, everything else is trusted or fixed fast, and assertions are on outcomes, never prose. the implementer brief asks that question before a test is written and owes a mutation proof only for a must-test pin. the suite is cut to it in one pass, Rust test functions 4848 to 1665, site vitest cases 1307 to 258 and SDK cases 160 to 64, with the living docs and comments that named deleted tests corrected and ADRs, tickets and released migrations left as history. cargo test green at 1945 passed with 6 ignored, the site gate green at 240 passed, the SDK at 75 passed with its one known macOS path failure from before the cut (ruwknvpw) 61f0184b · dbf3dbe6…diff
  • loot-core, loot-codec, loot-wasm, loot-hygiene, loot-identity, loot-revset, loot-ticket and loot-count production comments cut by 72% to the docs/agents/writing.md standard: history, ticket numbers, rosters and ADR retellings removed, contracts, formats and safety reasoning kept; comment-only, Rust token streams identical, test modules untouched (yrkykmsn) c1305a2b · dbf3dbe6…diff
  • site and sdk production comments cut by 71% to the docs/agents/writing.md standard: history, ticket numbers, rosters and ADR retellings removed, security reasoning, browser quirks and directives kept; comment-only, the TypeScript AST without comments identical, built bundles unchanged but for the build stamp (yrkykmsn) d8c01375 · dbf3dbe6…diff
  • docs/agents/writing.md is the standard for comments and docs: a comment says only the why the code cannot, rg and loot log answer who-calls, which-members and when-changed better than a cached comment, and history, ticket numbers, rosters and emphasis are deleted on sight. AGENTS.md links it. CONTEXT.md, AGENTS.md, docs/agents, the skills, specs, READMEs, research and evidence are cut by about 65% to it, every cited heading, § number and test-pinned string kept; files the yrkykmsn ticket (yrkykmsn) 8e3c7b83 · dbf3dbe6…diff
  • the ADRs are cut by 71% to the docs/agents/writing.md shape: Context, Decision and Consequences in about a page each, amendments folded into the decision they amend, function tours, test counts, sweeps and ticket archaeology removed; every title, Status section, cited § and numbered decision kept. ADR 0103 folds in the vmusyoxz, snmzospn and xrqwmovz amendments and restores the operator rulings of 3e1a10ce that the loot-core comment land reverted (yrkykmsn) 0fc947d9 · dbf3dbe6…diff
  • Windows correctness: on a filesystem that folds case a tree write keeps one spelling of names that differ only in case, records the rest never-materialized, says so after the verb and doctor fails naming them (mqzorvmp); a file another process holds open is retried, then left held back while the rest of the tree is written, and the verb names it and exits 1 until surface finishes it (wkuvwpxq); a name Win32 rewrites, such as one ending in a dot, is read and written through its verbatim path (wroorswy); every machine shape prints tree paths with / (uykmwpkm); --passphrase-file refuses a file whose access list lets others read it (sqyqkkrq); ci/install-smoke.ps1 runs its loot calls under Continue (xtryrwrm); AGENTS.md, the issue-tracker doc and the CLI page name the Windows PowerShell 5.1 pipe and stderr traps (xryxuzzl) (novqmmmy) and the escape hazard of editing through scripts (tumpytwl); and the pre-land suite runs green on Windows: path allow-lists by component, the fake spawner by file stem, the installer proxy tests in sh's own path spelling, gate programs without the in-turn switch, the config watch off inside its own unit tests, an hour for the packing tests and 120 s for the site's vitest; red before on the desktop each (tree_write_hazards 0 passed, 1 failed per case with its fix out; the verdict and passphrase-file tests 0 passed, 1 failed; guards 1 passed, 2 failed; installerProxy 3 failed; the beside-rows test under the switch 0 passed, 1 failed), green after; with tickets filed for the Windows audit under zxqkmrny and for landing from the desktop under wmputmok (ylwumypm) (nptlnmxl) (vuusszqt) Perf-Baseline: reset this desktop host's baseline is its last land, 2026-10-08 (a8d827fe49b4); landed main has since moved offer_addresses_delta1 24 -> 1 and store_file_reads 21 -> 20 through the Mac's lands (nutxovpx) 062262da · 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.