You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a Coverage Shield Class for Repositories That Upload Coverage #3692
Add a coverage shield class to spec/readme-sections.json, so the README audit expects a Codecov coverage badge in "Build and Distribution > Build Status" wherever the hub already produces coverage data.
Why
The reusable validate-task.yml already runs tests and uploads a Cobertura report to Codecov in every repository that has a .NET test project (its .NET steps run under hashFiles('**/*Tests*.csproj') != '', and the upload is report-only with fail_ci_if_error: false). The data exists fleet-wide, but shieldClasses declares no shield that surfaces it, so a repository adding the badge is doing so outside the spec, and one omitting it is never told.
Shape
name: coverage
trigger: the same condition the upload runs under, a repository carrying a test project. No trigger kind for that exists today (always and publish are the two in use), so this likely needs a new trigger kind.
shields: one entry, label "coverage", match/codecov/c/github/, in "Build and Distribution > Build Status", reporting the default branch like the other Build Status shields.
Open points
CODECOV_TOKEN is optional and the upload is best-effort, so a repository without the token may have no Codecov project and the badge would render "unknown". The trigger may need to be narrower than "has a test project", or the class may need to be optional.
Python test projects: whether the Python side uploads coverage the same way decides whether the trigger covers them.
Question: When spec/readme-sections.json gains a coverage shield class (a Codecov badge in "Build and Distribution > Build Status"), which repositories should it apply to: a new "has a test project" trigger kind, a narrower trigger, or an optional class, given CODECOV_TOKEN is optional?
Options, recommended first:
Reuse the existing secret trigger on CODECOV_TOKEN (recommended): The audit already supports this trigger kind and the registry already marks the right repositories, so it is one JSON entry with no new code, covering Python and C#. The 15 repositories declaring the secret (the hub among them) each get a LETTER finding until their README carries the badge. No work in flight.
Add a new "has a test project" trigger kind: Matches where the upload runs, but needs new audit code reading each repository tree over the API plus a schema change, and does nothing for the "unknown" badge on a repository with no token. No work in flight.
Make the class optional: The shield model has no optional flag (only sections do), so it needs a new field, and leaves a missing badge unreported, the gap the issue was filed for. No work in flight.
Decline, keep the badge outside the spec: Repositories adding it (as PlexCleaner#1106 did) keep doing so ad hoc, and one omitting it is never told. No work in flight.
Evidence: The issue says only always and publish trigger kinds exist, but secret is already in spec/readme-sections.schema.json:117, and spec/audit_markdown.py:542 evaluates it against registry requiredSecrets (since #632, unused by any class). spec/secrets.json:39: a csharp or python repo carrying tests lists CODECOV_TOKEN. In registry/repos.json the 15 repositories declaring it are exactly the 15 csharp or python ones. WORKFLOW.md D1.6 covers Python upload too. The hub's own README has no codecov shield.
Maintainer answer (decision triage, 2026-11-01): Option 1: the coverage shield class uses the existing 'secret' trigger kind on CODECOV_TOKEN, so it applies to repositories whose registry requiredSecrets lists it. This is now work for the next burndown round.
Both open points are settled. The issue is ready to implement.
Trigger: a new coverage trigger kind. It is true where the audit's existing coverage_types (spec/audit.py) is non-empty, meaning a declared csharp or python type whose tests exist in the tree. That predicate already decides whether a repo owes codecov.yml and CODECOV_TOKEN. One predicate for all three keeps the badge, the config, and the token from disagreeing. It covers Python as well as .NET, so the issue's Python open point is answered too. The secret kind (trigger on CODECOV_TOKEN being configured) and a registry opt-in were both declined. Under either one, a repo that should carry the badge is never told it owes one.
Severity: required. A missing coverage badge is a readme finding, like the other shield classes. spec/secrets.jsontypeMechanisms already requires CODECOV_TOKEN of every such repo whatever it opts into, and the audit reports a missing token. So a badge rendering "unknown" points at a token defect already reported elsewhere. It is no reason to make the class optional.
The issue's shape stands otherwise. The shield entry is label "coverage", match/codecov/c/github/, in "Build and Distribution > Build Status", against the default branch. The schema's trigger kind enum in spec/readme-sections.schema.json gains coverage.
Released (2026-11-24): PR #4416 merged to develop at 0b1cf75; branch and worktree cleaned up, so this claim holds no files. The issue closes on promotion.
Per the maintainer's decision of 2026-11-03: a new coverage trigger kind, true where the audit's coverage_types is non-empty, and a required class.
Predicted files:
spec/readme-sections.json, the new coverage shield class (label "coverage", match/codecov/c/github/, in "Build and Distribution > Build Status", default branch).
spec/readme-sections.schema.json, the trigger kind enum gaining coverage.
spec/audit_markdown.py, the trigger evaluation beside always, publish and secret.
spec/audit.py, handing the existing coverage_types predicate to the README check. spec/secret_names.py, which holds that predicate, is read, not edited.
spec/readme-structure.md, a Coverage row in the "Shields" table.
README.md, the hub's own Build Status badge, only where the hub's audit then owes one (the hub carries .codecov.yml).
tests/test_audit_helpers.py, the new trigger for a repository with coverage types and one without.
spec/project-types.json, the readme.shields assert text near line 210 (granted 2026-11-24).
Activity
ptr727 commentedon Nov 1, 2026
Decision needed (decision triage, 2026-11-01)
Question: When
spec/readme-sections.jsongains acoverageshield class (a Codecov badge in "Build and Distribution > Build Status"), which repositories should it apply to: a new "has a test project" trigger kind, a narrower trigger, or an optional class, givenCODECOV_TOKENis optional?Options, recommended first:
secrettrigger on CODECOV_TOKEN (recommended): The audit already supports this trigger kind and the registry already marks the right repositories, so it is one JSON entry with no new code, covering Python and C#. The 15 repositories declaring the secret (the hub among them) each get a LETTER finding until their README carries the badge. No work in flight.Evidence: The issue says only
alwaysandpublishtrigger kinds exist, butsecretis already inspec/readme-sections.schema.json:117, andspec/audit_markdown.py:542evaluates it against registryrequiredSecrets(since #632, unused by any class).spec/secrets.json:39: a csharp or python repo carrying tests lists CODECOV_TOKEN. Inregistry/repos.jsonthe 15 repositories declaring it are exactly the 15 csharp or python ones. WORKFLOW.md D1.6 covers Python upload too. The hub's own README has no codecov shield.Blocks: none
ptr727 commentedon Nov 1, 2026
Maintainer answer (decision triage, 2026-11-01): Option 1: the coverage shield class uses the existing 'secret' trigger kind on CODECOV_TOKEN, so it applies to repositories whose registry requiredSecrets lists it. This is now work for the next burndown round.
ptr727 commentedon Nov 3, 2026
Decided (maintainer, 2026-11-03)
Both open points are settled. The issue is ready to implement.
coveragetrigger kind. It is true where the audit's existingcoverage_types(spec/audit.py) is non-empty, meaning a declaredcsharporpythontype whose tests exist in the tree. That predicate already decides whether a repo owescodecov.ymlandCODECOV_TOKEN. One predicate for all three keeps the badge, the config, and the token from disagreeing. It covers Python as well as .NET, so the issue's Python open point is answered too. Thesecretkind (trigger onCODECOV_TOKENbeing configured) and a registry opt-in were both declined. Under either one, a repo that should carry the badge is never told it owes one.readmefinding, like the other shield classes.spec/secrets.jsontypeMechanismsalready requiresCODECOV_TOKENof every such repo whatever it opts into, and the audit reports a missing token. So a badge rendering "unknown" points at a token defect already reported elsewhere. It is no reason to make the class optional.The issue's shape stands otherwise. The shield entry is
label"coverage",match/codecov/c/github/,in"Build and Distribution > Build Status", against the default branch. The schema's triggerkindenum inspec/readme-sections.schema.jsongainscoverage.🤖 Generated with Claude Code
ptr727 commentedon Nov 24, 2026
Released (2026-11-24): PR #4416 merged to develop at 0b1cf75; branch and worktree cleaned up, so this claim holds no files. The issue closes on promotion.
Backlog burndown claim (away run 2026-11-24, round 3, refill): branch
burndown/coverage-shield-class, issue #3692.Per the maintainer's decision of 2026-11-03: a new
coveragetrigger kind, true where the audit'scoverage_typesis non-empty, and a required class.Predicted files:
spec/readme-sections.json, the newcoverageshield class (label"coverage",match/codecov/c/github/,in"Build and Distribution > Build Status", default branch).spec/readme-sections.schema.json, the triggerkindenum gainingcoverage.spec/audit_markdown.py, the trigger evaluation besidealways,publishandsecret.spec/audit.py, handing the existingcoverage_typespredicate to the README check.spec/secret_names.py, which holds that predicate, is read, not edited.spec/readme-structure.md, a Coverage row in the "Shields" table.README.md, the hub's own Build Status badge, only where the hub's audit then owes one (the hub carries.codecov.yml).tests/test_audit_helpers.py, the new trigger for a repository with coverage types and one without.spec/project-types.json, thereadme.shieldsassert text near line 210 (granted 2026-11-24).AUDIT.mdnear line 95, the readme-structure dimension sentence: granted 2026-11-24 after the Fix the Defects a First Whole-Unit Read of AUDIT.md Section 0 Found, Including Three Checks That Cannot Fire #1613 group merged (PR Correct AUDIT.md Section 0's Account of What the Audit Checks #4413) and released it.Any other group needing one of these files waits for this branch to merge.
Add a Required Coverage Shield Class to the README Audit (#4416)