From c63f6c74707dc57fcdd1ed96e6a25cce32e7d61a Mon Sep 17 00:00:00 2001 From: weichen Date: Tue, 13 Oct 2026 03:16:25 +0000 Subject: [PATCH] Gate checkpoint browser tests on an explicit owned instance Why: Unrelated browser suites should skip this opt-in runtime acceptance instead of importing an absent manifest. Evidence: Playwright discovers the two tests without an instance; explicit owned-instance replay passed previously. Impact: Preserves strict manifest verification when invoked. Refs: fast-slow-u2-u3 Task 7 --- e2e/work-checkpoints.playwright.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/work-checkpoints.playwright.ts b/e2e/work-checkpoints.playwright.ts index 013b1b7..b41624b 100644 --- a/e2e/work-checkpoints.playwright.ts +++ b/e2e/work-checkpoints.playwright.ts @@ -3,9 +3,9 @@ import { readFileSync, readlinkSync } from 'node:fs' import { createHash } from 'node:crypto' const manifestPath=process.env.WORK_CHECKPOINT_HTTP_MANIFEST -if(!manifestPath)throw new Error('Explicit task-owned mechanism instance manifest required') -const manifest=JSON.parse(readFileSync(manifestPath,'utf8')) -if(manifest.mode!=='mechanism'||!manifest.dataDir.includes('fast-slow-u2-u3-')||readlinkSync(`/proc/${manifest.pid}/exe`)!==manifest.binary||createHash('sha256').update(readFileSync(manifest.binary)).digest('hex')!==manifest.binarySHA256)throw new Error('Owned mechanism instance verification failed') +test.skip(!manifestPath,'Run explicitly with a task-owned mechanism instance manifest') +const manifest=manifestPath?JSON.parse(readFileSync(manifestPath,'utf8')):null +if(manifest&&(manifest.mode!=='mechanism'||!manifest.dataDir.includes('fast-slow-u2-u3-')||readlinkSync(`/proc/${manifest.pid}/exe`)!==manifest.binary||createHash('sha256').update(readFileSync(manifest.binary)).digest('hex')!==manifest.binarySHA256))throw new Error('Owned mechanism instance verification failed') async function setup(request:any){ const project=await(await request.post(manifest.base+'/api/projects',{data:{name:'browser-'+Date.now()}})).json()