fix(soak): fix NameError 'm' in rate_limited warning block

Made-with: Cursor
This commit is contained in:
Apple
2026-03-05 08:07:46 -08:00
parent e12c99903d
commit 4d6e73f352

View File

@@ -405,9 +405,9 @@ async def run_soak(
"— possible SQLite write pressure (Bottleneck #2)"
)
# Rate-limited warning (not a failure, but surfaced prominently)
rl_delta = m.get("rate_limited", 0)
rl_delta = report["metrics_delta"].get("rate_limited", 0)
if rl_delta > 0:
rl_pct = rl_delta / s["total_messages"] * 100
rl_pct = rl_delta / report["summary"]["total_messages"] * 100
report["warnings"] = report.get("warnings", [])
report["warnings"].append(
f"rate_limited={rl_delta:.0f} ({rl_pct:.0f}% of messages) — "