connor / loot

connor/loot

Changes touching this path

  • the browser opens what the forge cannot: own-private read ships an owner read tier, a once-per-device unlock, and a grant mailbox that never acks (#1043) c8dd4da1 · dbf3dbe6…
  • the collaborator can read someone else's namespace: migration 0015 adds the fourth role forge_member and eleven forge_member views, one per relation 0009 serves, so the shared prefix-parameterised TreeReader reads either family unchanged - and the gate is strictly stronger than 0009's, because the app names only the account the Clerk session resolved to while the membership join sits INSIDE the barrier view, so the application cannot name a repo it is not a member of even by mistake. metadata_public is absent as both column and predicate, and repo_member is named exactly once, by the gate. Two premises did not survive, and the first is a defect in the decision itself: ADR 0077's and the ticket's literal current_setting of loot.reader_tenant cast to bigint DOES NOT fail closed. It fails closed for an UNSET parameter and not for a CLEARED one, because set_config with NULL leaves the empty string behind and casting that to bigint RAISES - which 0009 never met because decoding an empty string as hex does not. Proved by removing the fold from the shipped migration and reading invalid input syntax for type bigint, so the gate ships as nullif and then the cast, malformed values still raise deliberately, and withMember validates a positive decimal with the pin on both sides. The second is a defect in #1727, which landed earlier tonight: its exact-set spelling, that the views naming repo_member equal the forge_member family, is satisfiable ONLY by a family of one, because the ten chained views name the GATE view and never the base table - so a second member view gaining the roster, which is precisely the disclosure ADR 0077 forbids, read as CORRECTNESS under the old spelling. It is re-spelled to exactly forge_member_repo whenever the family exists, its vacuity guard extended to require the member family non-empty, and its positive control now plants four breaks where it planted two. The row-level-security interaction is proved rather than assumed, as three readings on one database in one moment: the seven enabled tables this family reads really carry relrowsecurity, read as a set; the role handed a direct SELECT on repo reads ZERO rows, which is 0014's own named accident and shows the policy system live for that role; and the same role on the same connection at the same moment reads its repo through the gate view and gets one. The mechanism is then named from the catalogue and red-proved by setting security_invoker, which takes the read to insufficient_privilege, and the failure text names the non-superuser deployment case so a future deploy diagnoses itself. The isolation break is ADR 0077's own named careless shape rather than an invented one - the gate keeps its repo_member join and loses only the correlation to repo, which passes every text guard in migrate.rs - and seven of eight tests fire on it. Rows are planted from tests and from the site, outside account_tier.rs's scan of src, the way rls.rs already recorded, so the tripwire is untouched and green. forge_member ships NOLOGIN and provisioning is a different repo, so the class answers 404 rather than 500 and is not an existence oracle (#1726) e76ca863 · dbf3dbe6…diff
  • an api route answers an undeclared method with the same 404 an unserved path gets, and the all-platforms table goes through the counted hop with the direct link beside it loot#1925 and the last site item of loot#1647, in one change because both are about what a URL on this site tells a stranger. The router looks up handlers[method], then handlers.ANY, and on neither falls through to SSR - so GET /api/beacon answered 200 with 5 KB of HTML while /api/definitely-not-a-route answered 404, measured live the day the beacon deployed. The difference told a prober which routes exist, which is the oracle the download hop refuses to be. One ANY_NOT_FOUND spread into every api.* route answers the bare 404 an unserved path gets. NOT a 405: an Allow header is the polite answer and exactly the one that confirms the route and lists its methods. A declared method still wins, and that is pinned as a fact about the router read from its source rather than assumed. A test walks every api.* file, so a new endpoint cannot arrive without the fallback. The table links and the sentence about them moved TOGETHER, which loot#1647 insisted on: switching the links alone produces a page that counts a click it calls anonymous. Each row now links through loot.millerbyte.com/dl with the direct R2 URL visible beside it, hopHref is null for anything the hop would refuse so a row can never render a counted link that 404s, and the manual- install note says the hop counts the release, the platform and the time and sends you on to the CDN that serves anonymously. The checksum instructions still fetch sha256.sum direct, because the hop refuses it on purpose - every land fetches that file and admitting it would count every land as a download. Rendered: all five rows carry both links, the note reads as one sentence. 610 site tests, budget green. 7c4f1a17 · dbf3dbe6…diff
  • the site read tiers read the tree at one version by its manifest key instead of scanning every tree entry on the forge: listTree joined the tree view to the change view, both security_barrier views that Postgres does not flatten, so the join could not reach the tree_entry primary key and was answered with a scan of the whole table, every repo and every version, hashed down to one manifest. tree.ts treeAt now reads the tree view in a lateral subquery keyed by the change row manifest id with OFFSET 0, the #2346 shape, for the anonymous, owner and member tiers alike, and a new entryAt reads one path by (manifest_id, path), which the private blob route and the anonymous blob and diff loaders now ask instead of listing the whole tree and searching it. the views and their gates are unchanged and no migration is needed. measured as forge_owner on a throwaway Postgres 18 with 1,400 changes and a 7,240-path head, median of 7 runs (of 5 on one core): at 1.5M tree_entry rows the listing went from 148.7 ms (304.5 ms on one core) to 19.1 ms, at 7.6M from 607.9 ms (1,618 ms on one core) to 18.6 ms, and the one-path read is 0.26 and 0.25 ms where the blob route paid the whole listing, the same 7,240 rows and md5 before and after. pinned: a plan pin in owner.pg, member.pg and read.pg asks for both statements with nested loops and sequential scans priced out and refuses a tree_entry read not keyed by the change row manifest id, beside one-path tests on each tier. red under named mutations, each restored, over the 7 selected tests: the old join (3 failed and 4 passed), OFFSET 0 dropped (3 and 4), the old join for the one-path read alone (3 and 4), and the path filter dropped (3 and 4). bands() in the history route has the same scan (about 860 ms at 7.6M rows) and is left as it was, with a comment saying why the lateral alone does not cure it there. cargo test green, 4757 passed over 144 binaries with 13 ignored, the site live suites at 85 passed and the site gate at 863 passed. owes a site deploy (nyvxmxqz) 7e0ae25b · dbf3dbe6…diff
  • a file open asks for its entry and then the blob store, where it asked for the entry, a presign and then the blob store: /api/private/blob mints the ciphertext URL in its answer through mintFor, the presign route gate over the row its tier answered and the same 60 s life, and openEntry fetches from it while more than URL_SPARE_SECONDS of that life is left and asks the presign route otherwise, never before the keyring has answered; the entry route already read one path by key since nyvxmxqz. a file open keeps the ciphertext it fetched in the object cache under the blob store origin, up to a sixteenth of the cache, and a file whose ciphertext it holds opens with the entry request alone, once that ciphertext opens as the object at its address. a read of the Tickets list again after a write asks the route again and folds the objects and keys the list shown was opened from, asking the cache, the forge and the keyring only for what the new head names that they lack, where it asked for the whole list. quick open shows each view list as it arrives, where it waited for the Tickets index. a file open leaves files.entry, files.key, files.cache-read, files.ciphertext, files.decode and files.open. pinned in vitest: a file open 3 requests before and 2 after, a file the cache holds 1, and a read again after a write of one file 8 objects and 8 keys asked for before and 1 and 1 after. red under named mutations, each restored: the carried URL never used (2 failed and 6 passed), used past its spare (1 and 7), fetched before the key (4 and 4), the cache not read (3 and 5), a refused entry not fetched again (1 and 7), no bound on what is kept (1 and 7), no ciphertext measure (1 and 7), the blob route minting no URL (1 and 2), a burned row minted for (1 and 2), a shallow entry minted for (1 and 2), the read again taking nothing from the list shown (3 and 21), asking the keyring for every key (2 and 22), folding only what it fetched (2 and 22), fetching nothing new (2 and 22), quick open waiting for every list (2 and 1), in the order of arrival (1 and 2), and updating once stopped (1 and 2). cargo test green, 4897 passed over 144 test result lines with 15 ignored, and the site gate green at 998 passed. CONTEXT.md says so. owes a site deploy (yvtvstwu) d5f588e8 · 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

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.