Skip to content

Add a Required Coverage Shield Class to the README Audit - #4416

Merged
ptr727 merged 5 commits into
developfrom
burndown/coverage-shield-class
Nov 24, 2026
Merged

ptr727 merged 5 commits into
developfrom
burndown/coverage-shield-class

Conversation

@ptr727

@ptr727 ptr727 commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a required coverage shield class to the README audit, per the maintainer's decision of 2026-11-03 on #3692.

  • spec/readme-sections.schema.json: the trigger kind enum gains coverage.
  • spec/readme-sections.json: a coverage class with one shield, label "coverage", match /codecov/c/github/, in "Build and Distribution > Build Status". The model's note says what the trigger reads.
  • spec/audit_markdown.py: readme_shield_findings takes the repo's coverage_types as a required argument, so a caller cannot drop the class by omission, and fires the coverage trigger where it is non-empty. A missing-shield finding now names the class that requires it, rather than saying the repo's deliverables require it, since a coverage badge is not a deliverable.
  • spec/audit.py: check_readme_shields hands run.coverage_types to the check. That is the same predicate that already decides .codecov.yml and CODECOV_TOKEN, so the badge, the config, and the token cannot disagree.
  • spec/readme-structure.md: a Coverage row in the "Shields" table.
  • spec/project-types.json: the readme.shields assertion names owed Codecov coverage beside deliverables, since the new class fires on coverage rather than on a deliverable.
  • AUDIT.md: the readme-structure dimension names the coverage shield that owed Codecov coverage implies, beside the deliverable and license shields.
  • README.md: the hub's own coverage badge. The hub declares python with tests in its tree, so the audit now owes it one.

Verification

  • New tests in tests/test_audit_helpers.py cover a repo owing coverage with the badge (no finding), the same repo without it (one finding naming the coverage class), and a repo owing no coverage (no finding). A second test drives audit.check_readme_shields to show the audit hands its coverage_types through. Both fail with the trigger removed.
  • The hub's README read against the new model: one coverage finding at the base commit, none on this branch.
  • spec/validate.py passes, and the full unittest suite passes (4915 tests).

Local review findings declined

  • spec/readme-sections.json coverage shield, class introduced: the match does not check the branch, so a /develop badge passes while the Shields table says the badge shows the default branch. Declined: spec/readme-structure.md already says the audit matches a shield by its endpoint alone. The table describes what each shield shows the reader, as the Docker row's per-channel shields do with no mechanical check either. The hub's own badge names main, its default branch.

Known divergence, not fixed here

CI uploads .NET coverage only where hashFiles('**/*Tests*.csproj') matches. Since #4410 (for #1270) merged to develop, the audit detects a C# test project by its own text, so a C# test project whose file name lacks "Tests" would owe the badge while CI skips the upload. No cataloged repository has such a project today, and validate-task.yml is outside this change.

Closes on promotion: #3692

🤖 Generated with Claude Code

ptr727 and others added 5 commits November 24, 2026 01:38
A new `coverage` trigger kind fires where the audit's coverage_types
predicate names a declared type owing Codecov coverage, the same
predicate that decides .codecov.yml and CODECOV_TOKEN. The new
`coverage` shield class requires a /codecov/c/github/ badge in
"Build and Distribution > Build Status". A missing-shield finding now
names the class that requires it, since a coverage badge is not a
deliverable. The hub owes the badge and now carries it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The coverage shield class fires on owed Codecov coverage rather than
on a deliverable, so the assertion names both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The readme-structure dimension now names the coverage shield that owed
Codecov coverage implies, beside the deliverable and license shields.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A default of "owes no coverage" let a caller that forgot the argument
drop the required coverage class silently. The one production caller
always passes it, so the parameter is now required.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings November 24, 2026 10:10
@ptr727

ptr727 commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 9a7cdd6001c445530b2aa2bc33fb650dfcae9d8e, the content this pull request carries at that commit against develop, and it recorded 1 finding.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between fb44364 and 9a7cdd6.

Files selected for processing: 9

  • AUDIT.md
  • README.md
  • spec/audit.py
  • spec/audit_markdown.py
  • spec/project-types.json
  • spec/readme-sections.json
  • spec/readme-sections.schema.json
  • spec/readme-structure.md
  • tests/test_audit_helpers.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported, and the changes include corresponding coverage-focused tests and documentation updates for the new Codecov shield requirements.

No open issues 🎉

What changed in this PR

This pull request adds a required Codecov coverage shield to the README audit for repositories whose existing coverage predicate requires coverage reporting.

Changes:

  • Add the coverage shield trigger and Codecov badge model to the README schema and audit.
  • Pass coverage types through the audit and improve missing-shield findings.
  • Update documentation, project assertions, the hub README, and coverage-focused tests.
File Description
tests/​test_audit_helpers.py Adds tests for coverage-triggered shield findings and propagation of coverage types through the audit.
spec/​readme-structure.md Documents the Coverage shield class and its placement in the README structure.
spec/​readme-sections.schema.json Allows coverage as a README shield trigger kind.
spec/​readme-sections.json Declares the required Codecov coverage shield and its trigger behavior.
spec/​project-types.json Updates the README shield assertion to include repositories that owe coverage.
spec/​audit.py Passes each run's coverage types into the README shield audit.
spec/​audit_markdown.py Activates coverage shield requirements and identifies the requiring class in findings.
README.md Adds the hub repository's Codecov coverage badge and link.
AUDIT.md Documents coverage shields in the README structure audit dimension.

Review effort: Lite

@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.58%. Comparing base (b38e084) to head (9a7cdd6).
⚠️ Report is 334 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4416      +/-   ##
===========================================
- Coverage    81.60%   79.58%   -2.03%     
===========================================
  Files           26       47      +21     
  Lines         9070    16224    +7154     
===========================================
+ Hits          7402    12912    +5510     
- Misses        1668     3312    +1644     
Flag Coverage Δ
python-3.13 79.58% <100.00%> (-2.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727

ptr727 commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit 0b1cf75 into develop Nov 24, 2026
15 checks passed
@ptr727
ptr727 deleted the burndown/coverage-shield-class branch November 24, 2026 10:29
ptr727 added a commit that referenced this pull request Nov 24, 2026
…lts, Secret Sync Fields, and Audit Account Fixes (#4428)

Promotes the 28 pull requests that landed on develop since the last
promotion (#4388), from the away-mode backlog burndown run.

- #4391: Drop the false XML comment suppression claim from the .NET
conventions.
- #4390: Blank quotations after a heredoc label on its opening line in
the paste-safe rule.
- #4392: Carry attention lists, cut lists, and opt-in billing in the
`backlog_metrics.py` JSON.
- #4393: Gate `configure.sh apply`'s interaction limit on a committed
bot verification record.
- #4394: Make the gh and node report note say a one-line vendor source
is configured.
- #4395: Add ShellCheck and shfmt lint tasks to the VS Code task
snippets.
- #4396: Count a CodeRabbit clean pass on the head in the digest's
`other_reviewed`.
- #4401: Date the line-ending intentRefs by the skill and trim advisory
restatements.
- #4399: Share one any-level heading region primitive between
`heading_body` and `extract_anchored`.
- #4398: Name the hub pull requests a standup lands through, and add
HACS first-run guidance.
- #4404: Add a PowerShell section to CODESTYLE.md and narrow the shell
rule.
- #4405: Close AUDIT.md section 10's convergence loop and fix three
skill pointers.
- #4409: Route CODESTYLE.md's General section to the language skills
(part of #1153, which stays open).
- #4410: Detect a C# test project by its own text rather than its file
name.
- #4411: Drop the unruled "working gate is not drift" sentence from
CODESTYLE.md.
- #4412: Track the newest upstream line of each pinned host tool.
- #4413: Correct AUDIT.md section 0's account of what the audit checks.
- #4416: Add a required coverage shield class to the README audit.
- #4414: Tie drive-pr's merge to its authorization and align the pass
moments.
- #4417: Pass over a second SIGTERM in `pr_review.py` so an interrupt
prints one line.
- #4418: Point the report-path placeholder at AUDIT.md section 8.
- #4419: Correct the audit account copies outside AUDIT.md section 0.
- #4422: Drop the archived DevKitCIoT from the rollout checklists.
- #4423: Report a stale `pullRequestCheck: false` and correct AUDIT.md
section 6.
- #4424: Add a `prune` subcommand to retire orphaned canonical review
passes.
- #4425: Drop the archived DevKitCIoT from the reusable-workflows
checklists and fix a normalization docstring.
- #4427: Store secret sync metadata in item fields, not 1Password tags.
- #4426: Declare and apply the Actions workflow token defaults through
`configure.sh` (the `configure.sh` part of #1783, which stays open).

## Owed by the maintainer

- #4412: A live run of the new host-tool line tracker. Scheduled runs
start only once this reaches `main`, and a `workflow_dispatch` would
prove it sooner.
- #4426: A fleet `configure.sh apply` for the workflow token defaults,
after the per-repository read the 2026-11-01 answer requires. Please
also confirm the new `--lower-workflow-token` option, which a `write`
repository needs for the apply to lower its default.
- #4427: Run `python3 scripts/secrets_sync.py selftest`, then the
cleanup script in that pull request's body (`move_sync_tags.py`, dry run
first, then `--apply`). Until that runs, every un-migrated secret item
refuses to sync.
- #4393: The pilot's first interaction limit is set by hand in its
settings and its bots verified there. The verification record is
committed afterwards through a hub pull request, and only then does
`apply` set the limit fleet-wide.
- A fleet resync is owed, because carried text changed: AGENTS.md,
GOVERNANCE.md, CODESTYLE.md, and several skills.

Fixes #4387
Fixes #4383
Fixes #4284
Fixes #1095
Fixes #4299
Fixes #4370
Fixes #4364
Fixes #4173
Fixes #4064
Fixes #3536
Fixes #3929
Fixes #3808
Fixes #3812
Fixes #3810
Fixes #4320
Fixes #4232
Fixes #1748
Fixes #1607
Fixes #1270
Fixes #1170
Fixes #3692
Fixes #4415
Fixes #3908
Fixes #1648
Fixes #4276

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants