Skip to content

feat: implement issue #470 — [Fleet Monitor] petry-projects/TalkTerm — .github/workflows/ci.yml - #471

Merged
don-petry merged 2 commits into
mainfrom
dev-lead/issue-470-20260901-1203
Sep 1, 2026
Merged

don-petry merged 2 commits into
mainfrom
dev-lead/issue-470-20260901-1203

Conversation

@don-petry

@don-petry don-petry commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

User description

Closes #470

Implemented by dev-lead agent. Please review.


CodeAnt-AI Description

Prevent CI jobs from running indefinitely when a step stalls

What Changed

  • CI jobs now stop after 10 minutes instead of inheriting GitHub’s six-hour timeout
  • Workflow checks reject jobs with a missing or non-positive timeout
  • Regression tests cover valid, missing, and zero-minute job timeouts

Impact

✅ Faster detection of stalled CI jobs
✅ Fewer long-running timeout failures
✅ Lower wasted CI runner time

💡 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

  • Bug Fixes

    • Added 10-minute execution limits to CI security scanning and workflow validation jobs, preventing stalled jobs from running indefinitely.
  • Tests

    • Enhanced CI workflow checks to require a valid, positive timeout for every job.
    • Added coverage for valid, missing, and zero-value timeout configurations.

@don-petry
don-petry requested a review from a team as a code owner September 1, 2026 12:10
@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 Sep 1, 2026 •

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR fe07e2e Sep 01, 2026 · 12:10 12:12

@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

@codeant-ai

codeant-ai Bot commented Sep 1, 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 Sep 1, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 54 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

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

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 0c8d01ce-6069-4aa3-8fef-4209af428141

📥 Commits

Reviewing files that changed from the base of the PR and between fe07e2e and 9cff07e.

📒 Files selected for processing (2)
  • scripts/test-ci-workflow.sh
  • scripts/test-ci-workflow.test.sh

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: cc22da77-4f5a-4df3-9672-5eb93d8913eb

📥 Commits

Reviewing files that changed from the base of the PR and between 395d122 and fe07e2e.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • scripts/test-ci-workflow.sh
  • scripts/test-ci-workflow.test.sh

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The CI workflow adds 10-minute limits to two jobs. The regression guard now requires every job to declare a positive-integer timeout-minutes value. Tests cover valid, missing, and zero timeout declarations.

Changes

CI timeout enforcement

Layer / File(s) Summary
Workflow job timeout declarations
.github/workflows/ci.yml
The secret-scan and workflow-tests jobs now declare timeout-minutes: 10.
Timeout invariant and regression coverage
scripts/test-ci-workflow.sh, scripts/test-ci-workflow.test.sh
The guard validates positive-integer timeout values. Fixtures and test cases cover valid, missing, and zero timeout declarations. Existing fixtures include valid timeout values so other checks remain isolated.

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

Merge Risk: 🟡 Moderate · up to fe07e

The PR adds CI timeout enforcement, but the validation script may fail to parse because of a duplicated conditional and unmatched block. Until corrected, the repository cannot reliably enforce the new timeout policy, so merge should wait for this bounded correctness issue to be fixed.

Suggested reviewers: donpetry-bot

🚥 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 identifies issue #470 and the targeted .github/workflows/ci.yml. It is directly related to the workflow reliability changes, although it does not name the timeout or regression-test details.
Linked Issues check ✅ Passed The PR changes the workflow named in issue #470 by adding per-job timeouts. It also adds regression checks that require every workflow job to use a positive timeout-minutes value. These changes direct…
Out of Scope Changes check ✅ Passed The workflow changes and the related shell-test updates are within scope. The new fixtures and test cases validate the timeout-minutes invariant introduced for issue #470.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 2 files. (1 skipped: 1…
Full details: Linked Issues check

Explanation

The PR changes the workflow named in issue #470 by adding per-job timeouts. It also adds regression checks that require every workflow job to use a positive timeout-minutes value. These changes directly support the linked workflow reliability objective.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 2 files. (1 skipped: 1 unsupported.)

✨ 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-470-20260901-1203

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:L This PR changes 100-499 lines, ignoring generated files label Sep 1, 2026
@don-petry

Copy link
Copy Markdown
Contributor Author

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

PR: #471
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-09-01T12:41:37Z

@don-petry

Copy link
Copy Markdown
Contributor 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-09-01T12:41:37Z

@don-petry
don-petry enabled auto-merge (squash) September 1, 2026 12:11

@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 introduces a new regression guard check (Check 7) to ensure that every job in the CI workflow declares a positive-integer timeout-minutes, preventing stalled jobs from running up to the 6-hour default. Corresponding test cases and fixture updates are added to validate this behavior. The review feedback recommends initializing variables before command substitution to prevent unbound variable errors under set -u, and storing the regex pattern in a variable to ensure compatibility across different Bash versions.

Comment thread scripts/test-ci-workflow.sh Resolved
Comment thread scripts/test-ci-workflow.sh Resolved
@don-petry
don-petry disabled auto-merge September 1, 2026 12:12
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) September 1, 2026 12:16

@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: fe07e2e187baf717eb6ef6cf8a0f90c0eabb29f6
Review mode: triage-approved (single reviewer)

Summary

Adds timeout-minutes: 10 to both ci.yml jobs and extends the regression guard (Check 7) to require a positive-integer timeout-minutes on every job, with test fixtures for valid, missing, and zero values. Directly addresses Fleet Monitor issue #470. Guard logic is correct (yq env() lookup, regex + positivity validation); tests differentiate each failure mode cleanly.

Linked issue analysis

Closes #470 ([Fleet Monitor] ci.yml failure-rate WARNING, 11.8%). The root-cause class — jobs inheriting GitHub's 6-hour default timeout and landing as slow timeout failures — is substantively addressed: both jobs now bounded at 10m (p95 is ~150s), and the invariant is locked by a regression guard so it cannot silently regress.

Findings

  • Two unresolved bot review threads were evaluated and assessed as non-blocking:
    1. codeant-ai (Major): claims quoted 'timeout-minutes: "10"' would pass the guard while GitHub rejects strings. Assessed as a false positive — GitHub Actions accepts string/expression values that evaluate to numbers for timeout-minutes, and ci.yml uses an unquoted integer.
    2. gemini-code-assist (medium): stylistic note on variable initialization under set -u. The 'if ! var=$(cmd)' pattern assigns regardless of exit status, so no unbound-variable risk. Optional cleanup, not blocking.
  • No security concerns: workflow change is timeout-only (no new permissions, actions, or secrets); shell additions are safe (no injection vectors, proper quoting).
  • run_secret_scanning MCP tool unavailable in this session; gitleaks CI check passed and the diff contains no credential-like content.

CI status

All validation checks green: Secret scan (gitleaks), CodeQL Analyze (actions, python), SonarCloud, Workflow regression guards, AgentShield, CodeRabbit — all SUCCESS. CANCELLED entries are superseded duplicate dev-lead dispatch/ci-relay runs (latest attempts SUCCESS/SKIPPED); SKIPPED dependency-audit jobs are ecosystem-gated.


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

@don-petry
don-petry disabled auto-merge September 1, 2026 12:17
@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry merged commit 5900555 into main Sep 1, 2026
23 of 25 checks passed
@don-petry
don-petry deleted the dev-lead/issue-470-20260901-1203 branch September 1, 2026 12:17
@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-09-01T13:18:04Z.

@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: 9cff07e1ed7c3a49bd95a5b14e914f1b053a1463
Review mode: triage-approved (single reviewer)

Summary

Adds timeout-minutes: 10 to both ci.yml jobs and a new regression guard (Check 7) enforcing a positive-integer timeout-minutes on every job, including a YAML-tag check that rejects quoted values. Four new fixture test cases cover the accepted/missing/zero/quoted variants. Confirms the triage low-risk assessment; all CI green, all review threads resolved.

Linked issue analysis

Closes #470 (Fleet Monitor WARNING: ci.yml at 11.8% failure rate). Root cause — jobs without timeout-minutes inherit GitHub's 6-hour default, so stalled steps land as timeout failures. The fix bounds both jobs at 10 minutes (p95 is ~150s, ample headroom) and locks the invariant with a regression guard so future jobs cannot regress. Substantively addresses the issue.

Findings

No blocking findings.

  • Guard logic is sound: job names read via yq, per-job lookup uses env(J) (no injection), timeout validated as bare positive integer via regex plus !!int tag check.
  • Prior bot review threads (2) are both resolved: codeant's quoted-string type gap is fixed by the tag check; gemini's set -u variable-initialization suggestion is applied (job_names/timeout/timeout_tag pre-initialized).
  • Secret-scanning MCP tool unavailable in this run; gitleaks CI check passed and the diff contains no credential-like content.
  • Advisory bots Codex/Qodo were rate-limited or billing-blocked, but three advisory reviews (gemini, codeant, coderabbit) did complete and their actionable findings were addressed.

CI status

All checks green on 9cff07e: Workflow regression guards, Secret scan (gitleaks), CodeQL (actions + python), SonarCloud quality gate, agent-shield, pr-auto-review, review/review all SUCCESS. Two CANCELLED dev-lead entries are superseded duplicates of same-named checks that completed SUCCESS/SKIPPED.


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

Summary

Adds timeout-minutes: 10 to both jobs in ci.yml and a new regression guard (Check 7) in scripts/test-ci-workflow.sh enforcing that every job declares a positive bare-integer timeout-minutes, with four new test fixtures (valid, missing, zero, quoted-string). This confirms the triage assessment: the change is a low-risk CI-hardening fix that prevents stalled steps from inheriting GitHub's 6-hour default timeout.

Linked issue analysis

Closes #470 (Fleet Monitor WARNING: 11.8% failure rate on ci.yml, p95 duration ~150s). Substantively addressed: a 10-minute job timeout gives ~4x p95 headroom while turning a hang into a fast failure, and the new guard locks the invariant so future jobs cannot regress it. The zero/quoted-string edge cases (including the resolved codeant-ai thread about yq stripping quotes) are handled via a YAML tag check (!!int).

Findings

No blocking findings.

  • Workflow changes are timeout additions and comments only — no permission, trigger, action-pin, or secret changes; no GitHub Actions security smells.
  • Guard script uses env(J) to pass job names into yq (no injection into the expression) and correctly distinguishes bare integers from quoted strings via the YAML tag.
  • Minor, non-blocking: Check 7 would also flag any future reusable-workflow caller job (uses:), which cannot declare timeout-minutes — acceptable since the guard is scoped to ci.yml, which has none.
  • Both prior advisory-bot review threads are resolved; the earlier rate-limit hold on auto-approval has passed its reset time.
  • Secret scan MCP tool unavailable in this run; the gitleaks CI check is green.

CI status

All substantive checks green: Secret scan (gitleaks), CodeQL (actions + python), SonarCloud, agent-shield, Workflow regression guards, pr-auto-review, review. Cancelled dev-lead / dispatch and dev-lead / ci-relay entries are superseded automation relay runs (successful duplicates present); remaining SKIPPED checks are non-applicable ecosystem audits.


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

don-petry added a commit that referenced this pull request Sep 1, 2026
…— .github/workflows/ci.yml (#471)

* feat: implement issue #470 — [Fleet Monitor] petry-projects/TalkTerm — .github/workflows/ci.yml

* fix(reviews): address review comments [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Sep 4, 2026
…— .github/workflows/ci.yml (#471)

* feat: implement issue #470 — [Fleet Monitor] petry-projects/TalkTerm — .github/workflows/ci.yml

* fix(reviews): address review comments [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fleet Monitor] petry-projects/TalkTerm — .github/workflows/ci.yml

2 participants