11# Contributing
22
3+ ## Quality Assurance
4+
5+ This project maintains high code quality through automated checks that run on every commit and every PR.
6+
7+ ### Automatic Checks
8+
9+ ** Pre-commit hook** — runs automatically on every ` git commit ` :
10+
11+ - ` lint-staged ` formats and lints staged files (ESLint + Prettier)
12+ - Coverage verification if source/test/config files changed
13+ - Commit message validation via commitlint
14+
15+ ### Local Quality Commands
16+
17+ Run these before committing:
18+
19+ | Command | Purpose |
20+ | ------------------------------- | ------------------------------------------------- |
21+ | ` pnpm run check ` | Lint + format check |
22+ | ` pnpm run lint ` | ESLint only |
23+ | ` pnpm run format:check ` | Prettier check only |
24+ | ` pnpm run test ` | Unit tests |
25+ | ` pnpm run test:verify-coverage ` | ** Verify 100% coverage** (required before commit) |
26+ | ` pnpm run test:coverage ` | Detailed coverage report |
27+ | ` pnpm run test:spec ` | Spec tests (Cucumber) |
28+ | ` pnpm run test:integration ` | Integration tests |
29+ | ` pnpm run test:bun ` | Bun runtime tests |
30+ | ` pnpm run test:deno ` | Deno runtime tests |
31+
32+ ### Coverage Requirements
33+
34+ ** 100% coverage is required** — all statements, branches, functions, and lines must be covered.
35+
36+ ``` bash
37+ # Verify coverage before committing
38+ pnpm run test:verify-coverage
39+
40+ # Debug uncovered lines
41+ pnpm run test:coverage
42+ ```
43+
44+ ### CI (GitHub Actions)
45+
46+ Every PR runs the same checks as local:
47+
48+ - Lint + Prettier
49+ - Commit message validation
50+ - Dead code detection
51+ - Spec consistency with website
52+ - Tests on Node 22, 24 with coverage verification
53+ - Bun runtime tests
54+ - Deno runtime tests
55+ - Spec compliance tests (Cucumber)
56+ - Workflow validation
57+
58+ ---
59+
360## Running Integration Tests Locally
461
562This section covers how to run integration tests on your Mac for local development.
@@ -24,37 +81,23 @@ container system start
24813 . Start the development containers:
2582
2683``` bash
27- npm run test:container:start
84+ pnpm run test:container:start
2885```
2986
3087This starts Redis (port 6379) and Postgres (port 5432) in a lightweight VM.
3188
32- ### Running Tests
33-
34- Run the integration tests:
35-
36- ``` bash
37- npm run test:integration
38- ```
39-
40- Or run the full test suite with container management:
41-
42- ``` bash
43- npm run test:container:start && npm run test:integration && npm run test:container:stop
44- ```
45-
4689### Cleanup
4790
4891Stop and remove the containers:
4992
5093``` bash
51- npm run test:container:stop
94+ pnpm run test:container:stop
5295```
5396
5497### Troubleshooting
5598
56- - Check container status: ` npm run test:container:status`
57- - View container logs: ` npm run test:container:logs`
58- - Restart containers: ` npm run test:container:restart`
99+ - Check container status: ` pnpm run test:container:status`
100+ - View container logs: ` pnpm run test:container:logs`
101+ - Restart containers: ` pnpm run test:container:restart`
59102
60103For more apple/container commands, see the [ apple/container documentation] ( https://apple.github.io/container/documentation/ ) .
0 commit comments