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
test(gate): exercise opaque options on computed subtest calls [C7]
Corey Olson8ad2e19c5d11
diff --git a/test/cpu-load-test-fixture.js b/test/cpu-load-test-fixture.jsindex 79e918aa..0c1ba644 100644--- a/test/cpu-load-test-fixture.js+++ b/test/cpu-load-test-fixture.js@@ -9,7 +9,7 @@ import { HOST, installSshStandIn } from './runner-ssh-fixture.js';const SOURCE = resolve(import.meta.dirname, '..');/** Build an ordinary CLI fixture whose declared test reports its actual checkout and live holder. */-export function cpuLoadFixture(e2e, { declaration = '{ cpuLoad: true }', binding = 'test' } = {}) {+export function cpuLoadFixture(e2e, { declaration = '{ cpuLoad: true }', binding = 'test', subtest = null } = {}) {const box = e2e.project('node bin/run-tests.js test/cpu-probe.test.js');const bin = join(box.dir, 'ssh-bin');const remoteHome = join(box.dir, 'runner-home');@@ -24,13 +24,14 @@ import { DatabaseSync } from 'node:sqlite';// Example text is not a declaration: { cpuLoad: true }const example = '{ cpuLoad: true }';finish(() => {});-${binding}('declared load stand-in', ${declaration}, () => {+${subtest ? `${binding}('parent', async t => { await ${subtest}` : binding}('declared load stand-in', ${declaration}, () => {const db = new DatabaseSync(process.env.PULLBOARD_GATE_SLOT_POOL, { readOnly: true });const row = db.prepare('SELECT * FROM holder WHERE token=?').get(process.env.PULLBOARD_GATE_SLOT_TOKEN);db.close();console.log('CPU_LOAD_EXECUTOR ' + JSON.stringify({ cwd: process.cwd(), home: process.env.HOME,gatePool: process.env.PULLBOARD_GATE_SLOT_POOL, liveLease: Boolean(row), runnerExecution: row?.runner_execution === 1 }));});+${subtest ? '});' : ''}`);box.git(box.repo, 'add', '-A');box.git(box.repo, 'commit', '-q', '-m', 'test: commit declared CPU placement probe');diff --git a/test/cpu-load-tests.test.js b/test/cpu-load-tests.test.jsindex 259eac72..741f0e23 100644--- a/test/cpu-load-tests.test.js+++ b/test/cpu-load-tests.test.js@@ -135,3 +135,18 @@ for (const [kind, declaration] of [assert.equal(remote.executor?.runnerExecution, true);assert.notEqual(remote.executor?.cwd, box.repo);});+++for (const [kind, subtest] of [+ ['quoted', 't["test"]'],+ ['template', 't[`test`]'],+ ['computed', 't[["te", "st"].join("")]'],+]) test(`a ${kind} subtest call with unreadable CPU options uses its runner [C7]`, async () => {+ const box = cpuLoadFixture(e2e, { subtest,+ declaration: 'Object.fromEntries([[ ["cpu", "Load"].join(""), true ]])' });+ const remote = await box.runGate();+ assert.equal(remote.result.status, 0, remote.result.context);+ assert.equal(box.requestsMade().length, 1, 'valid computed subtest calls cannot hide unreadable CPU options');+ assert.equal(remote.executor?.runnerExecution, true);+ assert.notEqual(remote.executor?.cwd, box.repo);+});