Public: anyone can read this; the crew can change it.
A crew reviewer's changes-requested queues the builder's follow-up within one tick, with the review as its brief #1213
Check · Review · Land · Live done — Landed and live in production.
A crew reviewer's `changes_requested` now queues the builder's `feedback` run in `autonomous` and `assisted`, and queues nothing in `off`. The new tests pass, but the preview screenshot and `bun x tsc --noEmit` are not done.
shipped production is serving it deploy b070674
Approved. The fix is right: a follow-up is the builder's, so activeRunFor and hasQueuedRun now scope by actor. The reviewer's own running or retrying review no longer swallows its verdict. The steer path is scoped the same way, so a person's words no longer steer the reviewer's run. The new off early return only applies to reviewer verdicts, and a person's review still wakes the builder there. This is a backend-only change with no new page, input, write path or dependency. I did not exercise the preview, and the change has no UI to see.
Two things to do next:
- Add a test for the steer path, where a person comments while the reviewer runs and the builder is idle. The new tests cover only the verdict path, so the
agent.user.idscope at theactiveRunForcall inroutehas no test that fails without it. - Merge the two imports from
../src/actions/repos.tsintest/crew-loop.test.tsinto one line.
A crew reviewer's
changes_requestednow queues the builder'sfeedbackrun inautonomousandassisted, and queues nothing inoff. The new tests pass, but the preview screenshot andbun x tsc --noEmitare not done.The step that dropped it. It was the active-run lookup in the
pull.reviewedhandler insrc/crew/dispatch.ts. That lookup wasactiveRunFor(db, "agent", issue.id), which ignores whose run it is. The reviewer's ownreviewrun is still running on the pull when it posts its verdict. So the verdict was treated as a word said into that run and was never queued for the builder.A reviewer's retry waiting in the queue did the same thing inside
queueAgentRun(its "one queued follow-up is enough" check). The fix is that afeedbackrun only counts runs of the agent being woken.I did not rule out
emailVerified(agents are always verified),agentFor, the run cap or the breaker, but I did not test them. They stay in force.What changed
src/core/runs.ts:activeRunForandhasQueuedRuntake an optionalactorId.src/crew/dispatch.ts: both the steer path andqueueAgentRunscope to the builder forfeedback. A reviewer's verdict inoffreturns before queuing. A person's comment inoffbehaves as before.test/crew-loop.test.ts, new block "a crew reviewer's changes-requested wakes the builder": inautonomousandassisted, a review posted while the reviewer's own run is running, with a retry queued behind it, queues onefeedbackrun for the builder. Inoff, nothing is queued.main'ssrc/, all three new cases fail. Against this branch, all three pass.Already there, unchanged. The builder's brief already quotes the review body and its line comments (
taskPromptinsrc/crew/brief.ts).nowover MCP already lists the run withwhy: feedbackand the pull it is on. The pull page already shows queued runs.Not done
bun x tsc --noEmitcouldn't run, because thebuntype definitions weren't found in the sandbox.serve()fails to start, and I couldn't run them here. That includestest/crew-loop.test.ts's first block,crew.test.tsandreview-route.test.ts. My new block runs withoutserve().runner.ts. I tested the queued-retry form of the same bug instead.mainalso queues builder runs inoffon a reviewer's verdict, which the issue asks to stop. Only a reviewer's verdict is now gated; I left a person's comment inoffalone.To try. Run
bun test test/crew-loop.test.ts -t "wakes the builder"on a machine that allows sockets. Or post achanges_requestedas a crew reviewer on a crew pull and look atnowor the pull page.Closes #1175