-
Couldn't load subscription status.
- Fork 130
chore(scripts): update release script to include rivetkit #3265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(scripts): update release script to include rivetkit #3265
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
How to use the Graphite Merge QueueAdd 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. |
PR Review: Update release script to include rivetkitSummaryThis PR consolidates the release scripts by merging the separate rivetkit release script into the main release script, adding support for rivetkit package publishing alongside the existing engine SDK publishing. ✅ Positive Changes
🐛 Potential IssuesCritical Issues
Medium Priority Issues
Low Priority / Style Issues
🔒 Security Considerations
📊 Test CoverageConcern: No test files are included in this PR. The release script is critical infrastructure that would benefit from:
📝 Code Quality
🎯 RecommendationsBefore Merging:
Follow-up Work:
Overall AssessmentStatus: ✅ Approve with requested changes This is a solid refactoring that improves the release process significantly. The main concerns are around edge cases in version detection and ensuring the script doesn't silently do nothing when misconfigured. Once the critical issues are addressed, this will be a great improvement to the release infrastructure. 🤖 Generated with Claude Code |
More templates
@rivetkit/actor
@rivetkit/cloudflare-workers
@rivetkit/core
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |
c216fc0 to
d765175
Compare
d765175 to
d738886
Compare
Pull Request ReviewSummaryThis PR refactors the release script to consolidate the Rivet and RivetKit release processes into a unified system. It replaces Positive Changes ✅
Issues Found 🐛1. Critical: Inconsistent Commit Length Assertion (scripts/release/main.ts:263)The error message says "must use 8 char short commit" but the assertion checks for length 7. Either update the assertion to check for 8, or update the message to say "7 char". 2. Bug: Pre-release Detection Logic (scripts/release/sdk.ts:99 & 124)The code only detects release candidates with "-rc." pattern, but other pre-release formats like "-beta", "-alpha", or "-rc1" (without dot) will not be tagged correctly. The GitHub release function (git.ts:68) uses a more permissive check. This inconsistency should be fixed. 3. Potential Issue: Removed Release Please IntegrationThe old code had 4. Potential Issue: Missing merge-release Step ImplementationThe merge-release step is defined in STEPS but never implemented in the execution logic. Either implement it or remove it from the list. Code Quality Observations 🔍
Security Considerations 🔒
Performance Considerations ⚡
Recommendations
Overall AssessmentThis is a solid refactoring that consolidates the release process and improves the CLI interface. The code is well-structured and mostly follows good practices. With the critical bugs fixed (commit length message and pre-release detection), this should be ready to merge. Great work on consolidating two separate release processes into one! 🚀 |
Code ReviewThis PR refactors the release script to consolidate rivetkit releases with the main Rivet release process. Overall, this is a well-structured improvement that removes duplication and provides better control over the release workflow. Here is my detailed review: Strengths1. Excellent Architecture Improvements
2. Better CLI Design
3. Code Quality
Bugs and Issues1. Critical: Incorrect Error Message (scripts/release/main.ts:263)The error message says "8 char" but checks for length 7. Should be "must use 7 char short commit" 2. Logic Error: Git Validation Condition (scripts/release/main.ts:265)This logic seems inverted. The comment says "Skip setup-ci" but the condition validates git when NOT running type-check. This could skip validation when it should not. Please review this logic carefully. 3. Prerelease Detection Issue (scripts/release/sdk.ts:99-100, 124-125)The code only detects -rc. (with a dot). Other pre-release formats like -alpha, -beta, -rc1 will not be tagged as pre-releases. Recommend using proper semver.parse() to detect any prerelease version. 4. Inconsistent Tag AssignmentThe opts.latest flag is not considered when assigning tags to non-prerelease versions. If --no-latest is specified, packages should probably be tagged as next instead of latest. 5. Error in Git Release Logic (scripts/release/git.ts:68)This marks ANY version with a hyphen as prerelease, including build metadata. Use semver parsing instead of string matching. Potential Issues1. Missing ValidationgetVersionFromArgs does not validate mutual exclusivity of --major/--minor/--patch flags. A user could pass --major --minor and only major would be processed. 2. Force Push Safety (scripts/release/git.ts:22)Force pushing tags can be dangerous if multiple people are releasing. Consider warning the user or checking if the tag already exists remotely with a different commit. 3. Unused StepThe merge-release step is defined but never implemented in the code. Either implement it or remove it from the STEPS array. 4. Missing Type Check in Engine SDK BuildThe publishSdk function builds rivetkit packages with type checking, but engine SDKs are not built before publishing. This could lead to publishing untested code. Performance Considerations1. Sequential Package PublishingPackages are published sequentially. For many packages, this could be slow. Consider using Promise.all() to publish independent packages in parallel. 2. Redundant Version ChecksnpmVersionExists line 86 has unnecessary let versionExists = false before the assignment. Code Style and Best Practices1. Magic NumbersThe commit hash length checks use magic numbers (40, 7). Consider defining constants. 2. Type Safetyscripts/release/git.ts:49 and scripts/release/sdk.ts:46 use any type. Consider defining proper interfaces for GitHub API responses. Test CoverageNo tests for the new functionality. Given the critical nature of release scripts, consider adding unit tests for version parsing and validation, integration tests for phase execution, and mock tests for git/npm operations. Recommendations
SummaryThis is a solid refactoring that improves maintainability and provides better control over the release process. The main concerns are:
Overall: Approve with minor changes requested Great work consolidating the release processes! |
Code ReviewOverviewThis PR refactors the release script to consolidate rivetkit publishing with the main release process. The changes replace the old release approach with a phase-based system that is more modular and maintainable. Positive Aspects
Issues and Recommendations1. Critical: Incorrect Commit Length Assertion (scripts/release/main.ts:263)The error message says 8 char but the check validates 7 characters. This is confusing. 2. Potential Bug: Git Tag Force Push (scripts/release/git.ts:22)Force pushing tags can be dangerous and may cause issues for users who have already pulled the tag. 3. Code Quality: Unused Parameter (scripts/release/git.ts:4)The validateGit function has an unused _opts parameter. 4. Inconsistent npm Tag Logicscripts/release/sdk.ts uses -rc. to detect release candidates, but scripts/release/git.ts uses just - 5. Testing ConcernsNo test coverage is visible for the new release scripts. Given the critical nature of release automation, this is a significant gap. 6. Documentation GapThe justfile now uses --phase setup-local but there is no documentation explaining the different phases or when to use them. 7. Minor: Duplicate Version Check LogicIn scripts/release/sdk.ts, lines 86 and 110 unnecessarily initialize versionExists to false before assignment. Security Considerations
Performance Considerations
SummaryThis is a solid refactoring that improves the release process significantly. The main concerns are:
The code quality is generally good, but addressing the force-push behavior and adding tests would greatly improve confidence in the release automation. Overall Assessment: Approve with recommendations for follow-up improvements, particularly around testing and the force-push behavior. |
d738886 to
aa6a37d
Compare
Pull Request Review: Release Script RefactorSummaryThis PR consolidates the release process by integrating rivetkit package publishing into the main release script, replacing the separate scripts/rivetkit/release.ts with enhanced functionality in the main release pipeline. Positive Aspects
Critical Issues1. Git Force Push Without Safety Check (git.ts:19-22) 2. Commit Length Assertion Bug (main.ts:263) High Priority Issues3. Inconsistent CLI Flag Naming 4. Missing Error Context in Git Operations (git.ts:4-13) 5. Unsafe Version Bump Logic (main.ts:84-110) Medium Priority Issues6. Hard-Coded Package Paths (sdk.ts:67-71) 7. No Rollback Mechanism 8. GitHub Actions Issue (main.ts:265-267) Code QualityGood: Type safety, error handling, separation of concerns, commander CLI parsing Recommendation: Request ChangesMust Fix Before Merge:
Should Fix Soon After:
|
Some examples like example-deno depend on rivetkit being built before type checking can succeed.
Pull Request ReviewSummaryThis PR consolidates the release scripts by integrating rivetkit package publishing into the main release workflow. The separate scripts/rivetkit/release.ts (555 lines) has been removed and its functionality merged into the main release scripts. Positive Observations
Critical Issues
Medium Issues
Minor Issues
Test CoverageNo automated tests found for release scripts. Critical infrastructure should have comprehensive tests including unit tests for version bumping, integration tests for git operations, and mock tests for NPM publishing. RecommendationsHigh Priority:
Medium Priority:
Overall AssessmentThis is a solid refactoring with good structure. Main concerns: force push safety, missing tests, and minor type safety issues. With fixes to critical issues, this would be production-ready. Recommendation: Approve with requested changes for critical issues |
Pull Request ReviewThis PR consolidates the release process to include both Rivet and RivetKit packages in a unified release workflow. Overall, this is a solid refactor that improves maintainability. Strengths
Issues FoundCritical: Incorrect Commit Length Assertion (scripts/release/main.ts:271) Medium: Version Consistency Medium: Force Push Concerns (scripts/release/git.ts:19-22) Medium: Git Validation Skip (scripts/release/main.ts:273-276) Minor: Pre-release Tag Logic (sdk.ts:99-100, 124-125) Minor: Removed Justfile Commands Suggestions
SummaryApprove with changes - Address the critical commit length assertion issue before merging. Code Quality: Good | Best Practices: Good | Security: No concerns | Performance: No concerns |
The GitHub Actions CI environment doesn't have deno installed, so the example-deno check-types script now gracefully skips when deno is not available.
Pull Request Review: Release Script RefactoringOverviewThis PR refactors the release process to consolidate rivetkit releases into the main release script. The changes include:
Code Quality & Best Practices ✅Strengths:
Minor Suggestions:
Potential Bugs 🔍
Security Concerns 🔒
Performance Considerations ⚡
Test Coverage 🧪The PR doesn't include tests for the new release scripts. Consider adding:
However, release scripts are often tested manually in staging environments, so this may be acceptable. Architecture Feedback 🏗️Excellent improvements:
Suggested enhancements:
Workflow Changes 📋The GitHub Actions changes look good:
These changes improve consistency with CLI conventions. SummaryThis is a solid refactoring that improves the release process significantly. The main concerns are: Must Fix:
Should Consider:
Nice to Have:
Overall: Approve with minor fixes ✅ The architecture is much better, the code quality is good, and the changes consolidate duplicate logic effectively. The issues identified are minor and can be addressed in follow-up commits if needed. |
Pull Request ReviewThis PR consolidates the release process by merging scripts/rivetkit/release.ts into the main release script. Strengths
Critical Issues1. Git Force Push (scripts/release/git.ts:22) 2. Error Message Bug (scripts/release/main.ts:271) 3. Error Handling (sdk.ts:19-35) Code Quality Issues4. Validation Hack (main.ts:273-276) 5. Duplicate Builds 6. Type Safety 7. Missing Tests SummaryApprove with changes required. The consolidation is good architectural decision, but address: Must Fix: 1-3 Good work on the consolidation! |
The complete job needs NPM credentials to publish packages. Previously only the setup job had this configured.
Pull Request ReviewThis PR consolidates the release scripts by integrating rivetkit package publishing into the main release workflow. Overall, the changes are well-structured and improve the release process. Here are my findings: ✅ Positive Aspects
🔍 Code Quality and Best PracticesGood:
Concerns:
|
Code Review - Part 1: Overview and StrengthsOverviewThis PR consolidates the release scripts by merging the rivetkit release functionality into the main release script. The refactoring improves maintainability by eliminating duplicate release logic and providing a more unified approach to releasing both the main Rivet project and rivetkit packages. Key Changes
✅ Strengths1. Architecture Improvements
2. Code Quality
3. Publishing Logic
4. Git Operations
|
Code Review - Part 2: Issues and ConcernsCritical Issues1. Type Safety Bug: Assertion Length Check Location: scripts/release/main.ts:271 Bug: Error message says 8 char but checks for length 7. This is inconsistent. Fix: Either change to 8 or update the message to 7 char short commit. 2. Security: Force Push Operations Location: scripts/release/git.ts:22 Issue: Force pushing tags can overwrite existing tags, which could be dangerous if someone has already pulled the tag. Recommendation: Consider adding a confirmation prompt or making force push opt-in via a flag, especially for non-prerelease versions. 3. Error Handling: Version Regex Location: scripts/release/main.ts:243-247 Issue: Hard-coded regex instead of using the semver library which is already a dependency. Recommendation: Replace with semver.valid(version) for consistency and reliability. 4. Workflow: Missing NPM Auth Validation Location: .github/workflows/release.yaml:250-252 Issue: No validation that NPM_TOKEN exists or is valid before attempting to publish. Recommendation: Add a check to verify the token exists before proceeding with the release. 5. Code Duplication: Publishing Logic Location: scripts/release/sdk.ts:76-105 and 108-131 Issue: Nearly identical code blocks for publishing engine SDKs and rivetkit packages. Recommendation: Extract common publishing logic into a helper function to reduce duplication. 6. Hardcoded Release Candidate Detection Issue: Only detects -rc. pattern. What about -alpha, -beta, or other prerelease formats? Recommendation: Use semver.prerelease(opts.version) for prerelease detection instead of string matching. 7. Git Validation Skip Logic Location: scripts/release/main.ts:273-276 Issue: The comment acknowledges this is a hack. This suggests a deeper issue that should be investigated. Recommendation: Investigate why CI introduces changes and fix the root cause. |
Code Review - Part 3: Testing, Performance, and RecommendationsTesting ConcernsNo Unit Tests
No Integration Tests
Recommendation: Add tests for:
Performance ConsiderationsSequential Package Publishing Location: scripts/release/sdk.ts Issue: Packages are published sequentially. With many packages, this could be slow. Recommendation: Consider publishing packages in parallel using Promise.all() or with a concurrency limit. Additional Recommendations
|
Code Review - Part 4: SummarySummary RatingsCode Quality: 7/10
Security: 6/10
Maintainability: 8/10
Testing: 2/10
Overall: This is a solid refactoring that consolidates release logic effectively. The main concerns are around safety mechanisms for destructive operations, test coverage, and a few bug fixes needed. The phase-based architecture is a significant improvement over the previous approach. Required Fixes
Recommended Improvements
Great work on consolidating this! The codebase will be easier to maintain with this unified approach. The phase-based design is particularly well done - it makes the release process much more transparent and flexible. 🚀 |
@rivetkit/engine-* packages were being published twice - once from enginePackagePaths and once from getRivetkitPackages. Now engine packages are excluded from the rivetkit packages list.
PR Review: Release Script RefactoringI've reviewed this PR and found several improvements along with a few areas that need attention. Strengths
Critical Issues
Medium Priority Issues
Security Considerations
Testing Recommendations
Minor Suggestions
Overall, this is a solid refactoring that addresses real issues. The main concerns are around the force push behavior and the git validation hack, which should be addressed before merging. |
Pull Request ReviewOverviewThis PR refactors the release scripts to consolidate rivetkit and engine package publishing into a unified process. The changes include:
Code Quality & Best PracticesPositive:
Concerns:
Potential Bugs
Performance Considerations
Security Concerns
Test CoverageNo tests found for the release scripts. Consider adding tests for version parsing, phase-to-step mapping, NPM version existence checking, and package filtering logic. Recommendations
ConclusionThis is a solid refactoring that improves the release process. The main concerns are around the off-by-one error, the HACK comment indicating unresolved issues, and the lack of tests. Overall, the changes align well with the repository patterns and represent a good step forward for the release automation. Recommendation: Approve with minor changes requested (fix the commit length assertion message and investigate the HACK). |
The complete job uses gh CLI to create GitHub releases, which requires GH_TOKEN to be set in the environment.
PR Review: Release Script ConsolidationSummaryThis PR consolidates the release process by integrating RivetKit releases into the main release script, removing the separate Code Quality & ArchitectureStrengths:
Potential IssuesBug - Incorrect Assertion Message: // scripts/release/main.ts:271
assertEquals(releaseOpts.commit.length, 7, "must use 8 char short commit");The error message says "8 char" but the check validates for 7 characters. This should be "must use 7 char short commit". Potential Logic Issue - Comparison Operator: // scripts/release/main.ts:267
if (releaseOpts.commit.length == 40) {Should use strict equality ( |
Pull Request ReviewThis PR refactors the release script to consolidate rivetkit releases into the main release process. Overall, the changes are well-structured and improve maintainability by reducing code duplication. ✅ Strengths
🐛 Potential IssuesCritical1. Unsafe Git Force Push (git.ts:22)
2. Incorrect Error Message (main.ts:271)
Medium Priority
Low Priority
🔒 Security: All Good ✅
SummaryThis is a solid refactoring. Main concerns:
Overall Assessment: ✅ Approved with minor changes requested |
|
Missing Validation: The // scripts/release/main.ts:273-276
if (opts.validateGit && !shouldRunStep("run-type-check")) {
// HACK: Skip setup-ci because for some reason there's changes in the setup step but only in GitHub Actions
await validateGit(releaseOpts);
}The comment mentions it's a HACK - this logic seems fragile and could cause issues if the phase system is extended. Consider investigating why there are changes during setup-ci rather than working around it. Security ConsiderationsGood Security Practices:
Note on Force Operations: Force pushing tags is potentially dangerous. Consider adding validation to ensure this only happens for RC versions or with explicit confirmation. The GitHub release creation logic already handles RC versions specially (line 68 in git.ts), so consider applying similar logic here. Performance ConsiderationsGood Performance Patterns:
Potential Optimization: The |
Test CoverageMissing Tests: No test files are included in this PR. Given the critical nature of release scripts, consider adding:
The release process is high-risk - failures could result in broken releases or version conflicts. GitHub Workflow ChangesWorkflow Improvements:
Recommendations
Minor Observations
ConclusionOverall Assessment: Approved with minor suggestions This is a solid refactoring that significantly improves the release process. The code is well-structured and the phase-based approach is a clear improvement. The identified issues are minor and can be addressed in a follow-up PR if desired. The consolidation of RivetKit releases into the main script eliminates a source of potential divergence and makes the system easier to maintain. The biggest risk is the lack of automated tests, but that's a broader issue with the existing release infrastructure rather than something introduced by this PR. Recommendation: Merge after addressing the assertion message bug, or create a follow-up issue to track the test coverage improvements. |

No description provided.