Skip to content

ci: exclude identity from coverage collection and gating (tests still run) - #1569

Merged
ktursunov merged 1 commit into
constructorfabric:mainfrom
cyberantonz:identity-no-coverage
Jul 2, 2026
Merged

ci: exclude identity from coverage collection and gating (tests still run)#1569
ktursunov merged 1 commit into
constructorfabric:mainfrom
cyberantonz:identity-no-coverage

Conversation

@cyberantonz

@cyberantonz cyberantonz commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What

Removes identity resolution from coverage entirely — collection, artifact upload, and both gates — while its tests keep running and keep gating the pipeline.

Mechanism mirrors the existing rust lint-only pattern (cover=false):

  • scripts/ci/components.py — identity gets cover: False (with rationale comment)
  • scripts/ci/changed.py — dotnet matrix entries now carry the cover flag
  • .github/workflows/ci.yml dotnet job — cover=false entries run the same restore/build/test cycle (unit + Testcontainers MariaDB) without --collect/merge/upload; a test failure still fails the job → still trips the coverage-gate's "Guard against incomplete reports"
  • gate --require derivation filters dotnet by .cover (same as rust), so an identity-only PR isn't flagged as a changed component with a missing report

coverage.py needs no changes:

  • overall gate: no dotnet report → identity lands in the skipped list
  • new-code gate: diff-cover omits files absent from every report, so changed .cs lines don't count
  • identity-only PR (zero XMLs): short-circuits to "No component reports — nothing to gate" (verified locally, exit 0)

Verified

  • YAML valid; matrix entry emits cover: False for identity
  • --require jq derivation with identity in the changed set → empty (excluded)
  • gate on an empty reports dir → PASS, exit 0
  • no other consumers of cobertura-dotnet-* artifacts in the repo

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • CI now runs tests for all .NET components, while collecting code coverage only for components that support it.
    • Coverage checks now align with the components that actually publish coverage results, preventing unrelated failures.
    • One .NET component is now treated as test-only, so it still gets tested without affecting coverage reporting.

… run)

Remove identity resolution from coverage entirely, mirroring the existing
rust lint-only mechanism: the identity component gets cover=false in
components.py, threaded through the dotnet matrix entry (changed.py).

In the dotnet CI job, cover=false entries run the same restore/build/test
cycle (unit + Testcontainers-MariaDB integration) WITHOUT XPlat collection,
dotnet-coverage merge, or the Cobertura upload — a test failure still fails
the job and therefore the coverage-gate's "Guard against incomplete
reports" step, so correctness still gates the pipeline.

Gate side: the --require derivation now filters dotnet entries by .cover
(same as rust), so an identity-only PR is not flagged as "changed component
produced no report". coverage.py needs no changes — with no dotnet report,
identity lands in the skipped list for the overall gate, diff-cover omits
files absent from every report for the new-code gate, and an identity-only
PR (zero XMLs) short-circuits to "No component reports — nothing to gate".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Anton Zelenov <antonz@constructor.tech>
@cyberantonz
cyberantonz requested a review from a team as a code owner July 2, 2026 16:55
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: edde71cb-4696-41b7-aa8d-4fc5d86cb722

📥 Commits

Reviewing files that changed from the base of the PR and between 181154d and 20a267f.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • scripts/ci/changed.py
  • scripts/ci/components.py

📝 Walkthrough

Walkthrough

This PR introduces a cover flag for dotnet CI matrix entries, defaulting to true, allowing components to opt out of coverage collection while still running tests. The identity component is marked cover: False. CI workflow and coverage-gate logic are updated to respect this flag for dotnet and python entries.

Changes

Optional Coverage Flag for Dotnet Components

Layer / File(s) Summary
Matrix entry cover field and component registry
scripts/ci/changed.py, scripts/ci/components.py
_matrix_entry now sets entry["cover"] for dotnet from component config (default True) with updated docstrings; the identity component is marked cover: False.
CI workflow gating and test-only path
.github/workflows/ci.yml
Dotnet job renamed and documented, Cobertura collection gated on matrix.entry.cover, a new "Test (no coverage)" step added for cover=false entries, Cobertura upload made conditional, and the coverage-gate required-component filter now applies select(.cover) to dotnet and python entries.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: mitasovr

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main CI change: identity is excluded from coverage while tests still run.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ktursunov
ktursunov merged commit 84862c5 into constructorfabric:main Jul 2, 2026
10 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