Changes touching this path
- the browser mints the seed and the account binds the key: Clerk in the site's own routes, variant-B onboarding, and the account tier's one producer (#753)
Migration 0007 adds account_seed (the passphrase-wrapped envelope, opaque
ciphertext the server cannot open) and forge_identity, a NOLOGIN role scoped
to exactly the identity tier -- SELECT/INSERT on tenant, SELECT/INSERT plus a
column-scoped UPDATE of retired_at on account_key, the full row on
account_seed, and nothing else (pinned live by
forge_identity_is_scoped_to_the_identity_tier).
The producer lives in site/src/server/identity/ behind a verified Clerk
session (verifyToken in the site's own route handlers, reusing the millerbyte
Clerk instance and pattern, never the gateway service). Registration is one
transaction: upsert tenant on the verified clerk_user_id, add the key, store
the envelope, retire what rotation names -- and never zero live keys. The
Rust service still writes none of the tier; tests/account_tier.rs now guards
that boundary instead of a vacancy.
Onboarding is #487's variant B, the two-column contract: the app owns the 32
bytes (crypto.getRandomValues -> 24-word BIP39 over the ENTROPY, never the
64-byte derivation -> ed25519 pubkey via @noble/curves, held to the engine's
from_seed by the pinned RFC 8032 vector), a WebCrypto PBKDF2+AES-GCM envelope,
a .txt download that excludes the passphrase, and two consent checkboxes that
no download waives. Clerk mounts only under /account, which joins /k/ on the
prerender deny-list; every static surface stays static.
Follow-ons filed rather than folded: #926 (CLI raw-seed import, so BIP39
recovery reaches the CLI) and #927 (account-aware may_push, burn entitlement
via account, and the #506 historical-key 301s the anonymous read tier
deliberately cannot serve today).
278e1886 ·dbf3dbe6… - 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 ·diffdbf3dbe6… - key management on the site: a key can be retired by itself, named, and chosen at unlock. per the operator grill on #2398 (ADR 0100): POST /api/identity/retire retires one key of the signed-in account, refusing the last live key under the account-row lock registration takes and never re-dating a retirement, with no route to un-retire and no deletion, since #506 keeps every key resolvable; /account lists live keys and folds retired ones under a collapsed section, and the retire confirmation names the repos the key owns. names live in a new owner-only account_key_label table (migration 0027) that only forge_identity reaches, trimmed, at most 40 characters, with control, line-separator and direction characters refused and a CHECK repeating the cap; they reach only /account, the unlock picker and the private bar, always beside the fingerprint. the unlock picker lists every live key, defaulting to the key that owns the URL namespace, then the key this device last unlocked, then the only live key, and a key with no stored passphrase asks for its 24 words and can save one. both routes are Bearer only and refuse a key of another account; /api/identity/me stops returning the internal tenant id. rebased by hand over migration 0026 and ADR 0099. pg tests pin the role reach, route and picker tests pin the rules, each red under a named mutation; bash ci/local.sh green against Postgres 18 (4568 passed), site gate 842 passed. owes the setup-forge tripwire update, a forge deploy, then a site deploy (#2398)
a90c85fb ·diffdbf3dbe6… - 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 ·diffdbf3dbe6… - 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 ·diffdbf3dbe6… - 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 ·diffdbf3dbe6… - 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 ·diffdbf3dbe6… - the browser writes as the name minted on its key: loot login sends the <name>@loot comment of the key it registers first and of the key it holds on each poll, the forge keeps it once per live account key in account_key_name (migration 0070, SELECT and INSERT for forge_identity alone, named by no read role or view) and serves it to the owner beside the label, and nameOf passes it to the lockout check through writerName, falling back to the label, then the hex; a key registered before this or minted in a browser takes its name at the next loot login from a machine holding it; the move rail shows a refused space disabled with its reason beneath it, naming who the rule restricts it to; red without it: the web writer pin went 0 passed 1 failed with the label refusing tickets/security under restricted=connor and again with the label fallback dropped, and the restricted space pin 0 passed 1 failed with refused spaces omitted; ADR 0098 and CONTEXT say how; the site gate passes at 366 passed, 93 skipped, ci/local.sh is green on Postgres 18, and the suite is green at 2511 passed, 0 failed, 7 ignored (xynoxvlw)
144970ca ·diffdbf3dbe6… - 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 ·diffdbf3dbe6… - a repo and a keyed account are deleted on their owner signed request, which the operator tool carries out (ADR 0103 decision 10 amended, migration 0076): loot repo delete asks the forge over /repo/delete, behind the owner door, and the forge files a repo_deletion row and deletes nothing; loot account delete asks over the key lane, a keyed account by its live key and a signed-up one signed in, as a time on its tenant row; --cancel takes either back and --status and loot account read how it stands, each with porcelain and JSON; loot-forge --delete-requested, as the superuser and dry unless --apply, lists and then removes each requested repo by the takedown walk narrowed to that repo with no refusal recorded, and each account that asked as --delete-account does, keeping every other repo, every address another repo names, the account and its keys, and a repo pushed to since its request, which settles as moved; an act names its signing millisecond and is taken only later than the one on file, so a request sent again after its cancel or its deletion deletes nothing, and a restore does not put a deleted repo back; ADR 0062 fifth clause says carrying out a deletion its owner asked for is an agent to apply from the dry listing; repo becomes a served segment; with a moved repo deleted, the whole namespace cleared and the restore rule off the live tests went red (18 passed, 1 failed, then 16 passed, 3 failed); cargo test and ci/local.sh green against Postgres 18, the site gate 413 passed and the site live suites 104 passed (kvmrozqr)
2e682fec ·diffdbf3dbe6…
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.