Skip to content

fix(browser-actions): reject empty video recordings - #2562

Merged
chubes4 merged 1 commit into
mainfrom
fix/issue-2558-wp-codebox
Oct 3, 2026
Merged

chubes4 merged 1 commit into
mainfrom
fix/issue-2558-wp-codebox

Conversation

@chubes4

@chubes4 chubes4 commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #2558. Finalize Playwright’s video before adopting it, reject empty source or copied artifacts, and surface recording failures in errors.jsonl and the command result rather than reporting success.

What changed

  • Use Playwright's `video.path()` to obtain the finalized staged recording before copying it into the browser artifact.
  • Verify both the staged recording and adopted `video.webm` are non-empty; turn validation or adoption failures into command failures and serialized browser errors.
  • Write and expose `errors.jsonl` when video capture fails, even if the caller did not explicitly request `capture=errors`.
  • Strengthen the oversized-video regression to verify successful capture has no errors and produces a nontrivial artifact.

How to test

  1. Run npm ci && npm run build && npm run test:browser-video-capture; expect passes as recorded by Cook's deterministic gate.

Compatibility

Successful video captures retain their existing artifact path and summary shape. Invalid or empty recordings now fail loudly instead of returning success; on video failure, `errors.jsonl` is emitted even when errors were not explicitly requested. No CHANGELOG or version strings were changed.

Evidence

  • Verified command npm ci && npm run build && npm run test:browser-video-capture: status=succeeded; candidate commit a1317ed97ea8e67f83415edc9c46637b42e1055d, tree 4b0fd8d72aa23385b5a38982ffffe2bdc97c7c8c, fingerprint 7c7fcff1f9c0e1f3b1b79932fc19ba99ed2ecf9bdfcd7cafe638a3cc30943b45; durable gate gate-1
  • Base unchanged since verification: main remains at 0faffbf.
  • CI expected: Homeboy CI after push
  • Candidate adoption provenance: the candidate was promoted from the recorded Cook task execution.
  • Cook deterministic verification: 1 gate(s) completed green.
  • Durable run execution: Succeeded
  • Reviewer-resolvable evidence from source_refs[0]: browser-actions: video-size larger than the viewport writes a 0-byte video.webm and reports success #2558
  • Task objective: Goal: wordpress.browser-actions must never report success with an empty or unfinalized video. Start in packages/runtime-playground/src/browser-actions-runner.ts (video adoption ~L564-578, browserVideoSize ~L897) and tests/browser-actions-video-capture.browser.test.ts.
  • Verified candidate scope: 2 changed file(s): packages/runtime-playground/src/browser-actions-runner.ts, tests/browser-actions-video-capture.browser.test.ts.
  • Verified finalization base: main at 0faffbf
  • deterministic gate passed: sh -lc npm ci && npm run build && npm run test:browser-video-capture (Passed)

AI assistance

  • AI assistance: Yes
  • Tool(s): Homeboy (opencode)
  • Model: openai/gpt-6-luna
  • Used for: [operator-only reference omitted]

@chubes4
chubes4 merged commit 5f7578d into main Oct 3, 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.

browser-actions: video-size larger than the viewport writes a 0-byte video.webm and reports success

1 participant