Files
dotnet__skills/.github/workflows/devops-health-investigate.md
Jeff Handley 11c5dfc738 Require environment input to pat_pool shared workflow. (#832)
* Require environment input to pat_pool shared workflow.

- Updates the PAT pool shared workflow to latest version
- Updates the validate-pat-pool workflow to match other repos
- Updates all agentic workflows to use the updated PAT pool import
  with the standard secret names used across other repos
- The new version of the import does not require the 'needs' workaround
  but the issue-triage workflow's 'roles: all' configuration requires
  a different workaround to ensure the pre_activation job exists for
  the pat_pool job to be able to depend on it (necessary for ordering).

* Update markdown bullet style

* Apply Copilot PR feedback

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Bump versions to match gh-aw

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-25 15:35:22 -07:00

7.4 KiB
Raw Permalink Blame History

name, description, on, concurrency, permissions, tools, safe-outputs, network, timeout-minutes, imports, environment, engine
name description on concurrency permissions tools safe-outputs network timeout-minutes imports environment engine
DevOps Health — Deep Investigation Worker agent that performs deep root-cause analysis on a single health check finding (pipeline, infrastructure, or resource). Dispatched by the health check orchestrator.
permissions workflow_dispatch
inputs
finding_id finding_type finding_title finding_severity resource_url health_issue_number correlation_id
description required
Fingerprint ID of the finding to investigate true
description required
Category: pipeline | infra | resource true
description required
Human-readable title of the finding true
description required
Severity: critical | warning | info true
description required
URL to the primary resource (run, PR, etc.) true
description required
Issue number of the pinned health dashboard true
description required
Unique ID linking this investigation to the health check run true
group
gh-aw-${{ github.workflow }}-${{ inputs.finding_id }}
contents actions issues pull-requests
read read read read
github bash
toolsets
repos
issues
pull_requests
actions
cat
grep
head
tail
find
ls
wc
jq
date
sort
diff
add-comment noop
max
1
report-as-issue
false
allowed
defaults
60
uses with
shared/pat_pool.md
environment
copilot-pat-pool
../aw/shared/devops-investigate.lock.md
copilot-pat-pool
id env
copilot
COPILOT_GITHUB_TOKEN
${{ case( needs.pat_pool.outputs.pat_number == '0', secrets.COPILOT_PAT_0, needs.pat_pool.outputs.pat_number == '1', secrets.COPILOT_PAT_1, needs.pat_pool.outputs.pat_number == '2', secrets.COPILOT_PAT_2, needs.pat_pool.outputs.pat_number == '3', secrets.COPILOT_PAT_3, needs.pat_pool.outputs.pat_number == '4', secrets.COPILOT_PAT_4, needs.pat_pool.outputs.pat_number == '5', secrets.COPILOT_PAT_5, needs.pat_pool.outputs.pat_number == '6', secrets.COPILOT_PAT_6, needs.pat_pool.outputs.pat_number == '7', secrets.COPILOT_PAT_7, needs.pat_pool.outputs.pat_number == '8', secrets.COPILOT_PAT_8, needs.pat_pool.outputs.pat_number == '9', secrets.COPILOT_PAT_9, 'NO COPILOT PAT AVAILABLE') }}

DevOps Health — Deep Investigation Worker

You are a specialized investigation agent. You have been dispatched by the DevOps Health Check orchestrator to perform a deep root-cause analysis on one specific finding.

Your Mission

Investigate the finding identified by the inputs provided to this workflow run. Determine the root cause, assess the blast radius, and generate actionable remediation steps. Report your findings back to the pinned health issue.

Inputs Available

  • finding_id: ${{ inputs.finding_id }} — The fingerprint ID of the finding
  • finding_type: ${{ inputs.finding_type }} — Category (pipeline, infra, resource)
  • finding_title: ${{ inputs.finding_title }} — Human-readable title
  • finding_severity: ${{ inputs.finding_severity }} — Severity level
  • resource_url: ${{ inputs.resource_url }} — URL to the primary resource
  • health_issue_number: ${{ inputs.health_issue_number }} — Issue to update
  • correlation_id: ${{ inputs.correlation_id }} — Links this investigation to the health check run

Investigation Protocol

Step 1: Route to Category-Specific Playbook

Based on finding_type, follow the appropriate investigation playbook from the compiled knowledge file:

  • pipeline → Pipeline Investigation Playbook
  • infra → Infrastructure Investigation Playbook
  • resource → Resource Investigation Playbook

Step 2: Gather Evidence

Follow the playbook steps meticulously. For each piece of evidence:

  • Record the source (API endpoint, file path, log excerpt)
  • Note the timestamp of the evidence
  • Assess relevance to the finding

Step 3: Determine Root Cause

Based on the gathered evidence:

  1. Identify the most likely root cause
  2. Assign a confidence level: High / Medium / Low
    • High: Direct evidence (error message explicitly states the cause, code change directly correlates)
    • Medium: Strong circumstantial evidence (timing correlates, pattern matches known issues)
    • Low: Inferential (possible but no direct evidence found)
  3. Identify the blast radius — what else is affected?
  4. Check for related issues — is this already tracked?

Step 4: Generate Remediation Steps

Provide 1–3 specific, actionable remediation steps. Each step should:

  • Be concrete (include file paths, commands, or config changes)
  • Be ordered by recommended priority
  • Include any caveats or risks

Step 5: Report Back

Post your investigation results as a comment on the pinned health issue.

IMPORTANT: You MUST use the add-comment safe-output tool (NOT update-issue, which does not work for workflow_dispatch triggered workflows). Pass the health_issue_number as the item_number parameter.

add-comment:
  item_number: {health_issue_number}
  body: |
    ## 🔍 Investigation: {finding_title}

    **Finding ID:** `{finding_id}`
    **Severity:** {finding_severity}
    **Correlation:** {correlation_id}
    **Executive Summary:** {one-sentence summary of the root cause and recommended action}

    ### Root Cause
    {one-paragraph description with evidence}

    **Confidence:** {High|Medium|Low} — {justification}

    ### Blast Radius
    {what else is affected}

    ### Suggested Fix
    1. {step 1}
    2. {step 2}
    3. {step 3} (if applicable)

    ### Evidence
    {key log excerpts, API responses, or code references}

    ### Related
    {commits, PRs, issues, or "None found"}

    ---
    <sub>🔍 [Investigation Run #{this_run_number}]({this_run_url}) · Dispatched by health check · {correlation_id}</sub>

Guidelines

  • Be factual: Every claim must be backed by evidence from API responses, logs, or code.
  • Don't hallucinate: If you cannot determine the root cause, say so honestly. A "Low confidence" finding with honest uncertainty is better than a fabricated "High confidence" answer.
  • Be concise: The investigation report appears inline in the health dashboard. Keep it focused — 1-2 paragraphs for root cause, 1 paragraph for blast radius, numbered list for fixes.
  • Include source evidence: Quote specific error messages, log lines, or commit SHAs. Use code blocks for log excerpts.
  • Check recent commits: For pipeline and quality findings, always check commits between the last successful state and the current failure.
  • Cross-reference: Look for related open issues or PRs that might already be tracking this problem.
  • Time-box yourself: If evidence is insufficient after reasonable investigation, report what you found with appropriate confidence level rather than spiraling.