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

Making a new app starts the crew on it: "Choose for me" seats a crew and the… #12179

Parked opened this in answer to
Closed without merging

A new app now seats the forge's crew and assigns its first issue, with no admin step. I haven't confirmed a run reaches running, and no test covers the page's one-sentence message. The three new tests and 60 tests across 11 related files pass, bun x tsc --noEmit is clean and bun scripts/gate.ts printed nothing.

Notes

stopped parked by the crew deploy d116441

opened this

A new app now seats the forge's crew and assigns its first issue, with no admin step. I haven't confirmed a run reaches running, and no test covers the page's one-sentence message. The three new tests and 60 tests across 11 related files pass, bun x tsc --noEmit is clean and bun scripts/gate.ts printed nothing. I did not run the full suite. scripts/fast.ts selected 2,313 of 3,034 test files, so I ran the files around newApp and the first ask by hand.

What changed

  • newApp in src/actions/apps.ts: when no agent is named and the crew can run, it seats a builder and a reviewer, and a planner where the forge has one. It turns autonomy on, only if it was off. It then assigns the first issue to the builder, so the existing dispatcher can start a run. This covers "Choose for me", new_app, tell on a new repo, the API, the terminal and a spawn's fresh app, since they all go through newApp.
  • seatCrew in src/spawn/starter_crew.ts: this is the seating logic, taken out of seatFirstAskCrew, which now calls it. It uses the forge's own agents first and makes the starter pair only for a missing role. If the planner picked a builder, that builder is the one seated.
  • A person's own pick: naming an agent seats only that agent, as before.
  • Idle forge: if the forge has no model credential or credit left (crewCanRun is false), nothing is seated. The new-app page's confirmation then adds NO_CREDIT_WORDS: "The crew cannot build until you add a model key or pick a plan."
  • Tests: test/new-app-crew.test.ts covers three cases. It checks the default seating and assignment, a person's own pick staying exactly as chosen, and a forge with no credential seating no one.

What to look at

  • Seating is a few database writes and doesn't wait on any run. "Choose for me" still waits on the planner (plan) when claude is installed, as it did before.
  • src/actions/apps.ts now imports crewCanRun from src/web/studio/crew_key.ts, which crosses the actions/web layering. I left it rather than move that function.
  • The pre-push hook demanded a "Try:" commit line, so the branch has an empty commit saying how to try it.

Not done

  • No test starts the dispatcher and watches a run reach running within 10 seconds. I relied on the assignment event, the same path the first ask uses.
  • I did not change the CLI crew add/assign message, which the three outside agents hit.

Try it: on a forge with a model key or credit, make an app at /apps/new with "Choose for me". The crew card shows builder and reviewer, and #1 is assigned to the builder.

🤖 Generated with Claude Code

Closes #12175

2 earlier comments
commented

A new app now seats the forge's crew and assigns its first issue, with no admin step. I haven't confirmed a run reaches running, and no test covers the page's one-sentence message. The three new tests and 60 tests across 11 related files pass, bun x tsc --noEmit is clean and bun scripts/gate.ts printed nothing. I did not run the full suite. scripts/fast.ts selected 2,313 of 3,034 test files, so I ran the files around newApp and the first ask by hand.

What changed

  • newApp in src/actions/apps.ts: when no agent is named and the crew can run, it seats a builder and a reviewer, and a planner where the forge has one. It turns autonomy on, only if it was off. It then assigns the first issue to the builder, so the existing dispatcher can start a run. This covers "Choose for me", new_app, tell on a new repo, the API, the terminal and a spawn's fresh app, since they all go through newApp.
  • seatCrew in src/spawn/starter_crew.ts: this is the seating logic, taken out of seatFirstAskCrew, which now calls it. It uses the forge's own agents first and makes the starter pair only for a missing role. If the planner picked a builder, that builder is the one seated.
  • A person's own pick: naming an agent seats only that agent, as before.
  • Idle forge: if the forge has no model credential or credit left (crewCanRun is false), nothing is seated. The new-app page's confirmation then adds NO_CREDIT_WORDS: "The crew cannot build until you add a model key or pick a plan."
  • Tests: test/new-app-crew.test.ts covers three cases. It checks the default seating and assignment, a person's own pick staying exactly as chosen, and a forge with no credential seating no one.

What to look at

  • Seating is a few database writes and doesn't wait on any run. "Choose for me" still waits on the planner (plan) when claude is installed, as it did before.
  • src/actions/apps.ts now imports crewCanRun from src/web/studio/crew_key.ts, which crosses the actions/web layering. I left it rather than move that function.
  • The pre-push hook demanded a "Try:" commit line, so the branch has an empty commit saying how to try it.

Not done

  • No test starts the dispatcher and watches a run reach running within 10 seconds. I relied on the assignment event, the same path the first ask uses.
  • I did not change the CLI crew add/assign message, which the three outside agents hit.

Try it: on a forge with a model key or credit, make an app at /apps/new with "Choose for me". The crew card shows builder and reviewer, and #1 is assigned to the builder.

🤖 Generated with Claude Code

commented

I found nothing to fix, so I changed nothing and pushed nothing.

The "failed" report looks wrong. The deploy log's last line, "running at https://lab--12179--forge-trevato-apps.open-platform.sh · no tests declared, none run", is the summary of a successful deploy. src/apps/runtime.ts writes it when the deploy came up and the app's manifest declares no test. The rest of the log you pasted is the forge's own periodic output (process counts, SQL statistics). It has no error in it.

  • Preview: /healthz and / both return 200 on the preview of #12179.
  • Tests and types: test/new-app-crew.test.ts passes (3 tests) and bun x tsc --noEmit is clean.
  • Branch: it is in sync with origin.

The suffix is only informational. If you want the preview deploy to run tests, add an app.test command to forge.json. I didn't, because that would change how every deploy of this repo behaves.

I did not run the full suite. The forge's own check on the push does that.

If a deploy really failed, its log should hold an error line that this excerpt doesn't show.

commented

Closed by the crew: main moved under it and 2 attempts to bring the branch up to date failed. Conflicting files: src/web/pages/apps.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs