Fix publish smoke install for cloud SDK dependency#840
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (4)
📝 WalkthroughWalkthroughThe pull request extends the publish workflow smoke test to pack and install the locally-built ChangesCloud Tarball Smoke Test Integration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| # workflow — so pack them locally and install them alongside the | ||
| # SDK. Keep this list in sync with packages/sdk/package.json's | ||
| # `dependencies` whenever a new internal dep is added. | ||
| (cd packages/cloud && npm pack --ignore-scripts --pack-destination "$TARBALLS") |
There was a problem hiding this comment.
🔴 Negative smoke test missing cloud tarball will cause npm install failure
The PR adds @agent-relay/cloud to the positive smoke test's pack-and-install path (lines 643, 661, 668) but does not add it to the "Negative smoke — optional dep missing" test at .github/workflows/publish.yml:718-728. That negative test installs the SDK plus every non-optional internal dep whose bumped version isn't on the registry yet — but omits the cloud tarball. Since @agent-relay/cloud is a regular (non-optional) dependency in packages/sdk/package.json:152, npm install --no-optional will still attempt to resolve @agent-relay/cloud@6.0.14 from the npm registry. Because that version doesn't exist yet at this point in the workflow, the install will fail, breaking the negative smoke test on every publish run.
Negative smoke test install command that needs cloud
At .github/workflows/publish.yml:727-728:
npm install --ignore-scripts --no-audit --no-fund --no-optional \
"$SDK_TGZ" "$CONFIG_TGZ" "$GITHUB_PRIMITIVE_TGZ" "$SLACK_PRIMITIVE_TGZ" "$WORKFLOW_TYPES_TGZ"This needs $CLOUD_TGZ added, mirroring the fix applied to the positive smoke test.
Prompt for agents
The PR adds cloud to the positive smoke test pack/install steps but misses the negative smoke test. In the 'Negative smoke — optional dep missing (linux-x64 only)' step (around line 709), CLOUD_TGZ needs to be located and included in the npm install command, just like it was for the positive smoke test.
Specifically, in the negative smoke test block:
1. Add CLOUD_TGZ=$(ls "$TARBALLS"/agent-relay-cloud-*.tgz | head -n1) after the SDK_TGZ line (around line 718-722)
2. Add "$CLOUD_TGZ" to the npm install command at line 727-728
The negative test also installs non-optional SDK internal deps locally because the bumped version doesn't exist on the registry. @agent-relay/cloud is a regular dependency of the SDK (not optional), so it must be included here too.
Additionally, the publish-sdk-internal-deps job (line 752-765) matrix should include 'cloud' to ensure it is published to npm before the SDK. Without this, running the publish workflow with package=sdk will publish the SDK without first publishing @agent-relay/cloud at the matching version, causing install failures for end users.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/publish.yml:
- Around line 661-669: The negative-smoke install step is missing the CLOUD_TGZ
package causing npm install to fail before the broker-missing assertion; update
the negative-smoke npm install invocation to include "$CLOUD_TGZ" alongside
"$SDK_TGZ", "$BROKER_TGZ", "$CONFIG_TGZ", "$GITHUB_PRIMITIVE_TGZ",
"$SLACK_PRIMITIVE_TGZ", and "$WORKFLOW_TYPES_TGZ" so the exact-version
dependency chain is present for that path (look for the second npm install block
that mirrors the earlier echo/installation using the SDK_TGZ/BROKER_TGZ
variables).
In @.trajectories/completed/2026-05/traj_aw7stgf4qau0.json:
- Line 47: Replace the machine-local absolute path value assigned to the JSON
key "projectId" with a stable, non-user-specific identifier (e.g., a
repo-relative path, repository name, or a logical ID). Locate the "projectId"
entry in the trajectory JSON and update its value to something like the
repository name or a relative path (not an absolute path containing a username
or local filesystem), then validate the JSON remains well-formed.
In @.trajectories/completed/2026-05/traj_aw7stgf4qau0.md:
- Line 12: Replace the incorrect wildcard typos: change the literal string
"agent-relay-cloud-_.tgz" to use a star wildcard "agent-relay-cloud-*.tgz" and
change the package pattern "@agent-relay/_" to "@agent-relay/*" wherever those
tokens appear in the trajectory summary so the publish workflow and SDK
dependency check use proper wildcard notation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c8191052-b73e-40d9-a5cd-462a1ef984eb
📒 Files selected for processing (4)
.github/workflows/publish.yml.trajectories/completed/2026-05/traj_aw7stgf4qau0.json.trajectories/completed/2026-05/traj_aw7stgf4qau0.md.trajectories/index.json
Summary
packages/cloudwith the SDK smoke-test internal dependency tarballsnpm installWhy
The publish smoke job version-bumps the SDK to the new release version before publishing. Since
@agent-relay/sdkdepends on exact-version@agent-relay/cloud, the scratch install tried to resolve unpublished@agent-relay/cloud@6.0.15from npm and failed withETARGET.Verification
ruby -e 'require "yaml"; YAML.load_file(".github/workflows/publish.yml"); puts "publish.yml parses"'@agent-relay/*SDK dependencies: cloud, config, github-primitive, slack-primitive, workflow-types