Skip to content

fix(release): support version-based engine reuse and fix Cargo.toml indent matching#4288

Merged
NathanFlurry merged 1 commit intomainfrom
02-23-fix_release_support_version-based_engine_reuse_and_fix_cargo.toml_indent_matching
Feb 24, 2026
Merged

fix(release): support version-based engine reuse and fix Cargo.toml indent matching#4288
NathanFlurry merged 1 commit intomainfrom
02-23-fix_release_support_version-based_engine_reuse_and_fix_cargo.toml_indent_matching

Conversation

@NathanFlurry
Copy link
Member

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4288 February 24, 2026 07:56 Destroyed
@railway-app
Copy link

railway-app bot commented Feb 24, 2026

🚅 Deployed to the rivet-pr-4288 environment in rivet-frontend

Service Status Web Updated (UTC)
ladle 🕐 Initializing (View Logs) Web Feb 24, 2026 at 7:56 am
website 🕐 Initializing (View Logs) Web Feb 24, 2026 at 7:56 am
frontend-cloud 🕐 Initializing (View Logs) Web Feb 24, 2026 at 7:56 am
frontend-inspector 🕐 Initializing (View Logs) Web Feb 24, 2026 at 7:56 am
mcp-hub 🕐 Initializing (View Logs) Web Feb 24, 2026 at 7:56 am

Copy link
Member Author


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@NathanFlurry NathanFlurry merged commit 7cc0f58 into main Feb 24, 2026
4 of 9 checks passed
@NathanFlurry NathanFlurry deleted the 02-23-fix_release_support_version-based_engine_reuse_and_fix_cargo.toml_indent_matching branch February 24, 2026 07:56
@claude
Copy link

claude bot commented Feb 24, 2026

PR Review: fix(release): support version-based engine reuse and fix Cargo.toml indent matching

Summary

This PR adds support for reusing version-tagged Docker manifests and S3 artifacts (not just commit-tagged ones), fixing a chain-release scenario where a previous release itself reused artifacts from an even earlier release. It also fixes a Cargo.toml regex that was failing when the workspace.package section had leading whitespace.

The overall approach is sound. The separation between version-based and commit-based artifact paths is clear and consistent across docker.ts, promote-artifacts.ts, and main.ts.


Bug: Docker image name mismatch

The validateReuseVersion function in main.ts checks rivetkit/engine, but the REPOS array in docker.ts publishes to rivetdev/engine. The validation would always fail (or silently pass against the wrong registry) at runtime. Worth confirming whether rivetkit/engine is an intentional org migration or an oversight.


Minor: Misleading parameter name in promotePath

After this PR, the sourceCommit parameter in promotePath can hold a version string like 2.0.33, not just a commit hash. Renaming to sourcePrefix or sourceRef would match the call-site variable name and avoid confusion.


Positive: --latest auto-detection

Removing the hardcoded true default and replacing it with shouldTagAsLatest auto-detection is a good improvement. The guard if opts.latest is not undefined correctly handles explicit --latest/--no-latest overrides while defaulting to semver-based auto-detection.


Positive: Cargo.toml regex fix

The updated regex captures leading whitespace in a capture group and restores it via backreference in the replacement string. The prior regex would silently strip indentation when workspace.package appeared inside a nested TOML context with leading whitespace.


Observation: Version vs commit detection heuristic

Using .includes('.') to distinguish version strings from commit hashes is applied consistently across all three files and matches the existing versionOrCommitToRef utility. Works correctly for the expected inputs (2.0.33 vs bb7f292). A semver regex would be more defensive but is likely overkill for this controlled context.


Verdict

The architecture is correct and the refactor is clean. The main issue worth addressing is the Docker org name mismatch (rivetkit/engine vs rivetdev/engine) in validateReuseVersion.

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