Skip to content

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.

fix(test): prevent native Chrome signing clones [C7]

Corey Olson3059f444c6c4
diff --git a/bin/run-tests.js b/bin/run-tests.js
index aed6761e..462517e9 100644
--- a/bin/run-tests.js
+++ b/bin/run-tests.js
@@ -1455,13 +1455,28 @@ async function main(args) {
const sandbox = mkdtempSync(join(tmpdir(), 'pullboard-test-run-'));
// A shard of a sharded landing reports each file's wall time back to its orchestrator.
const fileTimes = shardLabel ? join(sandbox, 'landing-file-times.jsonl') : '';
+ // Observe leftovers around the whole execution, including failed cases; never remove clones.
+ const cloneCheck = browser && process.platform === 'darwin'
+ ? await import('../src/chrome-clone-check.js') : null;
+ let clonesBefore;
if (fileTimes) process.env[LANDING_FILE_TIMES_ENV] = fileTimes;
try {
+ clonesBefore = cloneCheck?.chromeCloneSnapshot();
const result = await executeTests(actions.args, sandbox, gateMarkers, fullSuite && !actions.files, concurrency);
signal = result.signal;
process.exitCode = result.status ?? 1;
if (fileTimes) (await import('../src/landing-shards.js')).printShardFileTimes(fileTimes);
- } finally { rmSync(sandbox, { recursive: true, force: true }); }
+ } finally {
+ try {
+ if (clonesBefore) {
+ const growth = cloneCheck.newChromeClones(clonesBefore);
+ if (growth.length) {
+ process.stderr.write(`run-tests: CHROME_CLONE_GROWTH: ${growth.length} new native clone directories remain; stop browser work and notify the coordinator\n`);
+ process.exitCode = 1;
+ }
+ }
+ } finally { rmSync(sandbox, { recursive: true, force: true }); }
+ }
};
try {
const { GATE_SLOT_HELD_ENV, GATE_SLOT_POOL_ENV, GATE_SLOT_TOKEN_ENV, gateSlotEnvironment, inheritedGateSlot } = await import('../src/resources.js');
diff --git a/test/chrome-launch-args.js b/test/chrome-launch-args.js
index 5a71ebea..338fadbc 100644
--- a/test/chrome-launch-args.js
+++ b/test/chrome-launch-args.js
@@ -1,6 +1,6 @@
/** Shared real Chrome arguments, separate from generic Node process stand-ins [C7]. */
export function chromeLaunchArgs(profile) {
- return ['--headless=new', '--disable-gpu', '--no-first-run', '--no-default-browser-check',
+ return ['--disable-features=MacAppCodeSignClone', '--headless=new', '--disable-gpu', '--no-first-run', '--no-default-browser-check',
'--disable-background-networking', '--disable-sync', '--disable-extensions', '--no-proxy-server',
'--use-mock-keychain', '--password-store=basic', '--remote-debugging-port=0', `--user-data-dir=${profile}`, 'about:blank'];
}