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.
The app's studio page says Slots 4 of 2 in use on
trevato/csright 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) setsactive: activeRuns(app, repo.id).length— every active agent run. Thirty lines laterdriveRepocomputesslotted: the same runs minus reviews and minus anything a planner or reviewer is running, and it isslotted.length >= repo.autonomySlotsthat 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
driveRepomust keep gating on exactly the set it gates on now; the refactor is a move, not a new policy.activemay be read by the TUI or the API — find every reader before changing its meaning, and check the board.Who
Mason — one rule, in one place, with the duplicate deleted.