Conventions
How work flows through the repo.
Branches
<kind>/<scope>-<short-slug> where:
kind โ {feat, chore, build, ci, docs, test, refactor}.scopematches the relevant Conventional Commits scope, often a crate name (e.g.maidan-store).
Examples:
chore/governance-bootstrapfeat/maidan-store-postgresfeat/maidan-server-healthdocs/cluster-a-retro
Commit + PR titles
Conventional Commits. The PR
title becomes the squash commit on main, so it must read well as
release notes.
Examples:
chore: governance + workspace scaffoldfeat(maidan-store): postgres impl + schema 0001feat(maidan-server): /health endpoint + compose.yaml
PR body template
## What this PR does
<2โ4 bullets>
## Linked cluster
Clusters/Cluster A ยท Phase A.<N>
## Acceptance test
<the command(s) the reviewer runs to verify green>
## Risk / rollback
<what reverts cleanly; what does not>
## Out of scope
<things deferred and to which PR>
## Retrospective (PR-level)
- **What was surprising:**
- **What got deferred:**
- **What we learned:**
The Retrospective section is mandatory. Squash-merge preserves it in the commit body so each merged commit carries its own retro.
Code
- Rust 2021; toolchain pinned in
rust-toolchain.toml(currently 1.91). cargo fmt --checkandcargo clippy --all-targets --workspace -- -D warningsmust pass.thiserrorin libraries;anyhowonly at binary boundaries.tracingfor logging โ noprintln!in library code.- Tests next to the code (
#[cfg(test)]); integration tests intests/; property tests viaproptest. - testcontainers for DB integration tests.
Secrets
.env,maidan.toml,*.pem,*.keyare ignored.- All credentials from env vars or external secret managers.
- CI runs a secrets scan on every PR.
- Fixtures use synthetic data only.
CI matrix
| Job | Tool | Required |
|---|---|---|
lint (fmt + clippy + deny) | fmt + clippy + deny | yes |
secrets scan | trufflehog | yes |
unit tests | cargo test | yes |
integration (testcontainers) | nextest + testcontainers | yes |
docker compose smoke | docker compose + curl | yes |
helm install (kind) | kind + helm | no |
sqlite-vec (optional feature) | cargo test + feature flag | no |
bootstrap compile-time strip | cargo build/test | no |
coverage (llvm-cov) | cargo-llvm-cov | no |