Contributing
Thank you for your interest in contributing to S4. This guide will help you get started.
Getting Started
- Fork the repository
- Clone your fork
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Run tests:
cargo test --workspace - Run lints:
cargo clippy --workspace --all-targets -- -D warnings - Format code:
cargo fmt - Commit and push
- Open a pull request
Development Environment
Required Tools
- Rust 1.70+ — install via rustup
- Git — version control
- AWS CLI (optional) — for manual testing
Recommended Tools
- cargo-watch — auto-rebuild on file changes:
cargo install cargo-watch - jq — for parsing JSON responses in test scripts
Project Structure
See the Workspace Structure page for a detailed overview of the crate layout.
Workflow
1. Find or Create an Issue
Before starting work, check existing issues or create a new one describing the change.
2. Write Code
Follow the Code Standards:
- English-only comments and documentation
- Document all public APIs
- Use proper error types (
thiserror) - No
unwrap()in production code - Include unit tests
3. Write Tests
- Unit tests in the same file:
#[cfg(test)] mod tests { ... } - Integration tests in
tests/directory - Aim for meaningful test coverage, not just line count
4. Run CI Checks Locally
Before pushing, run the full CI check:
cargo fmt --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
Or use the convenience script:
./scripts/check.sh
5. Submit a Pull Request
- Write a clear PR title and description
- Reference the related issue
- Ensure all CI checks pass
- Be responsive to review feedback
Commit Messages
Use clear, descriptive commit messages:
Add lifecycle policy background worker
Implements a background worker that periodically evaluates
lifecycle rules and deletes expired objects. Supports dry-run
mode for safe testing.
Questions?
If you have questions about the codebase or architecture, check the Architecture section or open a discussion on GitHub.