Thanks for your interest. This document describes how to contribute effectively.
RestoreLab is deliberately scoped. Please read DESIGN_DOC.md and ROADMAP.md first. PRs that expand the scope beyond what v0.1.0 promises will be politely closed.
Open a GitHub issue with:
- RestoreLab version (
restorelab version) - The contract YAML you used (remove secrets)
- The exact command you ran
- The JSON or HTML report if the drill completed
- The relevant portion of
docker logsif available
Open an issue first. We discuss, then decide. Do not open a PR for a new feature without prior discussion.
Prerequisites:
- Go 1.22 or newer
- Docker Engine 26.0.0 or newer
- Restic 0.14.0 or newer (0.17.0+ recommended)
- On Debian/Ubuntu:
sudo apt install -y build-essential libc6-dev
Build:
git clone https://github.com/YOUR-USERNAME/restorelab cd restorelab go build -o restorelab ./cmd/restorelab
Unit tests:
go test ./...
End-to-end test (requires Docker):
./scripts/test-e2e.sh
Failure-mode tests (requires Docker):
./scripts/test-failures.sh
Use conventional commit prefixes:
- feat: new feature
- fix: bug fix
- docs: documentation only
- test: tests only
- refactor: no behavior change
- chore: build, tooling
The pre-commit hook runs gofmt, go vet, and go test before every commit. If any fail, the commit is refused.
- Run
gofmt -w cmd internalbefore committing. - Keep functions under 50 lines where possible.
- Every exported function has a doc comment.
- Use
%wto wrap errors. - Never log secrets.
If you find a security issue, do NOT open a public issue. See SECURITY.md for the private disclosure process.
By contributing, you agree that your contributions are licensed under the MIT License.