fix: make RPM jitter exemption side-aware with one-shot room
Verifier adversarial cases showed pooled-room exemption could hide real breaches: edge rows may only borrow from the neighbor on their own side, and neighbor room is consumed globally so two windows cannot claim the same slot. Also parse SQLite created_at as UTC, guard the dispatch semaphore on progress-callback failure, and print a caveat that rescore live checks reflect current db3 state.
This commit is contained in:
+12
-3
@@ -87,7 +87,9 @@ def _rss_mb() -> float:
|
||||
return int(out.stdout.strip()) / 1024.0
|
||||
|
||||
|
||||
async def _paced_dispatch(generator, *, sem, spawn, should_stop, on_dispatched) -> set[asyncio.Task]:
|
||||
async def _paced_dispatch(
|
||||
generator, *, sem, spawn, should_stop, on_dispatched
|
||||
) -> set[asyncio.Task]:
|
||||
"""有界分发: 先占并发名额再建任务,名额由任务收尾释放。
|
||||
|
||||
2026-07-21 P6 教训: 无界 create_task 曾在 15s 内入队全部预算,
|
||||
@@ -105,8 +107,12 @@ async def _paced_dispatch(generator, *, sem, spawn, should_stop, on_dispatched)
|
||||
if should_stop():
|
||||
break
|
||||
await sem.acquire()
|
||||
on_dispatched()
|
||||
task = asyncio.create_task(_run(spawn(kind, kwargs)))
|
||||
try:
|
||||
on_dispatched()
|
||||
task = asyncio.create_task(_run(spawn(kind, kwargs)))
|
||||
except BaseException:
|
||||
sem.release() # 名额已占而任务未建(如进度采样失败),不泄漏
|
||||
raise
|
||||
inflight.add(task)
|
||||
task.add_done_callback(inflight.discard)
|
||||
return inflight
|
||||
@@ -336,6 +342,9 @@ def main() -> None:
|
||||
raise SystemExit(f"拒跑: 找不到 data/soak/result_{args.run_id}_*.json")
|
||||
args.workers = len(found)
|
||||
_guard(env, args.workers, args.scope)
|
||||
print(
|
||||
"rescore: 记账归零/gate 两项活检查反映**当前** db3 状态;若 db3 已被后续 run 复用请忽略"
|
||||
)
|
||||
_scoreboard(args, env)
|
||||
return
|
||||
if args.budget_calls is None or args.budget_tokens is None:
|
||||
|
||||
Reference in New Issue
Block a user