test(sandbox): pin runner argv forms

This commit is contained in:
Hypatia May
2026-08-04 17:19:19 +08:00
parent c4e9893a87
commit ea762e3962
3 changed files with 34 additions and 21 deletions

View File

@@ -248,6 +248,8 @@ describe('fail closed', () => {
denialSignatures: UNIX_SIGNATURES,
runnerFailureRules: RUNNER_FAILURE,
}))
// This pins an alternative SubprocessService's synchronous seam, not the
// shipped local behavior.
vi.spyOn(ctx.subprocess, 'spawn').mockImplementation(() => {
throw Object.assign(new Error('spawn EACCES'), { code: 'EACCES', syscall: 'spawn', path: runner })
})