feat!: drop Playwright trace recording
Closed
OK
20d ago+782+782+012345678901234567890123456789-2215-2215-0123456789012345678901234567890123456789
Playwright trace zips were the debugging artifact for a failed test, but an agent can't read one without a GUI viewer, the screencast is withheld after a secret fill, and devices have no trace at all. This removes trace recording. The failure pages in the stacked PR take its place.
tracein the config or on a target isINVALID_CONFIG, on a test, describe, or setupCOLLECTION_ERROR, and--trace(bare or with a mode) onrunandexploreexits 2. Each names the replacement: the markdown reporter's failure pages, orvideofor a recording.videokeeps every mode and the config < target < CLI < test precedence.trace-modes.test.tsis ported tovideo-modes.test.ts, so on-all-retries, retain-on-failure, serial groups, and test-beats-config stay covered.- Engine contract:
startTrace/stopTraceleaveEngineArtifacts. An engine published before this (@e2e-dev/web@0.11.2allowse2e >=0.15 <1) still declares them, so the manifest accepts and never calls them (packages/e2e/src/engine/manifest.ts,RETIRED_HOOKS) and updatinge2ealone keeps working. - report-1 drops the
traceartifact kind,traceinartifactCapabilities, and thenot-requiredredaction;TRACE_WITHHELDis gone. Schema, valid fixture, and producer change together. - Dead code deleted:
run/trace-redaction.ts,internal/zip.ts, the ledger'sappearsIn, the web engine's trace segments around restarts and CDP recovery, telemetry'sconfig_trace_modes.redactFragmentsstays: text downloads use it since #806. - A video segment waits up to 1s for its first frame before it ends (
packages/web/src/video.ts). Without the trace keeping the screencast busy, a segment stopped right after a navigation got no frame on Linux, and Playwright writes that as a white video: thevideo.webm inked 0failuremainalso hit. Reproduced and verified in themcr.microsoft.com/playwright:v1.63.0-noblecontainer. - The late route-handler tests route a script the page waits for (
/script-flags) instead of a fetch it issues after load, which raced the end of the body once tracing no longer slowed it.
Verified
Ran it locally: yes
- testbed,
e2e run tests/todos.e2e.ts: 7 passed, notrace/directory or zip written.--videostill writes one.webmper attempt. trace: 'on'in a copy of the testbed config,--trace,--trace=on, andexplore --trace off: each refused, exit 2, with the replacement message.- The packed
e2efrom this branch with the published@e2e-dev/web@0.11.2andplaywright@1.63.0in a scratch project: the config loads and the test runs (before the manifest fix it wasINVALID_CONFIG: engine "web": artifacts has unknown key "startTrace").
FAIL |web| tests/hello.e2e.ts > hello
ASSERTION_FAILED: expect.toHaveText failed
Tests 1 failed | 0 passed (1)
(The failure is the deliberate assertion; no config error.)