Contributing to Karta
Thank you for considering a contribution. Karta is in early development, so the most useful contributions right now are bug reports with a reproduction, protocol test cases (RFC examples, interoperability failures) and reviews of the security-relevant code.
Before you start
- Open an issue first for anything beyond a small fix, so the design can be agreed before code is written.
- Security issues go to the address in
SECURITY.md, never to a public issue.
Development
Requirements are in README.md. The quality gate is one command and must
pass before every commit:
mix precommit
It runs hex.audit, format --check-formatted, compile --warnings-as-errors,
deps.unlock --check-unused, credo --strict, sobelow, deps.audit and the
test suite with warnings as errors. CI runs the same gate plus a dependency
scan.
Rules we hold ourselves to:
- Tests first. Protocol modules (SMTP, DKIM, SPF, DMARC, ARC, DNS) are pure functions with no sockets or processes, tested against RFC vectors and with property tests. Side effects sit behind behaviours so tests use fakes.
- No real secrets in the repository. Test keys are generated in tests or
committed as clearly marked test fixtures (see
dev/unbound/README.md). - Never send mail to real addresses from tests; the compose stack in
dev/is the only network tests may touch. - English names in code, comments and documentation. User-facing strings go through Gettext.
- Every security fix gets a Security entry in
CHANGELOG.md.
Pull requests
- One topic per pull request, with a description that says what changed and why, and which tests prove it.
- Keep commits readable; rebase on
masterrather than merging it in. - New behaviour comes with tests; a bug fix comes with a test that failed before the fix.
License
By contributing you agree that your contribution is licensed under the MIT
license in LICENSE.