Skip to content

pyamber measures no branch coverage #8039

Description

@aglinxinyuan

Task Summary

pyamber measures no branch coverage at all. build.yml runs pytest --cov=src/main/python --cov-report=xml without --cov-branch, and there is no coverage configuration anywhere in the repo — no .coveragerc, no setup.cfg section, no [tool.coverage] in amber/pyproject.toml.

The consequence is that a half-taken if in any Python file reads as fully covered. coverage.py records only whether each statement executed, so the emitted coverage.xml carries no condition-coverage data and Codecov has no partial-line information for the pyamber flag — while the amber flag (JaCoCo) reports branches normally. The two halves of the same service are measured to different standards.

Measured on 97e3585a6a: turning branch coverage on surfaces 62 partial lines and 80 untaken branch arms in pyamber that are invisible today.

This also affects contributors directly. Because nothing is configured, a local pytest --cov and the CI run agree today only by accident — and a fix applied in CI alone would split them, which is how a line comes to look green on a laptop and partial on Codecov.

Task Type

  • DevOps / Deployment / CI
  • Testing / QA

Was this issue authored using generative AI tooling?

Generated-by: Claude Code (Opus 5)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions