From 442a46f9891c6c4f1ce416e8c7dfccf3ec1f12da Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 29 Aug 2026 04:50:55 +0000 Subject: [PATCH] fix(test): reactivate 5 quarantined browse tests (2 security) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit extension-sender-auth's two privileged-message denial tests (content script + missing sender.url — the extension's security boundary) and snapshot's three skips were quarantined 'pre-existing' failures. Root cause: machine-local state on the quarantining dev machines — the test and gate code are byte-identical between the quarantining commit (410b4928) and HEAD, and all five pass deterministically on a clean checkout (68/68 across both files, multiple runs). No assertions weakened, no product changes. Co-Authored-By: Claude Fable 5 --- browse/test/extension-sender-auth.test.ts | 12 ++---------- browse/test/snapshot.test.ts | 18 +++--------------- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/browse/test/extension-sender-auth.test.ts b/browse/test/extension-sender-auth.test.ts index 238356abf..ba5d4781c 100644 --- a/browse/test/extension-sender-auth.test.ts +++ b/browse/test/extension-sender-auth.test.ts @@ -190,11 +190,7 @@ describe('background.js onMessage listener (behavioral)', () => { expect(r.response!.error).toBeUndefined(); }); - // QUARANTINED (pre-existing): fails identically on origin/main v1.64.1.0, - // solo, on dev machines (blame protocol, 2026-08 test-infra pass). Main's - // CI lane skip-lists this whole FILE; we quarantine only this test so the - // rest keeps guarding. Un-skip when the underlying env dependency is fixed. - test.skip('own content script: every privileged type is denied with no token/port fields', () => { + test('own content script: every privileged type is denied with no token/port fields', () => { for (const type of PRIVILEGED) { const r = dispatch(listener, { type }, CONTENT_SCRIPT_SENDER); expect(r.responded).toBe(true); // the gate answers, it does not go silent @@ -208,11 +204,7 @@ describe('background.js onMessage listener (behavioral)', () => { } }); - // QUARANTINED (pre-existing): fails identically on origin/main v1.64.1.0, - // solo, on dev machines (blame protocol, 2026-08 test-infra pass). Main's - // CI lane skip-lists this whole FILE; we quarantine only this test so the - // rest keeps guarding. Un-skip when the underlying env dependency is fixed. - test.skip('missing sender.url: every privileged type is denied', () => { + test('missing sender.url: every privileged type is denied', () => { for (const type of PRIVILEGED) { const r = dispatch(listener, { type }, NO_URL_SENDER); expect(r.responded).toBe(true); diff --git a/browse/test/snapshot.test.ts b/browse/test/snapshot.test.ts index 96a8b170e..85150308a 100644 --- a/browse/test/snapshot.test.ts +++ b/browse/test/snapshot.test.ts @@ -222,11 +222,7 @@ describe('Ref staleness detection', () => { expect(bm.getRefCount()).toBeGreaterThan(0); }); - // QUARANTINED (pre-existing): fails identically on origin/main v1.64.1.0, - // solo, on dev machines (blame protocol, 2026-08 test-infra pass). Main's - // CI lane skip-lists this whole FILE; we quarantine only this test so the - // rest keeps guarding. Un-skip when the underlying env dependency is fixed. - test.skip('stale ref after DOM removal gives descriptive error', async () => { + test('stale ref after DOM removal gives descriptive error', async () => { await handleWriteCommand('goto', [baseUrl + '/snapshot.html'], bm); const snap = await handleMetaCommand('snapshot', ['-i'], bm, shutdown); // Find a button ref @@ -276,11 +272,7 @@ describe('Snapshot diff', () => { expect(result).toContain('baseline'); }); - // QUARANTINED (pre-existing): fails identically on origin/main v1.64.1.0, - // solo, on dev machines (blame protocol, 2026-08 test-infra pass). Main's - // CI lane skip-lists this whole FILE; we quarantine only this test so the - // rest keeps guarding. Un-skip when the underlying env dependency is fixed. - test.skip('snapshot -D shows diff after change', async () => { + test('snapshot -D shows diff after change', async () => { await handleWriteCommand('goto', [baseUrl + '/snapshot.html'], bm); // Take first snapshot await handleMetaCommand('snapshot', [], bm, shutdown); @@ -367,11 +359,7 @@ describe('Annotated screenshots', () => { if (fs.existsSync(screenshotPath)) fs.unlinkSync(screenshotPath); }); - // QUARANTINED (pre-existing): fails identically on origin/main v1.64.1.0, - // solo, on dev machines (blame protocol, 2026-08 test-infra pass). Main's - // CI lane skip-lists this whole FILE; we quarantine only this test so the - // rest keeps guarding. Un-skip when the underlying env dependency is fixed. - test.skip('annotation overlays are cleaned up', async () => { + test('annotation overlays are cleaned up', async () => { await handleWriteCommand('goto', [baseUrl + '/snapshot.html'], bm); await handleMetaCommand('snapshot', ['-a'], bm, shutdown); // Check that overlays are removed