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

"4 of 2 in use": a slot count that means what the crew's rule means #50

shipped production is serving it opened this has it

Landed in pull #58 · run

opened this

The app's studio page says Slots 4 of 2 in use on trevato/cs right now, which is not a thing that can be true — the page counts every active agent run for the repository while the loop that gates on slots counts only the ones a slot is spent on. Make the number the page shows come from the same rule the loop enforces.

autonomyStatus (src/crew/autonomy.ts:147) sets active: activeRuns(app, repo.id).length — every active agent run. Thirty lines later driveRepo computes slotted: the same runs minus reviews and minus anything a planner or reviewer is running, and it is slotted.length >= repo.autonomySlots that decides whether a builder may start. The studio app page (src/web/pages/studio.ts:986), the crew card in settings (src/web/pages/settings.ts:1260) and the map's autonomy line (src/web/pages/map.ts:1154) all render the looser number, so an autonomous app with a reviewer and a planner busy reads as over its own ceiling and a person cannot tell whether the crew is stuck or working.

Done looks like

Files I expect to change

src/crew/autonomy.ts, src/web/pages/studio.ts (only if the wording needs it), test/autonomy.test.ts, test/studio.test.ts.

Risks

  • Changing the gate by accident. driveRepo must keep gating on exactly the set it gates on now; the refactor is a move, not a new policy.
  • Another caller. active may be read by the TUI or the API — find every reader before changing its meaning, and check the board.
  • A count that hides a stuck crew. If reviews and planner runs no longer count, the page must still show them somewhere; that is what Now is for.

Who

Mason — one rule, in one place, with the duplicate deleted.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs