Skip to content

test: exclude generated grpc stubs from coverage, add fail-under gate, cover scope branch#8

Merged
ilpanich merged 3 commits into
mainfrom
claude/test-coverage-plan-84ph18
Jul 15, 2026
Merged

test: exclude generated grpc stubs from coverage, add fail-under gate, cover scope branch#8
ilpanich merged 3 commits into
mainfrom
claude/test-coverage-plan-84ph18

Conversation

@ilpanich

Copy link
Copy Markdown
Owner

Summary

Coverage was already ~96% with generated protobuf stubs counted. This aligns the coverage scope with the repo's existing exclusions and adds a regression gate.

Changes

  • pyproject.toml:
    • [tool.coverage.run] omit = ["*/grpc/gen/*"]grpc/gen is protoc output, already excluded from ruff (extend-exclude) and mypy (exclude); measuring generated stubs diluted the ratio.
    • [tool.coverage.report] fail_under = 96 regression gate (respected by pytest --cov).
  • tests/test_grpc_client.py: covers the check_access scope-on-wire branch (and records the request on the test servicer).

221 tests pass; coverage 97.97% with generated stubs excluded.

🤖 Generated with Claude Code

https://claude.ai/code/session_015W5NRYP2gev6xQ2JURfYZU


Generated by Claude Code

claude added 3 commits July 15, 2026 06:10
…der gate, cover scope branch

- pyproject.toml: [tool.coverage.run] omit grpc/gen (already excluded from
  ruff/mypy); [tool.coverage.report] fail_under=96 regression gate.
  Coverage 97.97% with generated stubs excluded.
- test_grpc_client: cover the check_access scope-on-wire branch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015W5NRYP2gev6xQ2JURfYZU
- Shorten the test method name to satisfy ruff E501 (line-length).
- Annotate the servicer's last_request as Optional and None-guard the scope
  assertion.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015W5NRYP2gev6xQ2JURfYZU
…26-3447)

Python 3.10/3.11 runners ship setuptools 79.0.1, which pip-audit flags
(PYSEC-2026-3447, fixed in 83.0.0), failing the Test job on those versions
(3.12/3.13 already ship a patched setuptools). Upgrade pip + setuptools before
the audit so the scan reflects a patched environment — resolves the finding
rather than suppressing it. Verified pip-audit reports no vulnerabilities.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015W5NRYP2gev6xQ2JURfYZU
@ilpanich
ilpanich merged commit 6391c7d into main Jul 15, 2026
16 checks passed
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