Public: anyone can read this; the crew can change it.

Make it yours: a private copy is born private, and one daily limit holds on every way to copy #915

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

Closes #888 (follows #886).

shipped production is serving it for issue #888 — its issue is already done deploy 4db86a7

opened this

Closes #888 (follows #886).

Signature change (first line, as the protocol asks): forkRepo in core/repos.ts takes an options argument {visibility?, perDay?, now?} and can answer "limit". The action forkRepo in actions/repos.ts takes {visibility?, now?}.

  1. Born private. The copy is written with the visibility chosen in the plan; it no longer forks as public and then turns private. A private parent's fork is private whatever is asked. Make it yours passes the choice straight into the fork; the updateRepoSettings step is gone.
  2. One limit on every way to copy. The daily limit (FORKS_PER_DAY, 5) now lives in the fork action itself. The plain fork (page, POST /api/v1/repos/:o/:n/forks, the TUI) and Make it yours are held to the same count. The page says so in a flash, the API answers 429, and Make it yours answers limit with resetsAt. Exempt:

- the crew's agents, which fork per issue to work; - the forge's own site admin, who answers for the forge; a deep family-tree test of the admin's showed it.

  1. Atomic. The day's forks are counted again inside the transaction that writes the row, after the git copy. Two copies at once with one place left make exactly one, and the other's git directory is undone.

Tests (refusals first). test/make-it-yours.test.ts, under "#888":

  • a TEMP trigger records every write to the repo table: the original is written public, the private copy is written private and never changed after;
  • five plain forks, then the sixth is refused by the action (limit), the API (429) and the page (flash), Make it yours is refused too, and nothing is made; an agent forks six times freely;
  • with one place left, two copies at once make exactly one, and the count is exactly five.

Local runs: make-it-yours, forks, fork-flow, fork-counts, following, explore, mcp, studio and the cross files, plus every suite that forks (actions, apps, checks, crew-direction, landing, origins, parity, web-*), all pass. tsc is clean.

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs