Skip to content

[Fleet Monitor] petry-projects/.github-private — .github/workflows/pr-auto-review.yml #1390

Closed

Description

@don-petry

🟡 WARNING: petry-projects/.github-private / .github/workflows/pr-auto-review.yml

Metric Value
Failure Rate 20% (1 / 5 runs)
Status WARNING
p50 Duration 13s
p95 Duration 19s
Successful Runs 4
Cancelled Runs 0

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

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

Activity

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

    @don-petry
    CollaboratorAuthor

    Dev-Lead Implementation Plan

    Issue: #1390 — [Fleet Monitor] petry-projects/.github-private — .github/workflows/pr-auto-review.yml

    Root Cause

    The one failing run in the monitored window (run 30566787842) was a Dependabot pull_request
    event. On Dependabot-authored PRs, GitHub withholds repository/org secrets, so the caller stub's
    secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS resolves to an empty string. The reusable's
    "Checkout ready-check tooling" step then receives an empty token and fails at startup with
    ##[error]Input required and not supplied: token — producing the 20% failure rate. All non-Dependabot
    runs (workflow_run, check_suite, human pull_request) succeed because secrets are present.

    Fix

    Add a job-level if: github.actor != 'dependabot[bot]' guard to the caller job, mirroring the documented
    #864 precedent already in dev-lead-reusable.yml (a Dependabot pull_request run has no access to
    GH_PAT_WORKFLOWS, so the cross-repo checkout fails before it can classify/skip the event). Dependabot PRs
    are handled by dependabot-automerge.yml and never need the review-agent dispatch, so skipping cleanly
    before the reusable's checkout removes the false failure. This touches only the calling job's if: — the
    @pr-auto-review/v1-next channel, trigger event types, and permissions: block are left unchanged per the
    stub's edit contract.

    Implementation Checklist

    Tests to Write

    • tests/dev-lead/integration/test_pr_auto_review_stub.py — asserts the caller job that uses: the pr-auto-review reusable carries a Dependabot skip guard, and (regression) still pins the @pr-auto-review/v1-next channel

    Test Command

    python3 tests/dev-lead/integration/test_pr_auto_review_stub.py (full suite: the jobs in .github/workflows/test-dev-lead.yml)

  3. don-petry commented on Jul 31, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead: Implementation Complete

    Root Cause

    The single failing run in the monitored window (30566787842) was a Dependabot pull_request
    event. Dependabot runs receive no org/repo secrets, so the caller stub's
    secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS resolved to an empty string and the reusable's
    "Checkout ready-check tooling" step failed at startup with Input required and not supplied: token.
    Every non-Dependabot run in the window succeeded — hence the 20% (1/5) rate.

    Fix

    Added a job-level if: github.actor != 'dependabot[bot]' guard to the pr-auto-review caller job,
    mirroring the documented #864 precedent in dev-lead-reusable.yml. Dependabot PRs are handled by
    dependabot-automerge.yml and never need the review-agent dispatch, so the job now skips cleanly before
    the reusable's checkout. The @pr-auto-review/v1-next channel, trigger event types, and permissions:
    block are untouched, per the thin-caller edit contract.

    Plan Execution

    • Added if: Dependabot guard to .github/workflows/pr-auto-review.yml
    • Added regression test tests/dev-lead/integration/test_pr_auto_review_stub.py
    • Registered pr-auto-review-stub job + path filters in .github/workflows/test-dev-lead.yml
    • TDD: confirmed test fails before the fix (red) and passes after (green)
    • Ran full stub suite + dev-lead-lint.sh + schedule/YAML validators — all pass

    Test Results

    === TDD red phase (before fix) ===
    FAIL: .github/workflows/pr-auto-review.yml caller stub is misconfigured:
      Missing Dependabot guard: job 'if' is None
    
    === After fix — full integration stub suite ===
    test_caller_permissions.py:              PASS
    test_workflow_toplevel_permissions.py:   PASS
    test_dependency_audit_stub.py:           PASS
    test_auto_rebase_stub.py:                PASS
    test_spec_drift_workflow.py:             PASS
    test_pr_auto_review_stub.py:             PASS
    
    === Repo lint (.dev-lead/scripts/dev-lead-lint.sh) ===
      [lint] shellcheck on 98 file(s)...
      [lint] validating 4 agent profile(s)...
      [lint] validating .github/CODEOWNERS...
      [lint] all checks passed
    
    === Aux validators ===
    YAML OK
    schedule-lint: OK — no minute-0 (top-of-hour) scheduled crons found.
    tests/test_sonar_s7637_exemption.sh: PASS
    

    Files Changed

    • .github/workflows/pr-auto-review.yml: add if: github.actor != 'dependabot[bot]' guard (with rationale comment) to the caller job.
    • tests/dev-lead/integration/test_pr_auto_review_stub.py: new test asserting the caller job skips Dependabot and still pins @pr-auto-review/v1-next.
    • .github/workflows/test-dev-lead.yml: add pr-auto-review-stub test job and pr-auto-review.yml to the pull_request/push path filters.

    Notes

    • The guard is intentionally a blanket github.actor check (matching dev-lead's bug(dev-lead): caller stub fires on Dependabot PRs and fails at startup (secrets unavailable) #864 guard): it also
      skips workflow_run/check_suite events on Dependabot PRs, which is correct — those PRs are
      auto-merged by dependabot-automerge.yml and never need a review-agent dispatch. Human-authored PRs
      are unaffected.
    • The canonical long-term home for this behavior is the pr-auto-review-reusable.yml reusable in
      petry-projects/.github (per the stub header). This caller-level guard is the equivalent in-repo
      remediation and can be removed if/when the reusable adopts the same skip.
  4. added a commit that references this issue on Jul 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 report

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions