Thanks for contributing to persistent-queue. These guidelines keep history clean and review fast.
- Commits follow Conventional Commits.
- Keep commits small and self-contained so each can be reviewed on its own. Split large changes into incremental commits/PRs; never mix unrelated changes in one commit.
- Every change ships with tests (unit, plus integration where it fits). Coverage should not drop.
- CI must be green before review: formatting, clippy, and tests.
- Address review feedback by amending the relevant commit and rebasing, not with follow-up
fix: typocommits. Keep history linear.
A Conventional Commits subject in the present tense, imperative voice (feat: add try_send,
not feat: added try_send or feat: adds try_send), then an imperative body that explains
why when it is not obvious, wrapped at ~72 columns, ASCII only (no em-dash, no --).
AI-assisted commits disclose the assistant with an Assisted-by: trailer, following the kernel
coding-assistants guidance. Do not use
Co-Authored-By.
feat: add group-commit durability
Fsync per push serialises producers at disk speed. Batch pending writes
behind a single fsync so a burst of pushes shares one flush, trading a
little latency for throughput.
Assisted-by: Claude:claude-opus-4-8
Agents have extra rules in AGENTS.md.
cargo build
cargo test --all-features
cargo fmt --all
cargo clippy --all-targets --all-features --locked -- -D warnings
cargo llvm-cov --all-features --locked --summary-only # coverage, matches CIInstall prek and enable the git hooks once. They run typos and rustfmt on commit, a Conventional Commits check on the message, and clippy on push:
brew install prek # or: cargo install --locked prek
prek installFollow the Rust Style Guide; rustfmt and
clippy are enforced in CI. Prefer idiomatic Rust. Keep comments concise and reserved for the
non-obvious; do not narrate the code. Optional: typos for
spell checking.
The design and rationale live in the README and DESIGN.md, and the API is
documented with rustdoc. Keep the crate safe and lean: no unsafe, the mem backend and core
dependency-free (on-disk backends behind features), the store pure key/value bytes, and no
unbounded paths - backpressure is the point.