Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
fix(tests): classify Node option values before slot checks [Q4]
Corey Olsondb773a5a7125
diff --git a/bin/run-tests.js b/bin/run-tests.jsindex 4d573f02..c72b1af7 100644--- a/bin/run-tests.js+++ b/bin/run-tests.js@@ -156,15 +156,22 @@ function runTests(args, env) {return spawnSync(process.execPath, nodeArgs, { env, stdio: 'inherit' });}-const NODE_TEST_OPTIONS_WITH_VALUES = new Set([- '--test-name-pattern', '--test-skip-pattern', '--test-reporter', '--test-reporter-destination',- '--test-timeout', '--test-concurrency', '--import', '--require', '--conditions', '--loader',- '--experimental-loader', '--inspect-port', '-r', '-C',- '--test-shard', '--test-coverage-branches', '--test-coverage-exclude',- '--test-coverage-functions', '--test-coverage-include', '--test-coverage-lines',- '--test-global-setup', '--test-random-seed', '--test-rerun-failures',- '--experimental-test-isolation', '--test-isolation',-]);+let nodeOptionsWithValues;++/** Read Node option arity from this runtime so supported option values cannot bypass the machine pool. */+function optionTakesValue(argument) {+ if (!nodeOptionsWithValues) {+ nodeOptionsWithValues = new Set();+ const help = execFileSync(process.execPath, ['--help'], { encoding: 'utf8' });+ for (const line of help.split(/\r?\n/u)) {+ const signature = line.match(/^ (-\S.*?)(?: {2,}|$)/u)?.[1];+ if (!signature || !signature.includes('=') || signature.includes('[=')) continue;+ for (const option of signature.matchAll(/--?[A-Za-z][A-Za-z0-9-]*/gu)) nodeOptionsWithValues.add(option[0]);+ }++ }+ return nodeOptionsWithValues.has(argument.replaceAll('_', '-'));+}/** Distinguish file selection from option values so filtered discovery still takes a full-suite slot. */function hasTestFiles(args) {@@ -174,7 +181,7 @@ function hasTestFiles(args) {if (takesValue) { takesValue = false; continue; }if (argument === '--') return index < args.length - 1;if (argument.startsWith('-')) {- if (!argument.includes('=')) takesValue = NODE_TEST_OPTIONS_WITH_VALUES.has(argument);+ if (!argument.includes('=')) takesValue = optionTakesValue(argument);continue;}return true;diff --git a/test/gate-resource.test.js b/test/gate-resource.test.jsindex ea533080..e7bbcf34 100644--- a/test/gate-resource.test.js+++ b/test/gate-resource.test.js@@ -368,7 +368,11 @@ test('[Q1,Q2,V18] item checks wait for a gate slot and ordinary gates precede th});test('a raw full-suite run takes a machine gate slot [Q4]', async () => {- const modes = [[], ['--test-name-pattern', PROBE_PATTERN, '--test-reporter', 'tap', '--test-concurrency', '1', '--test-shard', '1/1', '--experimental-test-isolation', 'process']];+ const modes = [+ [],+ ['--test-name-pattern', PROBE_PATTERN, '--test-reporter', 'tap', '--test-concurrency', '1', '--test-shard', '1/1', '--experimental-test-isolation', 'process'],+ ['--disable-warning', 'ExperimentalWarning', '--title', 'pullboard-slot-probe', '--max-http-header-size', '16384'],+ ];for (const args of modes) {const box = fixture();const release = join(box.dir, 'release-full-suite-holder');@@ -434,6 +438,7 @@ test('a focused run takes no slot [Q4]', async () => {await waitFor(() => events(box).includes('focused-holder start'), 'the fixture gate to hold its only machine slot');focusedRun = launchTestRunner(box, suiteRoot, ['--test-name-pattern', PROBE_PATTERN,+ '--disable-warning', 'ExperimentalWarning', '--title', 'focused-slot-probe','test/probe.test.js',], marker);const outcome = await waitFor(() => {