Document contributor conventions and the PR checklist
Description
The repository has no CONTRIBUTING.md, yet src/lib.rs encodes several non-obvious conventions a contributor must follow to get a PR merged: the append-only RouterError numbering rule ("never reuse or renumber a variant once it has shipped"), the symbol_short! ≤ 9-character event-topic constraint, the admin-auth + pause-gate patterns, and the fmt/build/test commands. New contributors rediscover these by trial and error. This issue captures them in a single contributor guide.
Requirements and context
- Repository scope: StableRoute-Org/Stableroute-contracts only.
- Create
CONTRIBUTING.md covering: the append-only error policy, the event-topic naming/length rule, the admin-auth and pause-gate patterns, the storage-tier/TTL conventions, and the local cargo fmt --all -- --check / cargo build / cargo test workflow.
- Include a PR checklist (tests added, NatSpec on new entrypoints, no error renumbering, events asserted, docs updated).
- Link the StableRoute Discord: https://discord.gg/37aCpusvx
- No production code change.
Suggested execution
- Fork the repo and create a branch
git checkout -b docs/contracts-45-contributing-guide
- Implement changes
- Write code in:
src/lib.rs — no behavior change; optionally cross-link conventions in a top-of-file comment.
- Write comprehensive tests in:
src/lib.rs #[cfg(test)] mod test — no new tests required; ensure existing ones pass.
- Add documentation: create
CONTRIBUTING.md and link it from README.md.
- Include NatSpec-style doc comments (
///) consistency note in the guide.
- Validate security assumptions: the documented conventions match the actual enforced patterns in the source.
- Test and commit
Test and commit
- Run
cargo fmt --all -- --check, cargo build, and cargo test.
- Cover edge cases and failure paths: verify every documented convention maps to a real pattern in
src/lib.rs.
- Include the full
cargo test output and a short security notes section in the PR description (threat model + mitigations).
Example commit message
docs: add CONTRIBUTING guide with conventions and PR checklist
Guidelines
- Minimum 95 percent test coverage for impacted modules.
- Clear, reviewer-focused documentation.
- Timeframe: 96 hours.
Community & contribution rewards
- 💬 Join the StableRoute community on Discord for questions, reviews, and faster merges: https://discord.gg/37aCpusvx
- ⭐ This is a GrantFox OSS / Official Campaign task and may be rewarded. When your PR is merged you'll be prompted to rate the project — if this issue and the maintainers helped you ship, we'd be grateful for a 5-star rating. Clear questions in Discord and tidy, well-tested PRs are the fastest path to a merge and a reward.
Document contributor conventions and the PR checklist
Description
The repository has no
CONTRIBUTING.md, yetsrc/lib.rsencodes several non-obvious conventions a contributor must follow to get a PR merged: the append-onlyRouterErrornumbering rule ("never reuse or renumber a variant once it has shipped"), thesymbol_short!≤ 9-character event-topic constraint, the admin-auth + pause-gate patterns, and the fmt/build/test commands. New contributors rediscover these by trial and error. This issue captures them in a single contributor guide.Requirements and context
CONTRIBUTING.mdcovering: the append-only error policy, the event-topic naming/length rule, the admin-auth and pause-gate patterns, the storage-tier/TTL conventions, and the localcargo fmt --all -- --check/cargo build/cargo testworkflow.Suggested execution
git checkout -b docs/contracts-45-contributing-guidesrc/lib.rs— no behavior change; optionally cross-link conventions in a top-of-file comment.src/lib.rs#[cfg(test)] mod test— no new tests required; ensure existing ones pass.CONTRIBUTING.mdand link it fromREADME.md.///) consistency note in the guide.Test and commit
cargo fmt --all -- --check,cargo build, andcargo test.src/lib.rs.cargo testoutput and a short security notes section in the PR description (threat model + mitigations).Example commit message
docs: add CONTRIBUTING guide with conventions and PR checklistGuidelines
Community & contribution rewards