Skip to content

Latest commit

 

History

History
86 lines (56 loc) · 1.89 KB

CONTRIBUTING.md

File metadata and controls

86 lines (56 loc) · 1.89 KB

Contributing to RestoreLab

Thanks for your interest. This document describes how to contribute effectively.

Before you start

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.

Reporting bugs

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 logs if available

Suggesting features

Open an issue first. We discuss, then decide. Do not open a PR for a new feature without prior discussion.

Development setup

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

Running tests

Unit tests:

go test ./...

End-to-end test (requires Docker):

./scripts/test-e2e.sh

Failure-mode tests (requires Docker):

./scripts/test-failures.sh

Commit conventions

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.

Code style

  • Run gofmt -w cmd internal before committing.
  • Keep functions under 50 lines where possible.
  • Every exported function has a doc comment.
  • Use %w to wrap errors.
  • Never log secrets.

Security

If you find a security issue, do NOT open a public issue. See SECURITY.md for the private disclosure process.

License

By contributing, you agree that your contributions are licensed under the MIT License.