Skip to content

Harden the release run: repair, tag checkout, repeat, one publish - #1701

Open
lukasIO wants to merge 1 commit into
mainfrom
claude/harden-release-workflows
Open

lukasIO wants to merge 1 commit into
mainfrom
claude/harden-release-workflows

Conversation

@lukasIO

@lukasIO lukasIO commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

A release hardening audit of #1682 found four weaknesses that can leave a release incomplete or stuck. One of them already fired for livekit-ffi 0.13.3. That version has its release files and is on npm and pub.dev. Maven Central and the Swift repository never got it. The UniFFI run of 2026-10-28 failed, in a run of its own, and nobody repaired it. This PR is based on #1682 and merges after it.

Change

  • A repair run repairs. In Migrate the release process from knope to verwalter #1682, a run for a release that is complete skips the build, the upload and both UniFFI jobs, and ends green. The two UniFFI jobs of ffi-builds.yml now also run for a complete release.
  • Each UniFFI publish asks its registry first. uniffi-android.yml asks Maven Central, and uniffi-dart-publish.yml asks pub.dev. uniffi-swift.yml asks the hosting repository for the tag or an open pull request. A version that is there is not built and not published again. Before, a second run failed on the registry that already had the version.
  • The last job of release.yml asks each place that gets the livekit-ffi version. After verwalter status --check and npm, it asks pub.dev, Maven Central and the Swift repository. It also checks the 24 host library files on the release. It waits up to 30 minutes for Maven Central. Each error names the workflow that repairs it. A Swift pull request that waits for a merge is a warning.
  • ffi-builds.yml checks out the tag of the release. The order is now inputs.tag_name || inputs.ref. verwalter reports a draft on each run until it is public, so a later release run can finish an older draft. Before, it built its own commit under the older tag.
  • One publish at a time for each registry. publish-crates in release.yml and the publish job of node-builds.yml each have a concurrency group without cancellation. On npm, the older of two versions can otherwise finish last and take latest.

Failure case

Replay of 0.13.3 with this PR: the release files are complete, and Maven Central and Swift are missing. Start release.yml by hand with package: livekit-ffi and ref set to the tag. The run finds the release complete and skips the build. The Dart job finds a publishing run that passed. The Android and Swift jobs find nothing in their registries, so they build and publish. The last job then passes, or names what is still missing.

A concurrency group holds one running and one waiting job. A third job cancels the one that waits, and that run needs a second start.

Verified

  • The step of the last job, against the real registries. 0.15.0 passes with a warning for the open Swift pull request, and 0.14.0 passes. 0.13.3 fails and names Maven Central and Swift.
  • The three registry questions. Maven Central has 0.15.0 and not 0.13.3, and pub.dev has 0.15.0 and not 9.9.9. Swift has 0.14.0 by tag and 0.15.0 by open pull request, and not 0.13.3. A wrong URL fails the step.
  • All changed workflows parse as YAML, and their 44 shell blocks pass bash -n.

Not done yet

  • No workflow of this branch ran on GitHub. The job conditions with !cancelled() and the concurrency groups need a real run.
  • The last job reads the target list with yq. I tested with a stand-in, because yq is not on my machine.
  • Maven Central shows a version some minutes after the publish. A second run in that time publishes again and fails.
  • Three findings of the audit are open. Anyone with write access can start release.yml from any branch. A dry run skips the UniFFI workflows. download_ffi.py fails without the tag and the file name.

🤖 Generated with Claude Code

@lukasIO
lukasIO requested a review from ladvoc as a code owner November 19, 2026 12:35
@lukasIO lukasIO added the internal to tag changes that don't require changelog documentation label Nov 19, 2026
@lukasIO lukasIO self-assigned this Nov 19, 2026

@devin-ai-integration devin-ai-integration Bot 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.

Devin Review found 1 potential issue.

2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

# job can depend on it directly instead of polling the release for assets.
cdylib:
needs: resolve-tag
if: ${{ needs.resolve-tag.outputs.published != 'true' || inputs.dry_run }}

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.

🟡 Missing Dart libraries cannot be repaired

When a published version loses a host library, published skips the cdylib upload even on a repair run. Verification reports the missing asset, but rerunning the Dart publisher cannot restore it.

Learn more

The Dart package loads native libraries from release assets at consumer build time. The release upload attaches these assets, and the new verification detects a missing zip or checksum. Once pub.dev lists the package version, this guard skips the only automated path that can replace those assets, even if the publisher workflow is dispatched again. Registry publication and asset completeness need separate recovery gates.

Example: Version 0.15.0 exists on pub.dev, but build-aarch64-apple-darwin.zip is removed from its GitHub release. Verification fails and recommends dispatching the Dart publisher. That dispatch sees the pub.dev version, skips cdylib, and leaves the zip missing.

Recommended fix: Check the required build-*.zip and checksum assets before deciding whether to run cdylib. Continue skipping build-and-publish when pub.dev already contains the version, but allow cdylib to restore absent assets independently.

Devin Review


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

@lukasIO
lukasIO added this pull request to stack #1706 November 20, 2026 10:12
@lukasIO
lukasIO requested a review from 1egoman November 24, 2026 06:55
@lukasIO
lukasIO force-pushed the claude/harden-release-workflows branch from 5e06057 to f841fd7 Compare November 24, 2026 09:28
Base automatically changed from claude/migrate-knope-verwalter-6ac5e9 to main November 24, 2026 17:40
@lukasIO
lukasIO force-pushed the claude/harden-release-workflows branch from f841fd7 to 050ae6e Compare November 24, 2026 17:48
A run for a release where one registry failed now repairs it: the UniFFI
jobs also run for a complete release, each publish asks its registry and
skips a version that is there, and the last job of release.yml asks
pub.dev, Maven Central, the Swift repository and the host libraries.

ffi-builds.yml checks out the tag of the release before the commit of
the run. The crates.io and npm publish jobs each have a concurrency
group, so two release runs do not publish at the same time.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lukasIO
lukasIO force-pushed the claude/harden-release-workflows branch from 050ae6e to fd73597 Compare November 27, 2026 08:36

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal to tag changes that don't require changelog documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant