Skip to content

prerelease script for staging#395

Merged
khaliqgant merged 2 commits into
mainfrom
pre-release
Feb 10, 2026
Merged

prerelease script for staging#395
khaliqgant merged 2 commits into
mainfrom
pre-release

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 5 additional findings in Devin Review.

Open in Devin Review

Comment thread .github/workflows/publish.yml
@khaliqgant khaliqgant merged commit 495428c into main Feb 10, 2026
29 of 30 checks passed
@khaliqgant khaliqgant deleted the pre-release branch February 10, 2026 10:27
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 7 additional findings in Devin Review.

Open in Devin Review

Comment on lines +1082 to +1083
> This is a **prerelease** version published under the `${{ github.event.inputs.tag }}` npm dist-tag.
> It is not installed by default. Use `npm install agent-relay@${{ github.event.inputs.tag }}` to test.
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.

🔴 Prerelease versions default to latest npm tag, overwriting stable release for all users

When a user selects a pre-version type (e.g., prerelease, premajor, preminor, prepatch), the npm publish commands at .github/workflows/publish.yml:481 and .github/workflows/publish.yml:889 use --tag ${{ github.event.inputs.tag }}, which defaults to latest. Since the tag input default is latest (line 55), a prerelease publish will tag the prerelease version as latest on npm unless the user manually changes it.

Root Cause and Impact

The tag input defaults to latest (line 55), and there is no validation or automatic override to use a non-latest tag when publishing a prerelease version. The publish steps blindly use the user-provided tag:

# line 481 (publish-packages)
run: npm publish --access public --provenance --tag ${{ github.event.inputs.tag }} --ignore-scripts

# line 889 (publish-main)
run: npm publish --access public --provenance --tag ${{ github.event.inputs.tag }} --ignore-scripts

This means npm install agent-relay (without a version specifier) would install the prerelease version for all users.

Additionally, the summary step at line 1153 claims:

"Users running npm install agent-relay or install.sh are NOT affected by this prerelease."

And the prerelease release notes at lines 1082-1083 state:

"It is not installed by default. Use npm install agent-relay@latest to test."

Both statements are false when tag=latest, making the release notes actively misleading.

Impact: A prerelease version (e.g., 2.2.0-beta.1) could become the default install for all users worldwide, breaking production deployments that rely on npm install agent-relay.

Prompt for agents
Add a validation step early in the workflow (or in the build job before publishing) that fails the workflow if a prerelease version is detected but the tag is set to 'latest'. For example, add a step after the version bump that checks:

if [[ "$NEW_VERSION" == *"-"* ]] && [[ "$TAG" == "latest" ]]; then
  echo "ERROR: Cannot publish a prerelease version with tag=latest. Please use a tag like 'beta', 'next', 'alpha', or 'rc'."
  exit 1
fi

Alternatively, automatically override the tag to match the preid when a prerelease is detected (e.g., if preid=beta, force tag=beta). This would prevent accidental overwrites of the latest stable release on npm.

Also update the summary step at line 1153 and the prerelease release notes at lines 1082-1083 to not unconditionally claim users are unaffected, or make the claim conditional on the tag not being 'latest'.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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