-
Notifications
You must be signed in to change notification settings - Fork 146
doc: auto-generate docs for engine config and registry config #3902
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
|
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 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. |
More templates
@rivetkit/cloudflare-workers
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/virtual-websocket
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |
Pull Request Review: Auto-generate docs for engine config and registry configThis PR introduces automated JSON schema generation for engine configuration and RivetKit configuration, significantly improving documentation maintainability. Overall, the implementation is well-structured and follows good practices. ✅ Strengths
🔍 Code Quality IssuesCritical Issues1. Error handling in let workspace_root = std::env::var("CARGO_MANIFEST_DIR")
.map(|dir| {
Path::new(&dir)
.parent()
.unwrap() // Could panic
.parent()
.unwrap() // Could panic
.parent()
.unwrap() // Could panic
.to_path_buf()
})
.unwrap(); // Could panicRecommendation: Use proper error handling with let workspace_root = std::env::var("CARGO_MANIFEST_DIR")
.expect("CARGO_MANIFEST_DIR must be set")
.map(|dir| {
Path::new(&dir)
.parent()
.expect("Failed to get parent of packages")
.parent()
.expect("Failed to get parent of engine")
.parent()
.expect("Failed to get workspace root")
.to_path_buf()
});Medium Priority Issues2. Typo in actor config description ( 3. Missing file in workspace members Recommendation: Add to members = [
# ... existing members ...
"engine/packages/config-schema-gen",
]4. Hardcoded path traversal ( Recommendation: Consider using a more robust approach, perhaps by setting an environment variable or using a workspace-level configuration. Low Priority Issues5. Inconsistent naming convention
6. Empty lib.rs file ( //\! JSON schema generation for Rivet engine configuration.
//\!
//\! This crate generates a JSON Schema file at build time from the
//\! engine's configuration types defined in rivet-config.
//\! The generated schema is written to `engine/artifacts/config-schema.json`.7. TypeScript any types (
These could use more specific types or at least document why 🔒 Security ConsiderationsNo security issues identified. The schema generation happens at build time and doesn't involve user input or runtime execution. ⚡ Performance ConsiderationsBuild-time overhead: Schema generation adds build time, but this is acceptable since:
Runtime impact: None - schemas are static files loaded at build/startup time. 🧪 Test CoverageMissing test coverage for:
Recommendation: Add tests to verify:
📝 Documentation QualityExcellent improvements:
Minor suggestions:
🎯 SummaryThis is a well-designed PR that adds valuable auto-documentation infrastructure. The main concerns are:
Once the critical and important issues are addressed, this PR will be ready to merge. Estimated Risk: Low-Medium (mostly build configuration changes) |
c8807c1 to
8c5aaf8
Compare
9800079 to
82ade5d
Compare
8c5aaf8 to
fe63ee7
Compare
Merge activity
|

No description provided.