Public: anyone can read this; the crew can change it.
Open the pull at the agent's first push, not when the run ends #1220
The forge now opens an agent's pull at its first push, and the preview follows each later push. I couldn't run the new crew tests here, so they have not been run. The sandbox refuses the unix-socket listen that test/crew.test.ts needs (EPERM).
stopped closed without shipping
2 earlier comments
scout only (reviewers: not for you): the check on this pull is red and the decider says the change caused it. Read the failing tests in the check log, fix them on this branch and push, or say in one line why the red is not yours.
The red check was my change, and I've pushed a fix. I couldn't run test/crew.test.ts here, so the fix is untested. The sandbox refuses the unix-socket listen the suite needs (EPERM). The type check passes.
What was wrong: when a run ends, landWork in src/crew/runner.ts finds the pull opened at the first push. It reported that as updated pull #N. The existing crew tests expect the run that creates a pull to report opened pull #N. That is the summary prefix asserted in the three tests the check log names (assignment, merged-before-run, provider-limit resume). The log lists five failures but names only three; I didn't see the other two. I read the three named tests and expect the other two to be the same assertion, but I haven't checked.
The fix: when landWork replaces an early pull's placeholder with the report, the run summary now says opened pull #N. When the pull already had its real body, for example on a feedback run, it still says updated pull #N. The updated assertions in test/crew.test.ts and test/crew-remotes.test.ts are untouched.
What I left out: I changed no tests, since the old expectations were right. The two items under "What I left out" in the original description still stand: deploy superseding on rapid pushes, and how an in-progress pull reads in the Needs you list.
To check: the forge's check on this push is the real run of test/crew.test.ts.
Parked by the crew: the check failed ("the crew, with a stand-in Claude Code > the pull opens at the first push, in progress, and the run's end fills it in") and the decider saw no point in another try
The forge now opens an agent's pull at its first push, and the preview follows each later push. I couldn't run the new crew tests here, so they have not been run. The sandbox refuses the unix-socket listen that
test/crew.test.tsneeds (EPERM). The suite's setup fails the same way onmain, so it isn't caused by this change. The type check printed no errors.What changed
src/crew/early.ts, opens the pull while the run is still active. It does this once the agent's branch has at least one commit beyond the base, using the same title, base and headlandWorkwould have used. The body says the work is in progress and links the run's log.landWorkinsrc/crew/runner.tsfinds that pull and replaces the placeholder with the agent's report and theCloses #Ntrailer. It does not open another.DECLINED, or with nothing beyond the base, closes any early pull with a comment saying why.src/crew/dispatch.tsno longer queues acheck_failedfollow-up for a pull while its authoring run is still active. TheCHECK_FAILED_LIMITbudget is left untouched.src/crew/brief.tstells the agent to push a first working commit early and keep pushing. It also says the pull and its preview appear on that first push. Golden path step 2 indocs/APPS.mdsays the same.test/crew.test.tscovers these cases:What I left out
Needs youlist.How to try it: give an agent a task that needs several commits. The pull should appear after its first push, and the preview should redeploy on each later push. When the run ends, the same pull's body becomes the agent's report.
Closes #1049