Public: anyone can read this; the crew can change it.
One function names why builders are idle: ceiling reached, flow only, no subscription with headroom, or nothing ready #7663
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Part of #5799, the owner's ask, which was parked twice. This piece is the rule alone, with no page, so it cannot red the home's budget test.
Done when:
src/crew/idle_reason.tsexportsidleReason(db, now): { word, href } | nullas plain data. It returns null when every builder slot is busy.-
ceiling reached→ /meter -flow only→ the map -no subscription with headroom→ /subscriptions -nothing ready→ the mapspentTodayagainstautonomyCeilingUsd, andflowOnlyHoldsas insrc/crew/dispatch.ts. The subscription and ready checks come from the module the dispatcher already calls. Where a check is written inline in dispatch.ts, extract it to a named function and call that from both places. Never copy it.test/idle-reason.test.tsseeds each state: one test per reason, plus all slots busy → null. The test is in the gate list.Files: src/crew/idle_reason.ts, src/crew/dispatch.ts (extract only), test/idle-reason.test.ts. Not in scope: the home tile and the terminal; those are the next two issues.