Open History to see the last commit
1import {chromium} from '@playwright/test'
2import {readFile,writeFile} from 'node:fs/promises'
3
4// Read-only requests to an already running lab server. Each guest gets its own
5// disposable kernel. This diagnostic does not change the compatibility baseline.
6const base=new URL(process.argv[2]??'http://127.0.0.1:4199')
7if(!['127.0.0.1','localhost','[::1]'].includes(base.hostname))throw Error('Use a local lab server')
8const prior=JSON.parse(await readFile('reports/workload-matrix.json','utf8'))
9const engine=await (await fetch(new URL('/quickjs-als/build.json',base))).json()
10const ids=[...new Set(prior.kernel.filter(row=>row.browser==='chromium'&&row.status==='gap').map(row=>row.id))]
11const browser=await chromium.launch(),results=[]
12try{
13 const page=await browser.newPage()
14 await page.goto(new URL('/sandbox.html',base).href)
15 for(const id of ids){
16 const report=await page.evaluate(async id=>{
17 const manifest=await (await fetch('/workloads/manifest.json')).json()
18 manifest.cases=manifest.cases.map(row=>({...row,execution:'modules'}))
19 return window.sandboxLab.runWorkload(id,manifest)
20 },id)
21 results.push(report)
22 console.log(id,report.status,report.error?.slice(0,250)??'')
23 }
24}finally{await browser.close()}
25await writeFile('reports/runtime-loading-discovery.json',JSON.stringify({generatedAt:new Date().toISOString(),browser:'chromium',engine,
26 scope:'Existing prepared source graphs through the Node-shaped runtime loader. Graphs were mostly captured for browser bundling and may omit Node entrypoints or runtime assets. This is blocker discovery, not full package support.',results},null,2)+'\n')