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 forge live-database suites now run in CI: test-main.yml stands up a postgres:18 service, provisions it the way setup-forge.js does including its default privileges, migrates it with the commit own loot-forge --migrate, sets every LOOT_FORGE_TEST database url the Rust and site suites read, and runs cargo test and then the site pg tests against it. LOOT_FORGE_TEST_REQUIRE_DATABASE turns a database test skip into a failure through pg::live_opt_in and the site skippingLive helper, and with it set and no url 91 Rust tests and all six site pg files fail, while two half-suites that used to skip silently now say so. The default-privilege tripwires run in CI by decision, and fail on a cluster without provisioning. A new migration that neutralises the roster policy passed the bare suite and failed rls.rs and membership.pg.test.ts against the cluster. It is a canary on landed main and not a pre-land gate, and the prose that said no workflow sets these urls now says that instead (#1735)
c0931f78 ·diffdbf3dbe6… - the Tickets view on the private workbench, verdict E of #2411 (ADR 0094, ADR 0098 §1): a view module, its VIEWS line, routes for tickets, tickets/<id> and tickets/q/<query>, and a read route, /api/private/tickets, that answers the files the forge head holds under tickets/ as paths and addresses and each ticket path first touch in the head history with its generation. the browser fetches the objects from the forge by address, opens them with the session keys and folds them in wasm with loot_ticket::fold, the fold loot ticket now folds through too, moved out of loot-cli (ticket_read.rs: readTickets, ticketWants, ticketKinds), so the web reads a ticket as the CLI does and in the same causal order. the page is the conversation page for every ticket and map, a timeline ending in the resolution card, a comment and resolve composer and a right rail; the panel with search, saved views, maps, labels and kinds; and on a map a Conversation and Board switch whose board lays out Waiting, Frontier, In a lane and Resolved under the decisions so far, where a drop onto a card is a wait-on. sealed tickets are withheld rows, and each control names its loot ticket command. a write publishes one change through the SDK publish, now publishTicketWith over an injected core (sdk/src/ticket-publish.ts, assertStowAccepted moved to stow.ts); the pending bar holds writes in flight, and a collision shows both versions and asks. a session whose key is not the namespace owner reads, and lanes, which the web cannot see, are said to be so. connect-src is not widened, since the forge origin it names covers the repo endpoints, pinned by a CSP test, and a built private route loaded in headless Chrome under the enforced policy loaded the view and the wasm core with no violation but the control fetch meant to be refused. public surfaces grow by 229 to 236 B gzip, the route definitions. red under ten named mutations, each restored: the least touch taken as the latest (0 passed and 1 failed), the timeline ordered by name (0 and 1), waiting ignoring closure (0 and 1), the shared fold ignoring a label removal (0 and 2, the CLI label test and the browser read test), a touch outside the head history kept (1 failed and 2 passed), a generation counting a parent never sent (1 and 2), the board waiting column taking the frontier (1 failed and 7 passed), any session writing (1 and 7), an own key held without unsealing (1 failed and 16 passed), and the parent edges swapped in the read route SQL (1 failed and 78 passed over the live Postgres suites). cargo test green, 4739 passed over 145 binaries with 13 ignored, the site gate green at 856 passed, the live Postgres suites at 79 passed, and the SDK suite at 153 passed. owes a site deploy (#2432)
94447d12 ·diffdbf3dbe6… - 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 ·diffdbf3dbe6… - the History view reads its ledger and its bands by key: the ledger walk reads each step of parents through a lateral OFFSET 0 subquery over the parent view, and the page change rows and the size count read the change view the same way, so no step reads every change on the forge; bands() restricts the change view by the version ids it was asked for and reads the tree view laterally by manifest id and path, and forge migration 0028 adds change_node_by_manifest, the index the tree view gate asks a change by, so that gate no longer scans change_node once per touched path. the views and their gates are unchanged. measured as forge_owner on a throwaway Postgres 18 with 5,000 changes and 7.6M tree entries, medians of 7: page 1 of the ledger of a 1,400-deep line 1.7 s to 21 ms, its size query 1.7 s to 19 ms, and the bands of a 50-version page whose changes touched 6,356 paths, the ids bound as one array as the site binds them, 25.7 s to 56 ms, and 547 ms without the index. pinned in plan pins in owner.pg, member.pg and read.pg refusing an unkeyed read of change_parent, change_node or tree_entry in the ledger page, the size and the bands, planned with change_node holding enough rows that a keyed read wins, since on a near-empty table the gate read tied with a walk of the primary key and was taken. red under named mutations, each restored, each 3 failed and 7 passed over the 10 selected tests: the step as a plain join, the step without OFFSET 0, the page change rows as a plain join, the size count as a plain join, the bands tree read as a plain join, the bands change read without the id restriction, and the index dropped. not taken: an index on path_touch(repo_id, version_id), since the scan of the repo touches took 2 ms of the 60 ms bands query. cargo test green, 4829 passed over 144 test result lines with 14 ignored, the site gate green at 892 passed, and the site live suites 88 passed, also on a fresh cluster through ci/local.sh. owes a forge deploy for migration 0028 before the site deploy; it also carries the comment of review sweep 5 on mpkswzkl and files its fix-up ticket ztyxspll (rlztuvmo)
c8bae938 ·diffdbf3dbe6… - 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 ·diffdbf3dbe6… - 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 ·diffdbf3dbe6… - the History ledger walks one depth a step and bands a page asking each change tree once: ledgerWalk reads the parents of each version once, at its least depth, carrying as seen the versions of each depth that reached two or more, where its UNION over version and depth rows re-read a version once for every depth a path reached it at, 37,044 reads of parents for the 1,366 versions and 75 merges of this repo graph, which the linear fixture of rlztuvmo could not show; bandsOf groups the page touches by version and asks the tree view for each change with its touched paths as one array, so the view is read once per change and in the plans measured its gate ran once per change, where both ran once per touched path. measured as forge_owner on a throwaway Postgres 18 with this repo graph as a fixture, medians of 7: a first ledger page 273 ms before and 37 ms after, the ledger size 273 and 36 ms, and the bands of a page touching 6,170 paths 82 ms over 142,724 buffers before and 34 ms over 20,582 after; over the 1,400-deep line of rlztuvmo the page went from 32 to 34 ms and the bands from 21 to 16 ms. the answers compared equal row for row at depth caps of 2000, 300 and 7, and the bands over three sets of versions. live the page had read 644 ms and the bands 363 ms; the fixture reproduced the walk and not the whole bands gap. the seen rule was checked against a plain breadth-first walk over 20,000 random graphs with several heads, missing parents and a depth cap: no mismatch, and 10,927 and 3,610 mismatches with seen never grown or grown only past two versions. pinned in a new owner.pg test over a ladder of 8 diamonds: the answer, a walk capped at depth 5, and the plan loops, no read of change_parent run more often than there are versions and none of tree_entry more often than there are changes. red under named mutations, each restored, over the 3 selected live tests: the old walk back (1 failed and 2 passed), seen never grown (1 and 2), seen grown only past two versions (1 and 2), the old bands back (1 and 2), and the bands asking one path at a time (1 and 2). cargo test green, 4832 passed over 144 test result lines with 15 ignored, the site gate green at 914 passed, and the site live suites 93 passed. CONTEXT.md says so. owes a site deploy and no forge migration; it also carries a comment on ylrvoopz (zlulwtlw)
05f831e6 ·diffdbf3dbe6… - the History ledger walk carries no record of the versions it read on its rows: each row writes its depth as the scale of a zero, 0 then 0.0 then 0.00, and since a numeric compares by value a recursive UNION drops every later row of a version, so the walk keeps one row per version, at its least depth, and reads its parents once, where the zlulwtlw walk carried seen on every depth row and over 16 lanes of 2,100 changes stored 1,127,928 kB and took 9.8 s for a first page. measured as forge_owner on a throwaway Postgres 18, a first page in medians of 3, for the walk before zlulwtlw, the zlulwtlw walk and this one: this repo graph 259, 36 and 31 ms, the 1,400-deep line 33, 34 and 32 ms, 2 lanes 91, 373 and 87 ms, 4 lanes 187, 1,067 and 182 ms, 8 lanes 361, 3,055 and 338 ms, 16 lanes 735, 9,823 and 700 ms; the size query over this repo graph, the line, and 2 and 16 lanes went alike, 258, 36 and 29 ms, 32, 33 and 30 ms, 86, 381 and 84 ms, and 686, 9,463 and 654 ms. the answers compared equal to the walk before zlulwtlw row for row over this repo graph, the line, and 2 and 16 lanes at depth caps of 2000, 300 and 7, and over 21,000 random graphs with several heads, missing parents and depth caps: 143,645 rows and no difference, where a step of two places differed on 17,657 graphs and a value distinct per depth left 47,724 versions walked more than once. pinned in a new owner.pg test over 4 lanes of 150 changes: the answer, a walk capped at depth 5, and no CTE the page scans storing more than 256 bytes a version. red under named mutations, each restored, over the 4 selected live tests: the zlulwtlw walk back (1 failed and 3 passed, 1,642 kB against a bound of 150), the walk before it back (1 and 3), a value distinct per depth (1 and 3), and two places a step (2 and 2). cargo test green, 4842 passed over 144 test result lines with 15 ignored, the site gate green at 915 passed, and the site live suites 94 passed. CONTEXT.md says so. owes a site deploy and no forge migration (rmwmkyvu)
01378d5e ·diffdbf3dbe6… - a forge push no longer writes an index over every tree entry: migration 0031 drops tree_entry_by_object_manifest and keeps repo_object, the addresses each repo tree names, derived by a trigger on repo_change and backfilled under a lock, and the fetch residue (repo_referenced_objects) and each tier object and tombstone views read it by key, where they asked tree_entry by address. on a throwaway Postgres 18 seeded with 1,400 versions of 7,400 paths, the tree insert of a one-change push after a checkpoint went from 373-412 ms, about 8,000 pages dirtied and 49 MB of WAL to 61-66 ms, about 300 pages and 3.3 MB, the trigger adding 12-14 ms to the repo_change insert; the residue asked for 2,200 addresses went from 286-327 ms to 2.9-4.4 ms. ADR 0102 records the measurements, the levers that did not move it (COPY, a narrower index, hash partitioning) and why content-addressed tree nodes and delta manifests are deferred. pinned: every_index_on_tree_entry_leads_with_the_manifest_id, repo_object_holds_the_addresses_each_repos_trees_name, the_residue_asks_repo_object_by_key_and_never_the_tree, every_view_of_an_address_asks_repo_object_by_that_address_and_never_the_tree, migration_thirty_one_backfills_the_set_from_the_trees_already_on_file and two migrate.rs guards over the migration text; red under named mutations, each restored: the index kept (2 failed and 3 passed over the lib pins), no trigger (2 and 3, and member_read 1 failed and 8 passed), the residue back on the join (1 failed and 6 passed), the owner object view back on the tree (member_read 1 and 8, the view guard 1 and 4), and no backfill (1 failed and 9 passed). the rls and member_read fixtures file a tree before its change, as the forge does. ci/local.sh green, cargo test with the live suites 4984 passed over 145 test result lines with 15 ignored, and the site live suites 101 passed. owes a forge deploy, which applies migration 0031 (yznpntky)
92bb0631 ·diffdbf3dbe6… - a test is kept only for a bug whose damage outlives its detection (ADR 0105, docs/agents/testing.md): disclosure, durable bytes, signed history, silent-pass refusals and machine contracts keep their tests, everything else is trusted or fixed fast, and assertions are on outcomes, never prose. the implementer brief asks that question before a test is written and owes a mutation proof only for a must-test pin. the suite is cut to it in one pass, Rust test functions 4848 to 1665, site vitest cases 1307 to 258 and SDK cases 160 to 64, with the living docs and comments that named deleted tests corrected and ADRs, tickets and released migrations left as history. cargo test green at 1945 passed with 6 ignored, the site gate green at 240 passed, the SDK at 75 passed with its one known macOS path failure from before the cut (ruwknvpw)
61f0184b ·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…
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.