Skip to content

test: map BROWSER_LAUNCH_FAILED to companion HTTP 503 - #11

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/test-coverage-automation-7bfa
Draft

test: map BROWSER_LAUNCH_FAILED to companion HTTP 503#11
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/test-coverage-automation-7bfa

Conversation

@cursor

@cursor cursor Bot commented Jul 21, 2026

Copy link
Copy Markdown

Description

Adds companion HTTP coverage so BROWSER_LAUNCH_FAILED maps to 503 with the matching lifecycle code (same recovery class as missing browsers).

Risky behavior now covered

  • createSession throwing WebchainRuntimeError("BROWSER_LAUNCH_FAILED", …) → HTTP 503
  • Error body code and lifecycle.code are BROWSER_LAUNCH_FAILED

Test files added/updated

  • services/companion/src/server.test.ts

Why these tests materially reduce regression risk

Operators rely on 503 for browser install/launch recovery. Only BROWSER_NOT_INSTALLED was asserted before; a mapping drift on launch failure would break that recovery signal.

How Has This Been Tested?

  • pnpm --filter @webchain/companion exec vitest run src/server.test.ts (14 passed)
Open in Web View Automation 

Ensure launch failures share the not-installed recovery status path so
operators get a consistent 503 + lifecycle code.

Co-authored-by: esadrianno <esadrianno@gmail.com>
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