Skip to content

[Fleet Monitor] petry-projects/markets β€” .github/workflows/pr-review.ymlΒ #276

Closed

Description

@don-petry

🟑 WARNING: petry-projects/markets / .github/workflows/pr-review.yml

Metric Value
Failure Rate 12.5% (1 / 8 runs)
Status WARNING
p50 Duration 241s
p95 Duration 679s
Successful Runs 4
Cancelled Runs 2

Workflow: .github/workflows/pr-review.yml

Last updated by Fleet Monitor run on 2026-06-18.
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 Jun 18, 2026
  2. don-petry commented on Jun 18, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead Implementation Plan

    Issue: #276 β€” [Fleet Monitor] petry-projects/markets β€” .github/workflows/pr-review.yml

    Root-cause analysis

    I inspected the last 15 runs of pr-review.yml:

    Scope

    Make main's caller robust by adopting PR #261's good ideas (dedup overlapping runs, skip no-PR check_suite events) without its breaking change β€” i.e. keep agent_ref: pr-review/stable. This reduces the cancellations/contention and supersedes the broken PR #261 with a correct config.

    Implementation Checklist

    • .github/workflows/pr-review.yml: add a per-PR concurrency group (falls back to github.run_id for batch/dispatch/no-PR runs so they are never cancelled).
    • .github/workflows/pr-review.yml: add a job-level if: guard to skip check_suite completions with no associated PR.
    • Keep agent_ref: pr-review/stable and the uses: ...@pr-review/stable pin unchanged (do NOT repeat feat: implement issue #252 β€” [Fleet Monitor] petry-projects/markets β€” pr-review.ymlΒ #261's agent_ref: main mistake).
    • Leave trigger event types and the permissions: block unchanged (thin-caller stub rules).

    Tests to Write

    • No executable test framework exists for workflow YAML in this repo (CI ecosystem-detects Go/Node, neither present; .dev-lead/.github tests cover shell scripts only). Per the Phase 2 documentation/config exception, verification is via YAML parse + actionlint (if available) + the repo lint script. This exception will be noted in the Phase 6 report.

    Test Command

    bash ".dev-lead/scripts/dev-lead-lint.sh" (plus YAML parse + actionlint on the workflow)

  3. don-petry commented on Jun 18, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead: Implementation Complete

    Root cause (confirmed from run history)

    Plan Execution

    • Added a per-PR concurrency group (falls back to github.run_id for batch/dispatch/no-PR runs so they are never cancelled).
    • Added a job-level if: guard to skip check_suite completions with no associated PR.
    • Kept agent_ref: pr-review/stable and the @pr-review/stable pin unchanged β€” deliberately NOT repeating feat: implement issue #252 β€” [Fleet Monitor] petry-projects/markets β€” pr-review.ymlΒ #261's agent_ref: main change that causes the failures.
    • Left trigger event types and the permissions: block unchanged (thin-caller stub rules).

    Test Results

    No executable test framework exists for workflow YAML in this repo (CI ecosystem-detects Go/Node β€” neither is present; .dev-lead/.github tests cover shell scripts only). Per the Phase 2 config/documentation exception, verification was done via:

    $ python3 -c "import yaml; yaml.safe_load(open('.github/workflows/pr-review.yml'))"
    OK: YAML parses
    
    $ actionlint .github/workflows/pr-review.yml
    OK: actionlint clean   # validates expression contexts (inputs, github.event.*, github.run_id)
    
    $ bash .dev-lead/scripts/dev-lead-lint.sh
      [lint] shellcheck: no .sh files found β€” skipping
      [lint] all checks passed
    

    Files Changed

    • .github/workflows/pr-review.yml: added per-PR concurrency dedup + check_suite null-PR job guard; agent_ref and reusable pin unchanged.
    diff --git a/.github/workflows/pr-review.yml b/.github/workflows/pr-review.yml
    index 0c1377c..8f07c5a 100644
    --- a/.github/workflows/pr-review.yml
    +++ b/.github/workflows/pr-review.yml
    @@ -43,8 +43,30 @@ permissions:
       pull-requests: write
       checks: read
     
    +# Collapse redundant overlapping runs for the same PR. The high-frequency
    +# triggers (synchronize + the resulting check_suite completions) fire several
    +# times for one PR head; without this they spawn concurrent duplicate reviews
    +# (the source of the cancelled runs). Group per PR when one is identifiable;
    +# fall back to a unique run id for batch/dispatch/no-PR runs so those are never
    +# cancelled against each other.
    +concurrency:
    +  group: >-
    +    pr-review-${{
    +      github.event.pull_request.number
    +      || github.event.check_suite.pull_requests[0].number
    +      || inputs.pr_url
    +      || github.event.client_payload.pr_url
    +      || github.run_id
    +    }}
    +  cancel-in-progress: true
    +
     jobs:
       review:
    +    # Skip check_suite completions with no associated PR (e.g. pushes to main):
    +    # there is nothing to review, so the run would be pure waste.
    +    if: >-
    +      github.event_name != 'check_suite'
    +      || github.event.check_suite.pull_requests[0] != null
         uses: petry-projects/.github-private/.github/workflows/pr-review.yml@pr-review/stable
         with:
           agent_ref: pr-review/stable

    Notes

  4. added a commit that references this issue on Jun 20, 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