-
Notifications
You must be signed in to change notification settings - Fork 129
chore(engine): move smoke test to engine/tests/ #3337
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(engine): move smoke test to engine/tests/ #3337
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
PR Review: Move smoke test to engine/tests/SummaryThis PR relocates the smoke test from Code Quality & Best PracticesPositive Observations✅ Consistent renaming across all files (package.json, pnpm-workspace.yaml) Issues Identified1. Debug Code Left in Production (High Priority)Location: // Wait for actor to sleep
// const sleepTime = 1_100 + Math.random() * 800;
const sleepTime = Math.random() * 2500;
console.log("sleeping", sleepTime);
// const sleepTime = 1000;
await new Promise((res) => setTimeout(res, sleepTime));Issues:
Recommendation:
2. Dead Code (Medium Priority)Location: if (succeeded) {
}Issue: Empty conditional block serves no purpose Recommendation: Remove this dead code entirely 3. Function Order Inconsistency (Low Priority)Location: The diff shows Recommendation: Keep function definitions in the same order as they appear in the switch statement for readability. 4. Logging Standards Violation (Low Priority)Per CLAUDE.md:
The Performance Considerations
Security Concerns✅ No security issues identified. The changes are purely organizational. Test CoverageMissing Context
Recommendations
Additional NotesDocumentation UpdatesThe README.md was simplified, removing references to RivetKit branding and links. This makes sense for an internal test, but ensure:
Actor Lifecycle TestingThe addition of Summary of Required ChangesMust Fix:
Should Consider: Overall, this is a clean refactor with a few housekeeping items to address. The main concern is ensuring debug/experimental code is cleaned up before merge. |
3689716 to
dce28f8
Compare
Pull Request ReviewThis PR moves the smoke test from Code Quality Issues1. Commented-out debug code in spawn-actor.ts (engine/tests/smoke/src/smoke-test/spawn-actor.ts:93-96)There are multiple commented-out lines and debug // Wait for actor to sleep
// const sleepTime = 1_100 + Math.random() * 800;
const sleepTime = Math.random() * 2500;
console.log("sleeping", sleepTime);
// const sleepTime = 1000;Recommendation:
2. Dead code in spawn-actor.ts (engine/tests/smoke/src/smoke-test/spawn-actor.ts:107-108)Empty conditional block that serves no purpose: if (succeeded) {
}Recommendation: Remove this dead code. 3. Inconsistent function ordering (engine/tests/smoke/src/smoke-test/spawn-actor.ts:36-109)The functions Issue in the diff:
Recommendation: Verify function names match their implementations. Potential Bugs4. Missing variable usage in spawnActorHttp (engine/tests/smoke/src/smoke-test/spawn-actor.ts:36-60)The original succeeded = true;
onSuccess();But the new onSuccess();The 5. Error handling inconsistencyThe Recommendation: Standardize error handling patterns across both test functions. Testing & Documentation6. No automated testsThis is a test suite but there are no automated tests (no Recommendation: Consider adding automated tests that can run in CI/CD to validate the smoke test behavior. 7. Documentation needs updating (engine/tests/smoke/README.md)The README still references the old path: cd rivetkit/examples/smoke-testRecommendation: Update the README with:
Performance Considerations8. Random sleep times may cause flaky tests (engine/tests/smoke/src/smoke-test/spawn-actor.ts:94)const sleepTime = Math.random() * 2500;Using random sleep times can make test results non-deterministic and harder to debug. Recommendation:
9. Added 1-second delays to lifecycle hooks (engine/tests/smoke/src/server/registry.ts:10-15)onStart: async () => {
await new Promise((resolve) => setTimeout(resolve, 1000));
},
onStop: async () => {
await new Promise((resolve) => setTimeout(resolve, 1000));
},These artificial delays will slow down the tests significantly. Recommendation:
Security & Best Practices10. Package naming consistencyGood change renaming packages to follow the
This clearly identifies them as test packages. 11. Workspace integrationGood addition to - engine/tests/*This properly integrates the test packages into the monorepo workspace. SummaryPositive aspects:
Issues to address:
Priority fixes:
Please address these issues before merging. Happy to review again once updated! |
62a6fbf to
43de939
Compare
dce28f8 to
30bd99b
Compare
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/limits#rate-limits |
PR Review: Move smoke test to engine/tests/SummaryThis PR moves the smoke test from 🐛 Issues Found1. Commented-out debug code (engine/tests/smoke/src/smoke-test/spawn-actor.ts:93-96)// Wait for actor to sleep
// const sleepTime = 1_100 + Math.random() * 800;
const sleepTime = Math.random() * 2500;
console.log("sleeping", sleepTime);
// const sleepTime = 1000;Issue: Multiple commented-out variations of Recommendation:
2. Dead code (engine/tests/smoke/src/smoke-test/spawn-actor.ts:107-108)if (succeeded) {
}Issue: Empty conditional block serves no purpose. Recommendation: Remove this dead code. 3. Function names swapped in diff (engine/tests/smoke/src/smoke-test/spawn-actor.ts:36-62)The diff shows 4. Inconsistent error handling
Recommendation: Standardize error handling between both functions. 5. Outdated README (engine/tests/smoke/README.md:13)Issue: Path is now outdated after the move. Recommendation: Update to 📝 Code Quality ObservationsPositive:
Suggestions:
✅ Security & PerformanceNo security concerns identified. Performance considerations:
🧪 TestingThe PR appears to be moving existing test infrastructure, so existing test coverage should be preserved. However:
Recommendation: Request ChangesThe organizational change is good, but the code quality issues (commented code, dead code, console.log, outdated README) should be addressed before merging. |
PR Review: Move smoke test to engine/tests/SummaryThis PR relocates the smoke test from Critical Issues1. Dead Code in
|
Merge activity
|
43de939 to
8afd075
Compare
30bd99b to
20dd048
Compare
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/limits#rate-limits |
Pull Request ReviewSummaryThis PR moves the smoke test from Code Quality & Best PracticesPositives:
Issues Found:
Potential Bugs
Performance Considerations
Security ConcernsNo security issues identified. This is test code with no sensitive operations. Test Coverage
Additional Recommendations
VerdictRequest Changes - The debugging code and dead code should be cleaned up before merging. The other issues are minor but should be addressed for code quality. Checklist
|

No description provided.