mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-29 17:01:55 +00:00
TASK-pilot-executor-outcomes fail closed CLI fixture
This commit is contained in:
1 parent
e26a0fb506
commit
5bbd81a01f
3 files changed
+36
-6
No files matched your search
+4
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user