rust-review
Rust review guidelines
This project uses Rust for Coglet (crates/), the prediction server that runs
inside Cog containers. It handles HTTP requests, worker process management, and
prediction execution.
What linters already catch (skip these)
clippy runs in CI. cargo-deny audits dependencies for license/advisory issues. Don't flag issues these would catch.
What to look for
Error handling
- Use
thiserrorfor typed errors in library code,anyhowfor application errors - Don't use
.unwrap()or.expect()in non-test code unless the invariant is documented - Error context: use
.context()or.with_context()from anyhow, not bare?
More from replicate/cog
updating-architecture-docs
Use this skill when updating, reviewing, or creating architecture documentation in the architecture/ directory. This includes after refactors, feature additions, component changes, or when auditing docs for accuracy. Use it any time code changes affect how Cog's internals work -- new packages, changed IPC protocols, modified build pipeline, runtime behavior changes. Also use it proactively when reviewing PRs that touch core systems to check whether the architecture docs need updating.
6python-review
Python code review guidelines for the Cog SDK
5cog-review
Cog architecture and cross-cutting review guidelines
5go-review
Go code review guidelines for the Cog codebase
5release-cog
Guide and automate the Cog release process
5