Skip to content

fix(coverage): honor configured warning drop - #3262

Merged
stranske merged 2 commits into
mainfrom
codex/fix-coverage-guard-warn-drop
Aug 26, 2026
Merged

stranske merged 2 commits into
mainfrom
codex/fix-coverage-guard-warn-drop

Conversation

@stranske

Copy link
Copy Markdown
Owner

Why

Ready PR #542 revealed that the shared coverage guard exposed warn_drop in its baseline contract but still opened a breach issue for any value below the baseline.

Change

  • apply the configured drop allowance before opening or updating a breach issue;
  • keep an existing breach open until coverage reaches the full baseline;
  • add a focused threshold test.

Validation

  • python3 -m pytest tests/test_coverage_guard.py -q (86 passed)
  • deliberate-break proof: the new threshold test is red on origin/main and green on this head.

Consumer delivery remains owned by Maint 68/71; this PR changes only the Workflows source.

@stranske-keepalive

Copy link
Copy Markdown
Contributor

Workflow source needed

PR #3262 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.

@stranske-keepalive

stranske-keepalive Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: 9e65213
Latest Runs: ⏳ pending — Gate
Required contexts: summary
Required: core tests (3.12): ⏳ pending, core tests (3.13): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 1

Coverage Trend

Metric Value
Current 76.72%
Baseline 85.00%
Delta -8.28%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/repo_review_round1_runner.py 39.0% 133
scripts/prune_agent_stubs.py 39.7% 26
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 45.8% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

Low Coverage Files (<50.0%)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/repo_review_round1_runner.py 39.0% 133
scripts/prune_agent_stubs.py 39.7% 26
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 45.8% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

No scope information available

Tasks

  • No tasks defined

Acceptance criteria

  • No acceptance criteria defined

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 2 minutes.

View limit details

Limit details: You’ve used the included review currently available. Your 78 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ce6b1f48-3815-4b35-88d5-845cd498e8c4

📥 Commits

Reviewing files that changed from the base of the PR and between 2ca9251 and 7c551c8.

📒 Files selected for processing (5)
  • docs/INTEGRATION_GUIDE.md
  • docs/ci/WORKFLOWS.md
  • tests/docs/test_workflow_source_docs.py
  • tests/test_coverage_guard.py
  • tools/coverage_guard.py

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 738db5c341

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/coverage_guard.py
@stranske

Copy link
Copy Markdown
Owner Author

Addressed the active coverage-guard documentation finding in 7c551c8: the operator-facing contract now states the default 1.0-point warn_drop, strict breach boundary (current < baseline - warn_drop), intentional below-baseline no-op, and full-baseline consecutive-sample recovery rule. Added a source-doc contract test; python3 -m pytest tests/docs/test_workflow_source_docs.py tests/test_coverage_guard.py -q passes (91).

@stranske
stranske merged commit 9e65213 into main Aug 26, 2026
50 checks passed
@stranske
stranske deleted the codex/fix-coverage-guard-warn-drop branch August 26, 2026 02:42
@stranske stranske added the verify:compare Compare multiple LLM evaluations label Aug 26, 2026
@stranske
stranske deployed to agent-high-privilege August 26, 2026 02:43 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Provider Comparison Report

Provider Summary

Provider Model Verdict Confidence Summary
openai gpt-5.6-terra PASS 91% The coverage-guard change applies warn_drop to the breach-opening threshold, so coverage within the configured allowed drop no longer opens or updates a breach issue. It separately preserves the fu...
anthropic claude-sonnet-5 PASS 55% The PR is scoped to fix the coverage guard's handling of the configured warn_drop allowance, per the acceptance criteria: applying the drop allowance before opening/updating breach issues, keeping...
📋 Full Provider Details (click to expand)

openai

  • Model: gpt-5.6-terra
  • Verdict: PASS
  • Confidence: 91%
  • Scores:
    • Correctness: 9.0/10
    • Completeness: 9.0/10
    • Quality: 8.0/10
    • Testing: 8.0/10
    • Risks: 8.0/10
  • Summary: The coverage-guard change applies warn_drop to the breach-opening threshold, so coverage within the configured allowed drop no longer opens or updates a breach issue. It separately preserves the full baseline as the closure threshold, meaning an already-open breach remains open until coverage reaches the baseline rather than merely the warning-adjusted threshold. The focused coverage-guard test addition covers the new threshold behavior and would distinguish this implementation from the prior unconditional-below-baseline behavior. The implementation is small, readable, and consistent with the stated acceptance criteria.

anthropic

  • Model: claude-sonnet-5
  • Verdict: PASS
  • Confidence: 55%
  • Scores:
    • Correctness: 7.0/10
    • Completeness: 7.0/10
    • Quality: 7.0/10
    • Testing: 6.0/10
    • Risks: 6.0/10
  • Summary: The PR is scoped to fix the coverage guard's handling of the configured warn_drop allowance, per the acceptance criteria: applying the drop allowance before opening/updating breach issues, keeping breaches open until full baseline, and adding a focused threshold test. The file change summary (tools/coverage_guard.py +13/-1, tests/test_coverage_guard.py +5/-0) is consistent with a small, targeted fix and test addition. However, the actual diff content for coverage_guard.py was truncated in the review context, so the precise implementation logic could not be directly inspected—only inferred from the change size and CI success. CI results reported (pr-00-gate, pr-11-ci-smoke, selftest-ci) all show successful Python test runs, which is consistent with acceptance criteria being met, but does not provide direct confirmation of the '86 passed' pytest count or the specific red/green deliberate-break proof. Given the otherwise strong CI signal and consistent scope of changes, this is assessed as a likely PASS, with residual uncertainty due to incomplete visibility into the core logic diff. Additional unrelated changes (retry script hardening, merge-sync PR script, health-68 workflow refactor) are included in the same PR, which is somewhat unusual for a narrowly-scoped bug fix but do not appear to introduce regressions based on the tests added.
  • Concerns:
    • The full diff for tools/coverage_guard.py (the core fix implementing the warn_drop threshold logic) was truncated in the provided context, making it impossible to fully verify the exact logic change against the acceptance criteria (applying configured drop allowance, keeping breach open until full baseline reached).
    • No visibility into the actual pytest run output confirming '86 passed' — reliance is on CI summary (selftest-ci 'Python Tests: success') rather than direct evidence of the specific test count or the deliberate-break proof (red on main, green on head).
    • tests/test_coverage_guard.py only adds 5 lines, which is a small, focused addition consistent with 'a focused threshold test' as required, but its exact assertions are not visible in the excerpt.
    • The bulk of the diff content in this PR (github-api-with-retry.js, maint71_merge_sync_prs.js, health-68 workflow refactor) appears unrelated to the stated coverage-guard scope, suggesting this PR may bundle multiple unrelated changes, which slightly obscures focus on the stated acceptance criteria.

Agreement

  • Verdict: PASS (all providers)
  • Quality: scores within 1 point (avg 7.5/10, range 7.0-8.0)

Disagreement

Dimension openai anthropic
Correctness 9.0/10 7.0/10
Completeness 9.0/10 7.0/10
Testing 8.0/10 6.0/10
Risks 8.0/10 6.0/10

Unique Insights

  • openai: The coverage-guard change applies warn_drop to the breach-opening threshold, so coverage within the configured allowed drop no longer opens or updates a breach issue. It separately preserves the full baseline as the closure threshold, meaning an already-open breach remains open until coverage rea...
  • anthropic: The full diff for tools/coverage_guard.py (the core fix implementing the warn_drop threshold logic) was truncated in the provided context, making it impossible to fully verify the exact logic change against the acceptance criteria (applying configured drop allowance, keeping breach open until full baseline reached).; No visibility into the actual pytest run output confirming '86 passed' — reliance is on CI summary (selftest-ci 'Python Tests: success') rather than direct evidence of the specific test count or the deliberate-break proof (red on main, green on head).; tests/test_coverage_guard.py only adds 5 lines, which is a small, focused addition consistent with 'a focused threshold test' as required, but its exact assertions are not visible in the excerpt.; The bulk of the diff content in this PR (github-api-with-retry.js, maint71_merge_sync_prs.js, health-68 workflow refactor) appears unrelated to the stated coverage-guard scope, suggesting this PR may bundle multiple unrelated changes, which slightly obscures focus on the stated acceptance criteria.

🔍 LangSmith Traces

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

Labels

codex codex-automation verify:compare Compare multiple LLM evaluations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants