feat(seats): accounts without a 5-hour limit
Anthropic is removing the 5-hour limit in stages (from 2026-10-31), and an account without it reports the weekly window alone. Until now the pool took such an account for an unprobed seat: always eligible, ranked after every other, never held to the weekly cutoff, with no cap on its passes. - The burst window is the 5-hour one, else the weekly one (Seats::BurstWindow). An account whose burst window is the weekly one is ranked by it and admitted under the 95 % cutoff with the passes in flight projected on it, at the measured share per pass (0.04 at xhigh, 0.125 otherwise; REVIEW_GATES_LENS_COST_7D_PCT), and waits for the weekly reset when over it. - Every OAuth account and the local login takes at most 128 passes at once, every driver's counted (REVIEW_GATES_OAUTH_CONCURRENCY): every run measured with 149 or more in flight on one account drew usage-limit rejections, none of the 119 with 139 or fewer. - A 'concurrents' rejection pauses the seat for 20 s or its retry-after, not until a window's reset (a seat sat two hours at 10 % on one). - Board entries, the folded foreign record and the board's view carry cost7d, so the drivers see each other's weekly load. - `seats` and the log table say `no limit` in such an account's 5-hour column; the board's others-line names its weekly projection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a2974a8139
commit
c28307601b
11 changed files with 209 additions and 26 deletions
|
|
@ -339,7 +339,8 @@ namespace {
|
|||
// projection.
|
||||
const Json base = sm["windows"]["five_hour"]["utilization"];
|
||||
Check("a driver's passes fold at its own projection (2 % each) into another driver's (0.25 %)",
|
||||
Dyn::Equal(sm["foreign"], {{"count", 2}, {"cost5h", 4.0}, {"costUsd", 0}, {"drivers", {{D.Me(), 2}}}}) && base == 40 && SeatPool::OauthProjected(sm, cfg) == base.get<double>() + 4.0,
|
||||
Dyn::Equal(sm["foreign"], {{"count", 2}, {"cost5h", 4.0}, {"cost7d", 0.25}, {"costUsd", 0}, {"drivers", {{D.Me(), 2}}}}) && base == 40
|
||||
&& SeatPool::OauthProjected(sm, cfg) == base.get<double>() + 4.0,
|
||||
std::format("{} {}", DumpSpaced(sm["foreign"]), base.dump()));
|
||||
const std::optional<std::string> unviewed = Platform::ReadFile(path);
|
||||
Json v = A.View(now);
|
||||
|
|
@ -347,6 +348,18 @@ namespace {
|
|||
Check("view: the drivers and, per account, the passes in flight by driver - nothing written",
|
||||
v["drivers"].contains(A.Me()) && v["drivers"].contains(D.Me()) && v["seats"][km]["inflight"] == 2 && Dyn::Equal(v["seats"][km]["by"], {{D.Me(), 2}}) && v["drivers"][D.Me()]["inflight"] == 2
|
||||
&& Platform::ReadFile(path) == unviewed);
|
||||
// 2026-10-31: an account without a 5-hour limit, as another driver's
|
||||
// pass loads it.
|
||||
Json sdn = mk("7", "oauth", "t7");
|
||||
Json san = mk("7", "oauth", "t7");
|
||||
sdn["windows"] = {{"seven_day", {{"utilization", 10}, {"resetsAt", now + 86400}}}};
|
||||
san["windows"] = sdn.at("windows");
|
||||
place1(D, sdn, cfg, chooserFor("7", "n0"));
|
||||
fold1(A, san, now);
|
||||
std::vector<Json> weeklySeats = {san};
|
||||
const std::vector<std::string> ol = A.OthersLines(weeklySeats, now, cfg, acfg);
|
||||
Check("others: an account without a 5-hour limit shows the other driver's pass on its weekly projection",
|
||||
std::ranges::any_of(ol, [](const std::string& l) { return l.contains("seat 7: 1 passes in flight") && l.contains("projected 7d 10.1 %, no 5-hour limit"); }), Dyn::Join(ol, " | "));
|
||||
D.Leave();
|
||||
Check("no secret on the board", !DumpSpaced(Read(path).at("seats")).contains("t1") && !Platform::ReadFile(path).value_or("").contains("k1"));
|
||||
// Memory across drivers (2026-10-31): what the board's passes were
|
||||
|
|
|
|||
Loading…
Reference in a new issue