Skip to content

fix(ci): pack github-primitive + workflow-types in smoke; publish workflow-types#804

Merged
khaliqgant merged 1 commit intomainfrom
fix/publish-pack-internal-deps
Apr 29, 2026
Merged

fix(ci): pack github-primitive + workflow-types in smoke; publish workflow-types#804
khaliqgant merged 1 commit intomainfrom
fix/publish-pack-internal-deps

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Apr 29, 2026

Summary

The v6.0.3 publish run (25091201135) shipped a half-broken release: agent-relay@6.0.3 is on npm but pinned to @agent-relay/sdk@6.0.3, @agent-relay/cloud@6.0.3, broker packages, etc. that were never published. Users now get `ETARGET No matching version found for @agent-relay/cloud@6.0.3` / `@agent-relay/github-primitive@6.0.3` on install.

Two underlying bugs:

  1. Smoke test couldn't install the SDK tarball. `smoke-broker-packages` packs SDK + broker + config locally and `npm install`s them into a scratch project, expecting npm to resolve everything else from the registry. But `@agent-relay/sdk@6.0.3` added `@agent-relay/github-primitive` and already pinned `@agent-relay/workflow-types` at the about-to-be-published version. Those aren't on the registry yet at this point in the workflow → ETARGET → smoke fails on every platform → publish-broker-packages / publish-packages / publish-sdk-only all skipped on `needs:`. `Publish Main Package` has no such gate, so it shipped anyway, pointing at the missing deps.
  2. `@agent-relay/workflow-types` was never in the publish matrix. `npm view @agent-relay/workflow-types` returns 404 — the package has never been on npm — but the SDK declares it as an exact-version hard dependency. Even after fix fix(truncation): improvements #1, installs would still fail on workflow-types until it's published.

Fix

  • Pack `github-primitive` and `workflow-types` in `smoke-broker-packages` alongside config, and pass their tarballs to `npm install` (both the main install and the linux-x64 negative smoke). The SDK now resolves entirely from local tarballs without registry round-trips.
  • Add `workflow-types` to the `publish-packages` matrix.

The pack list is documented as needing to stay in sync with `packages/sdk/package.json` `dependencies`.

Recovery

This PR fixes the workflow but doesn't republish the broken 6.0.3. Once merged, we still need to either (a) bump to v6.0.4 and re-run the publish workflow, or (b) deprecate `agent-relay@6.0.3` and republish the missing sub-packages at 6.0.3. (a) is cleaner.

Test plan

  • Manually run the publish workflow with `dry_run=true` against this branch and confirm `smoke-broker-packages` passes on all 4 platforms.
  • Confirm `publish-broker-packages`, `publish-packages`, and `publish-sdk-only` are no longer skipped (assuming `package=all`).
  • On the next real release, verify `npm install agent-relay@` succeeds on a fresh machine.

🤖 Generated with Claude Code


Open in Devin Review

…kflow-types

The v6.0.3 publish failed because:

1. smoke-broker-packages installed the SDK tarball into a scratch project
   but only locally packed config alongside it. The SDK's dependencies in
   6.0.3 added @agent-relay/github-primitive and already required
   @agent-relay/workflow-types at the bumped version — neither on the
   registry yet, so npm install hit ETARGET and failed every smoke leg.
2. Smoke failure cascaded: publish-broker-packages, publish-packages, and
   publish-sdk-only all skipped on `needs:`, but Publish Main Package has
   no such gate and shipped agent-relay@6.0.3 pointing at deps (sdk,
   cloud, broker-*) that were never published.
3. @agent-relay/workflow-types has never been on npm at all because it
   was missing from the publish-packages matrix, even though SDK declares
   it as an exact-version hard dep.

Pack github-primitive and workflow-types tarballs in the smoke step (and
the negative smoke step) so the SDK install resolves entirely from local
tarballs, and add workflow-types to the publish-packages matrix so
future releases actually publish it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@barryollama barryollama left a comment

Choose a reason for hiding this comment

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

🦫 Barry Ollama PR Review

Thanks for this fix, @khaliqgant! This is a solid post-mortem and remediation. I've reviewed the GitHub workflow changes.

✅ What Looks Good

  1. Root cause analysis is thorough — The description clearly explains the race condition between the smoke test and the publish workflow. The "Publish Main Package" running without proper gate checks while dependencies weren't yet published is a classic CI/CD trap.

  2. Adding workflow-types to the publish matrix is the right fix. Missing internal dependencies in the publish matrix is a common oversight when monorepos grow.

  3. Packing internal deps locally for smoke tests is the correct approach. Installing from tarballs avoids the registry lookup that was causing ETARGET errors.

  4. The comment updates explaining why we pack these locally ("Keep this list in sync with packages/sdk/package.json's dependencies") will prevent future regressions.

📝 Code Review Notes

.github/workflows/publish.yml

Line Note
638-650 Good explanatory comment update — makes the "why" clear
658-665 Variable unpacking with GITHUB_PRIMITIVE_TGZ and WORKFLOW_TYPES_TGZ is clean
898 Adding workflow-types to matrix — essential fix ✅

💭 Suggestions (Non-blocking)

  1. Consider a check to validate that the packed tarball list in smoke-broker-packages matches what's in packages/sdk/package.json at CI time. A simple grep/compare could catch future drift.

  2. The negative smoke test (lines ~712-727) now installs all internal deps — this is correct because the test intent is "no broker binary" not "no internal pkgs". Good catch updating that too.

🎯 Approval

CI-only changes, fixes a real incident, test plan is reasonable. LGTM! 👍

/approve

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: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@khaliqgant khaliqgant merged commit 2f4f6dc into main Apr 29, 2026
37 checks passed
@khaliqgant khaliqgant deleted the fix/publish-pack-internal-deps branch April 29, 2026 05:57
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