Skip to content

[AAASM-4001] 🔧 (ci): Align Codecov measured scope to SonarCloud#202

Merged
Chisanan232 merged 1 commit into
masterfrom
v0.1.0/AAASM-4001/config/align_codecov_scope
Jul 2, 2026
Merged

[AAASM-4001] 🔧 (ci): Align Codecov measured scope to SonarCloud#202
Chisanan232 merged 1 commit into
masterfrom
v0.1.0/AAASM-4001/config/align_codecov_scope

Conversation

@Chisanan232

Copy link
Copy Markdown
Contributor

Description

Adds agent_assembly/proto/** to codecov.yml ignore so Codecov measures the
same file set as SonarCloud's sonar.sources, closing the residual ~2pt headline
coverage gap under Epic AAASM-3999.

SonarCloud drops the protoc-generated proto tree from analysis via
sonar.exclusions=agent_assembly/proto/**, but Codecov was still counting its
near-zero generated-code coverage (*_pb2.py / *_pb2_grpc.py, 0–58%), dragging
the Codecov number ~1.5pt below Sonar. The existing types.py ignore (AAASM-3962,
mirroring sonar.coverage.exclusions) is preserved.

Measured locally (717 passed, --cov=agent_assembly):

Scope Lines Coverage
Codecov before 3904/4199 92.97%
Codecov after (proto + types.py ignored) 3822/4042 94.56%

This is a Codecov-only view change: .coveragerc and the shared coverage_*.xml
artifact (also read by SonarCloud/Coveralls) are untouched, so no real coverage of
hand-written code is altered and SonarCloud's Quality Gate is unaffected.

Type of Change

  • 🔧 Bug fix

Breaking Changes

  • No

Related Issues

  • Related JIRA ticket: AAASM-4001 (Story), AAASM-4002 (Subtask), Epic AAASM-3999
  • Related GitHub issues: N/A

Testing

  • Manual testing performed — local pytest test/ --cov=agent_assembly reproduces the pre/post denominators above; codecov.yml validated as parseable YAML.
  • No tests required (explain why) — config-only change to Codecov's report scope; no runtime code touched.

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Documentation updated if needed (inline comment in codecov.yml explains the mirror)
  • All tests passing

Expected post-fix

Codecov moves 92.97% → ~94.56%, converging with SonarCloud 95.0% within a small
documented tolerance (~0.4pt residual is Sonar's own line/branch coverage engine,
not a scope difference).

Closes AAASM-4001

🤖 Generated with Claude Code

https://claude.ai/code/session_01UTHd8q87SpWGe5he9xFZWN

protoc-generated agent_assembly/proto/** is dropped from SonarCloud analysis
via sonar.exclusions, but Codecov still counted its near-zero generated-code
coverage. Add it to codecov.yml ignore (alongside the existing types.py) so
Codecov measures the same file set as sonar.sources, converging the headline
coverage % without touching the shared coverage_*.xml or Sonar's Quality Gate.

Closes AAASM-4002
Refs AAASM-4001, AAASM-3999
@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Chisanan232

Copy link
Copy Markdown
Contributor Author

Claude Code — PR review

CI state: GREEN. gh pr checks 202 reports 17 passed / 0 failed (CI, CodeQL, SonarCloud, codecov/patch, pip-audit all SUCCESS; e2e jobs SKIPPED as designed). mergeStateStatus=BLOCKED with mergeable=MERGEABLE reflects only the required ≥1 Pioneer approval, not a failing check. No red CI, so no fix was needed.

Scope verdict: MATCHES. The diff is exactly what AAASM-4001 specifies — add agent_assembly/proto/** to codecov.yml ignore (preserving the existing agent_assembly/types.py from AAASM-3962), mirroring sonar.exclusions=agent_assembly/proto/** and sonar.coverage.exclusions=agent_assembly/types.py. The generated protobuf tree (*_pb2.py / *_pb2_grpc.py, ~5 files) was counted by Codecov but dropped by Sonar, which is the documented root cause of the 92.97% → ~94.56% convergence toward Sonar 95.0%. The ticket's explicit design choice — codecov.yml ignore over .coveragerc [run] omit, so the change scopes to Codecov's view only and leaves the shared coverage_*.xml untouched — is honored: .coveragerc is unchanged (still omits only __main__.py).

Side-effect assessment: SAFE. Single-file, config-only diff (codecov.yml, +9/−4). YAML parses cleanly (ignore = ['agent_assembly/types.py', 'agent_assembly/proto/**']). The glob matches the real generated path (agent_assembly/proto/common_pb2.py, policy_pb2_grpc.py, …). The added ignore only narrows Codecov's denominator; the shared coverage_*.xml, SonarCloud (sonar.sources/QG), Coveralls, and the pytest suite are all untouched — no hand-written code coverage is altered. License/validate untouched, MIT respected.

Ready to merge? YES — CI fully green, diff matches the ticket precisely, no side effects on the shared coverage artifact or other consumers. Only the standard ≥1 Pioneer approval remains (I do not approve or merge).

@Chisanan232 Chisanan232 merged commit 63536bf into master Jul 2, 2026
21 checks passed
@Chisanan232 Chisanan232 deleted the v0.1.0/AAASM-4001/config/align_codecov_scope branch July 2, 2026 06:52
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