com um clique
debug-ci
// Debug failed CI tests by fetching workflow logs from GitHub Actions and analyzing failures. Use when the user mentions CI failures, test failures, or wants to understand why their PR's CI is failing.
// Debug failed CI tests by fetching workflow logs from GitHub Actions and analyzing failures. Use when the user mentions CI failures, test failures, or wants to understand why their PR's CI is failing.
Detect breaking changes by analyzing git diff against dev branch. Checks for state access changes in call/genesis handlers, state item ordering violations, and demo-rollup-schema.json changes.
Analyze compilation time and test durations from CI logs. Use when the user asks about slow builds, slow tests, or wants to optimize CI time.
Identify flaky tests by comparing failures across multiple CI runs. Use when the user suspects flaky tests, sees intermittent failures, or wants to analyze test reliability.
| name | debug-ci |
| description | Debug failed CI tests by fetching workflow logs from GitHub Actions and analyzing failures. Use when the user mentions CI failures, test failures, or wants to understand why their PR's CI is failing. |
Debug failed CI tests by fetching workflow logs and analyzing failures.
gh CLI installed and authenticated (gh auth login)Get PR info for current branch:
gh pr view --json number,title --jq '"\(.number) \(.title)"' 2>/dev/null || echo "no-pr"
If no PR exists, use branch name for the log directory.
Get latest "Rust" workflow run for current branch:
BRANCH=$(git branch --show-current)
gh run list --workflow=Rust --branch=$BRANCH --limit=1 --json databaseId,conclusion,headSha,createdAt
List all jobs from the run:
gh run view <run-id> --json jobs --jq '.jobs[] | {id: .databaseId, name: .name, conclusion: .conclusion}'
Create directory and download all job logs, stripping ANSI color codes:
mkdir -p ci-logs/pr-<PR_NUMBER>/
# or: mkdir -p ci-logs/branch-<BRANCH_NAME>/
gh run view --job <job-id> --log | perl -pe 's/\e\[[0-9;]*m//g' > ci-logs/pr-<PR_NUMBER>/<job_name>_<job_id>.log
Sanitize job names for filenames (replace spaces/special chars with underscores).
FAILED, error[E, panicked at, assertion failedgh pr diff) to correlate failures with changesProvide summary:
ci-logs/ directory should be in .gitignore