-
Notifications
You must be signed in to change notification settings - Fork 41
chore(core): add smoke test #1363
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(core): add smoke test #1363
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Claude finished @NathanFlurry's task —— View job Code Review for Smoke Test AdditionI've completed a thorough review of this PR that adds a smoke test example to RivetKit. Here's my comprehensive feedback: Todo List
✅ Positive AspectsExcellent Adherence to Project Standards
High Code Quality
Robust Test Implementation
🐛 Issues Found1. Import Path Issue (scripts/connect.ts:2)import type { Registry } from "../src/registry";
// ^^^^^^^^^^^^^^
// Should be: "../src/server/registry" The import path is incorrect - 2. Missing Dependency (package.json:17)The
3. Unused README Template (README.md:20)The README uses generic npm commands instead of the pnpm commands used in the project: npm install # Should be: pnpm install
npm run dev # Should be: pnpm run dev 🔧 Minor Improvements1. Environment Variable DocumentationConsider documenting all environment variables in README.md:
2. Error Type Safety (spawn-actor.ts:7)export type SmokeTestError = {
index: number;
error: unknown; // Could be more specific
}; 3. Magic Numbers (index.ts:17)
⚡ Performance Considerations
🔒 Security Assessment
📊 Test CoverageExcellent Coverage
Potential Additions
🎯 Final RecommendationsMust Fix
Should Fix
Consider
Overall Assessment: This is a high-quality smoke test implementation that follows project conventions excellently. The few issues found are minor and easily fixable. The test provides valuable functionality for validating RivetKit performance and reliability. |
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via 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. |
0e90cab
to
179226f
Compare
Claude finished @NathanFlurry's task —— View job Code Review for Smoke Test AdditionI've completed a thorough review of this PR that adds a smoke test example to RivetKit. Here's my comprehensive feedback: Todo List
✅ Positive AspectsExcellent Adherence to Project Standards
High Code Quality
Robust Test Implementation
🐛 Issues Found1. Import Path Issue (scripts/connect.ts:2)import type { Registry } from "../src/registry";
// ^^^^^^^^^^^^^^
// Should be: "../src/server/registry" The import path is incorrect - 2. Missing Dependency (package.json:17)The
3. Unused README Template (README.md:20)The README uses generic npm commands instead of the pnpm commands used in the project: npm install # Should be: pnpm install
npm run dev # Should be: pnpm run dev 🔧 Minor Improvements1. Environment Variable DocumentationConsider documenting all environment variables in README.md:
2. Error Type Safety (spawn-actor.ts:7)export type SmokeTestError = {
index: number;
error: unknown; // Could be more specific
}; 3. Magic Numbers (index.ts:17)
⚡ Performance Considerations
🔒 Security Assessment
📊 Test CoverageExcellent Coverage
Potential Additions
🎯 Final RecommendationsMust Fix
Should Fix
Consider
Overall Assessment: This is a high-quality smoke test implementation that follows project conventions excellently. The few issues found are minor and easily fixable. The test provides valuable functionality for validating RivetKit performance and reliability. |
Merge activity
|
const RUN_DURATION = parseEnvInt(process.env.RUN_DURATION, 10_000); | ||
const SPAWN_ACTOR_INTERVAL = parseEnvInt(process.env.SPAWN_ACTOR_INTERVAL, 10); | ||
const TOTAL_ACTOR_COUNT = Math.ceil(RUN_DURATION / SPAWN_ACTOR_INTERVAL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a discrepancy between the README and implementation regarding configuration options. The README mentions TOTAL_ACTOR_COUNT
as a configurable environment variable:
Set `TOTAL_ACTOR_COUNT` and `SPAWN_ACTOR_INTERVAL` environment variables to adjust the workload.
However, in the code, TOTAL_ACTOR_COUNT
is calculated from RUN_DURATION
and SPAWN_ACTOR_INTERVAL
:
const TOTAL_ACTOR_COUNT = Math.ceil(RUN_DURATION / SPAWN_ACTOR_INTERVAL);
To resolve this inconsistency, either:
- Update the code to accept
TOTAL_ACTOR_COUNT
directly as an environment variable, or - Update the README to mention
RUN_DURATION
instead ofTOTAL_ACTOR_COUNT
This will ensure the documentation accurately reflects the available configuration options.
const RUN_DURATION = parseEnvInt(process.env.RUN_DURATION, 10_000); | |
const SPAWN_ACTOR_INTERVAL = parseEnvInt(process.env.SPAWN_ACTOR_INTERVAL, 10); | |
const TOTAL_ACTOR_COUNT = Math.ceil(RUN_DURATION / SPAWN_ACTOR_INTERVAL); | |
const RUN_DURATION = parseEnvInt(process.env.RUN_DURATION, 10_000); | |
const SPAWN_ACTOR_INTERVAL = parseEnvInt(process.env.SPAWN_ACTOR_INTERVAL, 10); | |
const TOTAL_ACTOR_COUNT = process.env.TOTAL_ACTOR_COUNT | |
? parseEnvInt(process.env.TOTAL_ACTOR_COUNT, Math.ceil(RUN_DURATION / SPAWN_ACTOR_INTERVAL)) | |
: Math.ceil(RUN_DURATION / SPAWN_ACTOR_INTERVAL); |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
"devDependencies": { | ||
"rivetkit": "workspace:*", | ||
"@types/node": "^22.13.9", | ||
"tsx": "^3.12.7", | ||
"typescript": "^5.7.3" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The vitest
dependency appears in the pnpm-lock.yaml
file but is missing from the package.json
devDependencies
section. To maintain consistency between the lock file and package manifest, please add "vitest": "^3.1.1"
to the devDependencies
object.
"devDependencies": { | |
"rivetkit": "workspace:*", | |
"@types/node": "^22.13.9", | |
"tsx": "^3.12.7", | |
"typescript": "^5.7.3" | |
}, | |
"devDependencies": { | |
"rivetkit": "workspace:*", | |
"@types/node": "^22.13.9", | |
"tsx": "^3.12.7", | |
"typescript": "^5.7.3", | |
"vitest": "^3.1.1" | |
}, |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
No description provided.