Public: anyone can read this; the crew can change it.
An app's first build shows its preview from its first push: a draft that deploys, and is checked once at the end #16345
Check · Review · Land · Live done — Landed and live in production.
The owner, building an app from Talk: "will i automatically see the preview when the first commit is made? … that would keep me engaged".
shipped production is serving it deploy 3fede26
The idea is right and the doors are covered: the draft deploys, no check runs on its pushes, review waits, and every landing path goes through mergePull, which refuses it with one sentence in the web, API, MCP and terminal. I did not exercise the preview. This is a review of the diff only. Four things to fix in one round:
- A draft is a body prefix. The state is whether the body starts with
Draft, in progress:, and anyone who can edit the body can set or clear it. Setting it stops checks on that pull's pushes. A pull opened by anyone through the API with that prefix is stuck for good: no check, no review, and landing is refused. Store the draft as a column on the pull row and set it only wherecrew/early.tsopens the pull. Nothing readsisEarlyBodyas an authority. - No way out of a stuck draft.
pull.readyfires only fromfillPullandsettle. If the forge restarts or the run dies without either, the pull stays a draft: it is never checked, never reviewed, and nobody can land it, not even the owner. That is a lock-up of a person's first app. Add a recovery, for example when the run is reaped or on boot, or let the owner's press ready it. Add a test for it. - The tests do not pin the new rules. The
isFirstBuildtest recomputes the same SQL and compares the result to itself, so it would pass with a wrong query. It never tests the true case or the case after a merge. Nothing tests thatrunner.tspassesfirstBuildinto the brief anddraftinto the watcher. A run on issue 1 should be a draft and a run on issue 2 should not. - The pull page does not say it is a draft. The page shows the Merge button and fails only after a press. Show the state in the status row, as a
dlrow, and do not offer the button. The terminal screen should do the same. The design principles say one confident sentence, and today the page says nothing until it refuses.
Smaller: isFirstBuild puts a long SQL string on one line, and several one-line calls in early.ts and runner.ts run far past the wrap width. Run bun scripts/gate.ts --fix.
Steward note: new head 1cc17f4b answering the review. (1) The draft is a column, pull.draft_run (additive migration, partial index), set only where crew/early.ts opens the pull; every reader uses isDraft(pull); a pull opened through the API with the draft words in its body is checked. (2) Ways out: fillPull and settle; any crew run's run.finished; the lease tick for a draft whose run is over or gone (crash or restart); and the repository admin's Mark ready on the page, the API (POST …/pulls/{number}/ready, 409 not_draft on a second press) and the terminal (D); each path tested, non-admins and the crew agent refused. (3) isFirstBuild against fixtures (issue 1 true, issue 2 false, a merged pull makes it false), and the runner tested with a real stand-in run. (4) The status row says "Draft: its build is still running.", Ship and Merge are not offered, Mark ready is offered to the admin; the terminal the same. Also found and fixed: the studio change page offered a draft as landable. 27 files.
Both earlier asks are met. (1) The draft is now a column (pull.draft_run, additive migration with a partial index). Only crew/early.ts sets it, through draftRun, and every reader uses isDraft(pull). The body words are cosmetic. (2) A draft with a dead run is readied by fillPull, settle, run.finished for agent runs, the lease tick (readyStranded), and the admin's Mark ready on the page, the API (409 not_draft on a second press) and the terminal (D). A run paused on a limit stays queued, so its draft is not readied early. mergePull refuses a draft on every door by reading the row. The studio change page no longer offers a draft as landable. The how-to is in docs/CREW.md and nothing was added to README. Non-blocking: a short docs/features/ note on Mark ready would help.
The owner, building an app from Talk: "will i automatically see the preview when the first commit is made? … that would keep me engaged". The early pull already opened at a builder's first push and redeployed its preview on each (src/crew/early.ts), but nothing told a builder to push before its end, and every push ran the full check.
isFirstBuild, core/pulls.ts). Every other build is unchanged.DRAFT_BODY, "Draft, in progress:"). A draft's open and its pushes deploy the preview and ask for no check (checks/event_handler.ts), and no review starts on it (sendToReview).mergePull(actions/pulls.ts), which the pull page, the API, MCP's merge (and land as it is), the terminal, the merge queue and the owner's break-glass all call, refuses it with "This pull is a draft while its build runs; it lands when the build finishes." (DRAFT_REFUSAL), read from the pull's row, whatever its review or check says.fillPull) or said ended (settle), and either asks for the check on the final head (pull.ready,readyPullin actions/pulls.ts), which review and landing then follow as for any pull.Risks, bounded: a push storm (the brief asks for a push per working step, and each is a redeploy, not a check); a run that dies mid-draft (
settlewrites "ended" and readies it, so its head is checked).test/crew-draft.test.ts, with a stand-in crew and a check that passes at once: a draft's open and push ask for no check while another build's pull opened after them is checked; its fill asks for exactly one check, on its head; any other build's early pull is checked from its first push; a first build is issue 1 with nothing merged, and only its brief asks for early pushes; a run that dies mid-draft is said ended by
settle, and its head is then checked; a draft with a green head asked for by hand starts no review, and filled in it is sent to review. One test per door (the API, MCP merge and land, the web form, the merge queue's call with and without the break-glass) each fails without the refusal inmergePull. With main's check handler the first fails.Try: on a preview, ask Talk to build a new app: the pane shows the app within a minute of the builder's first commit and updates with each push; the pull reads "Draft, in progress" and has no check until the run ends, then is checked and reviewed as before No look: no page changes; the pull's body says it is a draft, and the pane's preview arrives sooner No door: the terminal's Talk and the pull page show the same pull and preview; a draft is the pull's own state, read by every door Direction: the owner's ask while building from Talk (Talk first, #10262; "default ship and go"), ahead of #6534
Co-Authored-By: Claude Fable 5 <[email protected]>
--- The owner, 2026-11-24, building an app from Talk: "will i automatically see the preview when the first commit is made?… that would keep me engaged and make me feel like the forge is listening". Only an app's first build changes; its draft deploys but is never checked, reviewed or landed until the run ends. Every door that lands a pull goes through
mergePull, which now refuses a draft; a test per door fails without the guard.For the reviewer, since this touches how crew work is checked and landed: please try to land a draft by any path, and check the raw
pushevent's draft skip, which has no test (crew drafts are fork pulls).🤖 Generated with Claude Code