Changes touching this path
- 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… - the second sweep's fix-up, and the guard at its centre could never have failed: it asserted that a view statement contains the member family prefix, while the statement BEGINS with create or replace view forge_member and then the view's own name - so the needle matched the name it was reading - and the two assertions beside it were absences that an UNGATED view also passes. The replacement computes the TRANSITIVE set of views reaching the gate, matching whole identifiers against each view's body rather than its header, and the contrast is committed rather than transcribed: a synthetic family per gate carrying an ungated base-table view, a shadow-prefix trap, and a one-hop and a two-hop view, asserting the OLD needle green on the first two while the new check refuses them, with the chained views as positive controls - a spelling that demands a direct FROM the gate fails that control, which is exactly why it is not the fix. The same shape had left the owner family unguarded since #1043, and both were red-proved on one planted break, deleting the join from a chained view and reading back that it reaches its gate by no chain at all. Beyond the ticket, migration 0003 had NO reach check whatsoever, only the outer-join tripwire, so the ANONYMOUS family was the least guarded of the three rather than the most; it gains the same check, red-proved the same way, and all three migration files are restored byte-identical with md5 verified. The night's dominant defect was counting: two different roles were each called the fourth role, ADR 0077 called the same thing a third family and a fourth family 284 lines apart, and ADR 0059's heading said FOUR and they are named rather than counted from here on, directly above a sentence listing five. Roughly twenty sites now list NAMES instead, because a corrected ordinal drifts again on the next role while a list of names cannot, and the arithmetic is settled against a live cluster rather than by reading - pg_views reads fifteen, eleven and eleven, so thirty-seven views in THREE families, which makes ADR 0077's own amendment the half that was wrong. The sentence that had been wrong three separate times is made CODE-DERIVED and stops being prose anyone must remember: removal now asks whether the member read tier is configured, the same question the pool itself asks, so the web half follows the deployment - while the sync half stays prose and is NAMED as the one line left to remember, because nothing in that process can observe the access class. The tenant validator is fixed in the CODE rather than in its claim, since the claim is what later readers rely on and narrowing the regex to eighteen digits would reject legal ids: set_config was measured accepting a nineteen-digit value with the first member query raising out of range, so a range check joins the pattern and the maximum itself is asserted as the positive control (#1739)
74afeacc ·diffdbf3dbe6… - the foreign grant stops applying itself, and that was a LIVE defect rather than a guard this ticket adds: pullMailbox indexed every verified blob alike and discarded the grantor pubkey, so a grant somebody else deposited in the mailbox was applied SILENTLY the first time any file at its address was opened - the exact opposite of #488's decision that nothing auto-applies. The mailbox is sorted BY GRANTOR now: a self-grant under ADR 0057 still goes straight into the key index, while anything signed by another key becomes an offer in a second map the decrypt path cannot reach, so the property is structural rather than a check somebody has to remember. Restoring the old line turns nine of sixteen cases red, headed by a stranger's key entering the key index, and the positive controls are what make locked a decision rather than a broken fixture: an accepted grant reads open with bytes equal to the content key, and a self-grant in the SAME pull still opens itself. The copy is asserted as RENDERED rather than as source, and the decline half is honest for a reason it states out loud - the only wire act that could take a grant out of your mailbox is an ack, and an ack would delete the blob for every other device you own, so this page does not have one - which is why declining revokes nothing and says so, against an absent-phrase list that refuses has been revoked and no longer has access. Expiry's first line is WELDED to the refusal constant rather than restating it, an expired offer stays visible after a refused accept, and a control files the same grant one second before it expires. The unprovisioned member tier is ASKED rather than remembered: the me route answers whether the read class is live and the browser tests that for exactly true, so a missing field lands on the arm that promises nothing, and the dark arm - the live one today - says the repo answers not yours as a 404 whether or not you have been added. Three things were found on the way and each is measured rather than argued. Importing the fingerprint helper dragged a curve library into the shared entry at eight kilobytes on every PUBLIC route, fixed by moving the function to the dependency-free module beside it. A lazy route was measured and REJECTED at 581 bytes against 270 eager, because the split chunk's manifest outweighs the code it saves, and that is recorded in the route so nobody fixes it back. And the byte record had to be raised, so the raise is SPLIT rather than apportioned: the same tree with this ticket removed already reads a thousand and thirty bytes over the recorded numbers on every surface, which is pre-existing shared-entry drift, where this page itself costs 270. The budget tool had a real bug that recording surfaced - its lowering note is anchored to the end of the line so a later lowering can replace its predecessor, but a raise appended after it buried the note out of that anchor's reach and the next lowering stamped a second one - fixed with a fixture that is red without it (#1640)
152d0635 ·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… - 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… - a proposer opens on the proposal page the logs the owner granted them: migration 0061 adds forge_member_granted_log, a barrier view of inner joins granted to forge_member and bound to the reader account, listing each log a change job of an open proposal wrote while the proposal grant names a key of that account; /api/private/pipeline-log now mints a URL by the rule of the forge /pipeline/log (mayReadLog: a job the owner or member family reads names the log, or the account holds the grantee key), the new /api/private/granted-logs lists the proposal logs with the runner that claimed each job, and the verdict opens a granted log of the tip in the browser with openLogTail; the forge rule moves unchanged into jobs::may_read_log, and pipeline_read.rs holds the web reads to it for owner, member, grantee, the grantee of another proposal and a reader on a public repo, before a grant, while it stands and after a withdrawal or a land; that pin went red without the view (6 passed, 1 failed), with the open-proposal check dropped (6 passed, 1 failed, at the landed proposal) and with the account binding dropped (6 passed, 1 failed); granted-logs.pg.test.ts went red without the grantee arm (0 passed, 1 failed) and with the log match dropped (0 passed, 1 failed); a log sealed before the grant still does not open on the web; ADR 0091 section 11 says so; cargo test with the live database suites ran 2232 passed and 1 failed, the known flaky loot-first a_landed_lane_drops_its_build_output_and_only_that, which passes alone, the site gate passes 348 and the site live suites 89; it also parks quxupmoq on the operator decision whether loot new signs a change whose only changes are re-seals (nnpsprvv)
77ddde7f ·diffdbf3dbe6… - the proposal read serves only the approvals a key of the owner account signed, retired keys included, and never more than a reader decodes: the forge filters each review/approve by the new MetadataStore::owner_keys, so a push carrying approvals from throwaway, member or other-repo keys neither shows them on the page nor fails the read, and the encoder writes at most MAX_APPROVALS; the read also carries the approvals of the tips its page of comments was written on and the web merges every page, so a round older than the round record gets its approvals; ADR 0095 section 12 records the choice and loses its outbox aside; granted-logs.pg.test.ts now asks the site grantedLogs and mayReadLog for the grantee of another proposal on the same repo and for a change proposed to a second repo, and pipeline_read.rs covers that second repo at the view; the NotYours-as-empty catch is one function, member.ts uses hex32, put_approvals is private, spineOf builds approvals in place, status builds its prose only for human output, the approvals placement test goes, and ticket ids and emphasis leave migration 0061, ADR 0091 section 11, api.ts, data.ts and change.rs; red without it: the read failed to decode 4101 approvals (0 passed, 1 failed), the encoder wrote 4097 (0 passed, 1 failed), with the owner filter dropped (0 passed, 1 failed), with retired keys left out in memory (0 passed, 1 failed) and in Postgres (0 passed, 1 failed), with the granted view joining jobs of any repo in the Rust pin (0 passed, 1 failed) and the site pin (0 passed, 1 failed), and with a grant reaching every proposal of its repo in the site pin (0 passed, 1 failed); cargo test with the live database suites ran 2259 passed, 0 failed and 6 ignored, the site gate passes 360 and the site live suites 89; it also files tkvpzuom, the same unbounded write for rounds (twovqosw)
23e3e214 ·diffdbf3dbe6… - who reads a pipeline log has one forge owner and one shared cases file: jobs::job_log_readers names both the claim-time seal list and the /pipeline/log gate, crates/loot-forge/tests/log-reader-cases.json drives the forge rule over Postgres in pipeline_read.rs and the real site mayReadLog and grantedLogs in granted-logs.pg.test.ts, and the Rust copy web_reads_log is gone; migration 0062 narrows forge_member_granted_log to the first job naming a log by version, trigger and kind, as job_of_log takes it, so a log a main job names before a granted change job no longer reaches the grantee on the web, which the forge already refused; the retired-key and owner-tier differences the ticket named agree at the account level and are pinned as cases; the site pin went red with the 0061 view in place (0 passed, 1 failed) and the forge pin with the grantee arm dropped (0 passed, 1 failed); cargo test is green at 2262 passed, 0 failed, 6 ignored, and ci/local.sh with the live database at 2262 passed plus the site live suites at 89, the site gate at 363 (umvloynu)
19c8dab1 ·diffdbf3dbe6… - review sweep 18 items 1 and 2: the peek_lanes, lane_status and lane_statuses docs lose their bold leads, star, ticket numbers and dated measurement, unix_separators keeps its why without the history and the attributes test docs drop their ticket numbers, the CaseProposal doc no longer names a listed field the struct lacks, http.ts and the migration 0062 header stop pointing at the shared cases file, and the site granted-logs test plants once and checks mayReadLog and grantedLogs in their own tests; comments and test structure only, no test owed, cargo test green at 2260 passed and ci/local.sh green against Postgres 18; item 3 in capture.rs remains (opqrmukx)
a2b56f7e ·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.