Skip to content

ci: build protocol before Check - #2986

Open
antonvishal wants to merge 2 commits into
browserbase:mainfrom
antonvishal:ci/check-protocol-first
Open

antonvishal wants to merge 2 commits into
browserbase:mainfrom
antonvishal:ci/check-protocol-first

Conversation

@antonvishal

@antonvishal antonvishal commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces the full pnpm build in the Check workflow job with targeted builds:

  1. Pre-builds @browserbasehq/stagehand-protocol before pnpm check and runs the schema drift diff.
  2. Explicitly builds browse before running CLI tests (pnpm --filter browse test:cli).

Why

  • Prevents formatter race condition: Running protocol build inside pnpm check causes stagehand.v4.json generation to race against root oxfmt --check ., leading to false formatting failures. Pre-building the protocol ensures the generated schema is formatted before formatting checks run.
  • Decouples CLI tests from typecheck: CLI tests require built SDK and Browse artifacts (dist/). Explicitly building browse guarantees CLI tests remain robust and independent of any incidental dependencies in evals#typecheck.
  • Eliminates unnecessary build steps: Avoids compiling unrelated deliverables (such as the evals bundle) during Check.

Verification

  • Fork CI run (35338910737): Check, Build, TypeScript unit, and all 32 integration jobs passed.
  • turbo run build --filter=browse hits Turbo cache in 51ms during normal runs while serving as a reliable guardrail.
  • Local verification: pnpm check, pnpm test:unit, and pnpm --filter browse test:cli passed cleanly.

@changeset-bot

changeset-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d14aaeb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run.
Approving the latest commit mirrors it into an internal PR owned by the approver.
If new commits are pushed later, the internal PR stays open but is marked stale until someone approves the latest external commit and refreshes it.

@github-actions github-actions Bot added external-contributor Tracks PRs mirrored from external contributor forks. external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. labels Sep 18, 2026
@antonvishal antonvishal reopened this Sep 18, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. external-contributor Tracks PRs mirrored from external contributor forks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant