feat(bench): opt-in CDP tracing in bench.spec.ts (unblocks flame-graph perf diagnostics)#143
Merged
Conversation
Opt-in CDP-level tracing path for apps/bench/tests/bench.spec.ts. Unblocks future perf diagnostics that need flame-graph data (the wrapped-text filter investigation from PR #142 hit this exact wall). No matrix-runner integration; opt-in via PLAYWRIGHT_PERF_TRACE=1 env. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Four-task plan: wire CDP-tracing branch behind PLAYWRIGHT_PERF_TRACE=1 env opt-in, manual verification, repo-memory entry, gates + PR. Auto-mergeable. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…TRACE Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Vercel preview readyPreview: https://pretable-p57kyj3hj-cacheplane.vercel.app Updated automatically by the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apps/bench/tests/bench.spec.ts, gated byPLAYWRIGHT_PERF_TRACE=1. Output:status/traces/<stem>.cdp.json(sibling to the Playwright.trace.zip, gitignored).tracing.start({ screenshots, snapshots })produces an SDK action trace, not a JS flame graph. CDPTracing.startoverdisabled-by-default-devtools.timeline+v8+disabled-by-default-v8.cpu_profilerproduces DevTools-loadable JSON.Manual verification
pretable / S2 / hypothesis / filter-text. File:status/traces/chromium-pretable-default-s2-hypothesis-filter-text-2026-05-13t17-55-56-984z.cdp.json(30 KB, 145 events).jqconfirms well-formed shape: every event hasph,ts,cat,name. Categories present:__metadata,disabled-by-default-devtools.timeline,disabled-by-default-v8.cpu_profiler,v8— the standard DevTools profiling set, as expected.{ traceEvents: [...] }) and should load in Chrome → DevTools → Performance → "Load profile…".Known limitation (consumer side, not the harness)
The bench app starts running its interaction script on page-load. CDP attaches after the adapter-label visibility check, so the very first moments of the interaction may run before tracing starts. For hypothesis-scale runs the captured window is sparse (~145 events). The wiring + format are correct; the next perf-diag consumer (the deferred wrapped-text filter investigation) will likely need either a wider scale or a triggered-start variant in the bench app. Documented in the spec,
docs/research/repo-memory.md, and called out as out-of-scope here.What's NOT in this PR
Files touched
apps/bench/tests/bench.spec.ts(+62)docs/research/repo-memory.md(+28 / -1)docs/superpowers/specs/2026-05-13-bench-harness-cdp-tracing-design.md(new)docs/superpowers/plans/2026-05-13-bench-harness-cdp-tracing.md(new)No `packages/` changes. No public-API surface.
Gates
🤖 Generated with Claude Code