Skip to content

feat: per-file coverage delta reporting, Codecov banners, and agent test requirements#44

Merged
nitrocode merged 2 commits into
mainfrom
copilot/ensure-coverage-per-file-modified
Apr 23, 2026
Merged

feat: per-file coverage delta reporting, Codecov banners, and agent test requirements#44
nitrocode merged 2 commits into
mainfrom
copilot/ensure-coverage-per-file-modified

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

PRs currently lack per-file coverage visibility and there's no enforcement preventing coverage regressions. Agents also had no explicit requirement to run tests before completing a session.

Changes

codecov.yml (new)

  • Enables per-file delta in every PR comment (layout: "reach, diff, flags, files, footer")
  • Sets threshold: 0% on both project and patch status checks — any negative delta fails the PR

.github/workflows/unit-tests.yml

  • Adds token: ${{ secrets.CODECOV_TOKEN }} for reliable status check posting
  • Adds flags: unit to namespace coverage (extensible if E2E coverage is added later)
  • Adds verbose: true

AGENTS.md

  • Adds explicit agent requirements: run test:ci + test:e2e before finishing any session; coverage must not decrease; tests must assert real behaviour, not just pad numbers
  • Adds two "What NOT to Do" entries matching the above

README.md

  • Adds a Coverage section with Codecov icicle and sunburst SVG graphs showcasing unit-test coverage by file; notes E2E coverage is reflected by the existing workflow badge

- Add codecov.yml: per-file delta PR comments, fail if coverage drops (threshold 0%)
- Update unit-tests.yml: add CODECOV_TOKEN, flags=unit, verbose=true
- Update AGENTS.md: require unit+e2e tests to pass on every agent run; no coverage decrease
- Update README.md: add Coverage section with Codecov icicle/sunburst graphs + E2E badge note

Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/57a4f4d2-9ed0-4f3d-8448-5f4014bc3eab

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
@nitrocode nitrocode marked this pull request as ready for review April 23, 2026 16:01
@nitrocode nitrocode self-requested a review as a code owner April 23, 2026 16:01
@nitrocode nitrocode enabled auto-merge (squash) April 23, 2026 16:01
@github-actions
Copy link
Copy Markdown
Contributor

👁️ PR Preview

🚀 Open Preview

Deployed from commit 6b4b38e · Updates on every push to this PR
(Preview is removed automatically when the PR is closed.)

@nitrocode nitrocode merged commit 62df522 into main Apr 23, 2026
3 checks passed
@nitrocode nitrocode deleted the copilot/ensure-coverage-per-file-modified branch April 23, 2026 16:02
github-actions Bot added a commit that referenced this pull request Apr 23, 2026
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