Skip to content

fix: resolve server release versions from remote tags#1940

Merged
monadoid merged 2 commits intomainfrom
fix_server_release_remote_tags
Mar 31, 2026
Merged

fix: resolve server release versions from remote tags#1940
monadoid merged 2 commits intomainfrom
fix_server_release_remote_tags

Conversation

@monadoid
Copy link
Copy Markdown
Contributor

@monadoid monadoid commented Mar 31, 2026

Resolve server-v3 and server-v4 release versions from remote tags, fail instead of bootstrapping from 0.0.0, and refuse to publish any version that does not advance the highest existing remote tag.


Summary by cubic

Resolve release versions for @browserbasehq/stagehand-server-v3 and @browserbasehq/stagehand-server-v4 from remote Git tags and add guardrails to stop non-advancing or bootstrapped releases. Workflows fail if no remote release tag exists.

  • Bug Fixes
    • Determine latest remote tag with git ls-remote --tags (no local tag reliance).
    • Fetch the resolved tag before diffing and ignore deleted changeset files.
    • Require the computed version to advance the highest remote version; otherwise fail.
    • Fail when no remote tag is found (no 0.0.0 bootstrap).

Written for commit 77c176c. Summary will update on new commits. Review in cubic

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 31, 2026

⚠️ No Changeset found

Latest commit: 77c176c

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

Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.
Architecture diagram
sequenceDiagram
    participant Runner as GHA Runner
    participant Remote as Git Remote (Origin)
    participant FS as Local Filesystem
    participant Logic as Version Logic (Node.js)

    Note over Runner,Logic: Release Version Resolution Flow

    Runner->>Remote: NEW: git ls-remote --tags
    Remote-->>Runner: Return all remote tags
    
    Runner->>Logic: NEW: Parse and sort tags to find highest version
    alt No remote tags found
        Logic-->>Runner: NEW: Throw Error (Refuse bootstrap from 0.0.0)
    else Tags found
        Logic-->>Runner: Return latest_tag
    end

    Runner->>Remote: CHANGED: git fetch --force (specific latest_tag)
    
    Runner->>FS: CHANGED: git diff --diff-filter=d (ignore deleted changesets)
    FS-->>Runner: List of active changeset files

    Runner->>Logic: Calculate new version based on changesets
    
    Logic->>Logic: Compare calculated version vs highest remote
    
    alt NEW: Version <= Remote Version
        Logic-->>Runner: Throw Error (Does not advance)
    else Happy Path: Version > Remote Version
        Logic-->>Runner: Return validated new version
    end

    Note over Runner: Continue to Publish / Tag step
Loading

@monadoid monadoid merged commit 4b3596d into main Mar 31, 2026
32 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.

2 participants