connor / loot

connor/loot

Changes touching this path

  • the forge's published surfaces render themselves anonymously, and each response's cache class rides out of the selector that produced it (#751) #749 built the read tier and nothing called it. This is the six surfaces #466's table named -- profile, repo home, tree, blob, history, diff -- as SSR routes over that tier, plus robots and a per-owner sitemap. Three properties are structural rather than configural, which was the point: STRICTLY ANONYMOUS (#486 Q4). No handler in site/src/server/forge.ts reads a request, a header, a cookie or a token; each takes only what the URL already says. So 'never serve one identity's view to another' is a fact about the module's signature rather than a cache rule someone must remember. Adding an identity parameter is the one edit that would break it. THE CACHE CLASS IS CARRIED, NEVER RE-DERIVED. resolveSelector already answers how a resolution may be cached; routes read loaderData.cache and map it in one place. That is what keeps the ADR 0032 trap shut: a change_id LOOKS like an address but is the durable handle carried across amends, so it resolves 'revalidate', and a pinned version_id is the only cache-forever class. Asserted twice -- a unit test on the header text, and a live render proving one URL family splits three ways. HONEST RENDERING (#497). A locked path shows its visibility tag and no bytes; grant_log is never queried, so a grantee set cannot leak from a surface with no way to learn one. Burned reads as a tombstone, sealed as 'Not published', absent as absent -- three outcomes a blank page would have made indistinguishable. The 404 is deliberately one 404: 'no such repo' and 'metadata private' must not be told apart. Also here: a published-only repo (metadata private, paths published) gets its index and nothing else -- no tree, no history, no diff -- which is 0005's barrier showing through the UI unchanged. Per #748 the profile lists metadata-public repos only, there is no global directory, and the sitemap is therefore per-owner: readable at a known URL is not consent to be advertised. vite.config.ts grows the prerender deny-list its own comment called unnecessary -- true until a route read a database. Acceptance: 49 tests green (31 new pure ones; the 8 read-tier tests against a throwaway 0001-0005 cluster), npm run build clean with exactly the five authored surfaces prerendered, and a 34-assertion end-to-end smoke -- real sealed bytes through R2 -> decrypt -> unzstd -> highlighted HTML, all three cache classes, every honest-rendering outcome. The client bundle carries no pg, no SQL and no credential. Publication: README.md, LICENSE-MIT and LICENSE-APACHE reach @world here, the set .lootattributes has declared since #750. Operator-authorised at the landing sign; nothing else in the tree changes tier. 2aa21bbe · dbf3dbe6…
  • the change ledger becomes the history surface, banded by what the server can read (#760) 8ad80be0 · dbf3dbe6…diff
  • every key an account ever held keeps resolving: migration 0008 publishes the one retired-to-canonical pairing the 301 itself discloses, and /k/<retired> redirects everywhere in one seam (#927, executing #506) 3a0fee42 · dbf3dbe6…diff
  • the landing hero becomes the receipt: one published object rendered as the ciphertext this host stores beside the plaintext a key opens, live from the forge, and no panes at all rather than invented ones (#1046) c729cf41 · 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
  • an account claims a handle on /account, once, and forge.loot.build/<handle>/<repo> resolves to the newest live key of the account, ADR 0103 decision 3: migration 0040 adds account_handle, keyed on the account and written by the site identity module, which may insert a claim and never change or release one, and forge_read_handle, the read tier half of the seam 0008 gives a retired key; the forge role reads account_handle and writes none of it. the forge rewrites /<handle>/<repo>/<endpoint> onto the /k/ mount of that key ahead of its router (loot-forge handle.rs), so a clone, pull or push through a handle is the /k/ request, the write rule included, and a handle nobody claimed is handed to the web as before; the site route /$handle/$ answers a 307 to the same path under /k/<key>, or the 404, on either host. a claim refuses a handle equal to any first path segment the host serves, read off the site route tree, the forge router through a copy a forge test holds equal to handle::served_first_segments, and the client asset directory. every answer to a request the forge rewrote and every answer of the /$handle/$ route carries X-Loot-Log-Path, the path with the handle and repo as :handle and :repo, a remainder of lowercase words kept and any other as /:path, never the query, so the edge can log it in place of a repo name. the ADR 0103 amendment and CONTEXT.md Handle say so. red under named mutations, each restored: the served-segment guard removed (1 failed and 1 passed of the handle unit pins, 1 failed and 2 passed over http), the rewrite layer removed (3 failed), a handle let match a literal in the overlap matcher (1 failed), the site copy short a segment (1 failed), a handle route sent to the forge from the brochure (2 failed and 17 passed), the reserved set without the forge segments (1 failed and 10 passed), handleHref matching inside a longer segment (1 failed and 10 passed), a 301 for the 307 (1 failed and 2 passed), the forge logging any remainder (1 failed and 2 passed), a rewritten answer untagged (1 failed and 2 passed), the site logging any remainder (1 failed and 12 passed), the route without its log-path middleware (1 failed and 3 passed); on Postgres 18, the forge handle read keeping retired keys (1 failed and 2 passed) and a second claim answering the old handle (1 failed of 27). cargo test green before the log header, 5104 passed over 148 test result lines with 15 ignored, and loot-forge green after it, 851 passed over 14 with 2 ignored; ci/local.sh green on Postgres 18 with the site live suites at 136 passed; site gate green at 1257 passed, every surface under its ceiling. owes a forge release and deploy, which applies migration 0040, and a site deploy (pkwrxnly) 6aa831db · dbf3dbe6…diff
  • the repo page is laid out by reader, ADR 0103 decision 4: /k/<owner>/<repo> stays one cached server-rendered page, README first with the files under it and an About rail with the clone command, who can read what, the live heads and a sign-in offer, and its 404 carries the same offer; an owner or member unlocked on the origin gets tabs, the head file table with sealed paths, the README opened in the page, the roster count and the workbench on the dot, drawn in the browser from a module and a Clerk a stranger visit never fetches; the home leads with the keys waiting to be accepted above the repos, which link to their one address; proposals, pipelines, settings and activity need reads the site does not have and are not shown. red under ten named mutations, each restored; site gate green at 1304 passed, about 215 B a surface (kkmzrqtm) 31dbf3e4 · 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 forge repo page no longer ships its whole tree: loadRepoHome sends the root level and the band it cuts from the head tree, where it sent all 8,166 rows of this repo as 1.3 MB of SSR payload to draw a 24-row table and five counts; FileTable takes a cut level and the member view cuts its own rows. built-pages.test.ts goes, as ADR 0105 keeps no test for site markup. tsc clean, site gate green (uwzmtwlx, qxqyqrvo) 4128c1d9 · 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
  • 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) (conflict resolution: site/src/server/forge.ts) 511708c2 · dbf3dbe6…diff
  • a handle may be renamed or released on /account, its old name retired forever in retired_handle and still resolving to the account, and handle/repo resolves to the newest live key holding the repo, else an older live key holding a public one, in the forge's rewrite and the read tier alike; migration 0043; a restore withholds a released handle; forge and site live suites green against Postgres 18, red with the retired-name refusal removed (rzzzklmz) 767ac89f · dbf3dbe6…diff
  • a retired key's repo opens at its /k/ address: the /k/$owner layout 301s a retired key's path to the live key only where the live key holds a readable repo of the name and the retired key does not, and the key's own page only while it lists none (ReadTier.ownerRedirect), since retiring never moves a repo; the workbench under /k/ (sywswsxx) had made the home's retired-key links strand, so the home now links every repo to its /k/ page; pinned against Postgres, mutation-checked with both keys holding the name; ADR 0100 and 0103 amended (oznokxzk) 35592e07 · dbf3dbe6…diff
  • names instead of keys: a person shows as their handle where the world can already tell — ReadTier.handlesOf names a key by its account's current handle for its newest live key, a retired key (whose 301 already publishes the pairing) and an older live key a public repo's <handle>/<repo> already reaches, asking only forge_read's views, so an older key behind private repos stays unjoined to its account (ADR 0103 §3, amended); the public server fn handlesOfKeys serves it 200 keys at a time, lib/handles.ts batches and caches it for the browser, and the home's ledger and the workbench's Author (tickets, the Proposals view) draw the name with the key in the tooltip and You for the account; pinned live in alias.pg.test.ts, red-proved with a loosened join, and in ledger.test.ts; ADR 0097 §10 and CONTEXT (ymswpzpv) f5343ce8 · dbf3dbe6…diff
  • names instead of keys in the rest of the views: history (workbench panel, ledger, path, quick open; the public history routes), pipelines (proposer, author, approvers, a non-runner pass signer), the proposal thread's replies and log grant, the roster's members, and the repo header's owner, read with the page as RepoHeader.ownerHandle so no page that names no one carries the handle read; PersonName kept out of the eager forge.tsx after it cost every page ~500 B; runner keys, ids and page titles stay keys; pinned in pipelines-names and handles tests (ymswpzpv) 1ab07b85 · dbf3dbe6…diff
  • restore what the 559b9cd6 catch-up merge dropped: names instead of keys in the views (30a95158), the valued-flag refusals (af3aa57a), the superseding-version ferry hunk (3882bab6) and the notification settings' migration 0056 registration, restore classing, tests, /account panel and route entries (6a1f5fad), with CONTEXT and ADR 0097; the 25 files that differ from the clean three-way merge of a9087957 and the desktop's 1a4faff6 are set to that merge's bytes, keeping the desktop's own changes (ymswpzpv) a7715d1f · 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.