nearCapAccounts made Codex's allowance stale and polled Allowances until
it said the wanted share. A test before it that left the same share in
usedCache (one that only read usage, sending no turn) let the poll pass
at once on the old reading, while the reading it had asked for was still
out. That reading landed after the test's first reply was heard (92%)
and put the account back at 89%, so TestNearCapWaitsThenHolds sent the
second turn too: codes map[200:2].
It now waits through provider.ReadUsageNow, which waits for a reading
begun after it asked.
Run on mote (mote-run):
- a setup-only test (codexSignedIn, newNearCapBackend at 89,
nearCapAccounts) beside TestNearCapWaitsThenHolds, -count=6: red 4 of
6 before, ok after.
- -run 'NearCap|Key|Cap' -count=2: ok.