Skip to content

fix(ci): delete the superseded publish workflow that could put a prerelease on latest - #52

Open
yakimoto wants to merge 1 commit into
mainfrom
fix/remove-superseded-publish
Open

fix(ci): delete the superseded publish workflow that could put a prerelease on latest#52
yakimoto wants to merge 1 commit into
mainfrom
fix/remove-superseded-publish

Conversation

@yakimoto

@yakimoto yakimoto commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Closes #51.

Deletes .github/workflows/publish.yml. One file, 27 lines, nothing added.

Two publishers, one gate

release.yml — guarded publish.yml — deleted here
Trigger tags: ['sdk-v*'] tags: ['v*']
Auth OIDC trusted publishing, no token NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Provenance --provenance, enforced --no-provenance, explicitly stripped
Version check tag must match package.json or it refuses none
dist-tag routed — *-next.*next none → latest

release.yml already knew: its own header says "publish.yml (tags: v*) publishes with NO gate; this workflow is the guarded one." The guarded one landed in #44. The ungated one was never removed.

The registry shows both halves of this

latest   2.0.14         gitHead f77067d…  — NOT a commit in this repo
next     2.1.0-next.0   gitHead 6140879…  — IS a commit in this repo

Two things follow. First, release.yml works exactly as designed — it published the prerelease to next and correctly left latest alone. Second, and worse than a plain version regression: what currently sits on latest was built from a different codebase. package.json here is 2.1.0-next.0, and npm publish with no --tag writes to latest regardless of semver — so an ungated v* tag would not merely move latest forward, it would replace a package built elsewhere with one built here.

That path is reachable: a legacy v2.0.1 tag already exists in this repo, so v* is a shape someone could plausibly reach for again.

$ git tag --list | tail -2
sdk-v2.1.0-next.0     ← the real release, via release.yml
v2.0.1                ← legacy, the shape publish.yml listens for

Two smaller defects die with the file

  1. --no-provenance cancels the package's own stated intent. package.json declares publishConfig: { "provenance": true }, and this is a public repo where sigstore provenance actually works. A release down this path would be unattested even though the package asked to be attested.
  2. Unpinned actions in a job holding publish rights. actions/checkout@v4 and actions/setup-node@v4 are mutable tags. release.yml pins its actions; this one didn't.

One correction to the issue, and it changes what this PR is

#51 says NPM_TOKEN "is currently set on the repo, so it is armed." It isn't set — anywhere. Re-measured:

$ gh api repos/wave-av/{sdk,mcp-server,adk,sdks}/actions/secrets   # → zero secrets, all four
$ gh api /orgs/wave-av/actions/secrets --paginate | grep -E 'NPM|NODE_AUTH'   # → no match

secrets.NPM_TOKEN resolves empty, so this workflow would fail at auth rather than publish. This is the removal of a latent path, not a live incident — and the "revoke the token" half of the suggested fix is already a no-op, so this PR carries no blast radius. A latent path that re-arms silently the moment someone adds an NPM_TOKEN for an unrelated reason is worth deleting while it's quiet.

If you want the v* ergonomics back

Add v* to release.yml's tag list rather than keeping a second workflow. One publisher, one gate.

CI

Cannot run. Actions are refusing every job org-wide on an account-level billing lock (plan=free, locked=yes). An absent check here is not a passing one. This is a pure deletion; release.yml, _checks.yml, foundation-gate.yml, issue-ops-triage.yml, lint.yml and public-repo-guard.yml all remain.

Part of the publishing audit in wave-av/sdks#42.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Note

Low Risk
Pure workflow file removal with no runtime or package code changes; npm publishing continues via the existing guarded release.yml workflow.

Overview
Removes .github/workflows/publish.yml, the legacy GitHub Actions job that published to npm on v* tags with npm publish --access public --no-provenance and NPM_TOKEN, with no version or dist-tag checks.

release.yml remains the sole publisher: sdk-v* tags, OIDC trusted publishing, provenance, secret-scan/verify gates, and dist-tag routing so prereleases do not land on latest. The deleted workflow was already documented there as the unguarded path; this PR closes that latent duplicate.

Reviewed by Cursor Bugbot for commit eac15dc. Configure here.


Summary by cubic

Remove the superseded publish.yml workflow so only the guarded release.yml can publish. This prevents accidental publishes from v* tags to latest and keeps provenance/tag routing intact.

  • Bug Fixes
    • Deleted .github/workflows/publish.yml (ungated v* trigger, NPM_TOKEN, --no-provenance, unpinned actions).
    • Blocks prereleases from landing on latest and avoids publishing from the wrong codebase.
    • Path was latent (no NPM_TOKEN set), but removing prevents silent re-arming if a token gets added.

Written for commit eac15dc. Summary will update on new commits.

Review in cubic

…elease on latest

This repo has two npm publish workflows on different tag patterns. `release.yml` is the
guarded one — OIDC trusted publishing with no long-lived token, `--provenance` enforced, a
version gate that refuses when the tag does not match `package.json`, and dist-tag routing
that sends `*-next.*` to the `next` channel. `publish.yml` is the legacy path and has none
of that. `release.yml` already said so in its own header; the ungated one was simply never
removed.

The gap is live rather than theoretical. `package.json` on main is 2.1.0-next.0, and
`npm publish` with no `--tag` writes to `latest` regardless of whether the version is a
semver prerelease, so a `v*` tag pushed here would put a prerelease on `latest`. A legacy
`v2.0.1` tag already exists in this repo, so `v*` is a shape someone could plausibly reach
for again.

The registry shows the guarded path working exactly as intended, and also shows why the
overwrite would be worse than a version regression:

  latest        2.0.14         gitHead f77067d — NOT a commit in this repo
  next          2.1.0-next.0   gitHead 6140879 — IS a commit in this repo

So `release.yml` correctly published the prerelease to `next` and correctly left `latest`
alone, while what currently sits on `latest` was built from a different codebase entirely.
An ungated `v*` tag here would not merely move `latest` forward — it would replace a package
built elsewhere with one built here.

Two smaller defects die with the file: `--no-provenance` cancels this package own declared
`publishConfig.provenance: true` on a public repo where provenance actually works, and
`actions/checkout@v4` / `actions/setup-node@v4` are unpinned mutable tags in a job holding
publish rights, while `release.yml` pins its actions.

Worth stating precisely: `NPM_TOKEN` does not currently exist — absent from this repo, from
wave-av/{mcp-server,adk,sdks}, and from the org-level secret list — so `secrets.NPM_TOKEN`
resolves empty and this workflow would fail at auth rather than publish. This is the removal
of a latent path, not a live incident. A latent path that re-arms silently the moment someone
adds an NPM_TOKEN for an unrelated reason is worth deleting while it is quiet.

If a `v*` trigger is wanted for ergonomics, add `v*` to release.yml tag list rather than
keeping a second workflow: one publisher, one gate.

Closes #51. Part of the publishing audit in wave-av/sdks#42.
@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: eac15dc

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.

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

@cursor

cursor Bot commented Jul 28, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_bb498e0f-ae14-4e63-8d9b-f17bdb831716)

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • .github/workflows/publish.yml
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: fd80f730-b7d2-4e32-8004-01f9cad39a18

📥 Commits

Reviewing files that changed from the base of the PR and between e3864a7 and eac15dc.

📒 Files selected for processing (1)
  • .github/workflows/publish.yml

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/remove-superseded-publish
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/remove-superseded-publish

Comment @coderabbitai help to get the list of available commands.

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.

publish.yml can push a prerelease to latest with a long-lived token — superseded by release.yml but never removed

1 participant