mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
354a11ef78
PR #1399 added auto-restart of stale daemons in BrowserBridge (daemonVersion ≠ PKG_VERSION → restart). The browser-tabs e2e fake daemon hard-coded `daemonVersion: 'test'`, so every test reported as stale and the bridge tried to /shutdown the fake daemon — which has no shutdown endpoint — causing all 4 tests in the file to exit with code 1. This has been the failing signal in `e2e-headed (ubuntu-latest)` and `e2e-headed (macos-latest)` on every main push since #1399. Read PKG_VERSION from package.json once at module load and feed that to the fake /status response. The fake daemon now matches the running CLI so the stale-daemon path is not triggered. Verification: - npx tsc --noEmit clean - npm run build clean - npx vitest run --project e2e tests/e2e/browser-tabs.test.ts → 4/4 pass