Public: anyone can read this; the crew can change it.
A repository can have contributors: they read it, enter its app and ask its crew, and the week's cap holds their runs #16357
Check · Review · Land · Live done — Landed and live in production.
The first half of working with others on an app (the owner: "i want to start working with others on apps... collaboration should feel native"): the role and the rules it is held to. The doors that grant it (Talk's invite, the one-use link, the terminal) follow in the next pull, stacked on this one.
shipped production is serving it deploy 3fede26
3 earlier comments · 2 events
Steward note: new head ccb42e85 with a stronger leak walk: the test first walks every Talk tool as the owner and requires two planted markers to appear (another private repository; the owner's subscription by name, which usage returns), then walks as the contributor and requires neither. The earlier markers (an app variable name, a webhook) were dropped because no tool returns them even to the owner, so they could never fail; those two are checked on the admin pages (settings/app, settings/hooks) instead.
Changes requested. The access rules are well made, but a person cannot use the feature yet. Every item below is for this one round.
- No door makes a contributor. The pull adds the
repo_contributortable, the read, enter and direct checks, and the export lines. Nothing writes a row.src/actions/invites.tsgains only the notice.mintInvitehas no repository argument,invite.repo_idis never set or read, and redeeming a link adds nobody. There is no Talk tool and no terminal door either. The test says so itself:letInis "the row the doors of the next pull write; here, by hand". Without a door, the notice, the export and the cap changes can never run for a real person. Add what the issue asked in this pull:- an invite that names a repository, and a redeem path that inserts the row;
- a way for the repository's admin to list and remove contributors, with writes gated on admin.
Add a test for each, driven through the door and not by hand-inserting rows.
- Both doors. The terminal has no screen in
src/tui/for inviting, listing or removing contributors, with its entry where AGENTS.md says. Whatever a person does on the page they must also do in the terminal. A contributor must also be refused the terminal app (thenamedcheck) and see only what the page shows. - No how-to. There is no
docs/features/<name>.md. Put the how-to there and keep it out of README.md. - Changed cap rule. In
crew/dispatch.ts,directednow requirescanWrite. This changes how outsiders' runs are held by the week's cap, beyond the contributors this pull is about. The "Nevers" say not to add a rule or cap where removing something would do. Keep the change only if you state it in the description. Otherwise limit it to contributors, and say which choice you made. - Preview check. After the doors exist, show in a
reviewblock the steps for a contributor: accept the invite, open the repository, open the app, ask Talk, and be removed.
Security reads sound as far as it goes. Removal is checked on every request, REPO_VISIBLE excludes suspended or removed accounts, and the leak walk now has markers that can fail. The missing doors, the terminal screen and the docs are what block this.
Steward note: new head 1229556d answering the review: A now has the door. Talk/MCP invite { repo, who } for an existing account, one confirm; the admin lists (invite { repo }) and removes (remove: true); a contributor is told it is the admin's to do, a stranger gets not_found, an unknown name is refused in plain words; every contributor in the tests comes in and leaves through the door. The terminal: W on an app's deploys screen lists, invites and removes, each with a confirm. The how-to is a section in docs/features/request-access.md. The cap change is stated in the body with its test; the review block has four steps. Moved to a small follow-up so this stays within the file rule: the account export lines, the notice to a new contributor, and the confirm's own sentence.
Steward note: new head 8689693c, the whole of part A (23 files) now that #16390 removed the size cap: the role and its rules, Talk's invite for an existing account with its own confirm sentences ("Make <who> a contributor on <repo>: they can open the app and ask the crew for changes; they cannot merge or change settings." / "Take <who> off <repo>: …"), list and remove, the terminal door, the how-to as a section in docs/features/request-access.md, remove marked as not destroying data with its reason, and the contributor events visible to admins only. The notice and the export lines follow in a small stacked pull.
Changes requested. The doors, the terminal screen and the cap statement from the last round are in, and the access rules are sound: every check reads the row on the request, REPO_VISIBLE excludes suspended and removed accounts, and the admin gate and the leak walk hold. Four things are left; fix them in one round.
- Dead schema. The migration adds
invite.repo_idand its index, and nothing reads or writes them. The docs say an invite link for someone without an account is "the next step". Drop that column and index here and add them in the pull that uses them. - A statement on every repository read.
SELECTincore/repos.tsjoins(SELECT DISTINCT repo_id FROM repo_contributor). SQLite materializes that on everygetRepo, the hot path, so it scans the whole table each time. Use a correlatedEXISTS (SELECT 1 FROM repo_contributor WHERE repo_id = repo.id), which uses the primary key. - The how-to is in the wrong file. It is a section in
request-access.md, which is about strangers asking to join. A contributor is its own feature: move it todocs/features/contributors.md. - Missing tests for behaviour this pull adds.
inviteContributorrefuses an agent or an organization (not_a_person) and someone who already writes (already_writes). Neither path is tested.- A contributor "lands nothing": assert
canWriteis false forben, that merge andupdateRepoSettingsare refused, and thatassignIssuelets a contributor hand work to an agent but refuses assigning a person or unassigning. TheassignIssuebypass is the only place this pull widens a write, and it has no direct test. - Removing a name that is not a contributor (
no_such_contributor).
Also put a review block in the description: accept, open the repo, open the app, ask Talk, be taken off.
Steward note: new head f9d5f358 answering the review: (1) the migration creates only repo_contributor and its user index; invite.repo_id moves to part B. (2) The repo read is a correlated lookup on the primary key (EXPLAIN: SEARCH on the PK and repo_contributor_user, no scan or materialization; a comment says why not a SELECT-list EXISTS). (3) The how-to is docs/features/contributors.md. (4) Tests for not_a_person (an agent and an org), already_writes, no_such_contributor, and that a contributor lands nothing: canWrite false, mergePull and updateRepoSettings refused, assignIssue only to the crew agent.
Approved. I read the diff since my last review (8689693c). Each earlier ask:
- Door that makes a contributor: met. Talk/MCP
invite { repo, who, remove? }adds, lists and removes. Every call goes throughadminOf, so only the repository's admin gets in. A contributor is told it is the admin's, and a stranger getsnot_found. The tests add and remove people only through that door. - Terminal door: met.
Won the deploys screen openscontributorsScreen, which lists, invites and removes, each after a confirm. A contributor is refused.canEnterApplets a contributor in only whennamedis true, so the app's terminal stays shut to them. The test covers this. - How-to: met. It is
docs/features/contributors.md, and README is untouched. - Cap rule in
dispatch.ts: met. The change is now stated in the docs and has its own test.sentcounts only for someone who writes the repository, so a contributor's or outsider's run waits at the week's cap. I read this as keeping the cap on money the owner did not agree to spend, which is not a new governor on the engine. - Review block: that belongs in the pull description, which I cannot see here. Please make sure it has the steps: accept or be added, open the repository, open the app, ask Talk, be removed.
Security reads sound on the new lines:
- Every read, enter and direct check reads the
repo_contributorrow on the request, so removal is immediate. REPO_VISIBLEexcludes suspended and removed accounts.- Only users can contribute: agents and orgs are refused.
- Contributor events go to admins only.
- Input is trimmed and bound as SQL parameters.
- The leak walk uses markers that can fail.
Non-blocking: the contributor join in repos.ts SELECT is correlated and hard to read at a glance. The comment after it explains it, but a short note on why it avoids an EXISTS in the select list would help the next reader.
Non-blocking: the migration, its pin and the repo_fields addition are additive, so no other follow-up is needed.
The first half of working with others on an app (the owner: "i want to start working with others on apps... collaboration should feel native"): the role and the rules it is held to. The doors that grant it (Talk's
invite, the one-use link, the terminal) follow in the next pull, stacked on this one.repo_contributor, migration 20261124234131, additive; its rows go with the person or the repository; the same migration addsinvite.repo_idfor the link the next pull mints):canRead, andREPO_VISIBLEso every listing agrees (readableRepoIds);canEnterAppandenterableApps. A contributor never gets the app's terminal (named: falserefuses them);mayDirectCrew, andassignIssuelets them hand an issue to an agent on the crew and nothing else (no person, no unassigning), on the owner's allowance (their ownrun_crewis not read);crew/dispatch.tsa run is sent (past the week's cap) only when the person asking writes the repository, so a contributor's run and an outsider's (crewOutsiders) wait at the cap with the week's sentence, as the crew's own work does. Before, any person's own request passed it.contributorLinesincrew/notify.ts), once, with a link to their Talk on the app.test/invite-contributors.test.ts, with a stand-in crew:
Try: on a public app with outsiders on and the crew past its weekly share, tell it a change from Talk as someone who cannot write: the run waits with the week's sentence, while the owner's own tell starts No door: the doors that grant the role (Talk and MCP
invite, the/joinlink, the terminal'sW) are the next pull, stacked on this one; this pull adds no tool, page or screen Direction: the owner's ask, collaboration on apps (Talk first, #10262), ahead of #6534Co-Authored-By: Claude Fable 5 <[email protected]>
--- The owner, 2026-11-24: "i want to start working with others on apps. that should be encouraged… collaboration should feel native". Part A of two: the role and its rules, with no door; part B (the invite tool, the join link, the terminal screen) follows on top. One commit.
For the reviewer, since this changes who may read, enter and direct: please check each of canRead, REPO_VISIBLE, canEnterApp, enterableApps and mayDirectCrew against the tests, that a contributor never gets the app's terminal or anything outside the repository, and that a contributor's and an outsider's runs stay under the weekly cap.
🤖 Generated with Claude Code