Repository navigation
fix(e2e): run worktree first-paint probe on a mapped window - #20197
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe E2E workflow runs the worktree first-paint benchmark once on shard Priority: ⬇️ Low 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
ℹ️ No critical issues — one documentation note.
Reviewed changes
- Mapped-window benchmark step —
.github/workflows/e2e.ymladds a shard-1-only step that runs the first-paint spec under--project=electron-headful --workers=1throughxvfb-runande2e-with-window-manager.sh. - Spec retagged
@headfulwith a background skip — the probe now leaves the headless shards (grepInvert: /@headful/) and callstest.skip(process.env.ORCA_BACKGROUND_LAUNCH === '1', ...). Assertions, budget, and timeouts are unchanged. - Workflow contract —
config/scripts/pr-e2e-gate-contract.test.mjspins the new step's shard condition, Xvfb prefix, and headful/worker flags.
ℹ️ @headful now implies "needs a mapped window" for this spec, which the tag's documented contract doesn't mention
tests/AGENTS.md states that a @headful spec "still runs in the background," and the top-level AGENTS.md instructs agents and developers to launch automated runs with ORCA_BACKGROUND_LAUNCH=1. With this change the benchmark skips under that env and reports green, so the documented default silently drops the coverage and no doc names an invocation that actually exercises it locally.
Technical details
# Document the mapped-window requirement for the first-paint benchmark
## Affected sites
- `tests/AGENTS.md` — "Tag a spec `@headful` only when it needs real pixels; it still runs in the background." now conflicts with this spec.
- `tests/e2e/worktree-switch-first-paint.spec.ts:375-380` — skips when `ORCA_BACKGROUND_LAUNCH === '1'`; CI exercises it only through the new explicit headful step.
## Required outcome
- The tag policy or the spec records that frame-timing benchmarks need a mapped window and are skipped under explicit background launches, ideally naming the invocation that runs it (`--project=electron-headful` with `ORCA_BACKGROUND_LAUNCH` unset).
## Open questions for the human
- Is `@headful` the intended selector here, or should this benchmark carry a distinct opt-in tag so the "still runs in the background" contract stays accurate for it?openrouter/deepseek/deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
Upstream stablyai#20197 added its own "Run worktree first-paint benchmark" step and, in the same change, a contract asserting exactly one step runs that spec. The fork had added an equivalent step earlier for the same reason, so the sync left two and both contracts went red. Keep upstream's step and delete the fork's. What the fork actually contributed here — retaining traces on the successful headful run, in both the sharded and changed-spec jobs — stays. Point the fork's own contract test at upstream's step, and at the full-run command upstream moved from `--shard=` to a precomputed `--test-list`. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Ddyy32VYir3LAeFDHv71UT

ELI5
The first-paint test waited for animation frames from a window that Linux never displayed. Its clock never ticked, so it reported missing terminal content even when the terminal buffer was restored.
What Changed
@headful) project on isolated Xvfb.Why
The main-branch baseline fails with the same 30-second timeout as #20069: https://github.com/stablyai/orca/actions/runs/34668815923 . A Linux diagnostic run recorded zero animation frames and null activation/mount timestamps while the viewport buffer contained the expected WTB_T2 lines. Background-throttling switches and CDP focus emulation did not resume frames; mapping the test window did.
Linked Issue
Related: #20069 (CI investigation; does not close the mobile PR).
Visual Proof
N/A — test-environment correction only; no application UI or production behavior changes.
Testing
Review
The test requires a real frame-producing surface; adding sleeps or replacing its frame clock with a timer would change the measurement. Changed-spec CI already selects the headful project for tagged tests. The explicit scheduled invocation prevents a silent loss of full-suite coverage.
Reliability
Agent skill upstream boundary
Checklist