Contributing
Thanks for helping Heimdall keep watch. This page mirrors CONTRIBUTING.md.
By taking part you agree to follow the Code of Conduct. Found a security problem? Read the security policy instead of opening an issue.
How changes flow
Section titled “How changes flow”main is protected. Nothing lands on it except through a pull request that:
- passes every required CI check (formatting, lints, tests, Helm chart validation, dependency audit, image build);
- is approved by a code owner;
- has all review conversations resolved;
- is up to date with
main(squash merge keeps history linear).
Direct pushes and force pushes to main are blocked for everyone.
Getting set up
Section titled “Getting set up”You need Rust (stable), Docker and, for chart work, Helm.
git clone https://github.com/mrashed98/heimdall.gitcd heimdalldocker compose -f docker-compose.dev.yml up -d # Postgres on localhost:5433export DATABASE_URL=postgres://heimdall:heimdall@localhost:5433/heimdallcargo testBefore you open a pull request
Section titled “Before you open a pull request”Run the same checks CI runs:
cargo fmt --checkcargo clippy --all-targets -- -D warningscargo testhelm lint deploy/helm/heimdallWhat a good change looks like
Section titled “What a good change looks like”- Small and focused. One problem per pull request. Open an issue first for anything large, so you can agree on the approach before writing code.
- Tested first. Write the test that fails without your change, then make it
pass. Database tests use
#[sqlx::test]; HTTP clients are tested againstwiremock. No real network calls in tests. - Readable Rust. Heimdall is meant to be maintainable by people still
learning Rust: plain structs and enums, no custom macros,
anyhow::Resultin app code, and comments that explain why when ownership shapes the code. - Fits the budget. Heimdall must run in 1 GB RAM and 1 CPU. Avoid loading whole tables into memory or adding heavy dependencies.
- Uses the project’s words. Terms such as Realm, Finding, Oath and Release are defined in the glossary. Hard-to-reverse decisions are recorded in the architecture decisions; if your change revisits one, update or supersede the ADR in the same pull request.
Commit messages
Section titled “Commit messages”Use Conventional Commits: feat:, fix:,
docs:, refactor:, test:, chore:. The pull request title becomes the squash
commit, so make it one of these.
Working on these docs
Section titled “Working on these docs”The documentation lives in docs/site/ (Astro Starlight). See its
README to run it locally.
The build fails on broken internal links.
Releases
Section titled “Releases”Maintainers tag releases as vMAJOR.MINOR.PATCH. A tag builds the release binaries
and the multi-arch container images and publishes them to GitHub Releases and GHCR.
License
Section titled “License”By contributing, you agree that your contributions are licensed under the Apache License 2.0.