/ci-extras:analyze-payload-jobsfrom ci-extras
Analyzes OpenShift payload verification job reliability for informing and blocking roles, investigates recurring failures, and exports repair/retirement recommendations. Reads Sippy data directly.
Ships in ci-extras. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Analyze the requested verification role after freezing a bounded payload
population. Use informing for non-blocking verification jobs and blocking
for release gates, including periodic reliability analysis of older z streams
that have no informing jobs or payload agent. This workflow reads Sippy directly
and produces local recommendations; it does not edit
release configuration, change schedules, open issues or PRs, decide payloads, or
trigger jobs.
Require positional release and job_role (informing or blocking), plus
--architecture and --stream. Accept natural-language equivalents and record
the effective values. Defaults are a 14-day window ending at collection start,
--payloads 10, 50 inspected payloads, --min-payloads 3, 5 distinct runs across
3 payloads per chronic conclusion, 90% blocker health for informing analysis,
50% poor-job success, --max-recommendations 10, --max-candidates 100,
and --time-budget-minutes 120. Recommendation limits count distinct validated
repair mechanisms and validated retirement candidates; candidate limits count
distinct cohorts started in this invocation. Neither is a quota. The
default --history-release auto-previous uses only the verified immediately
previous release when a newly started release lacks history. Use none to
disable fallback or a release value to select it explicitly.
Reject rates outside [0,1], nonpositive budgets, ambiguous lookback plus
start/end inputs, and non-UTC or reversed boundaries. A deliberately smaller
sample remains provisional. Freeze the end time and never add newer payloads on
restart.
Workspace/output paths are user-selected when supplied. Otherwise the workspace
is ~/tmp/analyze-payload-jobs/<UTC timestamp> and report exports are
fresh timestamped directories inside it.
Resolve bundled paths relative to this SKILL.md, independent of the current
working directory. Python 3.10+ and public HTTPS access are required.
Read population and ranking, then run:
python3 scripts/collect_payload_jobs.py RELEASE JOB_ROLE \
--architecture ARCH --stream STREAM --workspace WORK
python3 scripts/rank_jobs.py --workspace WORK
The collector uses Sippy's /api/releases/tags and
/api/releases/job_runs array API. It records raw responses, provenance,
limits, unknown values, large Prow IDs as strings, and every payload association.
It never treats a display page as an API page. Review collection completeness,
payload health, role normalization, and any fallback mapping before accepting the
frozen selection. Retain all job rows as context; rank only exact matches for the
requested role. Unknown roles never enter either ranking. Forced acceptance never
overrides blocker results.
Informing analysis selects relatively healthy completed payloads using
--min-blocker-pass-rate. Blocking analysis selects completed payloads even when
blocker health is poor or the payload was rejected, so the jobs under analysis
cannot exclude their own failures. Both require complete terminal blocker
inventories and retain shared-failure review. The blocker-health threshold is
unused in blocking mode.
For example, periodic analysis of an older release can start with:
python3 scripts/collect_payload_jobs.py 4.18 blocking \
--architecture amd64 --stream nightly --history-release none --workspace WORK
The role is frozen with the analysis scope. Resume using the same role; use a fresh workspace to analyze the other role. Investigation history keeps roles separate even when the underlying Prow job is the same.
Shared-failure interpretation requires AI review. Compare signatures across
independent job families, adjacent payloads, versions, and successful peers. Add
reviewed decisions with --shared-failure-decisions FILE and rerun ranking;
selection revisions remain in the manifest. Kubernetes or OS version skew is a
hypothesis to investigate, not an automatic common cause.
Ranking is deterministic and complete. It keeps association and unique-run denominators separate, keeps current and previous-release rates separate, and labels sparse cohorts. A raw worst performer may differ from the highest-priority job-local candidate.
Read investigation progress and initialize the persistent queue before choosing jobs:
python3 scripts/investigation_queue.py plan --workspace WORK
Investigate pending cohorts before unchanged prior investigations. Continue through the queue even if the first five yield no fixes. Stop new discovery at the validated recommendation ceiling, candidate ceiling, elapsed time budget, or exhaustion of feasible queued work; reserve time for review and export. Report the stopping reason and next cohort. Completed investigations with unresolved causes still count as explored; partial or interrupted work remains eligible for continuation.
Use the helper's begin before each cohort and record after saving its completed
finding. It enforces candidate/time limits and the validated count supplied from
actual review results; that count is accounting, not proof. Record a concrete
revisit_condition for unresolved or proposed actions. Subsequent runs use shared
history, prioritize pending cohorts, and recheck changed observations or documented
source/configuration/signature changes and newly feasible follow-ups. Preserve the
raw performance ranking and explain any investigation priority override.
For each queued investigation, sample as many as three failing
runs on different eligible payloads, plus the newest run and a passing control
when available. Invoke the ci:prow-job-analysis skill for each sampled failed
Prow run. Use the existing bounded artifact helper in the sibling
investigate-ci-reliability skill for metadata, listings, JUnit, and aggregate
child discovery.
Classify causal execution phase as NOT_STARTED, SETUP_FAILED,
WORKLOAD_FAILED_BEFORE_REAL_TESTS, REAL_TEST_FAILURE, POST_TEST_FAILURE,
INTENTIONAL_TESTLESS, or UNKNOWN. Record real, failed-real, and synthetic
test counts as integers or null; a JUnit file or successful setup alone does
not prove intended tests ran. Keep phase distinct from recurring mechanism.
Use failures from multiple payloads, passing controls, and unaffected peers to decide whether a mechanism is job-local, shared, fixed, or unresolved. Inspect current source and configuration, existing repairs, purpose, coverage, image/OS adoption when relevant, and the precise causal failure. Source-only proposals are proposed repairs until a confirming run exists.
For tests incompatible with a topology, platform, or common cluster configuration,
prefer shared OTE / openshift-tests selection or setup skips when multiple jobs
can be affected and the test setup supports the condition. Inspect existing
selectors and current registered names before proposing per-job TEST_SKIPS.
Follow the shared test-selection scope guidance
for ownership, validation, and justified job-specific fallbacks.
Read recommendation contract. Record
per-cohort finding JSON under WORK/findings/, retirement records under
WORK/retirement-candidates/, and unresolved records under WORK/unresolved/.
Each finding needs a descriptive title, a two- or three-sentence summary, and
a concrete next_action. Explain performance, the sampled mechanism or unknown
cause, action, and uncertainty. Keep the ranked denominator separate from the
deeply inspected sample, and identify partial repairs and their remaining failures.
Record the owner, source/fix status, acceptance criteria, and limitations using
the readable handoff contract; the exporter renders these fields without diagnosis.
Then run:
python3 scripts/export_report.py --workspace WORK --output WORK/report
Allowed dispositions are PROPOSE_FIX, RETIREMENT_CANDIDATE,
SHARED_FAILURE, ALREADY_FIXED, INSUFFICIENT_EVIDENCE, and KEEP_MONITOR.
Uninvestigated ranked cohorts remain pending. Missing artifacts, an exhausted
budget, or an unknown cause cannot by itself justify retirement.
Repairs use the sibling reliability skill's evidence and independent proof-review
contract unchanged; only its PROVEN_FIX findings enter fixes/. Retirement
candidates use a separate digest-bound review. They require adequate population,
recent persistence, localization, documented investigation, exact current
verification and periodic configuration, cross-stream impact, coverage risk,
owners, validation, and restoration criteria. Say “no supported repair found
within the documented investigation” when that is the evidence.
When a selected job cannot execute its intended real tests and no supported
repair is found, a yearly retirement proposal must also set disabled: true on
its verification entry in the selected payload configuration, retaining the entry
and its job mapping. If the periodic is already yearly, retain that schedule and
still propose disabling payload verification. Preserve the periodic definition
and manual diagnostic use. Include both actions in the
summary, next_action, and unapplied configuration proposal; independent review
must reject a schedule-only proposal for this case. Zero tests alone and useful
intentionally testless work do not satisfy the retirement gates. Follow the
retirement contract for exact configuration targets and restoration criteria.
The exporter refuses an existing destination. It generates a linked ranked table
and findings/<cohort-id>/README.md for every current and historical cohort.
Investigated handoffs follow the sibling reliability format; pending cohorts get
short metrics-and-status summaries with cause and action explicitly unassessed.
It also writes manifest, payloads, rankings, evidence-linked findings, fixes,
retirement candidates, and unresolved records. Report the actual collection and
investigation coverage even when no recommendation passes review.
references/investigation-progress.md (opens in a new tab)references/population-and-ranking.md (opens in a new tab)references/recommendation-contract.md (opens in a new tab)scripts/collect_payload_jobs.py (opens in a new tab)scripts/export_report.py (opens in a new tab)scripts/investigation_queue.py (opens in a new tab)scripts/rank_jobs.py (opens in a new tab)tests/fixtures/supplied-live-summary.json (opens in a new tab)tests/test_collection.py (opens in a new tab)tests/test_export.py (opens in a new tab)tests/test_investigation_queue.py (opens in a new tab)tests/test_pipeline.py (opens in a new tab)tests/test_ranking.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 skills in this plugin
npx claudepluginhub openshift-eng/ai-helpers --plugin ci-extrasOther plugins' skills for the same job