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(gate): keep lifecycle hooks outside test option discovery [C7]
Corey Olson184532c5d862
diff --git a/src/module-imports.js b/src/module-imports.jsindex 7dc6346a..7be52acc 100644--- a/src/module-imports.js+++ b/src/module-imports.js@@ -232,8 +232,10 @@ function unreadableTestOptions(source) {for (const match of source.matchAll(/\bimport\s+([^;'"]+?)\s+from\s*(['"])node:test\2/gu)) {const bindings = match[1].replace(/[{}*]/gu, ' ').split(',');for (const binding of bindings) {- const name = binding.trim().split(/\s+as\s+/u).at(-1)?.trim();- if (/^[A-Za-z_$][\w$]*$/u.test(name ?? '')) names.add(name);+ const [original, alias] = binding.trim().split(/\s+as\s+/u);+ const name = (alias ?? original)?.trim();+ if (['test', 'it', 'describe', 'suite', 'default'].includes(original?.trim())+ && /^[A-Za-z_$][\w$]*$/u.test(name ?? '')) names.add(name);}}// A direct alias retains the same conservative rule, including renamed imported test functions.diff --git a/test/cpu-load-test-fixture.js b/test/cpu-load-test-fixture.jsindex 1e3b7738..79e918aa 100644--- a/test/cpu-load-test-fixture.js+++ b/test/cpu-load-test-fixture.js@@ -19,10 +19,11 @@ export function cpuLoadFixture(e2e, { declaration = '{ cpuLoad: true }', bindingcpSync(join(SOURCE, 'src'), join(box.repo, 'src'), { recursive: true });cpSync(join(SOURCE, 'bin'), join(box.repo, 'bin'), { recursive: true });writeFileSync(join(box.repo, 'package.json'), JSON.stringify({ name: 'pullboard', version: '1.0.0', type: 'module' }) + '\n');- writeFileSync(join(box.repo, 'test', 'cpu-probe.test.js'), `import { test${binding === 'test' ? '' : ` as ${binding}`} } from 'node:test';+ writeFileSync(join(box.repo, 'test', 'cpu-probe.test.js'), `import { test${binding === 'test' ? '' : ` as ${binding}`}, after as finish } from 'node:test';import { DatabaseSync } from 'node:sqlite';// Example text is not a declaration: { cpuLoad: true }const example = '{ cpuLoad: true }';+finish(() => {});${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);