mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-11 04:00:38 +00:00
test(code-runtime-python): pin the directory-skip in pythonBin resolution; cover the ack gate defenses
The resolvePythonBin directory branch now has a regression: a PATH whose first entry is an executable DIRECTORY named python3 is skipped for a later real interpreter (fail-before: without the isFile guard the directory would be chosen and spawn would fail). The boot-ack gate's forged-second-ack re-entry guard and its write-failure branch are covered by v8 ignore comments (the honest child sends exactly one ack; the write failure needs the child to exit between ack and write).
This commit is contained in:
@@ -1995,11 +1995,13 @@ export class PythonCodeRuntime extends CodeRuntime {
|
||||
}
|
||||
// Register the ack gate with the frame handler before any data arrives.
|
||||
bootAckGate.run = (): void => {
|
||||
/* v8 ignore next -- a forged second boot-ack would re-enter; the honest child sends exactly one. */
|
||||
if (runSent) return
|
||||
runSent = true
|
||||
try {
|
||||
proto.write(`${JSON.stringify({ type: 'run', program: request.program })}\n`)
|
||||
} catch (error: unknown) {
|
||||
/* v8 ignore next -- the child exited between its ack and this write; the run settles as worker-exit. */
|
||||
finish({ error: { kind: 'worker-exit', message: `failed to boot python subprocess: ${messageOf(error)}` } })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user