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

The repositories limit answers 403 with the same sentence at every door, migrate included, and each door's refusal has a test #2188

shipped production is serving it opened this has it
opened this

Replaces #2173, parked twice because pull #2130 (the enforcement) was not yet on main. It is now, in 0.7.140 or later. Start from today's main.

Done looks like:

  • [ ] POST migrate in src/http/api.ts (today ~line 4489, apiError(started.error, 422, migrateMessage(...))) answers repository_limit with 403 and the bare repositoryLimitMessage sentence ("2 of 2 repositories"), like create, fork, make-it-yours and new app. Other migrate errors keep their 422.
  • [ ] test/quotas.test.ts has one test per door, with the account at exactly the limit: the fork page (src/web/pages/repo.ts forkSubmit), the new-app page and POST /api/v1/apps, the migrate page and API, the studio's make-it-yours form, the terminal's fork screen (forkScreen) and the MCP make-it-yours tool. Each asserts the door's words and that no repository was made.
  • [ ] Removing any one door's repository_limit branch makes a test fail. bun x tsc --noEmit and bun test test/quotas.test.ts pass.

Files: src/http/api.ts, test/quotas.test.ts. Risk: the migrate page may share migrateMessage; change only the API status and words, not the page's.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs