A paid seat within one lens cost of its budget is neither placed nor out #1

Open
opened 2026-11-02 18:34:13 +00:00 by jorijnvdgraaf · 0 comments

A paid seat is held out on its budget only when spentUsd >= budget (LedgerVerdict, used by LoadSeats and, from 1.1.0, after a probe). Placement needs room for one more pass: ApiRoom requires spentUsd + (running + 1) × lensCost + foreign <= budget. A seat whose spend is under its budget by less than one lens cost, with nothing running, is therefore ok but never eligible, and AllOut does not count it. A pool made only of such seats keeps waiting on "no seat has room for a new launch" instead of ending with "every seat is out".

Present on master (0d3d8ed). 1.1.0 adds one more way in: an OpenRouter key whose credit-out is lifted keeps its cycle's spend.

A fix makes the out test and the room test agree for an idle seat (out once a single pass no longer fits), with a test of a pool whose only seat sits half a lens cost under its budget.

Found by the 1.1.0 push gates.

A paid seat is held out on its budget only when `spentUsd >= budget` (`LedgerVerdict`, used by `LoadSeats` and, from 1.1.0, after a probe). Placement needs room for one more pass: `ApiRoom` requires `spentUsd + (running + 1) × lensCost + foreign <= budget`. A seat whose spend is under its budget by less than one lens cost, with nothing running, is therefore `ok` but never eligible, and `AllOut` does not count it. A pool made only of such seats keeps waiting on "no seat has room for a new launch" instead of ending with "every seat is out". Present on master (0d3d8ed). 1.1.0 adds one more way in: an OpenRouter key whose credit-out is lifted keeps its cycle's spend. A fix makes the out test and the room test agree for an idle seat (out once a single pass no longer fits), with a test of a pool whose only seat sits half a lens cost under its budget. Found by the 1.1.0 push gates.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Catcrafts/Crafter.Review#1
No description provided.