fix: address Copilot review round 1 (#2333)
A runner that threw ETIMEDOUT landed in the catch and read as
unavailable, bypassing the split the previous commit added. The thrown
error is now normalized onto the `{ error }` path so the timeout check
covers both shapes; a test pins the thrown case.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsmUAZ6aLUAFqenjJKSSRp
Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
3f7ba20ae6
commit
e0cd94b03e
1 changed files with 15 additions and 3 deletions
|
|
@ -189,6 +189,15 @@ test("probeScriptVersion throws on a timed-out probe instead of reporting no scr
|
|||
probeScriptVersion(() => ({ error: timedOut, stdout: "", stderr: "" })),
|
||||
new RegExp(`did not exit within ${SCRIPT_PROBE_TIMEOUT_MS}ms`),
|
||||
);
|
||||
// A runner that THROWS the same error is normalized onto the same path — the
|
||||
// `catch` must not quietly turn a thrown ETIMEDOUT back into "unavailable".
|
||||
assert.throws(
|
||||
() =>
|
||||
probeScriptVersion(() => {
|
||||
throw timedOut;
|
||||
}),
|
||||
/did not exit within/,
|
||||
);
|
||||
// And it reaches the caller: resolvePtyWrapper must not turn it into a skip.
|
||||
assert.throws(
|
||||
() =>
|
||||
|
|
|
|||
Loading…
Reference in a new issue