[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FKWF2ZTASC44HKEP81TE7S":3,"skill-same:01M6FKWF2ZTASC44HKEP81TE7S":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":53,"ownerHtmlUrl":54,"ownerBlogUrl":55,"ownerDescription":56,"updatedAt":57,"install":58,"resources":71},"01M6FKWF2ZTASC44HKEP81TE7S","ci-test-failures",null,"Guide for diagnosing GitHub Actions test failures, extracting failed tests from runs, and creating or updating failing-test issues. Use this when asked to investigate GitHub Actions test failures, download failure logs, create failing-test issues, or debug CI issues.","microsoft\u002Faspire","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M6FKTZ7ND1S9JN6JTVK7A7MD",6426,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fci-test-failures\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"test","ci test failures","ci","failing","github","when","for","extracting","tests","use","guide","download","investigate","github actions","actions","logs","issues","create","debug","2026-11-10 10:12:30",false,"---\nname: ci-test-failures\ndescription: Guide for diagnosing GitHub Actions test failures, extracting failed tests from runs, and creating or updating failing-test issues. Use this when asked to investigate GitHub Actions test failures, download failure logs, create failing-test issues, or debug CI issues.\n---\n\n# CI Test Failure Diagnosis and Issue Filing\n\n## Recipe: Create an Issue for a Test Failure\n\nWhen the user asks to create an issue for a failing test, follow these steps. Always redirect full output to a log file (not `tail`) so you can inspect it if the command fails.\n\n### Step 1: List failed tests (if user didn't specify one)\n\nOmit `--test` to discover all failures. Redirect output to a log file:\n\n```bash\ndotnet run --project tools\u002FCreateFailingTestIssue -- \\\n  --url \"\u003Cthe-url-the-user-gave>\" \\\n  --output \u002Ftmp\u002Fcfti-result.json \\\n  > \u002Ftmp\u002Fcfti-list.log 2>&1\n```\n\n```powershell\ndotnet run --project tools\u002FCreateFailingTestIssue -- `\n  --url \"\u003Cthe-url-the-user-gave>\" `\n  --output $env:TEMP\u002Fcfti-result.json `\n  > $env:TEMP\u002Fcfti-list.log 2>&1\n```\n\nThen read the result with `jq`:\n\n```bash\njq '{ success, availableFailedTests: .diagnostics.availableFailedTests, errorMessage: .errorMessage }' \u002Ftmp\u002Fcfti-result.json\n```\n\n```powershell\nGet-Content $env:TEMP\u002Fcfti-result.json | ConvertFrom-Json | Select-Object success, errorMessage, @{N='availableFailedTests';E={$_.diagnostics.availableFailedTests}}\n```\n\nIf `success` is `false`, inspect the full log: `cat \u002Ftmp\u002Fcfti-list.log` (bash) or `Get-Content $env:TEMP\u002Fcfti-list.log` (PowerShell).\n\nAsk the user which test to file for, then proceed to Step 2.\n\n### Step 2: Create the issue\n\n```bash\ndotnet run --project tools\u002FCreateFailingTestIssue -- \\\n  --url \"\u003Cthe-url-the-user-gave>\" \\\n  --test \"\u003Ctest-name>\" \\\n  --create \\\n  --output \u002Ftmp\u002Fcfti-result.json \\\n  > \u002Ftmp\u002Fcfti-create.log 2>&1\n```\n\n```powershell\ndotnet run --project tools\u002FCreateFailingTestIssue -- `\n  --url \"\u003Cthe-url-the-user-gave>\" `\n  --test \"\u003Ctest-name>\" `\n  --create `\n  --output $env:TEMP\u002Fcfti-result.json `\n  > $env:TEMP\u002Fcfti-create.log 2>&1\n```\n\nThen read the result:\n\n```bash\njq '{ success, issue: .issue.createdIssue, errorMessage: .errorMessage }' \u002Ftmp\u002Fcfti-result.json\n```\n\n```powershell\nGet-Content $env:TEMP\u002Fcfti-result.json | ConvertFrom-Json | Select-Object success, errorMessage, @{N='issue';E={$_.issue.createdIssue}}\n```\n\nIf `success` is `false`, inspect the full log: `cat \u002Ftmp\u002Fcfti-create.log` (bash) or `Get-Content $env:TEMP\u002Fcfti-create.log` (PowerShell).\n\nThat's it — do not add analysis comments, do not use `--dry-run` unless the user explicitly asks for a preview.\n\n**Rules:**\n- Always use `--output \u003Cfile>` to keep JSON clean. Do NOT try to parse JSON from stdout — it is interleaved with dotnet build progress output.\n- Use `jq` to extract fields from the output file. Key paths:\n  - `.success` — whether the operation succeeded\n  - `.issue.createdIssue.number` and `.issue.createdIssue.url` — the created\u002Fupdated issue\n  - `.diagnostics.availableFailedTests[]` — test names when `--test` is omitted\n  - `.errorMessage` — error details when `.success` is false\n- Do NOT create issues manually with `gh issue create`. The tool handles everything: resolving the run, finding the test, generating a template-compliant body, and creating the issue.\n- Do NOT invent your own issue markdown. The tool generates content that matches `.github\u002FISSUE_TEMPLATE\u002F50_failing_test.yml`.\n- If the tool fails, report the error from `diagnostics.log` and the JSON output. Do not fall back to manual issue creation.\n\n## Recipe: Investigate a Failing Run (No Issue Creation)\n\nTo download and inspect failure artifacts without creating an issue:\n\n```bash\ncd tools\u002Fscripts\ndotnet run DownloadFailingJobLogs.cs -- \u003Crun-id>\n```\n\n```powershell\nSet-Location tools\u002Fscripts\ndotnet run DownloadFailingJobLogs.cs -- \u003Crun-id>\n```\n\nThen search the downloaded logs and `.trx` files for errors.\n\n---\n\n## Reference Documentation\n\nEverything below is reference material for edge cases and deeper investigation.\n\n### Overview\n\nUse this skill in two phases:\n\n1. **Investigate the run** with `DownloadFailingJobLogs.cs` to fetch failed job logs and artifacts.\n2. **Create or update a failing-test issue** with `tools\u002FCreateFailingTestIssue --create`.\n\n### Tools covered\n\n| Tool | Purpose | Location |\n|------|---------|----------|\n| `DownloadFailingJobLogs.cs` | Download failed job logs and test artifacts from a GitHub Actions run | `tools\u002Fscripts\u002FDownloadFailingJobLogs.cs` |\n| `CreateFailingTestIssue` | Resolve a failing test from PR\u002Frun\u002Fjob URLs and create\u002Fupdate issues | `tools\u002FCreateFailingTestIssue` |\n| `\u002Fcreate-issue` workflow | Create, reopen, or comment on failing-test issues from issue\u002FPR comments | `.github\u002Fworkflows\u002Fcreate-failing-test-issue.yml` |\n\n## Quick Start\n\n### Step 1: Find the Run ID\n\nGet the run ID from the GitHub Actions URL or use the `gh` CLI:\n\n```bash\n# From URL: https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F19846215629\n#                                                        ^^^^^^^^^^\n#                                                        run ID\n\n# Or find the latest run on a branch\ngh run list --repo microsoft\u002Faspire --branch \u003Cbranch-name> --limit 1 --json databaseId --jq '.[0].databaseId'\n\n# Or for a PR\ngh pr checks \u003Cpr-number> --repo microsoft\u002Faspire\n```\n\n```powershell\n# From URL: https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F19846215629\n#                                                        ^^^^^^^^^^\n#                                                        run ID\n\n# Or find the latest run on a branch\ngh run list --repo microsoft\u002Faspire --branch \u003Cbranch-name> --limit 1 --json databaseId --jq '.[0].databaseId'\n\n# Or for a PR\ngh pr checks \u003Cpr-number> --repo microsoft\u002Faspire\n```\n\n### Step 2: Run the Tool\n\n```bash\ncd tools\u002Fscripts\ndotnet run DownloadFailingJobLogs.cs -- \u003Crun-id>\n```\n\n```powershell\nSet-Location tools\u002Fscripts\ndotnet run DownloadFailingJobLogs.cs -- \u003Crun-id>\n```\n\n**Example:**\n```bash\ndotnet run DownloadFailingJobLogs.cs -- 19846215629\n```\n\n### Step 3: Analyze Output\n\nThe tool creates files in your current directory:\n\n| File Pattern | Contents |\n|--------------|----------|\n| `failed_job_\u003Cn>_\u003Cjob-name>.log` | Raw job logs from GitHub Actions |\n| `artifact_\u003Cn>_\u003Ctestname>_\u003Cos>.zip` | Downloaded artifact zip files |\n| `artifact_\u003Cn>_\u003Ctestname>_\u003Cos>\u002F` | Extracted directory with .trx files, logs, binlogs |\n\n## What the Tool Does\n\n1. **Finds all failed jobs** in a GitHub Actions workflow run\n2. **Downloads job logs** for each failed job\n3. **Extracts test failures and errors** from logs using regex patterns\n4. **Determines artifact names** from job names (pattern: `logs-{testShortName}-{os}`)\n5. **Downloads test artifacts** containing .trx files and test logs\n6. **Extracts artifacts** to local directories for inspection\n\n## Creating or Updating Failing-Test Issues\n\nAfter you know which test failed, use the branch automation to create a failing-test issue in the known-issues format.\n\n### Preferred path: `\u002Fcreate-issue` from a PR or issue comment\n\nComment on the PR or issue with:\n\n```text\n\u002Fcreate-issue --test \"\u003Ctest-name>\" [--url \u003Cpr|run|job-url>] [--workflow \u003Cselector>] [--force-new]\n```\n\nExamples:\n\n```text\n\u002Fcreate-issue --test \"Tests.Namespace.Type.Method(input: 1)\"\n\u002Fcreate-issue --test \"Tests.Namespace.Type.Method(input: 1)\" --url https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F123\n\u002Fcreate-issue \"Tests.Namespace.Type.Method(input: 1)\" https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F123\u002Fjob\u002F456\n\u002Fcreate-issue --test \"Tests.Namespace.Type.Method(input: 1)\" --url https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F123\u002Fattempts\u002F2\u002Fjob\u002F456?pr=321 --force-new\n```\n\nNotes:\n\n- When the command is posted on a PR and no `--url` is supplied, the workflow defaults to that PR URL.\n- `--workflow` defaults to `ci`.\n- `--force-new` bypasses issue reuse and always requests a fresh issue.\n- The workflow requires write or admin access to the repository before it will create or update issues.\n\n### Supported source URLs\n\nThe resolver accepts:\n\n- Pull request URLs: `https:\u002F\u002Fgithub.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpull\u002F\u003Cnumber>`\n- Workflow run URLs: `https:\u002F\u002Fgithub.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Factions\u002Fruns\u002F\u003Crun-id>`\n- Attempt URLs: `https:\u002F\u002Fgithub.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Factions\u002Fruns\u002F\u003Crun-id>\u002Fattempts\u002F\u003Cattempt>`\n- Job URLs: `https:\u002F\u002Fgithub.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Factions\u002Fruns\u002F\u003Crun-id>\u002Fjob\u002F\u003Cjob-id>`\n- Attempt job URLs with query strings\n\n### Local path: run the resolver directly\n\nAlways use `--output` to write results to a file so JSON is not interleaved with build output:\n\nTo generate the JSON result locally without creating an issue (dry run):\n\n```bash\ndotnet run --project tools\u002FCreateFailingTestIssue -- \\\n  --url \"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F123\" \\\n  --test \"\u003Ctest-name>\" \\\n  --repo \"microsoft\u002Faspire\" \\\n  --output \u002Ftmp\u002Fcfti-result.json\n```\n\n```powershell\ndotnet run --project tools\u002FCreateFailingTestIssue -- `\n  --url \"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F123\" `\n  --test \"\u003Ctest-name>\" `\n  --repo \"microsoft\u002Faspire\" `\n  --output $env:TEMP\u002Fcfti-result.json\n```\n\nTo resolve the failure **and create the issue on GitHub** in one step:\n\n```bash\ndotnet run --project tools\u002FCreateFailingTestIssue -- \\\n  --url \"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F123\" \\\n  --test \"\u003Ctest-name>\" \\\n  --repo \"microsoft\u002Faspire\" \\\n  --create \\\n  --output \u002Ftmp\u002Fcfti-result.json\n```\n\n```powershell\ndotnet run --project tools\u002FCreateFailingTestIssue -- `\n  --url \"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F123\" `\n  --test \"\u003Ctest-name>\" `\n  --repo \"microsoft\u002Faspire\" `\n  --create `\n  --output $env:TEMP\u002Fcfti-result.json\n```\n\nRead the result with `jq`:\n\n```bash\njq '{ success, issue: .issue, availableFailedTests: .diagnostics.availableFailedTests }' \u002Ftmp\u002Fcfti-result.json\n```\n\n```powershell\nGet-Content $env:TEMP\u002Fcfti-result.json | ConvertFrom-Json | Select-Object success, @{N='issue';E={$_.issue}}, @{N='availableFailedTests';E={$_.diagnostics.availableFailedTests}}\n```\n\nIf `--test` is omitted, the tool emits structured JSON for all failing tests it found in the run (useful for picking which test to file).\n\nThe command writes a `diagnostics.log` file in the current directory. The JSON output (written to the `--output` file or stdout) contains:\n\n- the resolved run and job URLs\n- either the matched canonical and display test names plus generated issue content, or a per-test list of all failures in the run\n- primary failure details (error, stack trace, stdout)\n- when `--create` is set, the created issue number and URL\n- warnings and alternate failed-test names if the match fails\n\n### What the resolver does\n\n`CreateFailingTestIssue`:\n\n1. Resolves the workflow selector and source URL.\n2. Finds the workflow run and failed jobs, including attempt URLs.\n3. Downloads failed test occurrences from `.trx` artifacts.\n4. Falls back to failed job logs when artifacts are missing or the run is still active.\n5. Matches the requested test using canonical or display names.\n6. Generates issue content that matches `.github\u002FISSUE_TEMPLATE\u002F50_failing_test.yml`. The error details code block is wrapped in a collapsible `\u003Cdetails>` element when it exceeds 30 lines.\n7. Reuses an open issue with the same stable signature, reopens a closed one, or creates a new issue.\n\n### Finding the failed tests to file\n\nFor a run with multiple failures, first extract the candidate test names, then issue one `\u002Fcreate-issue` command per test:\n\n```powershell\nGet-ChildItem -Path \"artifact_*\" -Recurse -Filter \"*.trx\" | ForEach-Object {\n    [xml]$xml = Get-Content $_.FullName\n    $xml.TestRun.Results.UnitTestResult |\n        Where-Object { $_.outcome -eq \"Failed\" } |\n        Select-Object -ExpandProperty testName\n}\n```\n\nIf the resolver cannot match the requested test exactly, it returns `availableFailedTests` so you can retry with one of the discovered names.\n\n## Example Workflow\n\n```bash\n# 1. Check failed jobs on a PR\ngh pr checks 14105 --repo microsoft\u002Faspire 2>&1 | Where-Object { $_ -match \"fail\" }\n\n# 2. Get the run ID\n$runId = gh run list --repo microsoft\u002Faspire --branch davidfowl\u002Fmy-branch --limit 1 --json databaseId --jq '.[0].databaseId'\n\n# 3. Download failure logs\ncd tools\u002Fscripts\ndotnet run DownloadFailingJobLogs.cs -- $runId\n\n# 4. Search for errors in downloaded logs\nGet-Content \"failed_job_0_*.log\" | Select-String -Pattern \"error|Error:\" -Context 2,3 | Select-Object -First 20\n\n# 5. Check .trx files for test failures\nGet-ChildItem -Recurse -Filter \"*.trx\" | ForEach-Object {\n    [xml]$xml = Get-Content $_.FullName\n    $xml.TestRun.Results.UnitTestResult | Where-Object { $_.outcome -eq \"Failed\" }\n}\n\n# 6. Create or update the failing-test issue from the PR or issue thread\n\u002Fcreate-issue --test \"Tests.Namespace.Type.Method(input: 1)\" --url https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F$runId\n```\n\n## Understanding Job Log Output\n\nThe tool prints a summary for each failed job:\n\n```\n=== Failed Job 1\u002F1 ===\nName: Tests \u002F Integrations macos (Hosting.Azure) \u002F Hosting.Azure (macos-latest)\nID: 56864254427\nURL: https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F19846215629\u002Fjob\u002F56864254427\nDownloading job logs...\nSaved job logs to: failed_job_0_Tests___Integrations_macos__Hosting_Azure____Hosting_Azure__macos-latest_.log\n\nErrors found (2):\n  - System.InvalidOperationException: Step 'provision-api-service' failed...\n```\n\n## Searching Downloaded Logs\n\n### Find Errors in Job Logs\n\n```powershell\n# PowerShell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"error|Error:\" -Context 2,3\n\n# Bash\ngrep -i \"error\" failed_job_*.log | head -50\n```\n\n### Find Build Failures\n\n```powershell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"Build FAILED|error MSB|error CS\"\n```\n\n### Find Test Failures\n\n```powershell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"Failed!\" -Context 5,0\n```\n\n### Check for Disk Space Issues\n\n```powershell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"No space left|disk space\"\n```\n\n### Check for Timeout Issues\n\n```powershell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"timeout|timed out|Timeout\"\n```\n\n## Using GitHub API for Annotations\n\nSometimes job logs aren't available (404). Use annotations instead:\n\n```bash\ngh api repos\u002Fmicrosoft\u002Faspire\u002Fcheck-runs\u002F\u003Cjob-id>\u002Fannotations\n```\n\nThis returns structured error information even when full logs aren't downloadable.\n\n## Common Failure Patterns\n\n### Disk Space Exhaustion\n\n**Symptom:** `No space left on device` in annotations or logs\n\n**Diagnosis:**\n```powershell\ngh api repos\u002Fmicrosoft\u002Faspire\u002Fcheck-runs\u002F\u003Cjob-id>\u002Fannotations 2>&1\n```\n\n**Common fixes:**\n- Add disk cleanup step before build\n- Use larger runner (e.g., `8-core-ubuntu-latest`)\n- Skip unnecessary build steps (e.g., `\u002Fp:BuildTests=false`)\n\n### Command Not Found\n\n**Symptom:** `exit code 127` or `command not found`\n\n**Diagnosis:**\n```powershell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"command not found|exit code 127\" -Context 3,1\n```\n\n**Common fixes:**\n- Ensure PATH includes required tools\n- Use full path to executables\n- Install missing dependencies\n\n### Test Timeout\n\n**Symptom:** Test hangs, then fails with timeout\n\n**Diagnosis:**\n```powershell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"Test host process exited|Timeout|timed out\"\n```\n\n**Common fixes:**\n- Increase test timeout\n- Check for deadlocks in test code\n- Review Heartbeat.cs output for resource exhaustion\n\n### Build Failure\n\n**Symptom:** `Build FAILED` or MSBuild errors\n\n**Diagnosis:**\n```powershell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"error CS|error MSB|Build FAILED\" -Context 0,3\n```\n\n**Common fixes:**\n- Check for missing project references\n- Verify package versions\n- Download and analyze .binlog from artifacts\n\n## Artifact Contents\n\nDownloaded artifacts typically contain:\n\n```\nartifact_0_TestName_os\u002F\n├── testresults\u002F\n│   ├── TestName_net10.0_timestamp.trx    # Test results XML\n│   ├── Aspire.*.Tests_*.log              # Console output\n│   ├── recordings\u002F                        # Asciinema recordings (CLI E2E tests)\n│   └── workspaces\u002F                        # Captured project workspaces (CLI E2E tests)\n│       └── TestClassName.MethodName\u002F      # Full generated project for failed tests\n│           ├── apphost.ts\n│           ├── aspire.config.json\n│           ├── .aspire\u002Fmodules\u002F                  # Generated SDK (aspire.js) - key for debugging\n│           └── ...\n├── *.crash.dmp                            # Crash dump (if test crashed)\n└── test.binlog                            # MSBuild binary log\n```\n\n### CLI E2E Workspace Capture\n\nCLI E2E tests annotated with `[CaptureWorkspaceOnFailure]` automatically capture the full generated project workspace when a test fails. This includes the generated SDK (`.aspire\u002Fmodules\u002Faspire.js`), template output, and config files — critical for debugging template generation or `aspire run` failures.\n\nLook in `testresults\u002Fworkspaces\u002F{TestClassName.MethodName}\u002F` inside the downloaded artifact.\n\n## Parsing .trx Files\n\n```powershell\n# Find all failed tests in .trx files\nGet-ChildItem -Path \"artifact_*\" -Recurse -Filter \"*.trx\" | ForEach-Object {\n    Write-Host \"=== $($_.Name) ===\"\n    [xml]$xml = Get-Content $_.FullName\n    $xml.TestRun.Results.UnitTestResult | Where-Object { $_.outcome -eq \"Failed\" } | ForEach-Object {\n        Write-Host \"FAILED: $($_.testName)\"\n        Write-Host $_.Output.ErrorInfo.Message\n        Write-Host \"---\"\n    }\n}\n```\n\n## Tips\n\n### Clean Up Before Running\n\n```powershell\nRemove-Item *.log -Force -ErrorAction SilentlyContinue\nRemove-Item *.zip -Force -ErrorAction SilentlyContinue\nRemove-Item -Recurse artifact_* -Force -ErrorAction SilentlyContinue\n```\n\n### Run From tools\u002Fscripts Directory\n\nThe tool creates files in the current directory, so run it from `tools\u002Fscripts` to keep things organized:\n\n```bash\ncd tools\u002Fscripts\ndotnet run DownloadFailingJobLogs.cs -- \u003Crun-id>\n```\n\n```powershell\nSet-Location tools\u002Fscripts\ndotnet run DownloadFailingJobLogs.cs -- \u003Crun-id>\n```\n\n### Don't Commit Log Files\n\nThe downloaded log files can be large. Don't commit them to the repository:\n\n```bash\n# Before committing\nrm tools\u002Fscripts\u002F*.log\nrm tools\u002Fscripts\u002F*.zip\nrm -rf tools\u002Fscripts\u002Fartifact_*\n```\n\n```powershell\n# Before committing\nRemove-Item tools\u002Fscripts\u002F*.log -Force -ErrorAction SilentlyContinue\nRemove-Item tools\u002Fscripts\u002F*.zip -Force -ErrorAction SilentlyContinue\nRemove-Item tools\u002Fscripts\u002Fartifact_* -Recurse -Force -ErrorAction SilentlyContinue\n```\n\n## Prerequisites\n\n- .NET 10 SDK or later\n- GitHub CLI (`gh`) installed and authenticated\n- Access to the microsoft\u002Faspire repository\n\n## See Also\n\n- `tools\u002Fscripts\u002FREADME.md` - Full documentation\n- `tools\u002Fscripts\u002FHeartbeat.cs` - System monitoring tool for diagnosing hangs\n- `.agents\u002Fskills\u002Fcli-e2e-testing\u002FSKILL.md` - CLI E2E test troubleshooting\n","# CI Test Failure Diagnosis and Issue Filing\n\n## Recipe: Create an Issue for a Test Failure\n\nWhen the user asks to create an issue for a failing test, follow these steps. Always redirect full output to a log file (not `tail`) so you can inspect it if the command fails.\n\n### Step 1: List failed tests (if user didn't specify one)\n\nOmit `--test` to discover all failures. Redirect output to a log file:\n\n```bash\ndotnet run --project tools\u002FCreateFailingTestIssue -- \\\n  --url \"\u003Cthe-url-the-user-gave>\" \\\n  --output \u002Ftmp\u002Fcfti-result.json \\\n  > \u002Ftmp\u002Fcfti-list.log 2>&1\n```\n\n```powershell\ndotnet run --project tools\u002FCreateFailingTestIssue -- `\n  --url \"\u003Cthe-url-the-user-gave>\" `\n  --output $env:TEMP\u002Fcfti-result.json `\n  > $env:TEMP\u002Fcfti-list.log 2>&1\n```\n\nThen read the result with `jq`:\n\n```bash\njq '{ success, availableFailedTests: .diagnostics.availableFailedTests, errorMessage: .errorMessage }' \u002Ftmp\u002Fcfti-result.json\n```\n\n```powershell\nGet-Content $env:TEMP\u002Fcfti-result.json | ConvertFrom-Json | Select-Object success, errorMessage, @{N='availableFailedTests';E={$_.diagnostics.availableFailedTests}}\n```\n\nIf `success` is `false`, inspect the full log: `cat \u002Ftmp\u002Fcfti-list.log` (bash) or `Get-Content $env:TEMP\u002Fcfti-list.log` (PowerShell).\n\nAsk the user which test to file for, then proceed to Step 2.\n\n### Step 2: Create the issue\n\n```bash\ndotnet run --project tools\u002FCreateFailingTestIssue -- \\\n  --url \"\u003Cthe-url-the-user-gave>\" \\\n  --test \"\u003Ctest-name>\" \\\n  --create \\\n  --output \u002Ftmp\u002Fcfti-result.json \\\n  > \u002Ftmp\u002Fcfti-create.log 2>&1\n```\n\n```powershell\ndotnet run --project tools\u002FCreateFailingTestIssue -- `\n  --url \"\u003Cthe-url-the-user-gave>\" `\n  --test \"\u003Ctest-name>\" `\n  --create `\n  --output $env:TEMP\u002Fcfti-result.json `\n  > $env:TEMP\u002Fcfti-create.log 2>&1\n```\n\nThen read the result:\n\n```bash\njq '{ success, issue: .issue.createdIssue, errorMessage: .errorMessage }' \u002Ftmp\u002Fcfti-result.json\n```\n\n```powershell\nGet-Content $env:TEMP\u002Fcfti-result.json | ConvertFrom-Json | Select-Object success, errorMessage, @{N='issue';E={$_.issue.createdIssue}}\n```\n\nIf `success` is `false`, inspect the full log: `cat \u002Ftmp\u002Fcfti-create.log` (bash) or `Get-Content $env:TEMP\u002Fcfti-create.log` (PowerShell).\n\nThat's it — do not add analysis comments, do not use `--dry-run` unless the user explicitly asks for a preview.\n\n**Rules:**\n- Always use `--output \u003Cfile>` to keep JSON clean. Do NOT try to parse JSON from stdout — it is interleaved with dotnet build progress output.\n- Use `jq` to extract fields from the output file. Key paths:\n  - `.success` — whether the operation succeeded\n  - `.issue.createdIssue.number` and `.issue.createdIssue.url` — the created\u002Fupdated issue\n  - `.diagnostics.availableFailedTests[]` — test names when `--test` is omitted\n  - `.errorMessage` — error details when `.success` is false\n- Do NOT create issues manually with `gh issue create`. The tool handles everything: resolving the run, finding the test, generating a template-compliant body, and creating the issue.\n- Do NOT invent your own issue markdown. The tool generates content that matches `.github\u002FISSUE_TEMPLATE\u002F50_failing_test.yml`.\n- If the tool fails, report the error from `diagnostics.log` and the JSON output. Do not fall back to manual issue creation.\n\n## Recipe: Investigate a Failing Run (No Issue Creation)\n\nTo download and inspect failure artifacts without creating an issue:\n\n```bash\ncd tools\u002Fscripts\ndotnet run DownloadFailingJobLogs.cs -- \u003Crun-id>\n```\n\n```powershell\nSet-Location tools\u002Fscripts\ndotnet run DownloadFailingJobLogs.cs -- \u003Crun-id>\n```\n\nThen search the downloaded logs and `.trx` files for errors.\n\n---\n\n## Reference Documentation\n\nEverything below is reference material for edge cases and deeper investigation.\n\n### Overview\n\nUse this skill in two phases:\n\n1. **Investigate the run** with `DownloadFailingJobLogs.cs` to fetch failed job logs and artifacts.\n2. **Create or update a failing-test issue** with `tools\u002FCreateFailingTestIssue --create`.\n\n### Tools covered\n\n| Tool | Purpose | Location |\n|------|---------|----------|\n| `DownloadFailingJobLogs.cs` | Download failed job logs and test artifacts from a GitHub Actions run | `tools\u002Fscripts\u002FDownloadFailingJobLogs.cs` |\n| `CreateFailingTestIssue` | Resolve a failing test from PR\u002Frun\u002Fjob URLs and create\u002Fupdate issues | `tools\u002FCreateFailingTestIssue` |\n| `\u002Fcreate-issue` workflow | Create, reopen, or comment on failing-test issues from issue\u002FPR comments | `.github\u002Fworkflows\u002Fcreate-failing-test-issue.yml` |\n\n## Quick Start\n\n### Step 1: Find the Run ID\n\nGet the run ID from the GitHub Actions URL or use the `gh` CLI:\n\n```bash\n# From URL: https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F19846215629\n#                                                        ^^^^^^^^^^\n#                                                        run ID\n\n# Or find the latest run on a branch\ngh run list --repo microsoft\u002Faspire --branch \u003Cbranch-name> --limit 1 --json databaseId --jq '.[0].databaseId'\n\n# Or for a PR\ngh pr checks \u003Cpr-number> --repo microsoft\u002Faspire\n```\n\n```powershell\n# From URL: https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F19846215629\n#                                                        ^^^^^^^^^^\n#                                                        run ID\n\n# Or find the latest run on a branch\ngh run list --repo microsoft\u002Faspire --branch \u003Cbranch-name> --limit 1 --json databaseId --jq '.[0].databaseId'\n\n# Or for a PR\ngh pr checks \u003Cpr-number> --repo microsoft\u002Faspire\n```\n\n### Step 2: Run the Tool\n\n```bash\ncd tools\u002Fscripts\ndotnet run DownloadFailingJobLogs.cs -- \u003Crun-id>\n```\n\n```powershell\nSet-Location tools\u002Fscripts\ndotnet run DownloadFailingJobLogs.cs -- \u003Crun-id>\n```\n\n**Example:**\n```bash\ndotnet run DownloadFailingJobLogs.cs -- 19846215629\n```\n\n### Step 3: Analyze Output\n\nThe tool creates files in your current directory:\n\n| File Pattern | Contents |\n|--------------|----------|\n| `failed_job_\u003Cn>_\u003Cjob-name>.log` | Raw job logs from GitHub Actions |\n| `artifact_\u003Cn>_\u003Ctestname>_\u003Cos>.zip` | Downloaded artifact zip files |\n| `artifact_\u003Cn>_\u003Ctestname>_\u003Cos>\u002F` | Extracted directory with .trx files, logs, binlogs |\n\n## What the Tool Does\n\n1. **Finds all failed jobs** in a GitHub Actions workflow run\n2. **Downloads job logs** for each failed job\n3. **Extracts test failures and errors** from logs using regex patterns\n4. **Determines artifact names** from job names (pattern: `logs-{testShortName}-{os}`)\n5. **Downloads test artifacts** containing .trx files and test logs\n6. **Extracts artifacts** to local directories for inspection\n\n## Creating or Updating Failing-Test Issues\n\nAfter you know which test failed, use the branch automation to create a failing-test issue in the known-issues format.\n\n### Preferred path: `\u002Fcreate-issue` from a PR or issue comment\n\nComment on the PR or issue with:\n\n```text\n\u002Fcreate-issue --test \"\u003Ctest-name>\" [--url \u003Cpr|run|job-url>] [--workflow \u003Cselector>] [--force-new]\n```\n\nExamples:\n\n```text\n\u002Fcreate-issue --test \"Tests.Namespace.Type.Method(input: 1)\"\n\u002Fcreate-issue --test \"Tests.Namespace.Type.Method(input: 1)\" --url https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F123\n\u002Fcreate-issue \"Tests.Namespace.Type.Method(input: 1)\" https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F123\u002Fjob\u002F456\n\u002Fcreate-issue --test \"Tests.Namespace.Type.Method(input: 1)\" --url https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F123\u002Fattempts\u002F2\u002Fjob\u002F456?pr=321 --force-new\n```\n\nNotes:\n\n- When the command is posted on a PR and no `--url` is supplied, the workflow defaults to that PR URL.\n- `--workflow` defaults to `ci`.\n- `--force-new` bypasses issue reuse and always requests a fresh issue.\n- The workflow requires write or admin access to the repository before it will create or update issues.\n\n### Supported source URLs\n\nThe resolver accepts:\n\n- Pull request URLs: `https:\u002F\u002Fgithub.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpull\u002F\u003Cnumber>`\n- Workflow run URLs: `https:\u002F\u002Fgithub.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Factions\u002Fruns\u002F\u003Crun-id>`\n- Attempt URLs: `https:\u002F\u002Fgithub.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Factions\u002Fruns\u002F\u003Crun-id>\u002Fattempts\u002F\u003Cattempt>`\n- Job URLs: `https:\u002F\u002Fgithub.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Factions\u002Fruns\u002F\u003Crun-id>\u002Fjob\u002F\u003Cjob-id>`\n- Attempt job URLs with query strings\n\n### Local path: run the resolver directly\n\nAlways use `--output` to write results to a file so JSON is not interleaved with build output:\n\nTo generate the JSON result locally without creating an issue (dry run):\n\n```bash\ndotnet run --project tools\u002FCreateFailingTestIssue -- \\\n  --url \"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F123\" \\\n  --test \"\u003Ctest-name>\" \\\n  --repo \"microsoft\u002Faspire\" \\\n  --output \u002Ftmp\u002Fcfti-result.json\n```\n\n```powershell\ndotnet run --project tools\u002FCreateFailingTestIssue -- `\n  --url \"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F123\" `\n  --test \"\u003Ctest-name>\" `\n  --repo \"microsoft\u002Faspire\" `\n  --output $env:TEMP\u002Fcfti-result.json\n```\n\nTo resolve the failure **and create the issue on GitHub** in one step:\n\n```bash\ndotnet run --project tools\u002FCreateFailingTestIssue -- \\\n  --url \"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F123\" \\\n  --test \"\u003Ctest-name>\" \\\n  --repo \"microsoft\u002Faspire\" \\\n  --create \\\n  --output \u002Ftmp\u002Fcfti-result.json\n```\n\n```powershell\ndotnet run --project tools\u002FCreateFailingTestIssue -- `\n  --url \"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F123\" `\n  --test \"\u003Ctest-name>\" `\n  --repo \"microsoft\u002Faspire\" `\n  --create `\n  --output $env:TEMP\u002Fcfti-result.json\n```\n\nRead the result with `jq`:\n\n```bash\njq '{ success, issue: .issue, availableFailedTests: .diagnostics.availableFailedTests }' \u002Ftmp\u002Fcfti-result.json\n```\n\n```powershell\nGet-Content $env:TEMP\u002Fcfti-result.json | ConvertFrom-Json | Select-Object success, @{N='issue';E={$_.issue}}, @{N='availableFailedTests';E={$_.diagnostics.availableFailedTests}}\n```\n\nIf `--test` is omitted, the tool emits structured JSON for all failing tests it found in the run (useful for picking which test to file).\n\nThe command writes a `diagnostics.log` file in the current directory. The JSON output (written to the `--output` file or stdout) contains:\n\n- the resolved run and job URLs\n- either the matched canonical and display test names plus generated issue content, or a per-test list of all failures in the run\n- primary failure details (error, stack trace, stdout)\n- when `--create` is set, the created issue number and URL\n- warnings and alternate failed-test names if the match fails\n\n### What the resolver does\n\n`CreateFailingTestIssue`:\n\n1. Resolves the workflow selector and source URL.\n2. Finds the workflow run and failed jobs, including attempt URLs.\n3. Downloads failed test occurrences from `.trx` artifacts.\n4. Falls back to failed job logs when artifacts are missing or the run is still active.\n5. Matches the requested test using canonical or display names.\n6. Generates issue content that matches `.github\u002FISSUE_TEMPLATE\u002F50_failing_test.yml`. The error details code block is wrapped in a collapsible `\u003Cdetails>` element when it exceeds 30 lines.\n7. Reuses an open issue with the same stable signature, reopens a closed one, or creates a new issue.\n\n### Finding the failed tests to file\n\nFor a run with multiple failures, first extract the candidate test names, then issue one `\u002Fcreate-issue` command per test:\n\n```powershell\nGet-ChildItem -Path \"artifact_*\" -Recurse -Filter \"*.trx\" | ForEach-Object {\n    [xml]$xml = Get-Content $_.FullName\n    $xml.TestRun.Results.UnitTestResult |\n        Where-Object { $_.outcome -eq \"Failed\" } |\n        Select-Object -ExpandProperty testName\n}\n```\n\nIf the resolver cannot match the requested test exactly, it returns `availableFailedTests` so you can retry with one of the discovered names.\n\n## Example Workflow\n\n```bash\n# 1. Check failed jobs on a PR\ngh pr checks 14105 --repo microsoft\u002Faspire 2>&1 | Where-Object { $_ -match \"fail\" }\n\n# 2. Get the run ID\n$runId = gh run list --repo microsoft\u002Faspire --branch davidfowl\u002Fmy-branch --limit 1 --json databaseId --jq '.[0].databaseId'\n\n# 3. Download failure logs\ncd tools\u002Fscripts\ndotnet run DownloadFailingJobLogs.cs -- $runId\n\n# 4. Search for errors in downloaded logs\nGet-Content \"failed_job_0_*.log\" | Select-String -Pattern \"error|Error:\" -Context 2,3 | Select-Object -First 20\n\n# 5. Check .trx files for test failures\nGet-ChildItem -Recurse -Filter \"*.trx\" | ForEach-Object {\n    [xml]$xml = Get-Content $_.FullName\n    $xml.TestRun.Results.UnitTestResult | Where-Object { $_.outcome -eq \"Failed\" }\n}\n\n# 6. Create or update the failing-test issue from the PR or issue thread\n\u002Fcreate-issue --test \"Tests.Namespace.Type.Method(input: 1)\" --url https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F$runId\n```\n\n## Understanding Job Log Output\n\nThe tool prints a summary for each failed job:\n\n```\n=== Failed Job 1\u002F1 ===\nName: Tests \u002F Integrations macos (Hosting.Azure) \u002F Hosting.Azure (macos-latest)\nID: 56864254427\nURL: https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Factions\u002Fruns\u002F19846215629\u002Fjob\u002F56864254427\nDownloading job logs...\nSaved job logs to: failed_job_0_Tests___Integrations_macos__Hosting_Azure____Hosting_Azure__macos-latest_.log\n\nErrors found (2):\n  - System.InvalidOperationException: Step 'provision-api-service' failed...\n```\n\n## Searching Downloaded Logs\n\n### Find Errors in Job Logs\n\n```powershell\n# PowerShell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"error|Error:\" -Context 2,3\n\n# Bash\ngrep -i \"error\" failed_job_*.log | head -50\n```\n\n### Find Build Failures\n\n```powershell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"Build FAILED|error MSB|error CS\"\n```\n\n### Find Test Failures\n\n```powershell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"Failed!\" -Context 5,0\n```\n\n### Check for Disk Space Issues\n\n```powershell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"No space left|disk space\"\n```\n\n### Check for Timeout Issues\n\n```powershell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"timeout|timed out|Timeout\"\n```\n\n## Using GitHub API for Annotations\n\nSometimes job logs aren't available (404). Use annotations instead:\n\n```bash\ngh api repos\u002Fmicrosoft\u002Faspire\u002Fcheck-runs\u002F\u003Cjob-id>\u002Fannotations\n```\n\nThis returns structured error information even when full logs aren't downloadable.\n\n## Common Failure Patterns\n\n### Disk Space Exhaustion\n\n**Symptom:** `No space left on device` in annotations or logs\n\n**Diagnosis:**\n```powershell\ngh api repos\u002Fmicrosoft\u002Faspire\u002Fcheck-runs\u002F\u003Cjob-id>\u002Fannotations 2>&1\n```\n\n**Common fixes:**\n- Add disk cleanup step before build\n- Use larger runner (e.g., `8-core-ubuntu-latest`)\n- Skip unnecessary build steps (e.g., `\u002Fp:BuildTests=false`)\n\n### Command Not Found\n\n**Symptom:** `exit code 127` or `command not found`\n\n**Diagnosis:**\n```powershell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"command not found|exit code 127\" -Context 3,1\n```\n\n**Common fixes:**\n- Ensure PATH includes required tools\n- Use full path to executables\n- Install missing dependencies\n\n### Test Timeout\n\n**Symptom:** Test hangs, then fails with timeout\n\n**Diagnosis:**\n```powershell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"Test host process exited|Timeout|timed out\"\n```\n\n**Common fixes:**\n- Increase test timeout\n- Check for deadlocks in test code\n- Review Heartbeat.cs output for resource exhaustion\n\n### Build Failure\n\n**Symptom:** `Build FAILED` or MSBuild errors\n\n**Diagnosis:**\n```powershell\nGet-Content \"failed_job_*.log\" | Select-String -Pattern \"error CS|error MSB|Build FAILED\" -Context 0,3\n```\n\n**Common fixes:**\n- Check for missing project references\n- Verify package versions\n- Download and analyze .binlog from artifacts\n\n## Artifact Contents\n\nDownloaded artifacts typically contain:\n\n```\nartifact_0_TestName_os\u002F\n├── testresults\u002F\n│   ├── TestName_net10.0_timestamp.trx    # Test results XML\n│   ├── Aspire.*.Tests_*.log              # Console output\n│   ├── recordings\u002F                        # Asciinema recordings (CLI E2E tests)\n│   └── workspaces\u002F                        # Captured project workspaces (CLI E2E tests)\n│       └── TestClassName.MethodName\u002F      # Full generated project for failed tests\n│           ├── apphost.ts\n│           ├── aspire.config.json\n│           ├── .aspire\u002Fmodules\u002F                  # Generated SDK (aspire.js) - key for debugging\n│           └── ...\n├── *.crash.dmp                            # Crash dump (if test crashed)\n└── test.binlog                            # MSBuild binary log\n```\n\n### CLI E2E Workspace Capture\n\nCLI E2E tests annotated with `[CaptureWorkspaceOnFailure]` automatically capture the full generated project workspace when a test fails. This includes the generated SDK (`.aspire\u002Fmodules\u002Faspire.js`), template output, and config files — critical for debugging template generation or `aspire run` failures.\n\nLook in `testresults\u002Fworkspaces\u002F{TestClassName.MethodName}\u002F` inside the downloaded artifact.\n\n## Parsing .trx Files\n\n```powershell\n# Find all failed tests in .trx files\nGet-ChildItem -Path \"artifact_*\" -Recurse -Filter \"*.trx\" | ForEach-Object {\n    Write-Host \"=== $($_.Name) ===\"\n    [xml]$xml = Get-Content $_.FullName\n    $xml.TestRun.Results.UnitTestResult | Where-Object { $_.outcome -eq \"Failed\" } | ForEach-Object {\n        Write-Host \"FAILED: $($_.testName)\"\n        Write-Host $_.Output.ErrorInfo.Message\n        Write-Host \"---\"\n    }\n}\n```\n\n## Tips\n\n### Clean Up Before Running\n\n```powershell\nRemove-Item *.log -Force -ErrorAction SilentlyContinue\nRemove-Item *.zip -Force -ErrorAction SilentlyContinue\nRemove-Item -Recurse artifact_* -Force -ErrorAction SilentlyContinue\n```\n\n### Run From tools\u002Fscripts Directory\n\nThe tool creates files in the current directory, so run it from `tools\u002Fscripts` to keep things organized:\n\n```bash\ncd tools\u002Fscripts\ndotnet run DownloadFailingJobLogs.cs -- \u003Crun-id>\n```\n\n```powershell\nSet-Location tools\u002Fscripts\ndotnet run DownloadFailingJobLogs.cs -- \u003Crun-id>\n```\n\n### Don't Commit Log Files\n\nThe downloaded log files can be large. Don't commit them to the repository:\n\n```bash\n# Before committing\nrm tools\u002Fscripts\u002F*.log\nrm tools\u002Fscripts\u002F*.zip\nrm -rf tools\u002Fscripts\u002Fartifact_*\n```\n\n```powershell\n# Before committing\nRemove-Item tools\u002Fscripts\u002F*.log -Force -ErrorAction SilentlyContinue\nRemove-Item tools\u002Fscripts\u002F*.zip -Force -ErrorAction SilentlyContinue\nRemove-Item tools\u002Fscripts\u002Fartifact_* -Recurse -Force -ErrorAction SilentlyContinue\n```\n\n## Prerequisites\n\n- .NET 10 SDK or later\n- GitHub CLI (`gh`) installed and authenticated\n- Access to the microsoft\u002Faspire repository\n\n## See Also\n\n- `tools\u002Fscripts\u002FREADME.md` - Full documentation\n- `tools\u002Fscripts\u002FHeartbeat.cs` - System monitoring tool for diagnosing hangs\n- `.agents\u002Fskills\u002Fcli-e2e-testing\u002FSKILL.md` - CLI E2E test troubleshooting\n",{"name":5,"description":7},"main","cec61ac9b795bbfd9913f0c7196689b0d7a215d7",".agents\u002Fskills\u002Fci-test-failures",1039,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire","https:\u002F\u002Faspire.dev","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-15 00:32:23",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add microsoft\u002Faspire --skill ci-test-failures",{"tool":64,"command":65},"bunx","bunx skills add microsoft\u002Faspire --skill ci-test-failures",{"tool":67,"command":68},"pnpm","pnpm dlx skills add microsoft\u002Faspire --skill ci-test-failures","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fci-test-failures\u002FSKILL.md",true,[],[73,105,129,140,158,184],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":88,"publishedAt":43},"01M6FKZQPMA7VRA0PRBZRDFJTX","vscode-extension","Use when investigating, developing, debugging, testing, or reviewing Aspire VS Code extension behavior under extension\u002F, including extension UI, command, debugger, RPC, DCP, MCP, and CLI-integration issues or features.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fvscode-extension\u002FSKILL.md",[79,80,83],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":81,"categoryName":82,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":84,"categoryName":85,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[89,90,91,92,93,94,95,96,97,40,98,99,100,101,102,103,33,104,29],"vscode","vscode extension","extension","testing","MCP","cli","aspire","debugging","code","rpc","ui","integration","debugger","command","behavior","features",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":114,"publishedAt":43},"01M6FKZJG81XP80SVWFBJVMDWN","update-container-images","Updates Docker container image tags used by Aspire hosting integrations. Queries registries for newer tags, uses LLM to determine version-compatible updates, and applies changes. Use this when asked to update container image versions.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fupdate-container-images\u002FSKILL.md",[111],{"categoryNo":112,"categoryName":113,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",[115,116,117,118,119,120,121,95,122,33,123,124,125,126,127,30,128,29],"container images","update","container","images","update container images","image","docker","integrations","version","hosting","queries","tags","updates","changes",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":136,"publishedAt":43},"01M6FKZDY1MY0QA62EYSDG5NHW","test-management","Quarantines or disables flaky\u002Fproblematic tests using the QuarantineTools utility","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftest-management\u002FSKILL.md",[135],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[24,137,138,32,139],"management","test management","utility",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":43},"01M6FKZAQ428JX8F6NSA19XBQJ","startup-perf","Measures Aspire startup profiling with CLI self-profile capture and dashboard export traces.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fstartup-perf\u002FSKILL.md",[],[147,148,149,94,150,95,151,152,153,154,155,156,157],"perf","startup","startup perf","dashboard","profiling","capture","profile","export","self","with","traces",{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":43},"01M6FKZ4W4J0ET0Q0C2Z30HYRV","reviewing-aspire-architecture","Use only when the user explicitly requests a deep Aspire architectural or pattern review of an existing PR or diff, or when a generic reviewer escalates a named Aspire-domain question it cannot resolve. Do not use for ordinary review, implementation, debugging, explanation, or design discussion—even when a PR is referenced—and never select it from changed file paths alone.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Freviewing-aspire-architecture\u002FSKILL.md",[],[165,95,166,167,168,169,96,170,171,172,173,33,174,175,176,177,178,179,180,181,30,182,183,29],"architecture","reviewing aspire architecture","design","review","pr","file","select","reviewer","question","diff","never","only","do","domain","pattern","deep","paths","Existing","generic",{"skillNo":185,"name":186,"nameZh":6,"description":187,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":188,"categories":189,"keywords":191,"publishedAt":43},"01M6FKYZ44BEPJNV8VQ0X73CZR","pr-testing","Use when asked to test a microsoft\u002Faspire pull request, including CLI, hosting, dashboard, component, template, and VS Code extension changes. Also covers testing PRs that change CI infrastructure — GitHub Actions (workflows, actions, gh-aw agentic workflows, CI scripts under .github\u002F and eng\u002F) and Azure DevOps pipelines (eng\u002Fpipelines, eng\u002Fcommon).","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faspire\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fpr-testing\u002FSKILL.md",[190],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[92,169,192,94,28,193,150,194,195,196,197,198,95,199,97,38,26,37,200,201,33,202,124,203,91,204,128,205],"pr testing","agentic","workflows","change","component","agentic workflows","azure devops","infrastructure","template","common","devops","pipelines","scripts","prs"]