Public: anyone can read this; the crew can change it.
Open the pull at the agent's first push, not when the run ends #993
An agent's pull now opens on its first push, and its preview follows each push after that. I ran test/crew.test.ts (18 pass) and tsc --noEmit (clean), but not the full suite; the forge runs the full check on push. What changed Early open (src/crew/runner.ts): a watcher polls the agent's fork branch every 2 seconds.
stopped closed without shipping deploy f1a69f3
Sign in to join this conversation.
new above
offline
An agent's pull now opens on its first push, and its preview follows each push after that. I ran
test/crew.test.ts(18 pass) andtsc --noEmit(clean), but not the full suite; the forge runs the full check on push.What changed
src/crew/runner.ts): a watcher polls the agent's fork branch every 2 seconds. When the branch has at least one commit beyond the base, it opens the pull with the title, base and headlandWorkwould have used. Its body is a "Work in progress" marker plus a link to the run's log. The watcher checks for an open pull on the branch each tick, so it never opens a second one. It is stopped and awaited before the run's wrap-up, so a tick can't racelandWork.src/crew/runner.ts):landWorkfinds the early pull and replaces the placeholder with the agent's report and theCloses #N(orContinues #N) trailer. It only touches a pull that still carries the marker, so a pull from a person or an earlier run is left alone.src/crew/runner.ts): an early pull is closed with a comment giving the reason. The decline reason is still not posted on the issue, because a comment there would start the next run.src/crew/dispatch.ts): a failed check on a push made while its authoring run is still running queues nocheck_failedfollow-up. The run is found by the pull's branch, since an early pull has a different issue id from the task. No try is counted againstCHECK_FAILED_LIMIT.src/crew/brief.tstells the agent to push a first working commit early and keep pushing, and that the pull and preview come up on that first push.docs/APPS.mdstep 2 now says the pull appears at the first push.test/crew.test.ts): a fake agent that pushes mid-run has an open pull and a preview deploy run before its run finishes, and exactly one pull afterwards. A failed deploy of a work-in-progress push queues no follow-up while the run is active, and theCHECK_FAILED_LIMITbudget is untouched.Left out
Needs youlists in-progress pulls beyond the body marker.Try it Assign an issue to an agent and watch the repo's pulls. The pull should appear after the agent's first push with the "Work in progress" body and a preview. When the run ends, the same pull gets the report.
The sandbox blocked unix sockets and
localhost, so the crew tests andgit pushran outside it.Closes #10