Changes touching this path
- Forge service skeleton: /ingest, the sync surface, and CLI forge remotes (#502)
A new `loot-forge` crate and binary, sibling to the relay and never a mutation
of it: `loot-net` is a dependency of `loot-cli`, so a storage driver in the
relay would ship inside the released CLI binary (ADR 0041:53-57). The ban runs
one way -- the forge may use the other crates; none of them may gain a driver.
Every endpoint is envelope-authenticated, where a relay authenticates only
/stow. The one declared exception is GET /info: a client reads the capability
probe before it knows how to authenticate.
POST /ingest = envelope_sign(bundle || head_declaration), one signature over
both, so a genuine bundle can never be replayed under someone else's head
claim. CAS first; nothing is written before the generation compare. A lost CAS
answers with a 409 BODY carrying the current generation and head set -- behind,
not bounced -- so the client re-carries with no extra round trip.
/stow keeps relay parity and moves no ref, and consumes no generation either,
since a client reads the generation once and then stows N batches. It DEFERS a
change whose objects have not all arrived; /ingest REFUSES one, because a
declared head whose objects are missing is a repo no pull can complete. That
asymmetry is what keeping /stow is for.
Bundles are filtered PER OBJECT by the caller's access class, closing the leak
the ticket names: bundle_impl ships a key for every ANYONE-granted object, i.e.
every Internal object. Change metadata rides the second #494 axis and gates the
whole walk -- a ChangeNode carries the full tree, so shipping one while
withholding its bytes still discloses every path, address, message and author.
Validation before any write: author signatures, and a tree whose visibility
contradicts its objects is rejected. vis_tag is derived from the SealedObject
and never trusted from the tree, which is what makes content-addressed upserts
safe.
Forge purge policy: burn iff burner == object.introduced_by, recorded at first
arrival as introducing.author else the envelope pubkey; maroon read off
grant_log, global and exact. Both are judged before any object is stored and
outside the CAS transaction.
Repos are pubkey-addressed at /k/<pubkey>/<repo>, auto-created on first push,
and may_push holds iff the signer owns the namespace. resolve_remote is
untouched -- still no default host. CORS from day one.
Storage sits behind three narrow traits with in-process reference
implementations the whole suite runs against; the Postgres DDL they mirror is
checked in at docs/sql/forge-schema.sql and its driver is #516.
CLI: /info capability detection, the live head declaration off the Liveness
view, and a refusal to push a lane -- v1 ingests the primary position only.
verify_authored_change moves to loot-codec so the forge runs the identical gate
without linking the fs-hardwired engine.
Recorded in ADR 0041, the spec and CONTEXT.md: the forge stores no content key
but a published one, because filing the ANYONE key lane would let the server
read every Internal object, and the keystone is that only Published is
server-readable. The cost is stated rather than hidden -- a fresh clone of your
own Internal content from a forge is ciphertext you cannot open until #488
lands.
Closes #502.
300e06ff ·dbf3dbe6… - an embargo past the end of the storable clock stops reading back as due-now on Postgres, because reveal_at is admitted against one stated bound at the wire and in every backend instead of cast into a bigint that files it negative, and the agreement harness gains the row it could not carry until that decision was made (#1449)
13fd52b5 ·diffdbf3dbe6… - the forge half of #2130: the owner files key-only sealed grants for a runner of the repo through POST /runners/deposit, behind require_pusher, and a runner reads one version through POST /jobs/fetch, behind its runner row. a deposit is a SealedGrant with an empty body, due now and without an expiry, sealed to a live runner of this repo; grant::parse_runner_deposit refuses the rest by name, every blob of a request is judged before any is filed, and a request carries at most 1024, which the client splits by. that makes migration 0026's refused at the door true, through this route rather than the store method it names. the fetch takes one version id, any the repo holds, and answers a Frame::Sync bundle with the version's change node whole and the ciphertext of each object inside the runner's path scope, not burned, that the runner can open by a deposit or a live published key, and the runner's grants for exactly the objects whose bytes ride; a scope narrows content and not names, since a node cut to it would not verify. loot_net::runners::in_scope is the one scope rule, an entry naming a file or a directory and never a bare prefix, and the add route's pipeline check asks it too. the store gains runner_deposits_for, one runner's deposits by object, on both backends. act tags 12 and 13, and an old forge's 404 names #2130. ADR 0091 records the routes and the two operator decisions, and CONTEXT.md the key-only deposit. red under seventeen named mutations, each restored, counts read each time: no body refusal and no expiry refusal (0 passed and 1 failed over the parser test), no future-reveal refusal (0 and 1 there, 13 passed and 1 failed over the route tests), and 13 and 1 over the route tests each for no grantee row check, a retired grantee admitted, each blob filed as it parsed, no require_pusher on the deposit, no batch cap, no scope filter, bytes riding without a key, and grants not narrowed to what rides, which first survived at 14 passed until the test gained a keyed file whose bytes are gone; the memory read ignoring the runner or unsorted (1 passed and 1 failed over the two stamps), the Postgres read ignoring the runner or ordered by blob alone (0 passed and 1 failed on a throwaway Postgres 18), and a scope entry matching a bare prefix and the old-forge sentence naming #2158 (10 passed and 1 failed over the runner codec tests). bash ci/local.sh is green against Postgres 18, 4653 passed over 143 binaries with 13 ignored and the site live suites at 78. no migration; new routes, so this owes a forge deploy (#2130)
fffb0cca ·diffdbf3dbe6… - a grant deposit is now a type: loot_forge::grant::Deposit carries the blob it was parsed from, its fields are private to grant, parse_deposit verifies the blob before it builds one and the test constructor is compiled only under cfg(test), and Forge::deposit_grant takes the Deposit and no second blob, where the fields were public and the blob a separate argument, so a route could file a blob nobody verified and the peek would count it by the signer it names; migration 0030 is held to ENVELOPE_HEADER, ENVELOPE_VERSION and an envelope wrap writes by a test reading its text, which a land runs, where only a live Postgres case held it; ADR 0057 records that 0030 relies on its length test being evaluated before get_byte inside an AND, which Postgres does not order, and that a later migration touching the column should nest a CASE, and the signer conformance case now files an empty blob, which Postgres 18 files with a NULL signer; the draft refusal names a slot another command moved to what this one would write as having done so, where it named it as a move like any other. pinned by compile_fail examples beside a positive control, the migration text test, and draft label tests in loot-cli: red under named mutations, each restored, failed and passed: the fields public (1 and 2 of the doc tests), the test constructor public (1 and 2), a serving path calling the test constructor (the lib build fails), the header constant at 98, the version at 2, the substring offset at 3 and the version byte offset at 1 (1 and 0 each), the working change never matched (2 and 1), the draft check matching against what it read (1 and 2), the pending handle always matched (3 and 0). also names the trait as what defines the mailbox reads in inbox.rs and rejoins rewrap leftovers in mailbox.rs, inbox.rs and ADR 0057. cargo test green, 4946 passed over 145 test result lines with 15 ignored, with the forge suite live on a throwaway Postgres 18. owes no deploy (xwwrskls)
b7f03ea6 ·diffdbf3dbe6… - the land sync docs in CONTEXT.md, docs/agents/workflow.md and the land-change skill point at what defines the causes the land reads a primary for, CatchUpBlockers as Workspace::catch_up_blockers answers it with its refused field CaptureRefusals, where each listed the capture refusals by hand; the CatchUpBlockers::is_empty doc says nothing its fields read would stop the catch-up, since an I/O error or the mis-seal check fold_line_in runs on the merge branch still can; the Deposit doc says the peek counts the signer a row names on that ground for the rows its door files and not for GrantInbox::deposit, which the public Forge.inbox exposes and which files a blob unverified; the fix line of the refused primary sync block points at the reason instead of listing its kinds; the uxyruuuz test comment no longer says the adopt gives that refusal in every state, and the capture door notes that catch_up_blockers hoists refuse_before_capture and so reads as refused a working change the adopt would drop as redundant. comments, docs and that fix line only, no code path changes. cargo test green, 4970 passed over 145 test result lines with 15 ignored. owes no deploy (vtwrsmqw)
51c37db9 ·diffdbf3dbe6… - a burn at the forge drops the grants naming a burned address on every run of the burn delete job, derived from burn_tombstone in one keyed statement (GrantInbox::drop_burned_grants, pg::inbox::DROP_BURNED_GRANTS_SQL) and recorded nowhere, so burn_bytes_deleted records the blob delete alone and nothing the previous forge records during a deploy can end the drops, where a record it wrote after migration 0032 owed a burn again ended them for good; the deposit read after filing is a fast path that owes nothing, and a filing that fails is the deposit answer whatever that drop does; the grant door refuses a grant whose body carries an object other than the one its header names, or anything in its keys, changes or attestations lanes (grant::parse_deposit), and the builders whose grants a deposit sends are pinned to carry that object or none and leave those lanes empty; a 400 from that door reads as the door refusing the grant with the forge reason, where it told the reader to compare format versions; a migration waits at most 5 s for a lock (pg::migrate::MIGRATION_LOCK_TIMEOUT, below the pool checkout wait), and a wait past it stops --migrate with that migration rolled back and named, which stops setup-forge.js before the container swap; a test fails if a statement this crate ships deletes from or truncates repo_change, which would leave repo_object stale; a forge push refusal names an address burned here apart from one not held here, with the remedy of each. CONTEXT.md and ADRs 0038, 0046 and 0057 say so, the 0057 amendment carrying the deploy window the checksummed 0032 text does not. pinned: a_burn_leaves_no_grant_naming_its_address_in_any_mailbox over memory and Postgres 18 (a drop that fails, then a run with the blob delete on file, then a grant filed past the deposit check), a_failed_filing_is_the_answer_when_the_drop_after_it_fails_too, a_grant_carrying_an_object_its_header_does_not_name_is_refused, a_grant_carrying_a_key_in_its_body_is_refused, a_grant_carrying_a_change_in_its_body_is_refused, a_grant_carrying_an_attestation_in_its_body_is_refused, a_browser_grant_carries_its_object_and_nothing_else, a_forge_grant_door_400_says_the_door_refused_it_and_why, the_burned_grant_drop_asks_the_index_by_address, no_statement_this_crate_ships_deletes_a_version_from_a_repo, a_migration_waiting_past_the_lock_timeout_gives_up_and_applies_nothing, the_lock_timeout_is_below_the_checkout_wait, a_sealed_grant_carries_the_object_its_header_names_and_no_other, a_self_grant_carries_the_object_its_header_names_and_no_other and a_history_naming_an_object_burned_here_is_refused_as_burned; red under named mutations, each restored, over the nine selected forge tests against a throwaway Postgres 18: no drop in the job (2 failed and 7 passed), the Postgres drop a no-op (1 and 8), the memory drop a no-op (1 and 8), no burn read after a deposit (2 and 7), the drop error answered before the filing error (1 and 8), no door check (1 and 8), the drop written as IN (SELECT) (1 and 8), a repo_change delete in meta.rs (1 and 8), the timeout at 15 s (1 and 8); the drop run only while a blob delete is owed (2 failed and 0 passed over the two burn pins), no lock_timeout (1 failed and 0 passed, applied after 20 s), seal_grant carrying a second object (the custody pin 1 failed and 0 passed, and a_forge_push_deposits_embargoed_keys_to_peers_and_to_self refused with a 400 at the door, 1 and 0), the ticket self-grant carrying a second object (1 and 0), the burn log not asked (1 and 0); no keys, changes or attestations check at the door (each 1 failed and 11 passed over the grant tests), seal_grant carrying a key (the custody pin 1 failed and 0 passed, and the embargo push refused at the door, 1 and 0), the browser grant carrying a key (1 failed and 1 passed), the ticket self-grant carrying a key (1 and 1), the door 400 routed to the generic text (1 failed and 3 passed), the reason dropped (1 and 3). ci/local.sh green over the forge database steps and cargo test with the live suites, 5011 passed over 145 test result lines with 15 ignored, and the site gate 1071 passed. owes a forge deploy, with no migration of its own, and 0032 deploys with it (wurtzskp)
8cf84317 ·diffdbf3dbe6… - a standing self-grant carries the key alone: a push deposits it with DagRepo::grant_key_only, and the browser ticket write too, where each body carried a copy of its object ciphertext; a forge filing a key-only standing self-grant (grant::Deposit::supersedes_standing, its grantor its grantee, no object, due and never expiring) drops the other self-grants of that object in that mailbox (GrantInbox::supersede_standing, one keyed statement over the columns of migrations 0030 and 0032, no migration of its own) and says standing_supersede in /info; loot grants --replace-standing reads the mailbox whole and re-deposits each full self-grant this identity signed as its own header with an empty body, at a host that says standing_supersede; the browser device database moves to version 5, whose upgrade drops the grant cache and its cursor once. ADR 0057 and CONTEXT.md say so, and no reader of a standing self-grant this change found takes the object from its body. pinned: a_key_only_standing_self_grant_supersedes_the_full_one over memory and Postgres 18, the_standing_supersede_asks_the_index_by_address, only_a_due_key_only_self_grant_with_no_expiry_supersedes, a_standing_self_grant_carries_no_object_and_a_timed_one_carries_its_own, replacing_the_standing_self_grants_leaves_one_key_only_grant_an_object_that_still_opens, a_self_grant_carries_the_key_its_header_names_and_no_object and the site upgrade test; red under named mutations, each restored: no drop at filing (2 failed and 2 passed over the four supersede tests), a full self-grant replacing (3 and 1), an expiring one (3 and 1), a grant to another key (1 and 3), an undue one (1 and 3), the memory drop ignoring the signer (1 and 3), the Postgres drop ignoring the signer (1 and 3), the Postgres drop taking the grant it keeps (2 and 2), the drop not keyed by address (1 and 3), the push depositing a body (1 failed and 0 passed, twice), no capability check, key-only grants replaced again and the replacement keeping its body (each 1 and 0), the ticket self-grant carrying an object (1 and 0), no drop on the upgrade (1 failed and 18 passed). cargo test with the live suites over Postgres 18 green, 5017 passed over 144 test result lines with 15 ignored, and the site gate 1094 passed. owes a forge deploy, then the replacement run, then a site deploy (kwxvxtqm)
1f363845 ·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… - loot-forge, loot-net, loot-first, loot-perf, loot-relayd, loot-relay-contract, loot-s3 and loot-bench production comments cut by 70% to the docs/agents/writing.md standard: history, ticket numbers, rosters and ADR retellings removed, wire contracts, security and safety reasoning kept; comment-only, Rust token streams identical, test modules untouched (yrkykmsn)
a94b3d35 ·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… - agent keys propose, slice 2 of ADR 0111: one preamble, authenticate_party, admits a key the operator's list admits or an agent key through the agent door on /stow, where an agent stows as a proposer held to the rooted, whole and plan bounds, and on /propose, posture, read, list, take offer, take and withdraw, with the contribution door and the account gate not asked of an agent; /agents/grants takes key-only grants the agent signed and files each to its own agent_inbox or to the owner's grant mailbox when sealed to the owner or a live key of the owner's account, refusing any other grantee, another key's grant or a withheld one and judging the batch whole; the key-only parse is shared by runner and agent deposits with the runner wording unchanged; ADR 0111 §4 amended as built; 4 route tests (a shut door admits the agent and refuses a stranger, retired and orphaned agents are refused at the stow, the grants route files and refuses as above, the owner and write doors refuse an agent key), an inbox conformance case on both stores, ci/local.sh green on Postgres 18 (lklyxpuo)
f72f6cb5 ·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.