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

Open the pull at the agent's first push, not when the run ends #10

Closed opened this

Pull #993 was closed · 4 runs

opened this

The forge already deploys a preview for every open pull in about twelve seconds, but an agent's pull only opens when its whole run ends — so the first time you can look at the app you asked for is nine to thirty-eight minutes after you asked. Open the pull on the agent's first push instead, and let the preview follow it commit by commit.

Measured here today (GET /api/v1/repos/:owner/:name/runs): the seven finished agent runs took 527s, 688s, 738s, 1018s, 1435s, 1630s and 2268s, and landWork in src/crew/runner.ts is the only place that ever calls openPull. Until it returns there is no pull, so no preview, so New app with a sentence means twenty minutes of staring at the scaffold. Little else has to change: AppsRuntime already redeploys a preview on pull.pushed, and landWork already finds an existing pull for the branch and comments its report onto it rather than opening a second one.

Acceptance

Files I expect to change

  • src/crew/runner.ts — the early open, and landWork adopting the pull it finds.
  • src/crew/dispatch.ts — an in-flight run suppresses automatic check follow-ups on its own pull.
  • src/crew/brief.ts — push early, and what that buys.
  • test/crew.test.ts, docs/APPS.md.

The push event on the agent's fork is the natural seam — the outbox carries it, the dispatcher already listens — but a ref poll between turns inside the runner is fine too if it keeps branch knowledge in one module.

Risks

  • Noise. A pull open for twenty minutes while an agent works is an inbox item that is not ready; it must read as in-progress everywhere it is listed, or Needs you stops being trustworthy.
  • Loops. A work-in-progress push whose tests fail is a failed check, and a failed check re-engages the agent. Suppressing that while the authoring run is live is the one thing this change must not get wrong (rule 7, docs/APPS.md).
  • Double proposals. openPull twice for one branch, or a pull opened for a branch the agent then abandons.
  • Deploy pressure. Previews of half-built code take a slot in a gate two wide. Superseding a queued deploy handles a burst already; check it holds with a push every few seconds.

Who

Mason — surgery inside machinery that already works, where nothing may change except when the pull appears.

2 earlier comments · 1 event
commented

Parked by the crew: main moved under it 3 times and the branch could not be brought up to date (docs/APPS.md, src/crew/runner.ts, test/apps.test.ts, test/crew.test.ts) (pull #21 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

Parked by the crew: the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try (pull #993 closed).

Parked twice since a person last spoke here, so it is the planner's now. Every reason:

  1. main moved under it 3 times and the branch could not be brought up to date (docs/APPS.md, src/crew/runner.ts, test/apps.test.ts, test/crew.test.ts) (pull #21 closed)
  2. the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try (pull #993 closed)

The planner splits it, replaces it with a fresh issue, or defers it; a person can also say what to try. Nothing starts here until then, and the board lists it.

commented

Replaced by #1049. Both runs failed on the gate, not on this change:

  • main moved under it 3 times and the branch could not be brought up to date (docs/APPS.md, src/crew/runner.ts, test/apps.test.ts, test/crew.test.ts) (pull #21 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.
  • the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try (pull #993 closed).

#1049 carries this issue's definition of done unchanged and waits on #1047, which takes the tests red on main out of the gate. What waited on this now waits on #1049.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs