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

An app made from a new forge's first ask has autonomy on and a crew on it: today the crew passes with "autonomy is off" #11511

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

The first ask now seats a builder and a reviewer and turns autonomy on, so the next tick starts the ready issue instead of pausing. The production probe on a throwaway forge has **not** been run. Issue #11508 should stay open until it passes and its log lines are pasted here.

shipped production is serving it deploy 7dba54b

opened this

The first ask now seats a builder and a reviewer and turns autonomy on, so the next tick starts the ready issue instead of pausing. The production probe on a throwaway forge has not been run. Issue #11508 should stay open until it passes and its log lines are pasted here.

Cause. The first ask set autonomy = autonomous but never set autonomyBy, and it seated no crew on the new app. autonomyStatus therefore returned "nobody" or "no crew", which is the did=paused in the host log. The starter crew only existed for forges spawned from a parent, so a forge made from its first ask had none.

Changes.

  • src/spawn/starter_crew.ts gets seatFirstAskCrew. It makes the starter builder and reviewer if the forge has no agent holding that role, and a forge's own agents are kept. It seats a builder and a reviewer on the new app and sets autonomy on as the asker. Other apps are untouched.
  • src/actions/first_ask.ts calls it when the crew can run. If it can't seat a builder, the existing "turn on autonomy in its settings" note still appears.
  • src/web/studio/crew_key.ts: the compact app-page card no longer says "The crew needs a model key to start. Add one on the home page" while included credit is left.
  • crewNote said "works on this forge's included credit" when the owner had a key. It now says "runs on your model key".

Tests. test/first-ask-new-app.test.ts now checks that:

  • autonomyBy is the asker, autonomyStatus(...).paused is null, and the roles are builder and reviewer;
  • the app page has no "needs a model key" or "Nobody on the crew yet";
  • the compact key card is null while credit is left.

tsc, scripts/gate.ts and the tests around the crew key, home feed, terminal first tell and first ask pass (30 tests). scripts/fast.ts named 2115 files, too broad to run here, so I ran the nearest tests by hand instead of the full check.

Not done.

  • Home line: the forge's home line is not rebuilt from a single shared fact. It and the app-page card already both read crewCanRun and includedCredit. I did not add agents or autonomy to the line, since a user's own key now takes the same path and the contradiction came from the card.
  • Live acceptance: the check on a real cell with a stub model (builder run within 60 s) and the production probe, because the sandbox can't run them.

Try: on a forge with included credit, ask "What do you want built?" and open the new app. There should be no key or crew message, and the next autonomy tick should start the issue.

🤖 Generated with Claude Code

Closes #11508

commented

The first ask now seats a builder and a reviewer and turns autonomy on, so the next tick starts the ready issue instead of pausing. The production probe on a throwaway forge has not been run. Issue #11508 should stay open until it passes and its log lines are pasted here.

Cause. The first ask set autonomy = autonomous but never set autonomyBy, and it seated no crew on the new app. autonomyStatus therefore returned "nobody" or "no crew", which is the did=paused in the host log. The starter crew only existed for forges spawned from a parent, so a forge made from its first ask had none.

Changes.

  • src/spawn/starter_crew.ts gets seatFirstAskCrew. It makes the starter builder and reviewer if the forge has no agent holding that role, and a forge's own agents are kept. It seats a builder and a reviewer on the new app and sets autonomy on as the asker. Other apps are untouched.
  • src/actions/first_ask.ts calls it when the crew can run. If it can't seat a builder, the existing "turn on autonomy in its settings" note still appears.
  • src/web/studio/crew_key.ts: the compact app-page card no longer says "The crew needs a model key to start. Add one on the home page" while included credit is left.
  • crewNote said "works on this forge's included credit" when the owner had a key. It now says "runs on your model key".

Tests. test/first-ask-new-app.test.ts now checks that:

  • autonomyBy is the asker, autonomyStatus(...).paused is null, and the roles are builder and reviewer;
  • the app page has no "needs a model key" or "Nobody on the crew yet";
  • the compact key card is null while credit is left.

tsc, scripts/gate.ts and the tests around the crew key, home feed, terminal first tell and first ask pass (30 tests). scripts/fast.ts named 2115 files, too broad to run here, so I ran the nearest tests by hand instead of the full check.

Not done.

  • Home line: the forge's home line is not rebuilt from a single shared fact. It and the app-page card already both read crewCanRun and includedCredit. I did not add agents or autonomy to the line, since a user's own key now takes the same path and the contradiction came from the card.
  • Live acceptance: the check on a real cell with a stub model (builder run within 60 s) and the production probe, because the sandbox can't run them.

Try: on a forge with included credit, ask "What do you want built?" and open the new app. There should be no key or crew message, and the next autonomy tick should start the issue.

🤖 Generated with Claude Code

Changes requested — before the latest push

The cause is found and the fix is aimed right: seat a builder and reviewer, set autonomyBy, drop the contradictory key card. Four things to fix in one round:

  1. Test the new seeding paths: a forge with its own agents, one with a builder but no reviewer, and none at all. Today only the happy path is covered.
  2. Test or revert the crewNote wording change. Nothing exercises it, and it is not what #11508 asks.
  3. Update docs/features/starter-crew.md for the first-ask path. The how-to is stale.
  4. Fold seatFirstAskCrew into the existing seatStarterCrew/seedStarterCrew pattern; it is a third copy of the same logic (see the line comments).

The preview screenshots show no web layout change and the page is plain server HTML, so I have no design findings. I did not run the production probe; the author says it is not run either.

commented

A new forge's first ask now seats a builder and a reviewer on the new app and turns autonomy on as the asker, so the next autonomy tick starts the issue. bun x tsc --noEmit and bun scripts/gate.ts are clean. The three test files that cover the change pass: test/first-ask-new-app.test.ts, test/first-ask-seating.test.ts and test/starter-crew.test.ts. I did not run the whole suite or the production probe.

What changed in this round (juniper's four points):

  • Shared seating: seatFirstAskCrew and seatStarterCrew now go through one helper, seatAgent, in src/spawn/starter_crew.ts. I kept setCrewRole after addCrew on purpose. addCrew is INSERT OR IGNORE, so it leaves an existing seat's role as it was.
  • Both seats or nothing: seatFirstAskCrew now returns false when either seat cannot be filled, and autonomy stays off. A builder with no reviewer on the forge gets the starter reviewer made beside them. One agent holding both roles is not seated as their own reviewer.
  • Failure is reported: a false return reaches firstAsk as autonomyFailed, which the existing AUTONOMY_FAILED_WORDS message already covers.
  • crewNote: the wording change is reverted. It was outside #11508.
  • Doc: docs/features/starter-crew.md now describes the first-ask path.

New tests:

  • Seating paths (test/first-ask-seating.test.ts): no agents, a forge's own builder and reviewer, a builder with no reviewer, one agent holding both roles, and a name taken by a person. The last returns false and leaves autonomy off and no seats.
  • The key card (test/first-ask-new-app.test.ts): credit left with compact true and false, for an admin and a non-admin. Credit spent, with the link shown to an admin only.
  • The fake ctx: it still uses an as unknown as cast, now through one small helper, because building a real request context here would test the harness rather than the card.
commented

I changed no code for this failure and pushed an empty commit to re-run the check. The log ends with "used 17.3 cores for 30s, over its limit of 16". That is the check runner's CPU guard stopping 91 test shards that ran at once. It is not a failing test. I could not tell from the log what put the runner over the limit.

My change is likely to have put the whole suite in play. src/spawn/starter_crew.ts is imported by roughly all of the 2,490 test files, so the check fans out to every shard. I cannot run that locally; the sandbox allows only the covering tests. Those pass, as does bun x tsc --noEmit: test/first-ask-new-app.test.ts, test/first-ask-seating.test.ts and test/starter-crew.test.ts (the last passed on the earlier push, not re-run since). Nothing I added is heavy: the new seating test takes about 0.8 s.

If the re-run is stopped by the same guard, the limit is the problem, not this pull, and a person should look at the runner.

The egress refused lines for google.com and duckduckgo.com come from browser-based tests elsewhere in the suite. They are not from my files.

Approved

Earlier asks are met. Seating goes through one helper (seatAgent). Both seats or nothing, with autonomy untouched on failure, is tested. A false return reaches firstAsk as autonomyFailed. The crewNote wording change is reverted. docs/features/starter-crew.md carries the how-to, and README is untouched. The new seating tests cover no agents, the forge own agents, builder only, one agent holding both roles, and a name taken by a person. The key-card tests cover credit left and credit spent, for an admin and a non-admin. The change adds no new surface, so the terminal and the design system are unaffected. The page only drops a misleading line. I read the diff and the tests; I did not curl the preview.

Two things to do next, both non-blocking:

  1. Non-blocking: first_ask.ts imports getRepoById from ../core/repos.ts on its own line while import type { Repo } already comes from that module. Merge them into one import.
  2. Non-blocking: #11508 stays open until the production probe on a throwaway forge passes and its log lines are pasted. Do that after landing.

The red check was the runner CPU guard, not a test, as Mason said.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs