test(e2e): integration suites on the fake engine, cut to what only integration proves
Merged
OK
2mo ago+1269+1269+0123456789012345678901234567890123456789-3966-3966-0123456789012345678901234567890123456789
The packages/e2e integration suite, trimmed to what only an integration run proves. Suites that don't read a page run on the fake engine, and fixed sleeps become event-driven waits. Test-only.
- Fake engine: runner lifecycle, run events, parallel workers, reporters,
expect.pollscope,expect.soft, extended fixtures, andrunProjectwithout an app URL. A browser starts only where a page is read. - Folded:
mcp-customintomcp-server(one server), the class and URL-pattern suites intoweb-platform's config-file run, the stale--strict-cacherun into the changed-screen suite, semantic fallback intoagent-fallback-handoff, and serial artifact checks intoartifact-store-serial. - Dropped: integration cases that unit tests or the testbed already pin (each checked for a surviving test before the cut), the
trace-cache-speedwall-clock gate (its replay check lives intrace-cache-replay), and line-by-line prose checks. - Stronger: secret suites now read the model input and inflated
trace.zipentries, not just the run result, and fail their deliberate tap in 500 ms instead of the 30 s action timeout. Project tool results and errors in MCP go through the secret ledger.engine-targetassertsUNSUPPORTED_CAPABILITYand its category, not a message regex. - New: Ctrl-C releases what
prepareacquired, plus exit 3,--shard, and CI defaults through the CLI, and a timeout on the worker path. engine-contract.test.tsis also edited by #813 (oskar/fix-serial-verdicts). Whichever lands second needs a trivial rebase. Merged together, both are green.
Verified
Ran it locally: yes (full packages/e2e integration suite, --maxWorkers=3, on a shared machine)
| e2e integration | main | this PR |
|---|---|---|
| tests | 622 | 535 |
| wall time | 240 s | 111 s (132 s on a loaded run) |
Mutation checks on the moved and rewritten tests. Each mutation was made in src, rebuilt into dist, run against the one test file, then reverted.
| mutation | caught by |
|---|---|
absent-frame reads poll to the deadline before returning no match (src/locator/engine.ts) | web-platform absent-frame duration (< 3 s) |
abandonRunning marks the step passed, or returns no error (src/run/steps.ts) | both STEP_NOT_AWAITED step tests in expect-poll-scope |
a read on a detached node reports hidden (packages/web/src/read-selector.ts) | web-replaced-nodes, normal and starved; the 3-read starved case caught it 3/3 |
wait drops the timeout remap, or checkStepClock ignores the deadline | engine-contract step timeout |
| missing capability thrown as a test error, not a configuration error | engine-target capability code |
store-path artifact size 0, digest not hex, path moved (src/run/artifacts.ts) | artifact-store-serial |
pixelFallback ignores taint (act or judgment), or ignores vision: false | agent-fallback-handoff tainted and tree-only judgments |
visionInput dropped from the step record | agent-fallback-handoff |
toolAppliesTo ignores platforms; an undeclared verb reads as UNKNOWN_TOOL | mcp-server kiosk tools |
act.ts concludes a no-model hand-off as failed (regression of #710) | agent-trace-cache "keeps an entry whose replay handed off to a model that never answered" |
| a test without a session restores another test's session | parallel-workers "without a session starts clean" |
explorerAgent drops the model a custom executor brought | explore executor replacement case |
token counters accept fractions (isSafeInteger to isFinite) | model-usage 0.5 row |
a --trace off / --video off flag reads as unset | unit config.test.ts flag override |
The last five were cut first and then restored after self-review or bot review, because nothing else covered them. Fake-engine runs no longer inherit the caller's APP_URL. The MCP session TTL and idle polls also got a 5 s timeout: with a 500 ms TTL, the default 1 s poll left too little slack on a loaded runner.