Skip to content

fix(studio-web): auto-retry the story capture pass instead of failing the run#111

Merged
Yona-Appletree merged 1 commit into
mainfrom
claude/nostalgic-tereshkova-455536
Jul 16, 2026
Merged

fix(studio-web): auto-retry the story capture pass instead of failing the run#111
Yona-Appletree merged 1 commit into
mainfrom
claude/nostalgic-tereshkova-455536

Conversation

@Yona-Appletree

Copy link
Copy Markdown
Member

Summary

  • just studio-story-baselines / studio-story-check failed 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 three just studio-story-* recipes (and CI) stop paying the manual-retry tax.
  • The capture pass now automatically re-runs once with a fresh Chrome on failure (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.
  • CDP 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.
  • README: fixed the stale claim that the script defaults to one Chrome page (the default is 4) and documented the automatic retry.

Validation

  • Real studio-story-check run: the full 747-viewport capture completed with no retry needed (no regression).
  • Fault injection: with a CHROME_BIN wrapper 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.
  • Known pre-existing issue, unrelated to this change (reproduced with the pristine HEAD script from a clean capture dir): studio-story-check currently reports baseline drift on a clean tree — ~12 stories with glyph-edge deltas just over tolerance, plus a nondeterministic capture height for slot-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

… 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 <[email protected]>
@Yona-Appletree
Yona-Appletree merged commit d796692 into main Jul 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant