Expand description
One clean turn on an account clears the limit of its other panes (task #2648). A clean turn on an account is evidence for the whole account.
A pane whose run ended on the plan’s usage limit stays limited until the provider’s reset, a clean
turn of its own, a sign-in or an account move (limit_wake, limit_probe). When the plan is raised
or the limit lifted before the reset, other agents on the same account are already working, and
every pane still marked limited, and the account itself (its state is read from its panes’ stored
failures, account_blocks_at), waited for the reset days away. So when a turn ends clean on an
account, every other pane of that account whose usage limit was stored before that turn began
has its failure cleared at once, the held-message replay wakes, and each of those agents is told
once to continue, staggered as the reset wake is.
The scan is a map lookup unless some account has a stored limit: [note_limited_blocks] records
the accounts when a limit is stored and at start.
Constants§
- GRACE_
MS - A limit stored less than this before a turn ended clean is left alone: that turn may have been served just before the limit was hit.
Functions§
- clean_
turn - A turn on
block_idended clean. When its account has other panes still marked limited, clears them, wakes the replay and tells their agents to continue. Returns how many were cleared. A map lookup when no account has a stored limit. BLOCKING when it has (store reads and writes). - note_
failure - A usage limit is being stored for
block_id(persist_last_failure, before the write): records the pane’s account so a clean turn on it looks for the panes to clear. Reads the account from the pane, not the stored limit, which is not there yet. - note_
limited_ blocks - Records the accounts of the panes in
blocksthat hold a usage limit.