test(reliability): add long-duration steady-state soak test - #79
Conversation
socket.io-client test that holds a steady-state connected population for hours with light periodic churn, to surface slow leaks/degradation over time — distinct from the short, rapid connect/disconnect soak. - load-test/long-duration-soak.js — steady population + churn + interval health/metrics sampling - load-test/results/LONG-DURATION-SOAK.md — leak-over-time methodology (RSS/FD over hours) Authored by Claude (Anthropic) via Claude Code. Not executed against a live backend — results are placeholders, not fabricated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
3 issues found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="load-test/results/LONG-DURATION-SOAK.md">
<violation number="1" location="load-test/results/LONG-DURATION-SOAK.md:12">
P3: The doc cites `load-test/sfu-capacity.js` as an existing test, but no such file exists anywhere in the repo — load-test/ only contains `long-duration-soak.js` and `signaling-latency.js`. Update the reference to the actual short/rapid capacity test file name so readers aren't sent looking for a file that doesn't exist.</violation>
</file>
<file name="load-test/long-duration-soak.js">
<violation number="1" location="load-test/long-duration-soak.js:36">
P2: When a numeric flag is malformed or missing, `parseInt` yields `NaN`; the script then runs with zero clients or zero duration and reports a summary. Validate finite, positive argument values before starting the soak.</violation>
<violation number="2" location="load-test/long-duration-soak.js:108">
P2: When `METRICS_URL` sends headers but stalls while streaming the body, this timeout is cleared before `res.text()` runs, so the soak can wait forever. Keep the abort timer active through body consumption and clear it in `finally`.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| const TOKEN = arg("token", null); | ||
| const DO_JOIN = arg("join", "false") === "true"; | ||
|
|
||
| const NUM_CLIENTS = parseInt(arg("clients", "200"), 10); |
There was a problem hiding this comment.
P2: When a numeric flag is malformed or missing, parseInt yields NaN; the script then runs with zero clients or zero duration and reports a summary. Validate finite, positive argument values before starting the soak.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At load-test/long-duration-soak.js, line 36:
<comment>When a numeric flag is malformed or missing, `parseInt` yields `NaN`; the script then runs with zero clients or zero duration and reports a summary. Validate finite, positive argument values before starting the soak.</comment>
<file context>
@@ -0,0 +1,542 @@
+const TOKEN = arg("token", null);
+const DO_JOIN = arg("join", "false") === "true";
+
+const NUM_CLIENTS = parseInt(arg("clients", "200"), 10);
+const DURATION_MIN = parseInt(arg("durationMin", "120"), 10);
+const CHURN_INTERVAL_MS = parseInt(arg("churnIntervalMs", "60000"), 10);
</file context>
| const t0 = performance.now(); | ||
|
|
||
| socket.emit(event, ...args, (response) => { | ||
| clearTimeout(timer); |
There was a problem hiding this comment.
P2: When METRICS_URL sends headers but stalls while streaming the body, this timeout is cleared before res.text() runs, so the soak can wait forever. Keep the abort timer active through body consumption and clear it in finally.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At load-test/long-duration-soak.js, line 108:
<comment>When `METRICS_URL` sends headers but stalls while streaming the body, this timeout is cleared before `res.text()` runs, so the soak can wait forever. Keep the abort timer active through body consumption and clear it in `finally`.</comment>
<file context>
@@ -0,0 +1,542 @@
+ const t0 = performance.now();
+
+ socket.emit(event, ...args, (response) => {
+ clearTimeout(timer);
+
+ resolve({
</file context>
|
|
||
| ## Roadmap gap this fills | ||
|
|
||
| The existing `load-test/sfu-capacity.js` (and the signaling latency probe) are |
There was a problem hiding this comment.
P3: The doc cites load-test/sfu-capacity.js as an existing test, but no such file exists anywhere in the repo — load-test/ only contains long-duration-soak.js and signaling-latency.js. Update the reference to the actual short/rapid capacity test file name so readers aren't sent looking for a file that doesn't exist.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At load-test/results/LONG-DURATION-SOAK.md, line 12:
<comment>The doc cites `load-test/sfu-capacity.js` as an existing test, but no such file exists anywhere in the repo — load-test/ only contains `long-duration-soak.js` and `signaling-latency.js`. Update the reference to the actual short/rapid capacity test file name so readers aren't sent looking for a file that doesn't exist.</comment>
<file context>
@@ -0,0 +1,177 @@
+
+## Roadmap gap this fills
+
+The existing `load-test/sfu-capacity.js` (and the signaling latency probe) are
+**short and rapid**: they ramp viewers up, measure connect/join/first-frame
+latency, and tear down. That surfaces capacity ceilings and connect-storm
</file context>




Authored by Claude (Anthropic) via Claude Code. Not executed against a live backend — results are placeholders, not fabricated.
Summary by cubic
Adds a long-duration steady-state soak test for the signaling layer to catch slow leaks and gradual degradation that short, rapid connect/disconnect benchmarks miss.
viewer:heartBeatevents to keep Redis presence TTLs alive, exercising that machinery over the full window.Written for commit 553d761. Summary will update on new commits.