Skip to content

Commit 9edc9a6

Browse files
committed
Merge #97: Add comprehensive coverage documentation
f895f01 docs: [#89] add 'undertested' to project dictionary (copilot-swe-agent[bot]) bda86a1 docs: [#89] add comprehensive coverage documentation (copilot-swe-agent[bot]) 4a2022e Initial plan (copilot-swe-agent[bot]) Pull request description: Creates `docs/contributing/testing/coverage.md` documenting code coverage practices, tooling, and expectations per issue #89. ## Coverage Strategy - **Targets**: 85% overall, 90% business logic, 95% utilities - **Exclusions**: Binaries, E2E infrastructure, adapters requiring real infrastructure, linting package - **Philosophy**: Coverage as informational tool, not blocking gate ## Cargo Aliases Reference Documents all coverage commands from `.cargo/config.toml`: | Alias | Purpose | |-------|---------| | `cargo cov` | Terminal summary | | `cargo cov-check` | Validate ≥85% threshold | | `cargo cov-lcov` | LCOV format (`.coverage/lcov.info`) | | `cargo cov-codecov` | Codecov JSON (`.coverage/codecov.json`) | | `cargo cov-html` | HTML report (`target/llvm-cov/html/`) | ## Integration Points - **Pre-commit**: Final step in `scripts/pre-commit.sh`, non-blocking, informational only - **CI/CD**: `.github/workflows/coverage.yml` generates artifacts on all pushes/PRs, non-blocking - **PR Reviews**: Guidelines for when to request tests vs. accepting coverage gaps ## Changes - `docs/contributing/testing/coverage.md` - New 557-line comprehensive guide - `docs/contributing/testing/README.md` - Add navigation link - `project-words.txt` - Add "undertested" term <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Write coverage documentation</issue_title> > <issue_description>**Parent Epic**: #85 > **Prerequisites**: #88 must be completed first (testing documentation refactoring) > > ## Overview > > Create comprehensive code coverage documentation (`docs/contributing/testing/coverage.md`) to provide guidance on coverage expectations, how to run coverage locally, how coverage is checked in CI/CD, and how coverage should be evaluated in PR reviews. > > This is a **new documentation file** that will be added to the refactored testing documentation structure created in issue #88. > > ## Goals > > - [ ] Create new documentation file `docs/contributing/testing/coverage.md` > - [ ] Document all coverage commands and aliases > - [ ] Explain coverage expectations and thresholds > - [ ] Provide guidance for PR reviews involving coverage changes > - [ ] Document the pre-commit coverage check behavior > - [ ] Explain CI/CD coverage workflow > - [ ] Add link to `coverage.md` in testing README navigation > > ## Document Structure > > The new file should include these sections: > > 1. **Overview** - What coverage is and why it matters > 2. **Running Coverage Locally** - All cargo coverage commands > 3. **Coverage Thresholds** - Project targets (85% overall, granular targets) > 4. **What Gets Measured** - Include/exclude rules > 5. **Pre-commit Integration** - How coverage check runs > 6. **CI/CD Coverage Workflow** - GitHub Actions workflow details > 7. **Interpreting Results** - How to read coverage reports > 8. **PR Review Guidelines** - When coverage drops are acceptable > > ## Implementation Plan > > ### Phase 1: Create Core Documentation (40 minutes) > - [ ] Create `docs/contributing/testing/coverage.md` > - [ ] Write Overview and Running Coverage Locally sections > - [ ] Document all cargo aliases from `.cargo/config.toml` > > ### Phase 2: Coverage Strategy (30 minutes) > - [ ] Document coverage thresholds and targets > - [ ] Explain what code is measured and what's excluded > - [ ] Add examples of coverage output > > ### Phase 3: Integration Documentation (20 minutes) > - [ ] Document pre-commit coverage check > - [ ] Document CI/CD workflow behavior > - [ ] Explain non-blocking nature > > ### Phase 4: Guidance and Best Practices (30 minutes) > - [ ] Write section on interpreting coverage results > - [ ] Document PR review guidelines > - [ ] Add troubleshooting tips > > ### Phase 5: Navigation and Cross-linking (15 minutes) > - [ ] Add link to `coverage.md` in `docs/contributing/testing/README.md` > - [ ] Add cross-references to related documentation > - [ ] Verify all links work > > ### Phase 6: Review and Polish (15 minutes) > - [ ] Run markdown linter > - [ ] Review for clarity and completeness > - [ ] Ensure examples are accurate > > ## Acceptance Criteria > > - [ ] New file `docs/contributing/testing/coverage.md` created with complete documentation > - [ ] Link to `coverage.md` added in `docs/contributing/testing/README.md` navigation section > - [ ] All cargo coverage aliases documented (`cov`, `cov-check`, `cov-lcov`, `cov-codecov`, `cov-html`) > - [ ] Coverage targets clearly defined (85% overall, 90% business logic, 95% utilities) > - [ ] Exclusions documented (binaries, E2E infrastructure, adapters, linting tools) > - [ ] Pre-commit coverage check behavior is clearly explained > - [ ] CI/CD coverage workflow is documented > - [ ] PR review guidelines for coverage changes are clear > - [ ] All markdown passes linting > - [ ] All cross-references work correctly > > ## Related Documentation > > - [Testing Conventions](../testing/README.md) - Main testing documentation (after #88 completes) > - [Development Principles](../../development-principles.md) - Quality standards > - [Pre-commit Process](./commit-process.md) - Pre-commit workflow > > ## Notes > > - This is a **new file** - `docs/contributing/testing/coverage.md` does not exist yet > - Must be created AFTER issue #88 completes (testing documentation refactoring) > - The documentation should reflect actual behavior, not aspirational features > - Emphasize the non-blocking, informational nature of coverage checks > - Make it clear that coverage is a tool, not a goal > - Provide practical examples that contributors can run immediately > > ## Dependencies > > **Before This Issue**: #88 - Creates the `docs/contributing/testing/` directory structure > **After This Issue**: None - This is the final documentation task in the EPIC</issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> - Fixes #89 <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). ACKs for top commit: josecelano: ACK f895f01 Tree-SHA512: ef19ecbd1dbd4895cc7687a0e89b79e69b3242577f2bf0c2de789ce219015bf9ad4e53bcc7276f2b8d76225661e5a55caf78b66eccb961ab6af5ff7c682ae5e0
2 parents 94c764e + f895f01 commit 9edc9a6

File tree

3 files changed

+559
-0
lines changed

3 files changed

+559
-0
lines changed

docs/contributing/testing/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ This section provides links to specialized testing documentation organized by to
174174
- **[Testing Commands](./testing-commands.md)** - Command test patterns, builders, mocks, E2E
175175
- **[Clock Service](./clock-service.md)** - MockClock usage for deterministic time tests
176176
- **[Pre-commit Integration](./pre-commit-integration.md)** - AI enforcement tests, SKIP_AI_ENFORCEMENT flag
177+
- **[Coverage](./coverage.md)** - Code coverage targets, tools, CI/CD workflow, and PR guidelines
177178

178179
## 🔗 Related Documentation
179180

0 commit comments

Comments
 (0)