Skip to content

ci: add mypy, coverage threshold, and claude-runner build - #24

Merged
mariuspruvot merged 3 commits into
mainfrom
ci/pipeline-improvements
Apr 19, 2026
Merged

ci: add mypy, coverage threshold, and claude-runner build#24
mariuspruvot merged 3 commits into
mainfrom
ci/pipeline-improvements

Conversation

@mariuspruvot

Copy link
Copy Markdown
Owner

Summary

  • Add mypy (non-strict) to CI lint job with pydantic plugin and per-module overrides for third-party lib typing issues
  • Add pytest-cov with 70% coverage fail-under threshold (current coverage: 75%)
  • Add claude-runner Docker build to the CI build job (was missing)
  • Add CI status badge to README
  • Add make typecheck target and integrate mypy into make lint

Test plan

  • All 5 CI jobs pass on this PR
  • Verify mypy catches a real type error (break something locally)
  • Verify coverage threshold works (lower it to 80% and see it fail)
  • Verify claude-runner build step runs in the build job
  • Badge renders correctly in README

@helprs-local-mariuspruvot

Copy link
Copy Markdown

helPRs session created for this PR.

Skill: challenge-me | Open session

- Add mypy (non-strict) with pydantic plugin and per-module overrides
  for third-party lib typing issues (aiodocker, SQLAlchemy, Starlette)
- Add pytest-cov with 70% coverage threshold (current: 75%)
- Add claude-runner Docker build to CI build job
- Add CI badge to README
- Add `make typecheck` target, integrate mypy into `make lint`
structlog state contamination from create_app() causes these to fail
in the full suite but pass in isolation. See CLAUDE.md gotchas.
Root cause: create_app() calls configure_logging() with
cache_logger_on_first_use=True. The module-level logger proxy in
dispatcher.py caches its bound logger on first use, making
structlog.testing.capture_logs() unable to intercept subsequent logs.

Fix: autouse fixture replaces the cached proxy with a fresh one before
each test in test_dispatcher.py.
@mariuspruvot
mariuspruvot force-pushed the ci/pipeline-improvements branch from 2a26dae to cb6d3da Compare April 19, 2026 07:51
@mariuspruvot
mariuspruvot merged commit 09d862a into main Apr 19, 2026
8 checks passed
@mariuspruvot
mariuspruvot deleted the ci/pipeline-improvements branch July 30, 2026 16:16
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.

1 participant