Files
dotnet__skills/.github/workflows/devops-health-investigate.md
Jan Krivanek 70e2d3b333 Simplify the focus of devops health workflows (#521)
* Simplify the focus of devops health workflows

* Updated gh-aw and recompiled

* Fix scope wording to include resource usage per review feedback
2026-04-13 17:39:20 +02:00

8.8 KiB
Raw Permalink Blame History

name, description, on, concurrency, jobs, engine, permissions, imports, tools, safe-outputs, network, timeout-minutes
name description on concurrency jobs engine permissions imports tools safe-outputs network timeout-minutes
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.
workflow_dispatch steps
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
uses name with
actions/checkout@de0fac2e45 Checkout the select-copilot-pat action folder
persist-credentials sparse-checkout sparse-checkout-cone-mode fetch-depth
false .github/actions/select-copilot-pat true 1
id name uses env
select-copilot-pat Select Copilot token from pool ./.github/actions/select-copilot-pat
SECRET_0 SECRET_1 SECRET_2 SECRET_3 SECRET_4 SECRET_5 SECRET_6 SECRET_7
${{ secrets.COPILOT_GITHUB_TOKEN }} ${{ secrets.COPILOT_GITHUB_TOKEN_2 }} ${{ secrets.COPILOT_GITHUB_TOKEN_3 }} ${{ secrets.COPILOT_GITHUB_TOKEN_4 }} ${{ secrets.COPILOT_GITHUB_TOKEN_5 }} ${{ secrets.COPILOT_GITHUB_TOKEN_6 }} ${{ secrets.COPILOT_GITHUB_TOKEN_7 }} ${{ secrets.COPILOT_GITHUB_TOKEN_8 }}
group
gh-aw-${{ github.workflow }}-${{ inputs.finding_id }}
pre-activation
outputs
copilot_pat_number
${{ steps.select-copilot-pat.outputs.copilot_pat_number }}
id env
copilot
COPILOT_GITHUB_TOKEN
${{ case(needs.pre_activation.outputs.copilot_pat_number == '0', secrets.COPILOT_GITHUB_TOKEN, needs.pre_activation.outputs.copilot_pat_number == '1', secrets.COPILOT_GITHUB_TOKEN_2, needs.pre_activation.outputs.copilot_pat_number == '2', secrets.COPILOT_GITHUB_TOKEN_3, needs.pre_activation.outputs.copilot_pat_number == '3', secrets.COPILOT_GITHUB_TOKEN_4, needs.pre_activation.outputs.copilot_pat_number == '4', secrets.COPILOT_GITHUB_TOKEN_5, needs.pre_activation.outputs.copilot_pat_number == '5', secrets.COPILOT_GITHUB_TOKEN_6, needs.pre_activation.outputs.copilot_pat_number == '6', secrets.COPILOT_GITHUB_TOKEN_7, needs.pre_activation.outputs.copilot_pat_number == '7', secrets.COPILOT_GITHUB_TOKEN_8, secrets.COPILOT_GITHUB_TOKEN) }}
contents actions issues pull-requests
read read read read
../aw/shared/devops-investigate.lock.md
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

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.