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 private tier counts ACTIONS at the one seam every handler enters through, and the account reference it carries is the notice second identifier rather than a footnote loot#1758, the third of loot#1619 three collection points. Every api.private.* request enters through withPrivateSession, so the row is queued there on the way OUT with the status actually sent - one instrumentation point rather than one per route, which means a new endpoint is counted by construction and a test pins that every api.private.* file uses the seam. Deliberately narrow: the beacon owns views, the log owns volume, this owns actions. Counting anywhere wider would either double-count with the beacon or undercount behind the 60-second cache. The path is the ROUTE SHAPE, which on this tier is not a formality: owner, repo and file path all travel in the QUERY STRING, and routeShape drops the query before any rule runs. The pin asserts the repo name is absent from the serialised row, not merely that the path looks right. account_ref is a keyed SHA-256 digest of the Clerk id, 32 hex, stable ON PURPOSE - the opposite choice from the visitor key, because its entire job is to let an erasure request find every row of one account. A read of the metrics database yields nothing a third party issued; an erasure can still compute the value to delete by. A 401 row carries NULL rather than a reference to nobody, so the one-subject-tier CHECK reads it as no subject. The notice moved with it, in nine sentences. The page said in so many words that the records carry NO account reference and that there is ONE identifier; both are now false and both are now pinned in the other direction. What the page does NOT claim is as deliberate: loot#1622 says the reference lives with the account and is deleted on request, and only the second half is built - no account-deletion hook removes these rows - so the page says on request and says the automatic link is not built, and a test refuses the flattering version. Rendering found two more sentences that had become misleading rather than false: Erasure said deleting the account deletes it, which now read as covering the counted rows, and the retention section said keyed rows lose their meaning when the salt dies, which is true of visitor keys and the opposite of true for account codes. Both now say which rows they mean. 547 site tests pass; budget green with 263 B of slack left on /privacy, so the next notice edit will need a recorded raise. 3bb326ce · dbf3dbe6…diff
  • the private shell stops dying a minute after /account: it authenticated with Clerk 60-second __session cookie while no Clerk JS ran on /private to refresh it, so every private call 401d and a reload wiped the vault. per the operator grill (ADR 0096, reversing #930 dec. 4), Clerk JS now runs on the private routes, loaded on demand behind PrivateGate so public pages carry none, under the strict nonce CSP widened only for Clerk (its frontend API host read out of the publishable key, img.clerk.com, the Turnstile and protect hosts, and worker-src blob: for its session timers) with the request nonce passed to ClerkProvider; every private call goes through one privateFetch that sends a Bearer from getToken and retries once with a fresh token, and /api/private/* no longer accepts the cookie; the vault is wiped only when Clerk reports signed out or a different user, or on Lock, and an HTTP status never wipes it; signed-out /private renders SignIn in place and returns to the requested URL, and the private bar gains Sign out beside Lock. the vault, private shell and CSP comments and CONTEXT.md now say what is true: the wrap key can decrypt, so any script on this origin can recover the seed, and the wrap protects it at rest; the boundary is this origin script set, loot code plus Clerk. tests for the CSP, bearer lane, retry and wipe triggers and the built server, each red under a named mutation and restored; site gate 804 passed, every surface lighter; a CSP-enforcing signed-out load renders SignIn with no violation and /why loads no Clerk; workspace suite 4549 passed. the operator live check closes the ticket (#2396) 25ab3fa8 · dbf3dbe6…diff
  • private api answers carry a Server-Timing header from withPrivateSession, recorded by the new site/src/server/timing.ts: each timed step names itself where it is written, the session verify as verify.pem or verify.jwks and each pool wait and statement as identity, owner, member or membership .wait and .query, each name with its summed duration and run count, then total. a private request looks its account up once through the new sessionAccount, where /repo had looked it up 2 or 3 times and /repos once plus once per key. clerk.ts verifies over CLERK_JWT_KEY, the instance public key, when it is set: without it @clerk/backend refetches the JWKS whenever its copy is 5 minutes old, 12 fetches over a simulated hour at one request every 30 s against at most one per key id with the key, so the clerk.ts header claim of a networkless verify was false and is corrected, as is docs/specs/loot-forge.md. a key id goes to the static key only after a token under it verified over the JWKS, since Clerk files the static key under any key id a token names, in an unbounded cache, before the signature check; a signature the static key refuses goes to the JWKS, refetched at most once a minute, and a key id the JWKS then verifies stays with the JWKS and warns once, so a changed instance key keeps verifying under a new or the same key id, and a refusal on a claim never falls back. measured on a local Postgres through the live suites, the database side of an owned or a member repo read took 1.7 ms with one identity query, and the verify costs about 150 us in process over either key. pinned in private-timing (9 tests), clerk-verify (8) and one test each in owner.pg and member.pg. red under named mutations, each restored: the account looked up per ask (5 failed and 4 passed of 9, and 1 failed and 89 passed over the live suites), the header dropped (3 and 6), the static key for an unlearned key id (5 and 3 of 8), fallback on any refusal (1 and 7), no fallback (5 and 3), no demotion to the JWKS (2 and 6), no forced refetch (2 and 6), refetch unbounded (1 and 7), CLERK_JWT_KEY ignored (6 and 2), escaped line breaks kept (4 and 4). cargo test green, 4831 passed over 144 test result lines with 15 ignored, the site gate green at 909 passed, and the site live suites 90 passed through ci/local.sh. CONTEXT.md gains Private request timing. owes a site deploy, which should set CLERK_JWT_KEY in the site env half (uyzzknlm) 3cfbe0dd · dbf3dbe6…diff
  • each statement of a private route is named in its Server-Timing: a pool query takes the name of its statement beside its SQL and records it under the pool prefix, owner.tickets.graph for one, where every statement of a pool summed under one name such as owner.query; the transaction statements are begin, bind, commit and rollback, the identity transaction is timed too, the anonymous read pool takes the names as well, json times writing the answer as answer, and the Tickets fold is tickets.first. the Tickets read reads what it answers by key: the head ticket files from tickets/ on in the tree key, in byte order and without the published flag it never answered, the history as the parent edges walked from the head, and the touches from tickets/ on in the repo touches, each id as hex from Postgres, where it read the whole head tree, every change and parent edge of the repo through views that read every change on the forge, and every touch of the repo, and turned each id into hex in the site. the answer is the same but for the order of its files. measured on a throwaway Postgres 18 shaped like this tracker, 5,463 ticket files at a head 1,400 changes deep with 3.8M ticket entries in the history trees, the read and its JSON took 78 ms before and 33 ms after, medians of 15 in two rounds, and with a second repo of 200,000 changes 151 and 152 ms before and 32 ms after; the two answers compared equal, files as a set. pinned in the new owner.pg tests that count a generation across a merge and past a parent the repo does not hold and that read the Tickets view files, history and touches through keys, in the pool timing tests now expecting each statement by name, and in private-timing, which names the writing of its answer. red under named mutations, each restored, over the 5 selected live tests: roots taken without asking the change view (1 failed and 4 passed), the walk step without OFFSET 0 (1 and 4), the step as a plain join (1 and 4), the touches without their bound (1 and 4), the files without their bound (1 and 4), the owner pool under one name (1 and 4); and the answer untimed (2 failed and 8 passed of the 10 private-timing tests). not taken: grouping the touches by change in the answer, since writing the whole answer took about 2 ms. the site gate green at 914 passed and the site live suites 92 passed; no Rust changed. CONTEXT.md says so. owes a site deploy; it also carries comments on uyzzknlm, zsxqmrtm, woyvmtwq and kwlxstko (ylrvoopz) 2a747a82 · dbf3dbe6…diff
  • the site server records every request as one wide event and prints it as one JSON line (ADR 0101): lib/wide-event.ts holds the rules the browser will share, the declared field catalogue and its reductions, the error capture that scrubs a message and drops it on /private and /api/private, and the tail sampler that keeps every error, every request of 2 s or more and every signed-in surface and 5 percent of the rest at a recorded sample_rate; server/wide-event.ts is the per-request recorder, which also prints exact per-minute counts. start.ts runs every request under it first, timing.ts spans land on it, withPrivateSession and withSession record their caught error on it where they printed it raw with console.error, and router.tsx reports the loader and render errors the router answers 500 without throwing, seen live as a 500 event with a null error before that seam. no identity yet. ADR 0101 section 6, the glossary and ylmnvrtp now name the browser as the forge caller, since the site server reads the forge database directly. pinned in test/wide-event.test.ts, 21 tests; red under named mutations, each restored, failed and passed of 20: the private message kept (1 and 19), a raw path kept (2 and 18), an undeclared key kept (1 and 19), an error sampled like the rest (5 and 15), the quote scrub gone (2 and 18), only kept events counted (1 and 19), a throw not recorded (1 and 19), our own traffic not marked internal (1 and 19), spans not forwarded (1 and 19), the owner seam printing raw (1 and 19), the middleware off (1 and 19), and of 21: the router seam off (1 and 20). site gate green at 1049 passed. owes a site deploy (oqqwzwkp) bb784ff1 · dbf3dbe6…diff
  • the browser reports its errors (ADR 0101): lib/error-capture.ts, eager on every page at about 944 bytes, sends an uncaught error, an unhandled rejection or a router-caught error with the page last 20 steps and a page load id held only in memory to POST /api/errors, which reduces it by the server rules and prints the wide-event line with no database credential; privateFetch carries the page load id and the private seam records it with the account reference, neither for a caller who objected and never failing the request; a browser error whose last step was a forge 5xx carrying x-loot-event is upstream and opens no issue, one with no forge event is ForgeUnreachable (ylmnvrtp); migration 0007 files page_load, account_ref and crumbs; /privacy gains the browser paragraph the operator approved, and its sentence that no identifier is kept now names the two. pinned in errors-client.test.ts, 15 tests, and errors.pg.test.ts, 8 over Postgres 18; red under 11 named mutations, each restored, each 1 failed of 15. site suite 1082 passed (pvypzlpl) b908ba9f · dbf3dbe6…diff
  • the workbench keeps the head manifest and the Tickets route answer at rest between visits, sealed with AES-GCM under the vault record wrap key with the entry key as additional data and the repo named by a digest, and asks again with If-None-Match: both routes tag their answer with the sha256 of its body and answer 304 with no body to that tag, a weakened one included, so a repeat visit downloads nothing while the answer is unchanged; a digest rather than the head or version, because a manifest row published flag and the repo header move while those do not. an entry is written only once this tab holds an unlock and while the vault holds the record it was sealed under, checked in the writing transaction, and Lock, sign-out and a change of user wipe it with the seed; the device database moves to version 6. the decrypted fold is not kept. red under named mutations, each restored: plaintext at rest (5 failed and 13 passed), no additional data (1 and 17), the key without the repo (2 and 16), the repo named as plaintext (1 and 17), the wipe skipping the store (4 and 14), no record check in the write (1 and 17), no live check (1 and 17), kept before the unlock (1 and 17), no tag sent (2 and 16), a 304 passed through (1 and 17), the server comparing strongly (1 and 17), the server tagging the version alone (1 and 17), and in the first reads the manifest or the tickets route asked without the cache, or every selector asked through it (each 1 failed and 4 passed). site gate green at 1138 passed; cargo test green, 5018 passed over 144 test result lines with 15 ignored. owes a site deploy (lnmntzxw) 0a84402e · 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
  • an account act a live key may do is a request it signs, and an account an invite opens has no Clerk user (ADR 0120, migration 0075): the forge app takes Authorization: Loot-Key over a statement of one method, origin, path, body hash and signing millisecond as the session of the account the key is live on, only on routes that name the lane (identity me, handle, label and notifications, billing plan, private me, repos, repo, members and watch), refusing a statement five minutes from its clock, one signed for another forge, and a changing request signed no later than the key last one (account_key.last_request_ms); a key the door admits by a row of its own opens a keyed account for itself with no sign-up, whose live keys add and retire keys, while an account with a Clerk user keeps adding and retiring signed in; loot account show, open, handle, add-key and retire-key, loot member list, add and remove, and loot plan drive it with porcelain and JSON and refusals coded by status; the plan resync, the notification sender and loot-forge --delete-account skip a keyed account Clerk does not know; with the origin unchecked, the body unchecked, the clock taking an equal time, the door not asked, a key adding keys to a signed-up account, and every lane taking keys the lane tests went red (10 passed, 1 failed each); cargo test 2634 passed, the site gate 413 passed and ci/local.sh green against Postgres 18 (zoovvovz) 92fe8a10 · 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.