detect-permafail
БесплатноБез исполняемых скриптовНе проверенAnalyze consecutive job failures to determine if they represent a permafail pattern versus flaky failures
от openshift-eng★ 123 звезды на GitHubОб этом скилле
Detect Permafail
When to Use This Skill
Use this skill when you have 2-10 consecutive failures of the same job and need to determine if the failures represent a systematic/permanent failure (permafail) versus a flaky failure. This is critical for CI/CD pipeline analysis to distinguish between:
- Permafail: A systematic failure affecting the same test(s) or infrastructure issue, detected by analyzing comparable runs (same failure type):
- 2-3 comparable runs: All must have the same failure (100% match)
- 4-5 comparable runs: At least 4 must have the same failure (80% match)
- 6-10 comparable runs: At least ceil(count × 0.7) must have the same failure (70% match)
- Flaky: Non-deterministic failures with varying root causes, or failures that don't meet the permafail thresholds
Prerequisites
- Access to OpenShift CI Prow job artifacts via gcsweb URLs
- Access to the
Bashtool for runningplugins/ci/scripts/classify-job-failures.py - Python with the
requestspackage available for artifact fetching - Knowledge of Prow artifact structure (from
fetch-prowjob-jsonandprow-job-artifact-searchskills) - 2-10 URLs pointing to consecutive job failures (from Prow/OpenShift CI, ordered newest to oldest)
- Job name context to verify consistency across all failures
- PR information to provide context for analysis
Implementation Steps
Step 1: Validate Inputs
Standard Mode (URL-based):
Verify that all required inputs are present with expected types and constraints:
failure_urls: Array of 2-10 strings matching Prow job URL patternhttps://prow.ci.openshift.org/view/gs/<bucket>/<path>/<job-name>/<build-id>where path may belogs/,pr-logs/pull/, or other GCS paths (must be consecutive runs, ordered newest to oldest)job_name: Non-empty string identifier of the job being analyzedpr_info: Object containing PR number (integer) and repository context (string)- Each URL must match the Prow job URL pattern above
Reject requests if:
- URLs count is less than 2 or more than 10
- Job names don't match across all URLs (validate via prowjob.json metadata, not path position)
- PR context is missing
Notes:
- URL ordering (newest first) is assumed but not validated - the frontend provides them in this order
- Job name validation should check prowjob.json metadata or verify the name appears in the extracted GCS path, not assume a fixed path position (presubmit URLs include org/repo/pr segments)
Offline/Eval Mode (Pre-normalized Signatures):
For testing or offline analysis, the skill can accept pre-normalized failure signatures directly instead of fetching from URLs. This mode skips Steps 2-4 (artifact fetching and classification) and proceeds directly to Step 5 (threshold analysis).
Input format:
signatures: Array of 2-10 pre-normalized signature objects (see Step 4 output format)- Each signature must be either test_failure format
{type: "test_failure", url: "...", tests: [...], test_count: N}or infra_failure format{type: "infra_failure", url: "...", error: "...", error_hash: "..."}
When signatures are provided, skip to Step 5 and apply threshold logic directly. Use this mode only for evals or when signatures have been extracted by another tool.
Step 2: Classify Job Failures with Script
For standard URL-based analysis, call the deterministic classifier script to fetch artifacts and produce normalized signatures:
"$SKILL_DIR/../../scripts/classify-job-failures.py" --json-input '{
"failure_urls": ["https://prow.ci.openshift.org/view/gs/..."],
"job_name": "pull-ci-openshift-origin-master-e2e-aws",
"pr_info": {"pr_number": 12345, "repository": "openshift/origin"}
}'
The script performs the artifact-based work that does not require AI judgment:
- Parses the full GCS path from each Prow URL.
- Fetches
prowjob.jsonfrom gcsweb. - Browses the artifacts directory.
- Classifies each run as
test_failureorinfra_failurebased on artifacts, not error text alone. - Extracts failing test names from junit/build logs or normalized infrastructure errors.
- Returns the Step 4 normalized signature array.
If the script exits non-zero, report its JSON error and do not continue to threshold analysis unless at least two valid signatures are available from another trusted source.
Step 3: Artifact Classification Rules
The classifier follows these rules:
- TEST_FAILURE when artifacts contain
openshift-e2e-test/,e2e-*,junit/, junit XML files,openshift-tests-*, ormonitor-test-*. - INFRA_FAILURE only when artifacts show setup/build/gather output without test artifacts, or artifacts are empty/unavailable after a valid job fetch.
- MonitorTest failures count as test failures because MonitorTests run during e2e execution.
- Classification must be artifact-based. Do not classify from Prow descriptions or error messages alone.
Step 4: Use Normalized Failure Signatures
Use the script output directly as the norm
Установить detect-permafail в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл detect-permafail?
Analyze consecutive job failures to determine if they represent a permafail pattern versus flaky failures
Как установить скилл detect-permafail?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл detect-permafail запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub