Contributing to Harbour Credentials¶
Thank you for your interest in contributing to Harbour Credentials!
Getting Started¶
- Fork and clone the repository:
git clone --recurse-submodules https://github.com/YOUR_USERNAME/harbour-credentials.git
cd harbour-credentials
- Set up the development environment:
make setup
# PowerShell
.\.venv\Scripts\Activate.ps1
# macOS / Linux / Git Bash
source .venv/bin/activate
- Verify everything works:
Development Workflow¶
Branching¶
- Create feature branches from
main - Use descriptive branch names:
feat/add-kb-jwt-support,fix/sd-jwt-verification
Making Changes¶
- Python code lives in
src/python/harbour/andsrc/python/credentials/ - TypeScript code lives in
src/typescript/harbour/ - Tests live in
tests/(see structure in README) - Documentation lives in
docs/
Code Style¶
Python¶
- Python 3.12+ with type hints on public APIs
- Use
pathlib.Path(notos.path) - All modules must have
main()withargparseand--help - Run
make lintandmake formatbefore committing
TypeScript¶
- TypeScript 5.x with strict mode
- Use
async/awaitfor crypto operations - Export types alongside functions
- Run
make lint tsbefore committing
Testing¶
# Run all tests
make test full
# Python only
make test
# TypeScript only
make test ts
# Single Python test file
PYTHONPATH=src/python:$PYTHONPATH pytest tests/python/harbour/test_keys.py -v
# Single TypeScript test
cd src/typescript/harbour && yarn vitest run --config vitest.config.ts ../../../tests/typescript/harbour/keys.test.ts
Feature Parity¶
When adding features, implement in both Python and TypeScript to maintain feature parity. Use consistent API naming:
| Python (snake_case) | TypeScript (camelCase) |
|---|---|
generate_p256_keypair() |
generateP256Keypair() |
sign_vc_jose() |
signVcJose() |
verify_sd_jwt_vc() |
verifySdJwtVc() |
Commit Guidelines¶
Commit Message Format¶
Use Conventional Commits:
feat(harbour): add KB-JWT verification
fix(sd-jwt): handle empty disclosure arrays
docs: update quickstart guide
test(interop): add cross-runtime signing test
chore: update dependencies
Signing Commits¶
All commits must be signed:
-saddsSigned-off-byline (DCO)-Sadds GPG signature
Pull Requests¶
Before Submitting¶
- [ ] All tests pass (
make test full) - [ ] Linting passes (
make lint) - [ ] Documentation is updated if needed
- [ ] Commit messages follow conventional format
- [ ] Commits are signed (
-s -S)
PR Description¶
Include:
- Summary of the changes
- Testing performed
- Related issues (e.g.,
Closes #42)
Architecture Decisions¶
Major design decisions are documented in Architecture Decision Records (ADRs):
- ADR-001: VC Securing Mechanism
- ADR-002: Dual Runtime Architecture
- ADR-003: Canonicalization
- ADR-004: Key Management
When proposing significant changes, consider creating a new ADR.
Reporting Issues¶
- Bugs: Include steps to reproduce, expected vs actual behavior, and environment details
- Features: Describe the use case and proposed solution
- Security: Report security vulnerabilities privately (do not create public issues)
Code of Conduct¶
Be respectful and inclusive. We welcome contributors of all backgrounds and experience levels.
License¶
By contributing, you agree that your contributions will be licensed under the EPL-2.0 License.