Skip to content

Fail a publish whose source changed since its tag - #105

Merged
lukasIO merged 1 commit into
mainfrom
publish-checks-tagged-source
Nov 19, 2026
Merged

lukasIO merged 1 commit into
mainfrom
publish-checks-tagged-source

Conversation

@lukasIO

@lukasIO lukasIO commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

publish checks only that the tag of a package's version exists. A run by hand (workflow_dispatch) without ref checks out the branch head. If a later commit changed the package but not its version, publish uploads the newer source under the tagged version. livekit/node-sdks#784 works around this with a git diff step in its workflow. Closes #104.

Change

publish now compares the files of each package at its tag with HEAD (changed_since_tag). It does this before the publish command runs. If HEAD changed one, the command does not run. The package is failed, with the reason HEAD changed the source since <tag>: publish from ref=<tag>. Its dependents are blocked, as for any other failure.

  • The files of a package are the files under its path, minus the files of a package nested in it. This uses the same owners rule as the changeset check (Count a file in a nested package for that package only #101). A change to a README at the root, or to another package, does not fail the check.
  • A version that the registry has is skipped before the check, because its command does not run anyway.
  • For [publish].workspace, one changed member stops the workspace command for every member (L381). The other members report which member changed.
  • goproxy packages are not compared. The proxy serves the tag, not HEAD.
  • publish --allow-changed-source turns the check off. There is no config key for it.
  • A dry run reports the failure too, so publish --dry-run shows it before a real run.

The spec has the check in WorkflowPublishesInDependencyOrder. docs/features.md, docs/commands.md and the "Pin the commit" rule in docs/release-workflows.md describe it.

Verified

  • cargo fmt --all -- --check, cargo clippy --all-targets -- -D warnings and cargo test pass.
  • The new publish_fails_a_package_whose_source_changed_since_its_tag tags three packages, then commits a change to livekit-api and to a root README. It asserts that livekit-api fails with ref=livekit-api-v0.4.3 and the other two publish. It also covers the registry skip, the flag and the workspace command. With changed_since_tag forced to return false, the test fails.
  • allium check specs/versioning.allium gives the same diagnostics as on main.

The test file had one .err().expect() that the current clippy rejects. It is now .expect_err().

🤖 Generated with Claude Code

Closes #104

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lukasIO
lukasIO requested a review from ladvoc as a code owner November 17, 2026 13:46
@lukasIO lukasIO self-assigned this Nov 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR bumps

  • verwalter: minor

lukasIO added a commit to livekit/node-sdks that referenced this pull request Nov 17, 2026
The next verwalter release checks in publish that each package matches
its tag (livekit/verwalter#105). Until then, a run by hand sets ref to
the tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lukasIO
lukasIO added this pull request to stack #114 November 18, 2026 10:30

@MaxHeimbrock MaxHeimbrock left a comment

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.

LGTM

@lukasIO
lukasIO merged commit 6518cf7 into main Nov 19, 2026
3 checks passed
@lukasIO
lukasIO deleted the publish-checks-tagged-source branch November 19, 2026 10:22
lukasIO added a commit to livekit/node-sdks that referenced this pull request Nov 19, 2026
…784)

* Release with verwalter instead of changesets/action

Add verwalter.toml and the four verwalter workflows (release PR,
release, pre-release, changeset check). Remove the changesets/action
job from CI, .changeset/config.json, the ci:publish script and the
changesets devDependencies. Pending .changeset/*.md files carry over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Address review: rc releases, stale scripts, docs failures

Run the release workflow for verwalter PRs on any base branch, so an
rc PR from another branch is tagged and published. Remove the
server SDK's changeset and ci:publish scripts. Let a failed docs build
or upload fail the publish job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Upload the server SDK docs only for a stable version

An rc release must not replace the docs of the current stable release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Release: docs in their own job, one publish at a time

A docs failure no longer turns the publish job red after npm has the
version. A publish job waits for a running one instead of publishing
the same version twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Release: guard source on runs by hand, narrow docs, queue publishes

- Add a ref input for runs by hand. Before the build, fail when a
  package to publish differs from its release tag.
- Upload the server SDK docs only when this run released a final
  server SDK version from main.
- Keep every waiting publish run with queue: max.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Release: drop the source guard step

The next verwalter release checks in publish that each package matches
its tag (livekit/verwalter#105). Until then, a run by hand sets ref to
the tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Release: verwalter v0.31.0, verify the end state

v0.31.0 checks in publish that each package matches its tag, so the
note about v0.30.0 goes. A verify job runs status --check after the
publish, as in the upstream example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Release: build before the tag

A build job runs first and uploads the build output. A build that fails
now stops the run before release creates any tag. publish and docs use
that output instead of building after the tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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 can publish source that differs from the release tag

3 participants