Commit c8f5beb
fix(stress): extend optional chain through .trim() in readHostCounters
?.[1] short-circuits to undefined when /proc/stat's cpu line is missing,
but the following .trim() ran unconditionally and threw before the ?? []
fallback could apply — breaking readHostCounters' "return null for any
source the platform lacks" contract and surfacing as an uncaught
exception in the setInterval sampling callback.
Addresses PR #617 review threads from gemini-code-assist and claude.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 88acca6 commit c8f5beb
1 file changed
Lines changed: 1 addition & 1 deletion
File tree
- integrationTests/stress
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
0 commit comments