[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M699AJGM8SWNSW0KGWA4B02P":3,"skill-same:01M699AJGM8SWNSW0KGWA4B02P":65},{"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":18,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":46,"ownerHtmlUrl":47,"ownerBlogUrl":48,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M699AJGM8SWNSW0KGWA4B02P","fix-ci-failures",null,"Investigate and fix CI failures on a pull request. Use when CI checks fail on a PR branch — covers finding the PR, identifying failed checks, downloading logs and artifacts, extracting the failure cause, and iterating on a fix. Requires the `gh` CLI.","microsoft\u002Fvscode","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M6998NK2WED5M549DX06VBCH",195270,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ffix-ci-failures\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],"fix","ci","fix ci","fix ci failures","extracting","request","when","pull request","investigate","logs","artifacts","use","gh","pr","branch","pull","cli","2026-11-10 10:12:30",false,"---\nname: fix-ci-failures\ndescription: Investigate and fix CI failures on a pull request. Use when CI checks fail on a PR branch — covers finding the PR, identifying failed checks, downloading logs and artifacts, extracting the failure cause, and iterating on a fix. Requires the `gh` CLI.\n---\n\n# Investigating and Fixing CI Failures\n\nThis skill guides you through diagnosing and fixing CI failures on a PR using the `gh` CLI. The user has the PR branch checked out locally.\n\n## Workflow Overview\n\n1. Identify the current branch and its PR\n2. Check CI status and find failed checks\n3. Download logs for failed jobs\n4. Extract and understand the failure\n5. Fix the issue and push\n\n---\n\n## Step 1: Identify the Branch and PR\n\n```bash\n# Get the current branch name\ngit branch --show-current\n\n# Find the PR for this branch\ngh pr view --json number,title,url,statusCheckRollup\n```\n\nIf no PR is found, the user may need to specify the PR number.\n\n---\n\n## Step 2: Check CI Status\n\n```bash\n# List all checks and their status (pass\u002Ffail\u002Fpending)\ngh pr checks --json name,state,link,bucket\n\n# Filter to only failed checks\ngh pr checks --json name,state,link,bucket --jq '.[] | select(.bucket == \"fail\")'\n```\n\nThe `link` field contains the URL to the GitHub Actions job. Extract the **run ID** from the URL — it's the number after `\u002Fruns\u002F`:\n```\nhttps:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Factions\u002Fruns\u002F\u003CRUN_ID>\u002Fjob\u002F\u003CJOB_ID>\n```\n\nIf checks are still `IN_PROGRESS`, wait for them to complete before downloading logs:\n```bash\ngh pr checks --watch --fail-fast\n```\n\n---\n\n## Step 3: Get Failed Job Details\n\n```bash\n# List failed jobs in a run (use the run ID from the check link)\ngh run view \u003CRUN_ID> --json jobs --jq '.jobs[] | select(.conclusion == \"failure\") | {name: .name, id: .databaseId}'\n```\n\n---\n\n## Step 4: Download Failure Logs\n\nThere are two approaches depending on the type of failure.\n\n### Option A: View Failed Step Logs Directly\n\nBest for build\u002Fcompile\u002Flint failures where the error is in the step output:\n\n```bash\n# View only the failed step logs (most useful — shows just the errors)\ngh run view \u003CRUN_ID> --job \u003CJOB_ID> --log-failed\n```\n\n> **Important**: `--log-failed` requires the **entire run** to complete, not just the failed job. If other jobs are still running, this command will block or error. Use **Option C** below to get logs for a completed job while the run is still in progress.\n\nThe output can be large. Pipe through `tail` or `grep` to focus:\n```bash\n# Last 100 lines of failed output\ngh run view \u003CRUN_ID> --job \u003CJOB_ID> --log-failed | tail -100\n\n# Search for common error patterns\ngh run view \u003CRUN_ID> --job \u003CJOB_ID> --log-failed | grep -E \"Error|FAIL|error TS|AssertionError|failing\"\n```\n\n### Option B: Download Artifacts\n\nBest for integration test failures where detailed logs (terminal logs, ext host logs, crash dumps) are uploaded as artifacts:\n\n```bash\n# List available artifacts for a run\ngh run download \u003CRUN_ID> --pattern '*' --dir \u002Fdev\u002Fnull 2>&1 || gh run view \u003CRUN_ID> --json jobs --jq '.jobs[].name'\n\n# Download log artifacts for a specific failed job\n# Artifact naming convention: logs-\u003Cplatform>-\u003Carch>-\u003Ctest-type>-\u003Cattempt>\n# Examples: logs-linux-x64-electron-extension-host-1, logs-linux-x64-remote-smoke-1\ngh run download \u003CRUN_ID> -n \"logs-linux-x64-electron-extension-host-1\" -D \u002Ftmp\u002Fci-logs\n\n# Download crash dumps if available\ngh run download \u003CRUN_ID> -n \"crash-dump-linux-x64-electron-extension-host-1\" -D \u002Ftmp\u002Fci-crashes\n```\n\n> **Tip**: The `\u003Ctest-type>` is the `ARTIFACT_NAME` in the `env` of the failed job in `.github\u002Fworkflows\u002Fpr-\u003Clinux|win32>-test.yml` (e.g., \"Linux \u002F Electron (extension host)\" → `electron-extension-host`, \"Linux \u002F Remote (integration)\" → `remote`). Map the platform with \"Windows\" → `windows-x64`, \"Linux\" → `linux-x64`.\n\n> **Warning**: Log artifacts may be empty if the test runner crashed before producing output (e.g., Electron download failure). In that case, fall back to **Option C**.\n\n### Option C: Download Per-Job Logs via API (works while run is in progress)\n\nWhen the run is still in progress but the failed job has completed, use the GitHub API to download that job's step logs directly:\n\n```bash\n# Save the full job log to a temp file (can be very large — 30k+ lines)\ngh api repos\u002Fmicrosoft\u002Fvscode\u002Factions\u002Fjobs\u002F\u003CJOB_ID>\u002Flogs > \"$TMPDIR\u002Fci-job-log.txt\"\n```\n\nThen search the saved file. **Start with `##[error]`** — this is the GitHub Actions error annotation that marks the exact line where the step failed:\n\n```bash\n# Step 1: Find the error annotation (fastest path to the failure)\ngrep -n '##\\[error\\]' \"$TMPDIR\u002Fci-job-log.txt\"\n\n# Step 2: Read context around the error (e.g., if error is on line 34371, read 200 lines before it)\nsed -n '34171,34371p' \"$TMPDIR\u002Fci-job-log.txt\"\n```\n\nIf `##[error]` doesn't reveal enough, use broader patterns:\n```bash\n# Find test failures, exceptions, and crash indicators\ngrep -n -E 'HTTPError|ECONNRESET|ETIMEDOUT|502|exit code|Process completed|node:internal|triggerUncaughtException' \"$TMPDIR\u002Fci-job-log.txt\" | head -20\n```\n\n> **Why save to a file?** The API response for a full job log can be 30k+ lines. Tool output gets truncated, so always redirect to a file first, then search.\n\n### VS Code Log Artifacts Structure\n\nDownloaded log artifacts typically contain:\n```\nlogs-linux-x64-electron-extension-host-1\u002F\n  main.log              # Main process log\n  terminal.log          # Terminal\u002Fpty host log (key for run_in_terminal issues)\n  window1\u002F\n    renderer.log        # Renderer process log\n    exthost\u002F\n      exthost.log       # Extension host log (key for extension test failures)\n```\n\nKey files to examine first:\n- **Test assertion failures**: Check `exthost.log` for the extension host output and stack traces\n- **Terminal\u002Fsandbox issues**: Check `terminal.log` for rewriter pipeline, shell integration, and strategy logs\n- **Crash\u002Fhang**: Check `main.log` and look for crash dumps artifacts\n\n---\n\n## Step 5: Extract the Failure\n\n### For Test Failures\n\nLook for the test runner output in the failed step log:\n```bash\n# Find failing test names and assertion messages\ngh run view \u003CRUN_ID> --job \u003CJOB_ID> --log-failed | grep -A 5 \"failing\\|AssertionError\\|Expected\\|Unexpected\"\n```\n\nCommon patterns in VS Code CI:\n- **`AssertionError [ERR_ASSERTION]`**: Test assertion failed — check expected vs actual values\n- **`Extension host test runner exit code: 1`**: Integration test suite had failures\n- **`Command produced no output`**: Shell integration may not have captured command output (see terminal.log)\n- **`Error: Timeout`**: Test timed out — could be a hang or slow CI machine\n\n### For Build Failures\n\n```bash\n# Find TypeScript compilation errors\ngh run view \u003CRUN_ID> --job \u003CJOB_ID> --log-failed | grep \"error TS\"\n\n# Find hygiene\u002Flint errors\ngh run view \u003CRUN_ID> --job \u003CJOB_ID> --log-failed | grep -E \"oxlint|stylelint|hygiene\"\n```\n\n---\n\n## Step 6: Determine if Failures are Related to the PR\n\nBefore fixing, determine if the failure is caused by the PR changes or is a pre-existing\u002Finfrastructure issue:\n\n1. **Check if the failing test is in code you changed** — if the test is in a completely unrelated area, it may be a flake\n2. **Check the test name** — does it relate to the feature area you modified?\n3. **Look at the failure output** — does it reference code paths your PR touches?\n4. **Check if the same tests fail on main** — if identical failures exist on recent main commits, it's a pre-existing issue\n5. **Look for infrastructure failures** — network timeouts, npm registry errors (pnpm fetches from it as well), and machine-level issues are not caused by code changes\n\n```bash\n# Check recent runs on main for the same workflow\ngh run list --branch main --workflow pr-linux-test.yml --limit 5 --json databaseId,conclusion,displayTitle\n```\n\n### Recognizing Infrastructure \u002F Flaky Failures\n\nNot all CI failures are caused by code changes. Common infrastructure failures:\n\n**Network \u002F Registry issues**:\n- `ERR_PNPM_META_FETCH_FAIL`, `ERR_PNPM_FETCH_*`, `npm ERR! network`, `ETIMEDOUT`, `ECONNRESET`, `EAI_AGAIN` — npm registry unreachable\n- `error: RPC failed; curl 56`, `fetch-pack: unexpected disconnect` — git network failure\n- `Error: unable to get local issuer certificate` — TLS\u002Fcertificate issues\n- `rate limit exceeded` — GitHub API rate limiting\n- `HTTPError: Request failed with status code 502` on `electron\u002Felectron\u002Freleases` — Electron CDN download failure (common in the `node.js integration tests` step, which downloads Electron at runtime)\n\n**Machine \u002F Environment issues**:\n- `No space left on device` — CI disk full\n- `ENOMEM`, `JavaScript heap out of memory` — CI machine ran out of memory\n- `The runner has received a shutdown signal` — CI preemption \u002F timeout\n- `Error: The operation was canceled` — GitHub Actions cancelled the job\n- `Xvfb failed to start` — display server for headless Linux tests failed\n\n**Test flakes** (not infrastructure, but not your fault either):\n- Timeouts on tests that normally pass — slow CI machine\n- Race conditions in async tests\n- Shell integration not reporting exit codes (see terminal.log for `exitCode: undefined`)\n\n**What to do with infrastructure failures**:\n1. **Don't change code** — the failure isn't caused by your PR\n2. **Re-run the failed jobs** via the GitHub UI or:\n   ```bash\n   gh run rerun \u003CRUN_ID> --failed\n   ```\n3. If failures persist across re-runs, check if main is also broken:\n   ```bash\n   gh run list --branch main --limit 10 --json databaseId,conclusion,displayTitle\n   ```\n4. If main is broken too, wait for it to be fixed — your PR is not the cause\n\n---\n\n## Step 7: Fix and Iterate\n\n1. Make the fix locally\n2. Verify compilation: check the `VS Code - Build` task or run `pnpm run typecheck-client`\n3. Run relevant unit tests locally: `.\u002Fscripts\u002Ftest.sh --grep \"\u003Cpattern>\"`\n4. Commit and push:\n   ```bash\n   git add -A\n   git commit -m \"fix: \u003Cdescription>\"\n   git push\n   ```\n5. Watch CI again:\n   ```bash\n   gh pr checks --watch --fail-fast\n   ```\n\n---\n\n## Quick Reference\n\n| Task | Command |\n|------|---------|\n| Find PR for branch | `gh pr view --json number,url` |\n| List all checks | `gh pr checks --json name,state,bucket` |\n| List failed checks only | `gh pr checks --json name,state,link,bucket --jq '.[] \\| select(.bucket == \"fail\")'` |\n| Watch checks until done | `gh pr checks --watch --fail-fast` |\n| Failed jobs in a run | `gh run view \u003CRUN_ID> --json jobs --jq '.jobs[] \\| select(.conclusion == \"failure\") \\| {name, id: .databaseId}'` |\n| View failed step logs | `gh run view \u003CRUN_ID> --job \u003CJOB_ID> --log-failed` (requires full run to complete) |\n| Download job log via API | `gh api repos\u002Fmicrosoft\u002Fvscode\u002Factions\u002Fjobs\u002F\u003CJOB_ID>\u002Flogs > \"$TMPDIR\u002Fci-job-log.txt\"` (works while run is in progress) |\n| Find error line in log | `grep -n '##\\[error\\]' \"$TMPDIR\u002Fci-job-log.txt\"` |\n| Download log artifacts | `gh run download \u003CRUN_ID> -n \"\u003Cartifact-name>\" -D \u002Ftmp\u002Fci-logs` |\n| Re-run failed jobs | `gh run rerun \u003CRUN_ID> --failed` |\n| Recent main runs | `gh run list --branch main --workflow \u003Cworkflow>.yml --limit 5` |\n","# Investigating and Fixing CI Failures\n\nThis skill guides you through diagnosing and fixing CI failures on a PR using the `gh` CLI. The user has the PR branch checked out locally.\n\n## Workflow Overview\n\n1. Identify the current branch and its PR\n2. Check CI status and find failed checks\n3. Download logs for failed jobs\n4. Extract and understand the failure\n5. Fix the issue and push\n\n---\n\n## Step 1: Identify the Branch and PR\n\n```bash\n# Get the current branch name\ngit branch --show-current\n\n# Find the PR for this branch\ngh pr view --json number,title,url,statusCheckRollup\n```\n\nIf no PR is found, the user may need to specify the PR number.\n\n---\n\n## Step 2: Check CI Status\n\n```bash\n# List all checks and their status (pass\u002Ffail\u002Fpending)\ngh pr checks --json name,state,link,bucket\n\n# Filter to only failed checks\ngh pr checks --json name,state,link,bucket --jq '.[] | select(.bucket == \"fail\")'\n```\n\nThe `link` field contains the URL to the GitHub Actions job. Extract the **run ID** from the URL — it's the number after `\u002Fruns\u002F`:\n```\nhttps:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Factions\u002Fruns\u002F\u003CRUN_ID>\u002Fjob\u002F\u003CJOB_ID>\n```\n\nIf checks are still `IN_PROGRESS`, wait for them to complete before downloading logs:\n```bash\ngh pr checks --watch --fail-fast\n```\n\n---\n\n## Step 3: Get Failed Job Details\n\n```bash\n# List failed jobs in a run (use the run ID from the check link)\ngh run view \u003CRUN_ID> --json jobs --jq '.jobs[] | select(.conclusion == \"failure\") | {name: .name, id: .databaseId}'\n```\n\n---\n\n## Step 4: Download Failure Logs\n\nThere are two approaches depending on the type of failure.\n\n### Option A: View Failed Step Logs Directly\n\nBest for build\u002Fcompile\u002Flint failures where the error is in the step output:\n\n```bash\n# View only the failed step logs (most useful — shows just the errors)\ngh run view \u003CRUN_ID> --job \u003CJOB_ID> --log-failed\n```\n\n> **Important**: `--log-failed` requires the **entire run** to complete, not just the failed job. If other jobs are still running, this command will block or error. Use **Option C** below to get logs for a completed job while the run is still in progress.\n\nThe output can be large. Pipe through `tail` or `grep` to focus:\n```bash\n# Last 100 lines of failed output\ngh run view \u003CRUN_ID> --job \u003CJOB_ID> --log-failed | tail -100\n\n# Search for common error patterns\ngh run view \u003CRUN_ID> --job \u003CJOB_ID> --log-failed | grep -E \"Error|FAIL|error TS|AssertionError|failing\"\n```\n\n### Option B: Download Artifacts\n\nBest for integration test failures where detailed logs (terminal logs, ext host logs, crash dumps) are uploaded as artifacts:\n\n```bash\n# List available artifacts for a run\ngh run download \u003CRUN_ID> --pattern '*' --dir \u002Fdev\u002Fnull 2>&1 || gh run view \u003CRUN_ID> --json jobs --jq '.jobs[].name'\n\n# Download log artifacts for a specific failed job\n# Artifact naming convention: logs-\u003Cplatform>-\u003Carch>-\u003Ctest-type>-\u003Cattempt>\n# Examples: logs-linux-x64-electron-extension-host-1, logs-linux-x64-remote-smoke-1\ngh run download \u003CRUN_ID> -n \"logs-linux-x64-electron-extension-host-1\" -D \u002Ftmp\u002Fci-logs\n\n# Download crash dumps if available\ngh run download \u003CRUN_ID> -n \"crash-dump-linux-x64-electron-extension-host-1\" -D \u002Ftmp\u002Fci-crashes\n```\n\n> **Tip**: The `\u003Ctest-type>` is the `ARTIFACT_NAME` in the `env` of the failed job in `.github\u002Fworkflows\u002Fpr-\u003Clinux|win32>-test.yml` (e.g., \"Linux \u002F Electron (extension host)\" → `electron-extension-host`, \"Linux \u002F Remote (integration)\" → `remote`). Map the platform with \"Windows\" → `windows-x64`, \"Linux\" → `linux-x64`.\n\n> **Warning**: Log artifacts may be empty if the test runner crashed before producing output (e.g., Electron download failure). In that case, fall back to **Option C**.\n\n### Option C: Download Per-Job Logs via API (works while run is in progress)\n\nWhen the run is still in progress but the failed job has completed, use the GitHub API to download that job's step logs directly:\n\n```bash\n# Save the full job log to a temp file (can be very large — 30k+ lines)\ngh api repos\u002Fmicrosoft\u002Fvscode\u002Factions\u002Fjobs\u002F\u003CJOB_ID>\u002Flogs > \"$TMPDIR\u002Fci-job-log.txt\"\n```\n\nThen search the saved file. **Start with `##[error]`** — this is the GitHub Actions error annotation that marks the exact line where the step failed:\n\n```bash\n# Step 1: Find the error annotation (fastest path to the failure)\ngrep -n '##\\[error\\]' \"$TMPDIR\u002Fci-job-log.txt\"\n\n# Step 2: Read context around the error (e.g., if error is on line 34371, read 200 lines before it)\nsed -n '34171,34371p' \"$TMPDIR\u002Fci-job-log.txt\"\n```\n\nIf `##[error]` doesn't reveal enough, use broader patterns:\n```bash\n# Find test failures, exceptions, and crash indicators\ngrep -n -E 'HTTPError|ECONNRESET|ETIMEDOUT|502|exit code|Process completed|node:internal|triggerUncaughtException' \"$TMPDIR\u002Fci-job-log.txt\" | head -20\n```\n\n> **Why save to a file?** The API response for a full job log can be 30k+ lines. Tool output gets truncated, so always redirect to a file first, then search.\n\n### VS Code Log Artifacts Structure\n\nDownloaded log artifacts typically contain:\n```\nlogs-linux-x64-electron-extension-host-1\u002F\n  main.log              # Main process log\n  terminal.log          # Terminal\u002Fpty host log (key for run_in_terminal issues)\n  window1\u002F\n    renderer.log        # Renderer process log\n    exthost\u002F\n      exthost.log       # Extension host log (key for extension test failures)\n```\n\nKey files to examine first:\n- **Test assertion failures**: Check `exthost.log` for the extension host output and stack traces\n- **Terminal\u002Fsandbox issues**: Check `terminal.log` for rewriter pipeline, shell integration, and strategy logs\n- **Crash\u002Fhang**: Check `main.log` and look for crash dumps artifacts\n\n---\n\n## Step 5: Extract the Failure\n\n### For Test Failures\n\nLook for the test runner output in the failed step log:\n```bash\n# Find failing test names and assertion messages\ngh run view \u003CRUN_ID> --job \u003CJOB_ID> --log-failed | grep -A 5 \"failing\\|AssertionError\\|Expected\\|Unexpected\"\n```\n\nCommon patterns in VS Code CI:\n- **`AssertionError [ERR_ASSERTION]`**: Test assertion failed — check expected vs actual values\n- **`Extension host test runner exit code: 1`**: Integration test suite had failures\n- **`Command produced no output`**: Shell integration may not have captured command output (see terminal.log)\n- **`Error: Timeout`**: Test timed out — could be a hang or slow CI machine\n\n### For Build Failures\n\n```bash\n# Find TypeScript compilation errors\ngh run view \u003CRUN_ID> --job \u003CJOB_ID> --log-failed | grep \"error TS\"\n\n# Find hygiene\u002Flint errors\ngh run view \u003CRUN_ID> --job \u003CJOB_ID> --log-failed | grep -E \"oxlint|stylelint|hygiene\"\n```\n\n---\n\n## Step 6: Determine if Failures are Related to the PR\n\nBefore fixing, determine if the failure is caused by the PR changes or is a pre-existing\u002Finfrastructure issue:\n\n1. **Check if the failing test is in code you changed** — if the test is in a completely unrelated area, it may be a flake\n2. **Check the test name** — does it relate to the feature area you modified?\n3. **Look at the failure output** — does it reference code paths your PR touches?\n4. **Check if the same tests fail on main** — if identical failures exist on recent main commits, it's a pre-existing issue\n5. **Look for infrastructure failures** — network timeouts, npm registry errors (pnpm fetches from it as well), and machine-level issues are not caused by code changes\n\n```bash\n# Check recent runs on main for the same workflow\ngh run list --branch main --workflow pr-linux-test.yml --limit 5 --json databaseId,conclusion,displayTitle\n```\n\n### Recognizing Infrastructure \u002F Flaky Failures\n\nNot all CI failures are caused by code changes. Common infrastructure failures:\n\n**Network \u002F Registry issues**:\n- `ERR_PNPM_META_FETCH_FAIL`, `ERR_PNPM_FETCH_*`, `npm ERR! network`, `ETIMEDOUT`, `ECONNRESET`, `EAI_AGAIN` — npm registry unreachable\n- `error: RPC failed; curl 56`, `fetch-pack: unexpected disconnect` — git network failure\n- `Error: unable to get local issuer certificate` — TLS\u002Fcertificate issues\n- `rate limit exceeded` — GitHub API rate limiting\n- `HTTPError: Request failed with status code 502` on `electron\u002Felectron\u002Freleases` — Electron CDN download failure (common in the `node.js integration tests` step, which downloads Electron at runtime)\n\n**Machine \u002F Environment issues**:\n- `No space left on device` — CI disk full\n- `ENOMEM`, `JavaScript heap out of memory` — CI machine ran out of memory\n- `The runner has received a shutdown signal` — CI preemption \u002F timeout\n- `Error: The operation was canceled` — GitHub Actions cancelled the job\n- `Xvfb failed to start` — display server for headless Linux tests failed\n\n**Test flakes** (not infrastructure, but not your fault either):\n- Timeouts on tests that normally pass — slow CI machine\n- Race conditions in async tests\n- Shell integration not reporting exit codes (see terminal.log for `exitCode: undefined`)\n\n**What to do with infrastructure failures**:\n1. **Don't change code** — the failure isn't caused by your PR\n2. **Re-run the failed jobs** via the GitHub UI or:\n   ```bash\n   gh run rerun \u003CRUN_ID> --failed\n   ```\n3. If failures persist across re-runs, check if main is also broken:\n   ```bash\n   gh run list --branch main --limit 10 --json databaseId,conclusion,displayTitle\n   ```\n4. If main is broken too, wait for it to be fixed — your PR is not the cause\n\n---\n\n## Step 7: Fix and Iterate\n\n1. Make the fix locally\n2. Verify compilation: check the `VS Code - Build` task or run `pnpm run typecheck-client`\n3. Run relevant unit tests locally: `.\u002Fscripts\u002Ftest.sh --grep \"\u003Cpattern>\"`\n4. Commit and push:\n   ```bash\n   git add -A\n   git commit -m \"fix: \u003Cdescription>\"\n   git push\n   ```\n5. Watch CI again:\n   ```bash\n   gh pr checks --watch --fail-fast\n   ```\n\n---\n\n## Quick Reference\n\n| Task | Command |\n|------|---------|\n| Find PR for branch | `gh pr view --json number,url` |\n| List all checks | `gh pr checks --json name,state,bucket` |\n| List failed checks only | `gh pr checks --json name,state,link,bucket --jq '.[] \\| select(.bucket == \"fail\")'` |\n| Watch checks until done | `gh pr checks --watch --fail-fast` |\n| Failed jobs in a run | `gh run view \u003CRUN_ID> --json jobs --jq '.jobs[] \\| select(.conclusion == \"failure\") \\| {name, id: .databaseId}'` |\n| View failed step logs | `gh run view \u003CRUN_ID> --job \u003CJOB_ID> --log-failed` (requires full run to complete) |\n| Download job log via API | `gh api repos\u002Fmicrosoft\u002Fvscode\u002Factions\u002Fjobs\u002F\u003CJOB_ID>\u002Flogs > \"$TMPDIR\u002Fci-job-log.txt\"` (works while run is in progress) |\n| Find error line in log | `grep -n '##\\[error\\]' \"$TMPDIR\u002Fci-job-log.txt\"` |\n| Download log artifacts | `gh run download \u003CRUN_ID> -n \"\u003Cartifact-name>\" -D \u002Ftmp\u002Fci-logs` |\n| Re-run failed jobs | `gh run rerun \u003CRUN_ID> --failed` |\n| Recent main runs | `gh run list --branch main --workflow \u003Cworkflow>.yml --limit 5` |\n",{"name":5,"description":7},"main","6fef772036848fdba226014ed798eb1654b32c39",".github\u002Fskills\u002Ffix-ci-failures",43791,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode","https:\u002F\u002Fcode.visualstudio.com","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-12 03:13:10",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add microsoft\u002Fvscode --skill fix-ci-failures",{"tool":57,"command":58},"bunx","bunx skills add microsoft\u002Fvscode --skill fix-ci-failures",{"tool":60,"command":61},"pnpm","pnpm dlx skills add microsoft\u002Fvscode --skill fix-ci-failures","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ffix-ci-failures\u002FSKILL.md",true,[],[66,90,112,123,137,153],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":36},"01M70H0ANBKZAVEP1NVV4K28M3","sweeper-query","Answer natural-language questions about the VS Code Sweeper's published issue index (index-\u003Cname>.json for microsoft\u002Fvscode and the enrolled family repos) — which issues are agent-ready to implement or plan, what the sweeper proposed for an assignee or area, whether the sweeper knows a report as a duplicate, the highest-value open bugs in a lane — and, for one issue, the review's full record (evidence with file citations, fix brief, proposed comment). Use ONLY when the request explicitly names the sweeper — \"sweeper\", \"vscodesweeper\", \"sweeper-query\", a sweeper verdict, record, brief or index, an agent-ready issue — or asks what \"the sweeper\" found, proposed or knows. Do NOT use for general questions about issues, duplicates, priorities or ranking that do not mention the sweeper. Read-only; discovery only.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fsweeper-query\u002FSKILL.md",[],[73,74,75,76,19,25,24,77,78,79,80,81,82,83,84,85,86,87,88,89],"sweeper query","query","sweeper","review","which","natural-language","ranking","duplicates","ready","only","read","plan","open","Citations","brief","issues","code",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":36},"01M699DRJS4YJCV600Q72SVVWE","update-skills","Create or update repository skills and instructions when major learnings are discovered during a session. Use when the user says \"learn!\", when a significant pattern or pitfall is identified, or when reusable domain knowledge should be captured for future sessions.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002Fmain\u002Fsrc\u002Fvs\u002Fsessions\u002Fskills\u002Fupdate-skills\u002FSKILL.md",[],[97,98,99,100,101,102,103,30,104,105,106,107,108,109,110,111,25],"update","update skills","for","pattern","domain","learnings","reusable","session","user","instructions","knowledge","repository","learn","create","sessions",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":36},"01M699DPWHZ72B66P82EW31RNE","update-pr","Update the pull request for the current session. Use when the user wants to push new changes to an existing PR.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002Fmain\u002Fsrc\u002Fvs\u002Fsessions\u002Fskills\u002Fupdate-pr\u002FSKILL.md",[],[97,32,119,25,24,120,99,30,104,105,121,34,26,122],"update pr","Existing","push","changes",{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":36},"01M699DJMR6CE1MH5XCJZ0GFQ0","sync","Sync the current session branch with its upstream branch, or publish the current session branch to a remote. Use when the user asks to sync a branch, pull latest changes, rebase onto upstream, push current branch, publish branch, or set upstream.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002Fmain\u002Fsrc\u002Fvs\u002Fsessions\u002Fskills\u002Fsync\u002FSKILL.md",[],[125,130,131,121,34,132,25,122,133,134,135,136,30,104,105,33],"SET","publish","rebase","latest","with","remote","upstream",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":36},"01M699DGXHX6A2A72X57R6GGHJ","sync-upstream","Update a stale session branch by rebasing onto the latest origin. Use when the upstream has moved significantly and the session needs to catch up, resolving conflicts by preserving upstream changes and adapting session work to fit.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002Fmain\u002Fsrc\u002Fvs\u002Fsessions\u002Fskills\u002Fsync-upstream\u002FSKILL.md",[],[136,125,144,145,25,146,147,122,133,148,149,150,151,30,104,33,152,97],"sync upstream","fit","catch","catch up","origin","conflicts","stale","up","work",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":36},"01M699DEXYFWDGW0BAXJ5QQ377","merge","Merge changes from the topic branch to the merge base branch. Use when the user wants to merge their session's work back to the base branch.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002Fmain\u002Fsrc\u002Fvs\u002Fsessions\u002Fskills\u002Fmerge\u002FSKILL.md",[],[155,104,30,152,33,105,25,160,161,122],"back","base"]