Skip to content

docs(ai): let the coverage tool write COVERAGE.md - #1271

Merged
steward-warden merged 1 commit into
mainfrom
docs/1270-coverage-tool-writes-report
Nov 24, 2026
Merged

steward-warden merged 1 commit into
mainfrom
docs/1270-coverage-tool-writes-report

Conversation

@prpixie

@prpixie prpixie commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1270

Summary

The build MCP coverage tool now always writes COVERAGE.md on a run of every project or package, and records Covered and Coverable line counts on each row. The coverage ratchet instructions now let the tool write the file instead of assembling it by hand.

  • coverage-ratchet.instructions.md:
    • P3 measures once with project: all (.NET) or package: all (Node); the tool writes that language's section.
    • P4 failure runs git restore COVERAGE.md, so the branch keeps main's baseline, then P6 as before.
    • P5 commits the file the tool wrote. Tool-written sections are never written by hand, with a shell command or with an edit tool, and "Code Writer (docs only) write or overwrite" is gone.
    • Committed Coverage File: four-column format example (Overall counts are the sum of the rows), the gate reads only the Overall row's Line Coverage percentage, single-project/package row updates, files without counts (Overall unchanged, coverageReportNote says why), n/a rows count as 0/0. The Overall percentage stays in column 2.
    • Coverage runs outside the phase restore COVERAGE.md rather than commit it.
    • Node extraction leads with the build-node coverage tool and adds the cobertura reporter it reads.
  • agent-roles.instructions.md, dotnet.instructions.md, git.instructions.md, index.md: aligned with the above.

Python, n/a (no code) and excluded sections have no tool that writes them, so Code Writer (docs only) still writes those sections and only those.

Testing

  • markdownlint (MD013 disabled, as the hook runs it) passes on every changed file.
  • The commit went through the repository's pre-commit hooks.
  • No write_report mention remains; every anchor other files link to is kept.

🤖 Generated with Claude Code

The build MCP coverage tool now always writes COVERAGE.md on a full
run and records Covered/Coverable line counts per row, so the ratchet
no longer assembles the table by hand.

- P3 measures once with project: all / package: all; the tool writes
  the language's section.
- P4 failure restores COVERAGE.md so the branch keeps main's baseline.
- P5 commits the file the tool wrote; tool-written sections are never
  written by hand, Bash or an edit tool.
- Committed Coverage File shows the four-column format and explains
  single-project/package row updates, files without counts and n/a
  rows.
- Coverage runs outside the phase restore COVERAGE.md instead of
  committing it (Code Tester, dotnet Code Coverage).

Closes #1270

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pre-commit-Timings: total=7s check-identity=0s check-merge-commits=0s check-ignored-files=0s check-funfair-props=0s clean-package-lock-registry=0s pre-commit=7s(check-merge-conflict=0.07s,check-case-conflict=0.12s,check-added-large-files=0.11s,end-of-file-fixer=0.09s,trailing-whitespace=0.06s,mixed-line-ending=0.07s,check-toml=skipped,detect-private-key=0.08s,trufflehog=2.48s,check-executables-have-shebangs=skipped,check-shebang-scripts-are-executable=0.08s,check-json=skipped,check-xml=skipped,check-yaml=skipped,shellcheck=skipped,shellcheck-libraries=skipped,yamllint=skipped,flake8=skipped,markdownlint=0.74s,ansible-lint=2.99s,hadolint=skipped,check-compose-volumes=skipped,check-msbuild-path-separator=skipped,actionlint=skipped,composite-action-lint=skipped,pylint=skipped,stylelint=skipped,dotenv-linter=skipped,eslint=skipped,xmllint=skipped,bats=0.01s,trivy=skipped) check-changelog=skipped check-benchmark-project-names=skipped buildcheck=skipped buildtest=skipped npm-test=skipped tsqllint=skipped sqlfluff=skipped cfn-lint=skipped
@prpixie prpixie added the auto-pr Pull request created automatically label Nov 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for opening this pull request! Please make sure you have read the contributing guidelines.

@steward-warden
steward-warden marked this pull request as ready for review November 24, 2026 17:41
@steward-warden

Copy link
Copy Markdown
Collaborator

AI Review Loop: reviewed 20ef281

@credfeto

Copy link
Copy Markdown
Owner

Super-linter summary

Language Validation result

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@steward-warden
steward-warden merged commit 4743143 into main Nov 24, 2026
55 checks passed
@steward-warden
steward-warden deleted the docs/1270-coverage-tool-writes-report branch November 24, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-pr Pull request created automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(ai): have the coverage tool write COVERAGE.md instead of writing it by hand

3 participants