From 20c8315870c9f99b7623b03df7435888867a80b9 Mon Sep 17 00:00:00 2001 From: Bryant Date: Thu, 2 Jul 2026 09:36:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=A7=20(config):=20Add=20codecov.ym?= =?UTF-8?q?l=20ignore=20mirroring=20sonar=20coverage=20exclusions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Codecov had no ignore while sonar.coverage.exclusions excludes agent_assembly/types.py, so the two tools measured different scopes. Add the matching Codecov ignore so both share one coverage denominator. Refs AAASM-3962 --- codecov.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/codecov.yml b/codecov.yml index 4f1e1066..4e404416 100644 --- a/codecov.yml +++ b/codecov.yml @@ -9,3 +9,10 @@ coverage: default: target: 90% threshold: 5% + +# Mirror sonar.coverage.exclusions (sonar-project.properties): exclude the same +# path from Codecov's coverage denominator so both tools measure the identical +# scope. Without this, Codecov counts agent_assembly/types.py while SonarCloud +# does not, producing a spurious cross-tool coverage delta (AAASM-3962). +ignore: + - "agent_assembly/types.py" From 09cc9cc6bb79785b3ac8031f2b3c8a00ae3e8c3a Mon Sep 17 00:00:00 2001 From: Bryant Date: Thu, 2 Jul 2026 09:37:09 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9D=20(config):=20Document=20share?= =?UTF-8?q?d=20coverage=20report=20source=20for=20Codecov=20&=20Sonar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Record that both tools consume the same pytest-cov coverage_*.xml set and that any residual coverage-% delta is engine-level, not a regression, and note the codecov.yml/sonar exclusion lockstep. Refs AAASM-3962 --- sonar-project.properties | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index df089def..d117c694 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -20,12 +20,19 @@ sonar.sources=agent_assembly/ sonar.tests=test/ # Python test coverage settings +# SonarCloud and Codecov consume the SAME coverage report set: the pytest-cov +# `coverage_*.xml` files produced from `.coveragerc`. SonarCloud globs them via +# reportPaths below (in CI it scans the downloaded `coverage_all-test.xml`); +# Codecov uploads the same per-suite files. Both are fed one coverage source, +# so any residual percentage delta is engine-level (SonarCloud's analyzer vs +# coverage.py line counting), not a scope mismatch or regression (AAASM-3962). sonar.python.file.suffixes=.py sonar.python.version=3.12,3.13 sonar.python.coverage.reportPaths=coverage*.xml #sonar.coverage.python.reportPaths=coverage*.xml -# Ignore by test coverage +# Ignore by test coverage. Kept in lockstep with the `ignore` list in +# codecov.yml so both tools exclude the same paths from their denominator. sonar.coverage.exclusions=agent_assembly/types.py # Ignore by general analyze