Skip to content
quarry Artifact [f24d9795d0]
Login

Artifact [f24d9795d0]

Artifact f24d9795d01f133bfe1f2a7057a7b553d66d1c0cfa3c8f7ceb603b563f679a11:


Summary

Until now a person's coding tools reached the forge as an agent: a second account that starts with nothing and is then given rights piece by piece. Every difficulty of 2026-11-20 follows from that one choice. This RFC replaces it with three concepts.

You. quarry login on a machine gives that machine a token on your own account. It acts as you, on everything you can reach, and is named for the machine. What it does is recorded as you, with the machine as the detail: "alex via mac-mini".

A bot. An account that acts as itself, for work nobody is present for: CI, mirrors, releases. It holds the role it is given on the repositories it is given, and nothing else.

Rules on branches. A protected branch may carry one rule, "this branch only accepts green landings". With it on, nothing reaches the branch except a landing whose required checks are green, whoever asks.

Logging a machine in is one tap: one page, one Approve, as with gh's device flow. After it there are no approvals. A short fixed list of acts stays in the browser for every token, the person's own included.

Nothing changes on the Fossil wire.

Motivation

RFC 0021 decided that an agent is always a separate account. A separate account has no rights, so it needed grants (0021), then inheritance to avoid the grants (0026), then a ceiling and a repository list to cut the inheritance back, then a way to ask for what it still lacked (0027, 0028), then a way to be created without a secret pasted into a chat (0030), then a special grant so that it could land (0031 stage D).

The one rule that guards trunk never followed any of that. A protected branch admits a check-in from its owners, and an owner is an exact account name (RFC 0007). An agent that inherits its person is still not that person, so "land on green" took a role, a token and an owner entry on three pages, and RFC 0031 proposed a fourth record to join them.

A person had about fourteen things to hold: personal or dedicated, three scopes, the inherit switch, grants, four token scopes, repository lists, ceilings, setup kinds, who an agent belongs to, pickup, sign-offs, plans, land grants and branch owners. The owner, on 2026-11-20:

We need to prioritize making it super easy for the human. I want to do one thing, be okay that it's done, and know what that is.

Other forges do not have this problem, because a personal access token there is not a second identity. It is the person, so every rule keyed on their login already applies. Quarry built the hard half with care, bots that act as themselves, and never built the easy half. The store was ready for it: a token already resolves for any account, with scopes, idle lapse and revoke.

Safety by approval also did not hold. On 2026-11-20 three requests were approved and did the wrong thing silently. A person asked to approve each act learns to tap yes. A rule checked by the forge does not tire.

The three concepts

Examples use a placeholder person alex, a repository alex/website and a machine labelled mac-mini.

You: a token per machine

$ quarry login
Open https://zeitforge.app/setup and type   KQ4T-9XWM   (10 minutes)
Waiting for your approval ...
Logged in to zeitforge.app as alex, from mac-mini.
  can      everything you can do on the forge
  cannot   manage your sign-in and credentials; change branch
           protection; override a failing check; delete a repository
           or hand it on; act as a site admin
  token    in the login keychain; ends after 90 days unused
  revoke   https://zeitforge.app/me#machines
Next: quarry land

--repo sends repository addresses with the start. They are checked against the address alphabet, resolved as the person who claims, and shown as resolved names; one the person cannot see is "no such repository", as everywhere. Because a list can only take reach away, what an unauthenticated client typed can never widen what the Approve gives. This amends RFC 0030 decision 23 for a login only.

A bot

$ quarry login --bot website-release --repo alex/website --role publisher

A CI run keeps its run-scoped token (RFC 0021), and runners keep their installer (RFC 0030). Neither changes.

Rules on branches

Branch owners (RFC 0007), required checks (RFC 0009), auto-land and stacks (RFC 0006, RFC 0031 stage C) stay exactly as they are. One rule is added, under The green-landing rule. This is where safety lives now: a rule the forge checks each time, in place of a person approving each act.

The whole journey: quarry login once; then the coding agent runs quarry land --watch; the landing lands as the person. One approval, at login, and none after.

Hard stops

Five acts are never done on a token. They need a person signed in to a browser. This is the only place the person clicks again after login, and it is what makes a full-rights token safe to leave on a machine.

One table in the code, hardStops, holds these rows. The refusal and the consent sentence are both generated from it, so the page a person approves cannot promise a limit the forge does not enforce, and a new stop cannot be enforced without appearing in the sentence.

# Never on a token Ops In the sentence
1 The account's own sign-in and credentials: password, email, sessions, tokens, sync token, sign-in links, answering a request everything refuseToken guards today (RFC 0021) "manage your sign-in and credentials"
2 Changing branch protection: a branch's owners, its required checks, the green-landing rule branch.protection.set, ci.checks.set "change branch protection"
3 Overriding a failing check override on landing.accept, landing.auto and landing.land "override a failing check"
4 Deleting a repository, stopping serving it, or handing it on repo.delete, repo.remove, repo.claim "delete a repository or hand it on"
5 Site admin: the flag and every act that needs it account.siteadmin and every site-admin op "act as a site admin"

Invariants, each with one test named for it:

  1. Every token is bound. A person's login token, a bot's token, a run token and every token minted before this RFC are refused alike. A session opened by a sign-in link is bound to its token (RFC 0021) and counts as that token here. The one exception is the one RFC 0021 already made for row 5: a forge agent's token with site scope. No row gains another.
  2. The refusal says where to go. 403, code browser_only, with a next (RFC 0031) whose say is the row's sentence and whose open is the address of the page where a signed-in person does it. ask is false: a hard stop is never queued as a request.
  3. One source. The consent page, whoami, the Machines row and the email sent after a login print the "cannot" list from the table. Test: for each row, the op refuses a token with the row's id, and the sentence carries that row's clause, matched by the id in a data hook, never by its wording.
  4. The table in this RFC is the table in the code. A test reads the rows above and fails when the two differ.
  5. A token cannot become a session. A login token has no web scope, minting a sign-in link is under row 1, and a bot's token with web scope opens a session that is bound as invariant 1 says.

Row 5 means a site admin's own machine tokens are never site admins. A leaked laptop token is a repository problem and never a forge problem. This replaces RFC 0026 decision 4, which let a personal agent opt in to its owner's site powers.

The green-landing rule

A protection row gains one switch, shown on the branch's settings as one checkbox:

This branch only accepts green landings.

With it on, for protected branch B:

  1. Nothing joins B over sync. A check-in or tag that would change B's membership (RFC 0007's definition) is refused at the sync front from every client and every credential, the branch's owners included. The forge's accept path is the only writer.
  2. A landing onto B lands only when it is green. Every required check on B is green for the exact check-in that would land. Pending, stale, never ran and conflict all refuse. Green for a rung of a stack is as RFC 0031 stage C defines it.
  3. Who may land does not change. An owner of B, through landing.accept, landing.auto or landing.land. A person on a machine token is that owner, so nothing new is granted to anyone.
  4. It is read when the landing lands, not only when it was armed. An armed landing does not land after the rule, the checks or the owners changed against it.
  5. It needs something to be green. Turning it on for a branch with no required checks is refused, and so is removing the last required check while it is on. Both refusals name the page.
  6. Override is the way out, and it is a person's. An owner signed in to a browser may land over a failing check with a stated reason, as RFC 0009 has it; hard stop 3 keeps that from every token. The reason is kept on the landing and in the settings log.
  7. A bot may own only a green branch. Naming a bot among B's owners is refused unless B carries the rule, and the rule cannot be turned off while a bot is an owner.

The rule is refused on a branch that a mirror writes, since a mirror's pull is a sync write and would be refused by item 1.

Where it is on. By the owner's decision it is turned on for quarry's trunk and for the deploy branch of every deployed repository, in build step 8. Elsewhere it is a choice, offered already ticked when a branch that has required checks is first protected. A repository with a deploy environment (RFC 0019) whose deploy branch lacks the rule says so in one line on its settings.

Audit

Migration

What this supersedes

RFC Superseded Stands
0021 Decision 1 as the way a person's own coding agents work ("one account per agent role ... a coding assistant"); Granting (agent.grant as the common route); Creating an agent for a person's own Tokens; what a token may not do, extended by the hard stops; web sign-in; run tokens; forge agents; lifecycle; storage
0026 Decisions 1 to 5 (a personal agent inherits, a grant narrows, the inherit switch, site powers by inheritance, existing agents) and decision 13 (zeitgeist unchanged) Dedicated agents (decisions 6, 7), token upkeep and idle lapse (8), the rest
0027 Asking as how a coding agent works: Asking and What may be asked no longer reach a hard stop; in Limits, asking on by default The request, its page and its answer, as what carries a login, a bot setup and a runner request
0030 The kinds table (push, read) and "Whose agent it is" for the approver's own agents; decisions 5 and 9 where they make an agent for a person; decision 23 for a login The start, claim and pickup; their limits; bot setup for a repository; the runner installer; reading CI; who am I
0031 Stage D, steps 11 to 15; The land grant and its seven invariants; decisions 2, 3, 4, 10, 11, 12, 14 and 15; --for on login; "Agents are not made branch owners" Stages A, B, C, E, F and G, read with the changes below

RFC 0028's plans are not superseded and are no longer in the guides.

Risks

Already in flight

Work Counts toward
Branch login-as-me Step 1
Branch stack-green-prefix: an armed stack lands its green rungs without waiting for the top RFC 0031 stage C; closes #467
RFC 0031 stages A, B, C, E and F Continue, as below

Build order

Each step is one landing and lands alone. "Sign-off" marks a step that changes something a person sees: the owner approves the real output on real data before it lands. "Needs" lists earlier steps.

  1. Log in as you. A start of kind login carries a label and a pickup code; the claiming person's Approve mints a token on their own account with api and sync, no ceiling and no repository list, named by the label and collected by pickup; one page, one Approve; the hard stops refuse it; an accept made with it is recorded with via. Test: the minted token is the claimer's own, unlimited and labelled; a landing armed with it lands as the person and passes the owner check; each of the five stops refuses it; the claim page files nothing to answer elsewhere. Needs: none. Closes #459.
  2. The hard-stop table as one source. hardStops; browser_only with next.open; every token and every token-bound session bound; the consent sentence generated from the table. Test: hard-stop invariants 1 to 5. Needs: 1.
  3. The audit line, and telling the person. Sign-off. "PERSON via LABEL" on the forge journal, the landing and the timeline's pusher line; an act on a token notifies its person; the email on a new login. Test: one landing opened, armed and landed on a machine token carries the account and the token id at each of the four places; the person's attention stream has the event and a browser act adds none. Needs: 1.
  4. Machines. Sign-off. The list on the account page with Revoke and "Revoke all"; a revoked token keeps its label. Test: after a revoke the next call is refused with a next, and an armed landing does not land; "Revoke all" ends every machine token and no session. Needs: 1.
  5. --repo. A login start may name repositories; the page shows them resolved; the token carries the list. Test: a narrowed token acts on its repository and nowhere else, forge scope included; an address the claimer cannot see reads as missing; no start widens reach. Needs: 2.
  6. The rule on the protection row. Sign-off. Storage, the checkbox, and the refusals: no required checks, the last check removed, a branch a mirror writes. Test: rule items 5 and the mirror refusal; setting it on a token is refused by hard stop 2. Needs: 2.
  7. The rule enforced. The sync front and the accept path, the sweep included. Test: rule items 1 to 4 and 6. An owner's direct push from a stock fossil client is refused with the error card; an accept over a red, pending, stale or never-run check is refused on a token and in a browser without override; an override in a browser lands and is logged; a landing armed before the checks changed does not land. Needs: 6.
  8. Turned on, and landings land as the person. The rule is on for quarry's trunk and each deployed repository's deploy branch; zeitgeist leaves their owners; the settings line for a deploy branch without the rule. Test: on a test forge laid out the same way, a machine token lands a branch on green with no approval after login and the landing reads as the person; zeitgeist's token is refused the accept. Needs: 3, 7. Closes #461.
  9. Bots. Sign-off. --bot NAME --repo R --role ROLE on the start; one approval by a repository admin; the Bots list on the repository's settings; a bot as owner only on a green branch. Test: the bot's token holds the role's letters on R and nothing elsewhere; a non-admin's Approve is refused; rule item 7. Needs: 7.
  10. A person's agents retired. Sign-off. Making one answers with quarry login; "Your agents" becomes Machines and Bots with the retired list and its one control; ceilings, scopes, kinds and the inherit switch leave the surface; asking off by default. Test: the refusal carries its next; an existing agent's token still works until revoked; no form or page takes a ceiling or a scope. Needs: 4, 9.

RFC 0031's remaining steps

Stages A, B, C and G are unchanged. Stage D is not built. Stages E and F are built as written there, with these changes:

0031 step Change
16, login and whoami login [URL] [--repo R], and --bot NAME --role ROLE after step 9 here; no --for. whoami prints the person, the label and the "cannot" list from the table. Needs step 2 here in place of 0031's stage D
19, land Needs 0031 step 18 only. Does not close #461
20, the journeys A person logging a machine in; a coding agent landing a stack; a person asking why not; a coding agent meeting a hard stop and printing the page to open. The approval count is one at login and none after
22, the guides Lead with quarry login, quarry land and quarry status. Quarry-Ask is not in them

Done means #398's own test, for landing: a cold agent given only the forge's address lands a branch on green after one approval, and its person can read that it landed as them and from where. #398 and #434 stay open for their other items.

Not in this RFC

Decisions

Settled by the owner on 2026-11-20:

  1. A login reaches everything the person can. --repo narrows it.
  2. Four acts stay in the browser even for the person's own token: changing branch protection, overriding a failing check, deleting a repository or handing it on, and site admin. Managing sign-in and credentials stays there too, as it already is.
  3. The green-landing rule is turned on for quarry and for every deployed repository.
  4. Landings are recorded as the person, never as an agent, with the machine's label as the audit detail.
  5. Logging a machine in is one page with one Approve.

Decided here, reversible:

  1. The hard stops bind every token, bots' included, with RFC 0021's one exception for a forge agent's site scope. Reason: one rule with no per-token cases is the only kind that stays true, and a bot has no more business unprotecting a branch than a laptop has.
  2. Required checks count as branch protection. Reason: a token that could empty the list would have overridden every check at once.
  3. With the rule on, owners cannot push to the branch either. Reason: "only accepts green landings" has to be true of the branch, not of some of the people who write to it.
  4. The rule needs at least one required check. Reason: otherwise it reads as a guarantee and checks nothing.
  5. A bot may own only a green branch. Reason: it replaces the land grant's "never over red" without a second record.
  6. A hard stop is never askable. Reason: asking is what trained the yes; the answer is a link the person opens themselves.
  7. --repo is the client's to send, because it can only narrow. Reason: the person should not have to pick repositories on the page to get the default.
  8. Existing agents' tokens are not revoked by this RFC. Reason: nothing should stop working on the day it lands; the retired list makes them visible and one control ends them.
  9. A new login is announced by email. Reason: the approval gives full rights, so the person should hear of one they did not mean.