import fs from 'node:fs';import path from 'node:path';import {spawnSync} from 'node:child_process'; const s=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json','utf8')); if(!/^[a-f0-9]{12}$/.test(s.id)||path.resolve(s.root)!==path.resolve('C:/laragon/data/sgf-tempo/run/modular-regression-'+s.id)||s.port!==55439)throw Error('Wrong QA host'); const output=path.join(s.root,'workshop-stock-'+Date.now()+'.xml'); const filter=process.argv[2]?['--filter',process.argv[2]]:[]; const r=spawnSync('C:/laragon/tools/sgf-tempo/php-8.4.27/php.exe',['vendor/phpunit/phpunit/phpunit','tests/Feature/WorkshopStockTest.php',...filter,'--log-junit',output],{cwd:s.app,stdio:'inherit',windowsHide:true,env:{...process.env,SGF_ISOLATED_REGRESSION_RUN:s.id}}); console.log(JSON.stringify({exit_code:r.status,junit:output}));process.exitCode=r.status??1;