Skip to content

fix(health-digests): close prior daily digests (pr-review, runaway, docs-health) instead of accumulating - #1212

Merged
don-petry merged 5 commits into
mainfrom
fix/pr-review-health-digest-dedup
Jul 14, 2026
Merged

don-petry merged 5 commits into
mainfrom
fix/pr-review-health-digest-dedup

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Problem

daily-pr-review-health.yml creates two date-stamped digest issues unconditionally each run:

  • PR Review Agent — failures detected <date> — 20 open accumulated
  • Runaway PR candidate(s) detected <date> — 6 open accumulated

Same dedup bug as the fleet-monitor digest and ContentTwin audit.

Fix

Before creating today's digest, close any prior open digests with the matching title prefix (health-check label). Only the current snapshot stays open; history remains in closed issues.

Validation

YAML parses; both github-scripts node --check clean (async-wrapped); yamllint clean (repo max 250).

Companion to #1204 (fleet-monitor digest + fleet-tracker auto-close). Together they clear the health-check-only backlog. The remaining 3 'Docs Health Check' + 2 stub-drift issues are separate, lower-volume sources.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Juznz5V6su81ffSND8fg7s

Both digest steps ('PR Review Agent — failures detected <date>' and 'Runaway PR
candidate(s) detected <date>') embed the date in the title, so issues.create ran
every day — 20 + 6 open issues had accumulated. Close prior open digests (matching
title prefix, health-check label) before opening today's snapshot. Same pattern as
the fleet-monitor digest fix (#1204).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Juznz5V6su81ffSND8fg7s
Copilot AI review requested due to automatic review settings July 14, 2026 03:17
@don-petry
don-petry requested a review from a team as a code owner July 14, 2026 03:17
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@donpetry-bot, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 48 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 33746577-851c-454a-9326-18cfdf22eed2

📥 Commits

Reviewing files that changed from the base of the PR and between 5392425 and 2e836a0.

📒 Files selected for processing (2)
  • .github/workflows/daily-pr-review-health.yml
  • .github/workflows/docs-health-check.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pr-review-health-digest-dedup

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.

@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

This was referenced Jul 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the repo’s daily PR review health workflow to prevent date-stamped “digest” issues from accumulating by proactively closing older open digests before creating the current day’s snapshot.

Changes:

  • Close prior open “PR Review Agent — failures detected …” digest issues before creating today’s digest.
  • Close prior open “Runaway PR candidate(s) detected …” digest issues before creating today’s digest.
  • Normalize digest title construction via shared titlePrefix variables.

Comment thread .github/workflows/daily-pr-review-health.yml
Comment thread .github/workflows/daily-pr-review-health.yml
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) July 14, 2026 03:23
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 14, 2026
'Docs Health Check — stale files detected <date>' embeds the date in its title,
creating a fresh issue each run. Close prior open digests before opening today's,
matching the other digest dedup fixes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Juznz5V6su81ffSND8fg7s
@don-petry don-petry changed the title fix(pr-review-health): close prior daily digests instead of accumulating (26 stale) fix(health-digests): close prior daily digests (pr-review, runaway, docs-health) instead of accumulating Jul 14, 2026
@don-petry
don-petry force-pushed the fix/pr-review-health-digest-dedup branch from 7b8b152 to e75b5d2 Compare July 14, 2026 03:29
donpetry-bot
donpetry-bot previously approved these changes Jul 14, 2026

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: e75b5d258de8fab2f47b96980ffcb1db7791ddf9
Review mode: triage-approved (single reviewer)

Summary

Confirms the triage assessment. The PR fixes digest-issue accumulation in three workflow steps (PR-review failures, runaway-PR candidates, docs-health stale files) by closing prior open digests — matched on constant title prefix plus both 'health-check' and 'automated-report' labels — before creating today's date-stamped issue. Same proven pattern as the fleet-monitor fix (#1204). Logic is safe: constant title prefixes (no untrusted interpolation), a !p.pull_request guard, and per-issue try/catch so a failed close cannot break the run.

Linked issue analysis

No linked issue (closingIssuesReferences is empty). The PR is a companion to #1204 and the body documents the problem directly: 20 + 6 open digest issues had accumulated from date-stamped titles. The diff substantively implements the described fix in all three digest-creating steps.

Findings

  • Both Copilot review threads (scope the prior-digest search to health-check,automated-report, not just health-check) were addressed in the dev-lead follow-up commit and are marked resolved. The final diff uses the dual-label filter in all three blocks.
  • No security concerns: constant title prefixes, no shell interpolation of untrusted data, no permission escalation (workflows already create issues, so issues: write covers the close). CodeQL (actions), gitleaks, AgentShield, SonarCloud, and shellcheck all pass.
  • MCP secret-scanning tool not available in this environment; relying on the passing gitleaks CI check.
  • Minor (non-blocking): prior digests are only closed when a new digest is created, so if failures stop occurring the last digest stays open — arguably intended, since an open digest still reflects the latest unresolved snapshot.
  • The two CANCELLED dev-lead / dispatch and dev-lead / ci-relay check runs are dev-lead agent automation artifacts superseded by later pushes, not validation checks.

CI status

All validation checks green: CI (Lint, ShellCheck, Agent Security Scan, gitleaks, Compile agentic workflows), CodeQL (actions + python), SonarCloud quality gate, AgentShield, Lint suite (shellcheck, bats, template-drift, validate-agent-profiles, validate-personas, gh-aw-compile), Tests (unit-tests), Test AW Workflows, Holdout Guard, Test-Deletion Guard, CodeRabbit. Dependabot/dependency-audit jobs skipped (N/A). Two dev-lead agent check runs show CANCELLED (superseded automation, non-blocking); the review/review check is this run. Branch is BEHIND main but MERGEABLE.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: e75b5d258de8fab2f47b96980ffcb1db7791ddf9
Review mode: triage-approved (single reviewer)

Summary

Dedup fix for three date-stamped health digest issues (PR-review failures, runaway PR candidates, docs-health stale files). Each github-script step now closes prior open digests — matched by the 'health-check' + 'automated-report' labels and the exact title prefix, excluding PRs — before creating today's snapshot. Logic is correct, paginated, and failure-tolerant (per-issue try/catch → core.warning). No new permissions, actions, or untrusted-input interpolation.

Linked issue analysis

No linked closing issues. The PR is a companion to #1204 (fleet-monitor digest dedup) and applies the same validated pattern to the remaining health-check digest sources, matching the stated problem (20 + 6 accumulated open issues).

Findings

  • Triage assessment confirmed: low-risk workflow-automation fix, no issues found.
  • Both Copilot review threads (filter by both labels instead of only 'health-check') were addressed in the follow-up commit and are resolved.
  • The two title prefixes within daily-pr-review-health.yml are distinct, so the second step cannot close the issue the first step just created.
  • Minor, non-blocking: when a run finds nothing to report it returns early, so the previous day's digest stays open until the next non-empty run — pre-existing behavior, unchanged by this PR.
  • Secret scan: run_secret_scanning MCP tool not available in this environment; gitleaks CI check passed (no secrets in the diff — workflow logic only).

CI status

All required checks green: Lint, ShellCheck, bats, CodeQL (actions + python), gitleaks secret scan, AgentShield, SonarCloud quality gate, unit tests, AW workflow validation, holdout-guard, test-deletion guard. Two CANCELLED 'dev-lead' checks are superseded agent-automation runs, not CI gates; the in-progress 'review / review' check is this review.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@donpetry-bot
donpetry-bot dismissed their stale review July 14, 2026 03:40

Superseded by automated re-review at e75b5d2.

@don-petry
don-petry disabled auto-merge July 14, 2026 03:42
@sonarqubecloud

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: fix-reviews)

PR: #1212
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-07-14T04:12:38Z

@don-petry
don-petry enabled auto-merge (squash) July 14, 2026 03:42
@don-petry
don-petry merged commit 5e2b469 into main Jul 14, 2026
31 of 38 checks passed
@don-petry
don-petry deleted the fix/pr-review-health-digest-dedup branch July 14, 2026 03:44

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 2e836a0c0a10587a335c5ca851b222c05a3d5fe7
Review mode: triage-approved (single reviewer)

Summary

Dedup fix for date-stamped health-check digest issues: before creating today's digest, the workflow now closes prior open digests matching the title prefix and both labels (health-check + automated-report). Applied to both digest blocks in daily-pr-review-health.yml and the stale-docs block in docs-health-check.yml. Logic is safe: paginated list scoped to both labels, PR guard, title-prefix match, per-issue try/catch with warning on failure. Neither workflow is a protected thin-caller stub.

Linked issue analysis

No linked closing issues. PR is a companion to #1204 (fleet-monitor digest dedup), applying the same pattern to the remaining health-check digest sources. The PR body slightly understates scope (it also fixes the Docs Health Check digest), but the change itself is consistent and correct.

Findings

No blocking findings. Both Copilot review threads (scope the prior-digest label filter to health-check,automated-report) were applied at the head commit and are resolved. Minor non-blocking note: priors are closed before the new digest is created, so a failed create would briefly leave no open digest — acceptable for a daily snapshot. Secret scanning MCP tool unavailable in this environment; gitleaks CI check is green and the diff contains no secret-like content.

CI status

All completed checks green (Lint, ShellCheck, CodeQL, gitleaks, agent-shield, SonarCloud, yaml/workflow validation, unit tests, bats). Cancelled/pending review and dev-lead entries are the review pipeline's own superseded runs, not code checks.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 2e836a0c0a10587a335c5ca851b222c05a3d5fe7
Review mode: triage-approved (single reviewer)

Summary

Fixes digest-issue accumulation: before creating today's date-stamped digest, the workflows now close prior open digests (matched by title prefix + 'health-check,automated-report' labels, PRs excluded). Applied in 3 spots across daily-pr-review-health.yml and docs-health-check.yml. Confirms the triage assessment; head advanced past the previously approved SHA only via a merge of main (no changes to the PR's own files).

Linked issue analysis

No closing issue linked. PR body documents the problem (20 + 6 accumulated open digest issues) and cites #1204 as the companion fix for the fleet-monitor digest. Motivation is clear and the change substantively addresses it.

Findings

No blocking findings.

  • Prior Copilot review suggestions (filter by both labels instead of only 'health-check') are implemented and both threads are resolved.
  • Close calls are wrapped in try/catch with core.warning, so a single failure cannot abort digest creation.
  • No new workflow permissions; issue titles are only compared via startsWith, never executed or shell-interpolated. Not a protected thin-caller workflow.
  • MCP secret scanning tool unavailable in this run; gitleaks CI check passed (SUCCESS).
  • Minor (non-blocking): PR body calls the Docs Health Check issues a 'separate source', but the diff now also patches docs-health-check.yml — body slightly stale after review-driven additions.

CI status

All checks green: shellcheck, CodeQL (actions + python), gitleaks secret scan, agent-shield, SonarCloud quality gate, workflow validation, unit tests, bats. The only PENDING check is this review run itself; CANCELLED entries are superseded runs on earlier commits.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

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.

3 participants