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.

test(chrome): wait for native clone before shutdown [C7]

Corey Olson7bf215f46201
diff --git a/test/chrome-clone-proof.js b/test/chrome-clone-proof.js
index 7ded567f..83327e97 100644
--- a/test/chrome-clone-proof.js
+++ b/test/chrome-clone-proof.js
@@ -103,9 +103,9 @@ export async function assertNoKilledChromeClone(t) {
try {
await waitUntil(() => existsSync(join(profile, 'DevToolsActivePort')), 15_000, 'real Chrome did not publish its private DevTools port');
if (control) {
- await new Promise(resolve => setTimeout(resolve, 1_000)); // budget: let the native background clone task start before graceful shutdown drains it.
- await gracefulClose(profile, launched);
+ // Chrome may skip an unstarted clone task during shutdown, so observe creation before asking it to close.
await waitUntil(() => monitor.created.size > 0, 5_000, 'unflagged native Chrome must create a clone for the control');
+ await gracefulClose(profile, launched);
assert.deepEqual(monitor.errors, []);
t.diagnostic(JSON.stringify({ phase: 'unflagged-control', createdClones: monitor.created.size, remainingClones: newChromeClones(before).length }));
await waitUntil(() => newChromeClones(before).length === 0, 5_000, 'Chromium must clean its own control clone after graceful shutdown');