TASK-pilot-executor-outcomes fail closed CLI fixture

This commit is contained in:
thePR0M3TH3AN committed 2026-09-30 21:10:06 -04:00
1 parent e26a0fb506
commit 5bbd81a01f
3 files changed
+36 -6

No files matched your search

+4 -1
View File
@@ -52,7 +52,10 @@ const CODEX_PROTOCOL_REDUCER = fileURLToPath(new URL('./runtime/codex-protocol-r
export function executeRuntimeLaunch(spawn, launch, options = {}) {
// Tests and adapter qualification inject a deterministic executor. The real
// synchronous CLI boundary alone needs protocol reduction before buffering.
if (launch.runtime === 'codex' && spawn === spawnSync) {
// A tagged guard may delegate to native spawnSync after asserting hermetic
// launch preconditions; it must opt in rather than changing fake executors.
const usesNativeSpawn = spawn === spawnSync || spawn?.torchNativeSpawnGuard === true;
if (launch.runtime === 'codex' && usesNativeSpawn) {
return spawn(process.execPath, [CODEX_PROTOCOL_REDUCER, launch.command, ...launch.args], options);
}
return spawn(launch.command, launch.args, options);