Skip to content

Name runtime builds with build metadata - #255

Merged
tnkuehne merged 2 commits into
mainfrom
feat/runtime-build-metadata
Nov 20, 2026
Merged

tnkuehne merged 2 commits into
mainfrom
feat/runtime-build-metadata

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Runtime versions are immutable (Runtime versions are immutable; publish a new version). An installation that deploys several builds of one product version therefore needs a new product version for each build, even when the public source is unchanged and only its runtime extension differs.

This PR:

  • WIDEFLEET_RUNTIME_BUILD: packages/app-runtime/build.ts appends the value as build metadata, for example 0.7.20+5f67a8c3d2e1, to both release.json and the version the runtime reports. The contract validates the result.
  • Runtime contract: runtimeRelease.version accepts optional +build metadata, at most 64 characters. Pre-release suffixes stay rejected.
  • Without the variable: The build keeps the plain product version. Published releases are unchanged, and so are the CLI's runtime update, which downloads v<version> releases, and the agent's version checks.

Checked consumers of the runtime version:

  • Reporting: reportingVersion already allows +build.
  • Storage: runtime_release.version is text.
  • Workflow cache key and MCP server info: use the version as an opaque string.
  • Version list: is sorted by createdAt, not by semver.

Tested locally:

  • The build without the variable produces 0.7.20.
  • With 5f67a8c3d2e1 it produces 0.7.20+5f67a8c3d2e1 in release.json and loader.js.
  • An invalid value fails the build.
  • pnpm check and the runtime release tests pass.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge, with the previous test failure addressed.

Summary

Runtime builds can use WIDEFLEET_RUNTIME_BUILD to add build metadata without changing the product version.

  • Runtime builds can use a build label to get a distinct version.

Reviews (3) · Last reviewed commit: "Accept build metadata in the Cloudflare ..." · Reviewed by Greptile

Comment thread packages/app-runtime/build.ts Resolved
@tnkuehne
tnkuehne force-pushed the feat/runtime-build-metadata branch from d4f2ae6 to 51c7ab0 Compare November 20, 2026 21:33
Runtime versions are immutable, so an installation that deploys several
builds of one product version needed a product version bump for each one.
WIDEFLEET_RUNTIME_BUILD now appends build metadata, for example
0.7.20+5f67a8c3d2e1, and the runtime contract accepts it. Without the
variable the build keeps the plain product version, as published releases
and the CLI's release downloads expect.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs d4f2ae6 Nov 20 2026, 09:30 PM

The upload fixture read the runtime version with [0-9.]+, so a runtime
built with WIDEFLEET_RUNTIME_BUILD failed with "Runtime module has no
version". It now accepts build metadata, and a test updates to and rolls
back to a metadata-bearing runtime.
@tnkuehne
tnkuehne merged commit 54c2a1c into main Nov 20, 2026
15 checks passed
@tnkuehne
tnkuehne deleted the feat/runtime-build-metadata branch November 20, 2026 21:42
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.

1 participant