Skip to content

feat: implement issue #1502 — [Fleet Monitor] petry-projects/.github-private — .github/workflows/test-dev-lead.yml - #1503

Merged
don-petry merged 2 commits into
mainfrom
dev-lead/issue-1502-20260812-0805
Aug 12, 2026
Merged

don-petry merged 2 commits into
mainfrom
dev-lead/issue-1502-20260812-0805

Conversation

@don-petry

@don-petry don-petry commented Aug 12, 2026 •

Copy link
Copy Markdown
Collaborator

User description

Closes #1502

Implemented by dev-lead agent. Please review.


CodeAnt-AI Description

Prevent flaky unit checks caused by informational ShellCheck findings

What Changed

  • ShellCheck checks in the maintainer gate now only fail on warning-level findings, avoiding failures from informational messages
  • Added a regression test that verifies every ShellCheck invocation in the unit tests uses the warning severity threshold

Impact

✅ Fewer flaky workflow failures
✅ Consistent ShellCheck results across runners
✅ Clearer unit-test safeguards

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • Tests
    • Updated shellcheck validation to enforce warning-level severity.
    • Added regression coverage to ensure unit tests consistently include the required shellcheck severity setting.
    • Improved diagnostics by reporting test commands that do not meet the standard.

…private — .github/workflows/test-dev-lead.yml
@don-petry
don-petry requested a review from a team as a code owner August 12, 2026 08:22
@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.

@codeant-ai

codeant-ai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR b74ac0e Aug 12, 2026 · 08:22 08:24

@codeant-ai

codeant-ai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 53 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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 Plus

Run ID: 7d830a05-405d-42fe-bb36-8e20cac69b9f

📥 Commits

Reviewing files that changed from the base of the PR and between b74ac0e and feef113.

📒 Files selected for processing (1)
  • tests/dev-lead/unit/test_shellcheck_severity_consistency.bats
📝 Walkthrough

Walkthrough

The changes enforce --severity=warning in an existing ShellCheck test and add a regression test that checks all unit Bats files for consistent ShellCheck severity settings.

Changes

ShellCheck severity consistency

Layer / File(s) Summary
Enforce warning-level ShellCheck diagnostics
tests/dev-lead/unit/test_maintainer_comment_gate.bats, tests/dev-lead/unit/test_shellcheck_severity_consistency.bats
The maintainer comment gate test enables warning-level diagnostics. The new Bats test scans unit tests and reports ShellCheck commands that omit --severity=warning.

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

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change and impact but omits the required Summary, Interaction contract N/A, and Checklist sections. Add the template sections, mark Interaction contract as N/A, and complete the applicable checklist items.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title identifies issue #1502 and the affected workflow, which matches the PR's reliability objective.
Linked Issues check ✅ Passed The changes target ShellCheck-related flakiness in the unit checks and support the linked workflow reliability objective in [#1502].
Out of Scope Changes check ✅ Passed Both changes enforce warning-level ShellCheck usage and add regression coverage, with no unrelated scope evident.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-1502-20260812-0805

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.

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Aug 12, 2026

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates a shellcheck invocation in the maintainer gate test to use --severity=warning and adds a new regression guard test to ensure all shellcheck invocations in the unit tests use this severity flag, preventing info-level flakes. The review feedback recommends replacing a short-circuit && operator with a standard if statement in the new test to prevent premature termination under set -e environments.

Comment thread tests/dev-lead/unit/test_shellcheck_severity_consistency.bats Outdated
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #1503
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-08-12T08:53:42Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-08-12T08:53:42Z

@don-petry
don-petry enabled auto-merge (squash) August 12, 2026 08:23
Comment thread tests/dev-lead/unit/test_shellcheck_severity_consistency.bats
@don-petry
don-petry disabled auto-merge August 12, 2026 08:26
coderabbitai[bot]
coderabbitai Bot previously requested changes Aug 12, 2026

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/dev-lead/unit/test_shellcheck_severity_consistency.bats`:
- Around line 24-34: The ShellCheck consistency test’s scan in
`test_shellcheck_severity_consistency` must detect wrapped and
operator-delimited `shellcheck` invocations, while accepting
`--severity=warning` placed on a continuation line. Replace the line-only grep
logic with command-aware parsing that joins continuations and recognizes wrapper
forms such as `run shellcheck`, conditional commands, and commands after shell
operators, then report only invocations lacking the required severity option.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 703a96e2-4fdb-4c6d-8501-2e57f79283ed

📥 Commits

Reviewing files that changed from the base of the PR and between b7ae246 and b74ac0e.

📒 Files selected for processing (2)
  • tests/dev-lead/unit/test_maintainer_comment_gate.bats
  • tests/dev-lead/unit/test_shellcheck_severity_consistency.bats

Comment thread tests/dev-lead/unit/test_shellcheck_severity_consistency.bats
@don-petry

Copy link
Copy Markdown
Collaborator Author

@coderabbitai resolve

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) August 12, 2026 08:29
@donpetry-bot
donpetry-bot dismissed coderabbitai[bot]’s stale review August 12, 2026 08:29

Auto-dismissed (#617): coderabbitai[bot] CHANGES_REQUESTED on a superseded commit. The bot re-reviews the new head automatically — a valid concern will return as a fresh review.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
✅ Action performed

Comments resolved and changes approved.

@don-petry
don-petry disabled auto-merge August 12, 2026 08:30
@sonarqubecloud

Copy link
Copy Markdown

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-08-12T09:04:33Z

@don-petry
don-petry enabled auto-merge (squash) August 12, 2026 08:34
@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@don-petry
don-petry disabled auto-merge August 12, 2026 09:33
@don-petry
don-petry enabled auto-merge (squash) August 12, 2026 09:35
@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@don-petry
don-petry disabled auto-merge August 12, 2026 13:47
@don-petry
don-petry enabled auto-merge (squash) August 12, 2026 13:49
@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@don-petry
don-petry disabled auto-merge August 12, 2026 15:15
@don-petry
don-petry enabled auto-merge (squash) August 12, 2026 15:17
@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@don-petry
don-petry disabled auto-merge August 12, 2026 17:11
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #1503
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-08-12T17:43:26Z

@don-petry
don-petry enabled auto-merge (squash) August 12, 2026 17:13

@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: LOW
Reviewed commit: feef113fa34e6fac84265cf8971c9517542e1f35
Review mode: triage-approved (single reviewer)

Summary

Test-only PR (2 files, +45/-1) fixing the flaky unit job in test-dev-lead.yml (issue #1502). Adds --severity=warning to the maintainer-gate shellcheck invocation so info-level findings (e.g. SC1091, which varies by runner/CWD) can no longer flake the job, and adds a regression test asserting every shellcheck invocation in tests/dev-lead/unit/*.bats passes --severity=warning. The triage tier's low-risk assessment is confirmed.

Linked issue analysis

Closes #1502 (Fleet Monitor WARNING: test-dev-lead.yml at 13.3% failure rate). The root cause — a gate test running shellcheck at default severity, failing on info-level SC1091 findings that depend on runner shellcheck version and working directory — is directly addressed. The regression test prevents recurrence of this flake class. Substantively addressed.

Findings

No blocking findings.

  • Risk: LOW — test-only changes (.bats files); no workflow, script, auth, or dependency changes. Suppressing info-level shellcheck findings only in test invocations is a justified flake fix; warning/error severities still fail.
  • Regression test logic verified: grep matches only command invocations (excludes '# shellcheck' directives and 'command -v shellcheck' probes), and the file:line prefix is stripped before the --severity=warning pattern match — resolving the false-negative concern raised by earlier bot reviews (all 3 review threads resolved, CodeRabbit subsequently APPROVED).
  • No unanswered human-reviewer questions; don-petry's review entries are empty-bodied automation markers.
  • Secret scan (MCP run_secret_scanning) unavailable in this environment; gitleaks CI check passed (SUCCESS).

CI status

All checks green at feef113. 60+ checks SUCCESS including unit-tests, bats, ShellCheck, actionlint, CodeQL, Agent Security Scan, Secret scan (gitleaks), SonarCloud, agent-shield. A few CANCELLED entries (dev-lead/dispatch, review/review, dev-lead/ci-relay) are superseded earlier runs — each has a later SUCCESS/SKIPPED counterpart. No failures.


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

@don-petry
don-petry merged commit 0e6bbf2 into main Aug 12, 2026
72 of 76 checks passed
@don-petry
don-petry deleted the dev-lead/issue-1502-20260812-0805 branch August 12, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fleet Monitor] petry-projects/.github-private — .github/workflows/test-dev-lead.yml

2 participants