Repository navigation
ci(playwright): stop the plan step discarding the checked-in timing baseline - #32080
ShaileshParmar11 wants to merge 2 commits into
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
| # No baseline fallback here on purpose. `gh run download` above is | ||
| # silent on success, so "we got zero artifacts" is not something this | ||
| # step can tell by eye, and gating the baseline on an empty | ||
| # history_args meant one successful download discarded it -- taking | ||
| # every newly seeded spec file with it. build_playwright_shards.py | ||
| # now folds .github/playwright/timing-baseline.json in itself, at | ||
| # lower precedence than anything passed here. | ||
| echo "history sources: ${#history_args[@]} artifact(s) + the checked-in baseline" | ||
| if [[ ${#history_args[@]} -gt 0 ]]; then | ||
| printf ' %s\n' "${history_args[@]}" |
There was a problem hiding this comment.
Workflow authorization not recorded
This changes executable logic under .github/workflows/** without recording the repository-required CLAUDE_ALLOW_WORKFLOW_EDITS=1 authorization, preventing reviewers from verifying that the supply-chain safeguard was observed.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
…aseline The step built `history_args` from the downloaded full-run artifacts and reached for `.github/playwright/timing-baseline.json` only when that array came out empty. `gh run download` prints nothing on success, so a run could log 49 failures across its 50 candidates, quietly succeed on the 50th, and drop the baseline on the strength of that one artifact. Everything already covered by an artifact was unaffected, which is why this went unnoticed: the only entries that exist solely in the baseline are the ones an author seeds for a brand-new spec file, exactly as the stale-baseline gate's error text tells them to. Those were discarded, and the gate then failed the plan for a file that did have history — so a new spec file was unseedable whenever any artifact was available, which is most of the time. PR open-metadata#31898 hit this twice (runs 32933633223 and 32937328644). build_playwright_shards.py now folds the baseline in itself at lower precedence than anything passed via --history, so the fallback here is not just redundant but actively harmful — it re-introduces the baseline as a peer of the artifacts, diluting the p75 those weights are built from. Drop it, and log how many artifacts actually resolved so the next person can see at a glance what fed the planner. Blocked by open-metadata#31898, which carries the build_playwright_shards.py change. Merging this first would leave a zero-artifact run with no history at all. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
192c064 to
d112314
Compare
Code Review ✅ ApprovedUpdates the Playwright CI workflow to prevent plan steps from discarding the checked-in timing baseline when partial artifacts exist. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
Closing — not needed. The actual bug (a newly added spec file's seeded timings being discarded whenever any full-history artifact downloaded) is already fixed on That leaves this PR as cleanup only, and one of its stated justifications does not hold. The description argued that keeping the fallback "re-introduces the baseline as a peer of the artifacts, diluting the p75". That is wrong: the fallback only fires when The one piece here with lasting value is the |
The bug
The
Build duration-aware shard plansstep buildshistory_argsfrom the downloaded full-run artifacts and reaches for the checked-in baseline only when that array comes out empty:gh run downloadprints nothing on success, so a run can log 49 failures across its 50 candidates, quietly succeed on the 50th, and discard the baseline on the strength of that one artifact.Everything already covered by an artifact is unaffected, which is why this went unnoticed. The only entries that exist solely in the baseline are the ones an author seeds for a brand-new spec file — exactly as the stale-baseline gate's own error text instructs:
Those seeded timings were dropped, and the gate then failed the plan for a file that did have history. Net effect: a brand-new spec file is unseedable whenever any full-history artifact is available, which is most of the time.
Evidence
#31898 hit this twice — runs 32933633223 and 32937328644, both 49/50 download failures. The artifact they used, from run 32653484382, carries 4504 tests and none of the new file's.
Replaying run 32937328644's own selection with only its artifact as history:
Planning that same selection minus the new spec produces byte-identical shard plans either way, so nothing the artifacts already cover moves.
The change
build_playwright_shards.pynow folds the baseline in itself, at lower precedence than anything passed via--history. That makes the fallback here not merely redundant but harmful: it re-introduces the baseline as a peer of the artifacts, diluting the p75 those weights are built from. Drop it, and log how many artifacts actually resolved so the next person can see at a glance what fed the planner.🤖 Generated with Claude Code
Greptile Summary
The PR updates Playwright shard planning so downloaded timing artifacts are passed as higher-precedence history while the planner supplies the checked-in baseline itself.
Confidence Score: 5/5
The PR appears safe to merge because no blocking failure remains.
No blocking failure remains.
Important Files Changed
Reviews (3): Last reviewed commit: "Merge branch 'main' into claude/ci-plan-..." | Re-trigger Greptile