Skip to content

Fix bounded adaptive screenshot publication - #2420

Merged
chubes4 merged 1 commit into
mainfrom
fix/2419-optional-adaptive-screenshot
Aug 30, 2026
Merged

Fix bounded adaptive screenshot publication#2420
chubes4 merged 1 commit into
mainfrom
fix/2419-optional-adaptive-screenshot

Conversation

@chubes4

@chubes4 chubes4 commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • capture unresolved-navigation screenshots into memory during the bounded attempt
  • publish screenshot.png only after liveness succeeds
  • prevent timed-out Playwright work from materializing an unreferenced artifact later
  • accept both documented outcomes in the regression: captured screenshot or typed unavailability

Fixes #2419.

Root Cause

withBrowserCommandLiveness can bound waiting but cannot cancel Playwright’s pending page.screenshot({ path }). After timeout, that operation could still write screenshot.png, producing either a missing-file test failure or a late orphan file absent from the artifact summary and manifest.

The bounded adaptive path now requests Playwright’s screenshot buffer without a destination path. Only a successful bounded result is written through BrowserArtifactSession; late completion after timeout has no filesystem side effect. Normal settled capture remains unchanged.

Verification

  • 10 consecutive runs of npx tsx --test tests/browser-actions-navigation-capture.browser.test.ts
  • npx tsx --test tests/browser-actions-navigation-capture.browser.test.ts tests/browser-adaptive-exploration.test.ts (31 passed)
  • npm run build
  • git diff --check

This was discovered in the v0.26.0 Homeboy release preflight. The failed release rolled back cleanly and created no tag.

AI Assistance

OpenAI GPT-5.6 Sol through OpenCode reproduced both sides of the late-write race, traced the uncancelled Playwright promise through the artifact writer, implemented publish-after-liveness buffering, and ran repeated browser verification under Chris Huber’s direction.

@chubes4
chubes4 merged commit 9af3665 into main Aug 30, 2026
5 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.

Adaptive unresolved-navigation test requires an intentionally optional screenshot

1 participant