Skip to content

ci(coverage): measure and report coverage on the Gate, matching ci.yml - #556

Merged
stranske merged 1 commit into
mainfrom
claude/coverage-soft-gate-reporting
Aug 26, 2026
Merged

ci(coverage): measure and report coverage on the Gate, matching ci.yml#556
stranske merged 1 commit into
mainfrom
claude/coverage-soft-gate-reporting

Conversation

@stranske

@stranske stranske commented Aug 26, 2026

Copy link
Copy Markdown
Owner

What

coverage: true and enable-soft-gate: true on the Gate, plus coverage-min: '80' to match ci.yml.

Why this is drift, not a decision

The Gate carried coverage: false while ci.yml has had coverage: true all along. git log -S traces the Gate's false to the M0-001 scaffolding commit that created the workflow — a template default nobody revisited.

Compare stranske/Counter_Risk, which carries an explicit rationale in the commit that set it ("PR Gate is optimized for fast feedback. Full coverage enforcement runs on main"). That one is judgement and is being left alone. This one isn't.

The capability is already proven here

This repo's own ci.yml payload measures 87.48% over 10,805 statements. Turning it on for the Gate exposes a number that already exists — it asks for no new work.

Risk: none

coverage_trend.py runs with --soft and always exits 0. It cannot fail a PR or block a merge. It adds the trend artifact, the hotspot table, and something for Maint Coverage Guard to read.

Why coverage-min is set

Without it the Gate silently falls back to the reusable workflow's default of 70, while ci.yml uses 80 — two surfaces reporting different verdicts about the same repository. At 87.48% this reports a pass rather than arriving red.

Sequencing

Deliberately after the repaired reporter reached this repo — verified that main's tools/coverage_trend.py carries BASELINE_KEYS and _resolve_baseline (stranske/Workflows#3251, #3254). Before that, an absent baseline rendered as 0.00% and every run displayed a large fake improvement.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

    • Enabled code coverage measurement with an 80% target.
    • Added soft-gate reporting so coverage results are visible without blocking changes.
  • Chores

    • Excluded local GitNexus cache files from version control.

The Gate carried `coverage: false` and `enable-soft-gate: false` while ci.yml has had
`coverage: true` all along. That split was never a decision: `git log -S` traces the Gate's
`false` to the M0-001 scaffolding commit that created the workflow, so it is a template
default that nobody revisited -- not a considered trade-off like stranske/Counter_Risk's,
which carries an explicit "PR Gate is optimized for fast feedback" rationale.

The capability is already proven here: this repo's ci.yml payload measures 87.48% over
10,805 statements, so turning it on for the Gate exposes a number that already exists rather
than asking for new work.

Report-only. coverage_trend.py runs with --soft and always exits 0, so this cannot fail a PR
or block a merge; it adds the trend artifact, the hotspot table, and something for Maint
Coverage Guard to read.

coverage-min set to 80 to match ci.yml. Without it the Gate silently falls back to the
reusable workflow's default of 70, so the two surfaces would report different verdicts about
the same repository. At 87.48% this reports a pass rather than arriving red.

Sequenced AFTER the repaired reporter reached this repo -- verified that main's
tools/coverage_trend.py carries BASELINE_KEYS and _resolve_baseline (stranske/Workflows#3251,
#3254). Before that, an absent baseline rendered as 0.00% and every run displayed a large
fake improvement.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@agents-workflows-bot

Copy link
Copy Markdown
Contributor

Workflow source needed

PR #556 needs either a linked GitHub issue or one valid non-issue Workflow Source before PR metadata automation can manage it safely.

Please do one of:

  • Add <!-- meta:issue:123 --> or a normal Closes #123 / Related to #123 line.
  • Check one Workflow Source option in the PR body.
  • Add a hidden marker such as <!-- workflow-source:local_request -->, <!-- workflow-source:manual_remote -->, <!-- workflow-source:review_followup -->, <!-- workflow-source:sync_campaign -->, or <!-- workflow-source:dependabot -->.
  • Add a workflow source label such as workflow:source-direct-pr, workflow:source-local-request, workflow:source-review-followup, workflow:source-sync, or workflow:no-automation.

Once a valid source is present, this warning will not be reposted.

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6ae01c0f-8cd7-490a-9178-2517fa092c99

📥 Commits

Reviewing files that changed from the base of the PR and between 3a85c48 and 3f23658.

📒 Files selected for processing (2)
  • .github/workflows/pr-00-gate.yml
  • .gitignore

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.


📝 Walkthrough

Walkthrough

The Gate workflow now measures Python coverage with an 80% soft threshold and non-blocking reporting. The repository also ignores the local .gitnexus cache.

Changes

Coverage gate

Layer / File(s) Summary
Configure Python coverage gate
.github/workflows/pr-00-gate.yml
Coverage measurement uses an 80% minimum threshold. Soft-gate reporting is enabled, and coverage remains non-blocking.

Local cache exclusion

Layer / File(s) Summary
Ignore GitNexus cache
.gitignore
The repository ignores and documents the local .gitnexus cache.

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

Merge Risk: ⚪ Minimal · up to 3f236

This change enables non-blocking coverage reporting and aligns the Gate threshold with the repository’s existing CI settings; no actionable merge-blocking risk remains after normal checks and review.

🚥 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 clearly and concisely describes the main change: enabling coverage measurement and reporting in the Gate workflow, with alignment to ci.yml.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/coverage-soft-gate-reporting

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

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Workflow state fingerprint for Agents Gate Followups. Do not edit.

@stranske
stranske merged commit f4fd6df into main Aug 26, 2026
30 checks passed
@stranske
stranske deleted the claude/coverage-soft-gate-reporting branch August 26, 2026 03:31
@stranske stranske added the verify:compare Runs verifier comparison mode after merge label Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Workflow state fingerprint for Agents Verifier. Do not edit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

verify:compare Runs verifier comparison mode after merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant