Skip to content

[Fleet Monitor] petry-projects/TalkTerm β€” .github/workflows/sonarcloud.ymlΒ #401

Closed

Description

@don-petry

🟑 WARNING: petry-projects/TalkTerm / .github/workflows/sonarcloud.yml

Metric Value
Failure Rate 10.5% (2 / 19 runs)
Status WARNING
p50 Duration 46s
p95 Duration 572s
Successful Runs 17
Cancelled Runs 0

Workflow: .github/workflows/sonarcloud.yml

Last updated by Fleet Monitor run on 2026-07-22.
Threshold: failure rate > 10% over the monitored window.

Activity

  1. added
    dev-leadFor dev-lead agent pickup
    fleet-trackerTracked by the Actions Fleet Monitor
    health-checkAutomated health check result
    on Jul 22, 2026
  2. don-petry commented on Jul 22, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead Implementation Plan

    Issue: #401 β€” [Fleet Monitor] petry-projects/TalkTerm β€” .github/workflows/sonarcloud.yml

    Root-cause analysis

    Over the last 100 runs, only 2 are non-success, and both are action_required (runs awaiting approval that never execute). Fleet Monitor counts action_required as a failure (fleet_monitor.sh:140), so these two drive the 10.5% rate.

    Inspecting the two flagged runs by head SHA:

    • SHA 1d366770: two pull_request runs at the same second β€” one success and one action_required. A classic duplicate/superseded run with no concurrency control.
    • SHA f1c0172: a lone gated run (pure approval artifact, not fixable in the workflow file).

    The retry mechanism (added in #290/#383) already eliminated the transient-CDN real failures β€” last 100 runs contain zero failure conclusions. The residual noise is duplicate pull_request runs. sonarcloud.yml currently has no concurrency block, which the org ci-standards.md prescribes (SHA-scoped) for exactly this reason.

    Scope

    Add a SHA-scoped concurrency block to .github/workflows/sonarcloud.yml so duplicate/superseded runs for the same commit are cancelled (counted separately, not as failures) instead of lingering as action_required.

    Implementation Checklist

    • Add concurrency block (group: sonarcloud-${{ github.ref }}-${{ github.sha }}, cancel-in-progress: true) to .github/workflows/sonarcloud.yml, matching the org ci-standards SHA-scoped pattern (workflow-name-prefixed group so it never collides with ci.yml).

    Tests to Write

    • No app-level test harness exists for workflow YAML. Per the Phase-2 exception (behavior-preserving CI configuration change), validate via YAML parse + actionlint/lint instead of unit tests. Noted in the completion report.

    Test Command

    bash .dev-lead/scripts/dev-lead-lint.sh + python3 -c "import yaml,sys; yaml.safe_load(open('.github/workflows/sonarcloud.yml'))"

  3. don-petry commented on Jul 22, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead: Implementation Complete

    Root cause

    Over the last 100 sonarcloud.yml runs, zero were failure β€” the retry added in #290/#383 already eliminated the transient scanner-CDN failures. The only 2 non-success runs were both action_required, which fleet_monitor.sh:140 counts as failures. Inspecting them by head SHA:

    • SHA 1d366770: two pull_request runs for one commit at the same second β€” one success + one action_required. A duplicate/superseded run with no concurrency control to cancel it.
    • SHA f1c0172: a lone approval-gated run (not fixable from a workflow file).

    sonarcloud.yml had no concurrency block, which the org ci-standards.md prescribes (SHA-scoped) precisely to keep duplicate runs from lingering.

    Fix

    Added a SHA-scoped concurrency block. Duplicate runs for the same commit now supersede each other and resolve as cancelled (a separately-counted, non-failure conclusion) instead of lingering as action_required. SHA-scoping (vs per-ref) means distinct commits keep their own slots, so an in-flight scan for a still-relevant commit is never cancelled β€” matching the org rationale. The sonarcloud- prefix keeps the group distinct from ci.yml's (concurrency groups are repo-global).

    Plan Execution

    • Root-caused the failure rate to action_required duplicate runs
    • Added SHA-scoped concurrency block to .github/workflows/sonarcloud.yml
    • Validated YAML parses; concurrency present
    • bash .dev-lead/scripts/dev-lead-lint.sh β†’ all checks passed
    • npx prettier --check β†’ passes

    Test Results

    $ python3 -c "import yaml; yaml.safe_load(open('.github/workflows/sonarcloud.yml'))"
    YAML OK
    concurrency: {'group': 'sonarcloud-${{ github.ref }}-${{ github.sha }}', 'cancel-in-progress': True}
    
    $ bash .dev-lead/scripts/dev-lead-lint.sh
      [lint] shellcheck on 5 file(s)...
      [lint] validating CODEOWNERS...
    OK: CODEOWNERS
      [lint] all checks passed
    
    $ npx prettier --check .github/workflows/sonarcloud.yml
    Checking formatting...
    All matched files use Prettier code style!
    

    Files Changed

    • .github/workflows/sonarcloud.yml: added a SHA-scoped concurrency block (group sonarcloud-${{ github.ref }}-${{ github.sha }}, cancel-in-progress: true) between the on: triggers and jobs:, with an explanatory comment.

    Notes

    • Phase-2 (TDD) exception: behavior-preserving CI-config change. The repo's Vitest workspaces are scoped to src/**, so no app test can exercise a .github/workflows/*.yml file. Verified via YAML parse + dev-lead-lint + Prettier instead.
    • Residual: the lone action_required run (f1c0172, no superseding sibling) stems from GitHub approval-gating of a bot-authored PR and cannot be resolved in the workflow file. The concurrency block removes the duplicate class, which is what pushed the rate over the 10% threshold β€” expected to drop the warning back under threshold.
  4. added a commit that references this issue on Jul 22, 2026
  5. added 3 commits that reference this issue on Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dev-leadFor dev-lead agent pickupfleet-trackerTracked by the Actions Fleet Monitorhealth-checkAutomated health check result

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions