The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
test(orchestration): verify unset approval policy default
Huanyi Xie0609433033a1
diff --git a/tests/scripts/orchestrate-codex-worker.test.js b/tests/scripts/orchestrate-codex-worker.test.jsindex 6a8c5c17b..48a3ca6e0 100644--- a/tests/scripts/orchestrate-codex-worker.test.js+++ b/tests/scripts/orchestrate-codex-worker.test.js@@ -53,9 +53,10 @@ process.exit(Number(process.env.ECC_TEST_EXIT));const env = { ...process.env,PATH: `${binDir}${path.delimiter}${process.env.PATH}`,ECC_TEST_CAPTURE: captureFile,- ECC_TEST_EXIT: String(exitCode),- ECC_CODEX_APPROVAL_POLICY: policy || 'never'+ ECC_TEST_EXIT: String(exitCode)};+ if (policy === undefined) delete env.ECC_CODEX_APPROVAL_POLICY;+ else env.ECC_CODEX_APPROVAL_POLICY = policy;const result = spawnSync('bash', [SCRIPT, taskFile, handoffFile, statusFile], {cwd: tempRoot, env, encoding: 'utf8', timeout: 10000});@@ -73,6 +74,7 @@ process.exit(Number(process.env.ECC_TEST_EXIT));test('starts a worker with the current CLI grammar and configured model', () => {const result = runWorker();assert.strictEqual(result.status, 0, result.stderr);+ assert.strictEqual(result.args[result.args.indexOf('--ask-for-approval') + 1], 'never');assert.ok(!result.args.includes('-m') && !result.args.includes('--model'),'Worker should inherit the configured model rather than pin a retired model');assert.ok(result.handoff.includes('Completed the focused task.'));