Skip to content

[STG-2464] ci: gate v3 SEA binary build on server changes#2308

Draft
shrey150 wants to merge 1 commit into
mainfrom
shrey/gate-sea-build
Draft

[STG-2464] ci: gate v3 SEA binary build on server changes#2308
shrey150 wants to merge 1 commit into
mainfrom
shrey/gate-sea-build

Conversation

@shrey150

@shrey150 shrey150 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What & why

build-server-sea (Build SEA binary (tests, v3)) was the only package-scoped job in ci.yml without a path-filter gate. It only declared needs: [run-build], so it compiled the stagehand-server-v3 single-executable (SEA) across all 6 platforms + a sourcemap build on every PR — including metadata-only release PRs that touch zero server code (e.g. the browse version-bump PR #2287, where core / server-integration / e2e / evals all correctly skipped but the SEA build still ran).

This adds the same gate its siblings already use:

  build-server-sea:
    needs: [run-build, determine-changes]
    if: needs.determine-changes.outputs.server == 'true'

The server filter matches packages/server-v3/**, packages/server-v4/**, packages/core/**, root package.json, the lockfile, pnpm-workspace.yaml, and ci.yml — so genuine server changes still build. The only downstream consumer, server-integration-tests, already runs solely when server == true (via discover-server-tests), so gating is safe: when server is unchanged, both skip together; a skipped job passes branch protection.

Linear: STG-2464

E2E Test Matrix

Command / flow Observed output Confidence / sufficiency
ruby -ryaml -e "YAML.load_file('.github/workflows/ci.yml')" YAML OK Proves the workflow still parses after the edit.
git diff --stat origin/main..HEAD .github/workflows/ci.yml | 3 ++- (1 file, +2/-1) Confirms the change is scoped to a single job, no collateral edits.
This PR's own CI run build-server-sea runs (not skipped) Live proof the gate doesn't over-skip: ci.yml is itself in the server filter, so server == true here and the SEA build correctly fires.
Cross-check vs PR #2287 (browse@0.9.2, metadata-only) On #2287 determine-changes.server == false — evidenced by core / server-integration / e2e / evals all showing skipped while SEA still built Establishes the exact scenario this fixes; after merge, such a PR would skip build-server-sea too. Not directly runnable pre-merge (would need the merged workflow on a metadata-only PR).

🤖 Generated with Claude Code


Summary by cubic

Gated the build-server-sea job to run only when server changes are detected. This stops unnecessary multi-platform SEA builds on metadata-only PRs and stays aligned with sibling jobs; server-integration-tests remains in lockstep. Linear: STG-2464.

  • Bug Fixes
    • In .github/workflows/ci.yml, updated build-server-sea to needs: [run-build, determine-changes] and added if: needs.determine-changes.outputs.server == 'true'.

Written for commit 8cda7c3. Summary will update on new commits.

Review in cubic

build-server-sea only depended on run-build with no path-filter gate,
so it compiled the stagehand-server-v3 single-executable across all 6
platforms (+ sourcemap) on every PR — including release/metadata-only
PRs that touch no server code (e.g. the browse version-bump PRs).

Add the same `determine-changes.outputs.server == 'true'` gate its
sibling jobs (core/cli/server-integration/evals) already use. The only
downstream consumer, server-integration-tests, already runs solely when
server == true (via discover-server-tests), so gating is safe: when
server is unchanged both are skipped together.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8cda7c3

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

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@shrey150 shrey150 marked this pull request as draft July 2, 2026 19:33
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