Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

detect-permafail

БесплатноБез исполняемых скриптовНе проверен

Analyze consecutive job failures to determine if they represent a permafail pattern versus flaky failures

openshift-engот 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 Bash tool for running plugins/ci/scripts/classify-job-failures.py
  • Python with the requests package available for artifact fetching
  • Knowledge of Prow artifact structure (from fetch-prowjob-json and prow-job-artifact-search skills)
  • 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 pattern https://prow.ci.openshift.org/view/gs/<bucket>/<path>/<job-name>/<build-id> where path may be logs/, 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 analyzed
  • pr_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:

  1. Parses the full GCS path from each Prow URL.
  2. Fetches prowjob.json from gcsweb.
  3. Browses the artifacts directory.
  4. Classifies each run as test_failure or infra_failure based on artifacts, not error text alone.
  5. Extracts failing test names from junit/build logs or normalized infrastructure errors.
  6. 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-*, or monitor-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

Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить detect-permafail с