-
Notifications
You must be signed in to change notification settings - Fork 130
chore(scripts): add create actor script #3299
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
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: Add Create Actor ScriptSummaryThis PR adds a useful TypeScript script for creating actors via the Rivet API. The script provides an interactive CLI interface for gathering input parameters and making API calls. Code Quality & Best PracticesPositive aspects:
Issues identified:
RecommendationsHigh Priority:
Medium Priority: Low Priority: Example Fix for Crash Policy Validationconst validCrashPolicies = ["restart", "sleep", "destroy"] as const;
let crashPolicy = (await rl.question("Crash Policy (restart/sleep/destroy, default: restart): ")).trim() || "restart";
if (\!validCrashPolicies.includes(crashPolicy as any)) {
console.error("Error: Crash Policy must be one of: restart, sleep, destroy");
rl.close();
process.exit(1);
}Security & Performance
Test Coverage
Overall AssessmentThis is a functional addition that provides useful utility for developers. With the recommended improvements, particularly around input validation and consistency with other scripts, it would be production-ready. The changes are straightforward and low-risk. |
553b794 to
6498dbc
Compare
Merge activity
|
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: |
PR Review: Add Create Actor ScriptThanks for adding this utility script! Here is my review: Code QualityPositive Observations
Issues and Recommendations1. Missing JSON Input Validation (High Priority - Potential Bug) 2. Crash Policy Validation (Medium Priority) 3. Inconsistent Code Style (Medium Priority) 4. Inconsistent Namespace Input (Low Priority) 5. Missing Success Message (Low Priority - UX) SecurityNo security concerns identified. The script properly uses environment variables for sensitive data. PerformanceNo performance concerns for a CLI utility script. Test CoverageNo tests exist for this script, but that is consistent with other scripts in scripts/api/. SummaryThis is a useful addition! The main issues are:
The script is functional as-is, but these improvements would make it more robust and maintainable. |

No description provided.