Skip to content

feat: add non-gating pytest-cov coverage reporting to CI#165

Open
Copilot wants to merge 2 commits intomainfrom
copilot/add-test-coverage-reporting
Open

feat: add non-gating pytest-cov coverage reporting to CI#165
Copilot wants to merge 2 commits intomainfrom
copilot/add-test-coverage-reporting

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

Summary

Closes #90

No coverage measurement existed — no visibility into which modules lacked tests, and no way for agents to detect coverage holes after changes. Adds report-only coverage via pytest-cov (prints to CI logs, no fail-under threshold).

Changes

  • pyproject.toml — adds pytest-cov>=5.0 to [project.optional-dependencies] dev; adds [tool.coverage.run] and [tool.coverage.report] config sections
  • Makefile — updates test target: pytest --cov=contextweaver --cov-report=term-missing -q
  • .github/workflows/ci.yml — updates Test step with the same --cov flags

Coverage config:

[tool.coverage.run]
source = ["contextweaver"]
omit = ["*/__pycache__/*"]

[tool.coverage.report]
show_missing = true
exclude_lines = [
    "pragma: no cover",
    "if TYPE_CHECKING:",
    "if __name__",
]

Current baseline: 86% total coverage across 536 tests.

Checklist

  • Tests added or updated for every new/changed public function
  • make ci passes locally (fmt + lint + type + test + example + demo)
  • CHANGELOG.md updated under ## [Unreleased]
  • Docstrings added for all new public APIs (Google-style)
  • Every modified module stays ≤ 300 lines (or a decomposition issue is linked above)
  • Related issue linked in the summary above
  • Agent-facing docs updated if pipeline, API, or conventions changed

Notes for reviewers

Pure infra change — no library code touched. No --cov-fail-under is set intentionally; this is visibility-only and must not gate CI green status.

Copilot AI linked an issue Apr 14, 2026 that may be closed by this pull request
6 tasks
Copilot AI changed the title [WIP] Add test coverage reporting to CI without gating feat: add non-gating pytest-cov coverage reporting to CI Apr 14, 2026
Copilot AI requested a review from dgenio April 14, 2026 09:00
@dgenio dgenio marked this pull request as ready for review April 14, 2026 09:23
@dgenio dgenio requested review from Copilot April 14, 2026 09:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds non-gating code coverage reporting to the project’s test runs to improve visibility into untested areas without changing CI pass/fail criteria.

Changes:

  • Add pytest-cov to the dev optional dependency group and introduce baseline coverage.py configuration in pyproject.toml.
  • Update make test to run pytest with --cov=contextweaver --cov-report=term-missing.
  • Update GitHub Actions CI Test step to run pytest with the same coverage flags.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
pyproject.toml Adds pytest-cov dev extra and configures coverage run/report behavior.
Makefile Runs tests with terminal missing-line coverage output.
.github/workflows/ci.yml Enables coverage reporting in CI logs while keeping tests non-gating.

Comment thread Makefile
Comment on lines 12 to +13
test:
pytest -q
pytest --cov=contextweaver --cov-report=term-missing -q
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds non-gating coverage visibility to the project’s test workflows by wiring pytest-cov into local (make test) and CI pytest invocations, plus adding baseline coverage.py configuration in pyproject.toml.

Changes:

  • Add pytest-cov to the dev extra and configure coverage run/report settings in pyproject.toml.
  • Update make test to emit terminal missing-line coverage output for contextweaver.
  • Update CI test step to run pytest with the same coverage flags.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
pyproject.toml Adds pytest-cov dev dependency and coverage configuration sections.
Makefile Changes test target to run pytest with coverage reporting.
.github/workflows/ci.yml Updates CI test command to include coverage reporting flags.

Comment thread Makefile

test:
pytest -q
pytest --cov=contextweaver --cov-report=term-missing -q
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.

[infra] Add test coverage reporting to CI (non-gating)

3 participants