fix(studio-web): auto-retry the story capture pass instead of failing the run#111
Merged
Merged
Conversation
… the run A single CDP timeout (Chrome wedging under parallel wasm loads) used to reject the whole story-PNG run, and callers paid a manual re-run to resume. Bake that retry in: the capture pass re-runs once with a fresh Chrome (STUDIO_STORY_CAPTURE_ATTEMPTS, default 2), skipping viewports already captured for the current build. CDP sends on a closed DevTools socket now fail immediately so a dead Chrome hands over to the retry without stalling out the 30s per-call timeout. Also fix the README's stale claim that the script defaults to one Chrome page (it is four). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
just studio-story-baselines/studio-story-checkfailed on first run ~4 of 5 times with a CDP navigation timeout (Chrome wedging under the default 4-page parallel wasm load); a manual re-run always completed via the build-fingerprint resume. This bakes that retry into the capture script itself, so all threejust studio-story-*recipes (and CI) stop paying the manual-retry tax.STUDIO_STORY_CAPTURE_ATTEMPTS, default 2). The "already captured" skip check no longer depends on the startup resume flag — any non-empty PNG in the capture dir is from the current build (the dir is wiped at startup when the build changes) — so the retry pass genuinely resumes instead of redoing all ~747 captures.send()fails immediately when the DevTools socket is closed; previously such sends were silently discarded by the WebSocket and sat out the full 30s per-call timeout, stalling the handover to the retry.Validation
studio-story-checkrun: the full 747-viewport capture completed with no retry needed (no regression).CHROME_BINwrapper that SIGKILLs the capture browser 12s in, pass 1 failed fast (Capture pass 1/2 failed: Chrome DevTools connection is closed), pass 2 launched a fresh Chrome, skipped the ~71 already-captured viewports, wrote exactly 747/747 files with no duplicates, and exited 0.studio-story-checkcurrently reports baseline drift on a clean tree — ~12 stories with glyph-edge deltas just over tolerance, plus a nondeterministic capture height forslot-value-editor__overview__md(2148 vs 3963 px, looks like a story-load race). Tracked separately.Contribution Terms
By opening this pull request, I confirm that I have the right to submit these
changes and agree to the contribution terms in
CONTRIBUTING.md.🤖 Generated with Claude Code