connor / loot

connor/loot

Changes touching this path

  • the site reads forge trees through database functions of each read family and names no storage table: forge migration 0064 creates tree_at, entry_at, tree_under and bands for forge_read, forge_owner and forge_member, SECURITY INVOKER sql over that family views with EXECUTE for the family role alone, which Postgres inlines, so each statement plans byte for byte as the view query it replaced, and site/src/server/read/tree.ts calls them for the tree listing, the one-path read, the Tickets files and the History bands. measured as each tier on a throwaway Postgres 18 with 7.2M tree entries and a 7,240-path head, the answers equal before and after, server execution medians of 200 unchanged (listing 23.7 and 23.5 ms, one path 30 and 23 us, ticket files 0.62 and 0.57 ms, bands of a 50-version page 16.6 and 15.6 ms), planning up to about 0.1 ms more per statement for the inlining, and the tier reads through the site modules within noise over three interleaved rounds of 21. pinned by tree-functions.pg, which compares each tier view query with its function over a metadata-public and a metadata-private repo for the anonymous reader, the owner, a stranger and a member and refuses another family role the functions, and by forge-storage-boundary, which fails on tree_entry anywhere in site/src; red under mutations, each restored, 3 failed of 3: the owner one-path function without its path filter, the anonymous role granted the owner tree function, and tree_entry back in a site comment. cargo test green at 2268 passed over 69 test result lines with 6 ignored, the site live suites 92 passed through ci/local.sh, the site gate 365 passed. CONTEXT.md names the tree read functions. owes a forge deploy with --migrate, then a site deploy (nqlxwuzz) 56659d21 · dbf3dbe6…
  • the forge writer and tree reads for delta manifests, slice R2b of tlupspqp: migration 0066 rebuilds a tree from either layout in tree_at, entry_at, tree_under and bands of each read family through new gated views of tree_delta and of the base link, in an ungated manifest_tree the forge reads use, and in the published index; a repo_change trigger rewrites whole a delta whose base the arriving repo does not hold, the repo object trigger takes the upserts of a delta, a takedown deletes ops and keeps a base still named, and an index on repo_change by version keeps the family gate a probe; the forge files a new manifest as ops over the first parent manifest when the repo holds it, the base is below depth 63 and the ops are at most half the entries, behind LOOT_FORGE_MANIFEST_DELTAS, off unless on; on a Postgres 18 fixture of 7.3M tree_entry rows the anonymous head listing took 21.8 ms whole and 23.8 ms over 55 deltas, one path 0.04 and 0.25 ms, bands of 50 versions 3.6 and 12.6 ms, and the forge read of 760 trees 3.0 s and 0.34 s; red under mutation, each restored: the trigger skipping its rewrite (1 failed of 1), the family walk letting the farthest op win (1 of 1 forge, 1 of 3 site), the anonymous delta view ungated (1 of 3), the published index on whole rows only (1 of 3), the forge rebuild over an empty base so change ids stop recomputing (1 of 1), the writer dropping removes (1 of 1), a takedown keeping ops (1 of 1), the repo object set skipping upserts (1 of 1), the restore not copying ops (1 of 12) and an empty switch turning the writer on (1 of 1); cargo test green at 2381 passed, 0 failed, 6 ignored, ci/local.sh green on Postgres 18.6 with the site live suites at 93 passed, site gate 365 passed; owes a forge deploy with --migrate (tlupspqp) 4c1d2293 · 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.