openshift-eng/ai-helpers/payload-analysis
Claude Code and agent skill by openshift-eng/ai-helpers
- community
Checking that the SKILL.md file is still in the repository.
Analyze a payload snapshot to identify root causes of blocking job failures, score candidate PRs, and produce an HTML report with revert recommendations
Install
npx vskill@latest install openshift-eng/ai-helpers/payload-analysisSKILL.md
The same SKILL.md was published earlier as openshift-eng/ai-helpers/payload-analysis.
Payload Analysis
This skill analyzes a payload using a local snapshot (produced by payload-snapshot) to identify root causes of blocking job failures and produce a comprehensive HTML report. The snapshot pre-gathers all release controller, GitHub, and CI data so this skill can focus purely on analysis — no live API orchestration required.
It supports Rejected payloads (full analysis of all failed blocking jobs), Ready payloads (early analysis of blocking jobs that have already failed), and Accepted payloads (which may have been force-accepted despite blocking failures).
When to Use This Skill
Use this skill when you need to:
- Understand why a payload was rejected
- Investigate failures in a force-accepted payload
- Assess whether an in-progress ("Ready") payload is likely to be rejected
- Determine whether failures are new or persistent
- Identify which PRs likely caused new failures
- Get a comprehensive overview of payload health with actionable root cause analysis
- Re-analyze a historical payload against its original snapshot data
Examples
- Analyze an amd64 nightly payload (auto-creates snapshot if needed):
`` /ci:payload-analysis 4.22.0-0.nightly-2026-02-25-152806 ``
- Analyze using an existing snapshot directory:
`` /ci:payload-analysis 4.22.0-0.nightly-2026-02-25-152806 --snapshot-dir payload/4.22/nightly ``
- Analyze an arm64 payload (architecture inferred from tag):
`` /ci:payload-analysis 4.22.0-0.nightly-arm64-2026-02-25-152806 ``
Prerequisites
- Python 3 (3.10 or later) — for running the snapshot script if needed
- gcloud CLI — for subagent artifact download (must-gather, pod logs)
- GitHub CLI (`gh`) — for step-registry change detection (Step 3.6) and checking existing revert PRs (Step 6.3)
Bundled Resources
Load these only at the step that needs them — not up front:
- `references/investigation-subagent.md` — the verbatim per-job subagent prompt and
ANALYSIS_RESULTformat (Step 4) - `references/report-guide.md` — per-section content rules for the HTML report (Step 7)
- `references/completeness-review.md` — the completeness-reviewer prompt and response handling (Step 9)
- `assets/report-template.html` — the fill-in-the-blanks HTML report template (Step 7)
- `references/ship-status-component-map.md` — SHIP Status slug mapping (Step 6.5)
The payload-results-yaml and payload-autodl-json skills define the structured output schemas; load each via the Skill tool at its point of use (Steps 6.7 and 8).
Implementation Steps
Step 1: Parse Arguments
Anchor the output directory before anything else. Capture the current working directory up front so all output files land in one stable, predictable location even if a later step changes directories:
All three output files — the payload results YAML (Step 6.7), the HTML report (Step 7), and the autodl JSON (Step 8) — MUST be written under $OUTPUT_DIR, never into a snapshot subdirectory or a path a later cd may have changed. The Step 10 self-check verifies them at $OUTPUT_DIR.
The first argument is a full payload tag (e.g., 4.22.0-0.nightly-2026-02-25-152806). Parse from it:
tag: The specific payload tag to analyzeversion: Extract from the tag (e.g.,4.22from4.22.0-0.nightly-...)stream: Extract from the tag (e.g.,nightlyfrom4.22.0-0.nightly-...)architecture: Inferred from the tag. The tag format is<version>-0.<stream>[-<arch>]-<timestamp>. If no architecture is present between the stream and timestamp, it isamd64. Otherwise, the architecture is the segment between the stream and timestamp. Examples:4.22.0-0.nightly-2026-02-25-152806→amd644.22.0-0.nightly-arm64-2026-02-25-152806→arm644.22.0-0.nightly-ppc64le-2026-02-25-152806→ppc64le
Optional flags:
--snapshot-dir DIR: Use an existing snapshot directory (Step 2).--as-of TIMESTAMP: An RFC 3339 UTC cutoff (e.g.2026-07-23T07:44:48Z). When present, this is a point-in-time analysis: reason only from evidence that existed at or before this instant, as if you were analyzing the payload the moment it completed.
Point-in-time boundary. When --as-of is set, treat it as a hard cutoff for every piece of evidence, direct or delegated:
- Do not use later reverts, follow-up comments, subsequent payload outcomes, or the present-day absence of a revert as causal evidence. A PR that was later reverted, or never reverted, tells you nothing about causality as of the cutoff.
- Timestamp-bound every external lookup. When checking GitHub PRs, step-registry history (Step 3.6), or existing revert PRs (Step 6.3), ignore any commit, PR, comment, or review created after the cutoff.
- Pass the cutoff to every subagent you dispatch and instruct it to discard post-cutoff artifacts and discussion.
- If a lookup returns only post-cutoff results, treat that evidence as unavailable rather than as a finding.
When --as-of is omitted, analyze against present-day evidence as usual.
Step 2: Locate or Create Snapshot
The analysis requires a local snapshot produced by the payload-snapshot skill. Search for an existing snapshot in this order:
- Explicit `--snapshot-dir DIR`: If provided, look for
DIR/summary.json. If not found, exit with an error. - Current directory: Check if
./summary.jsonexists and itspayload_tagfield matches the requested tag. - Standard relative path: Check if
payload/<version>/<stream>/summary.jsonexists and matches the tag.
If no matching snapshot is found, create one:
After locating summary.json, set SNAPSHOT_DIR to the directory containing it. All relative paths in summary.json (e.g., job_json, junit_results, build_log, PR paths) resolve from this directory.
The snapshot script automatically prefers release-controller data and falls back to Sippy for payloads that have been garbage collected. Do not truncate the analysis chain merely because an originating tag is absent from the live release controller; use the Sippy-backed payloads[] entry and its PR data. Check each entry's source and changelog_source fields when provenance or field completeness matters.
Step 3: Extract Failure Data from Snapshot
Read summary.json to extract all data needed for analysis. The snapshot has already done the work of fetching payloads, building the chain, tracking streaks, and collecting PR data.
3.1: Payload Metadata
From summary.json top-level fields:
payload_tag,phase,release_url,source,architecture,stream,versionchain_length,baseline_tag,hours_since_baseline
Record `phase` verbatim from the summary.json metadata (Accepted, Rejected, or Ready). Never infer the phase from the job results or from whether failures exist — a payload can be Accepted with blocking failures (force-accepted) or Ready while jobs are still running. The stored phase drives the force-accept decision (Step 6.4) and the executive summary (Step 7.1), so an inferred phase silently corrupts both.
3.1b: If the Snapshot Is Incomplete, Collect the Data Yourself
Check summary.json → data_complete. An absent test_failure_count means unknown, not zero — never conclude a job had no test failures, and therefore failed for some other reason, from missing data.
When data is missing, collect it yourself from the job's gcs_url artifacts rather than analyzing around the gap. Do the same for any payload in the chain whose per-test data is missing. Report a gap as a limitation only when the artifacts themselves are unreachable.
An aggregated job with no per-test results at all is unclassified, not part of a regression streak — aggregation also fails when too few child runs completed or infrastructure killed them. Check the child runs: one that died before the test phase cannot have failed a test.
3.2: Failed Blocking Jobs
From summary.json → blocking_jobs.failed_jobs[], each entry contains:
name,state,prow_url,gcs_url,is_aggregated,retriesrhcos_version: the RHCOS variant for this job (rhcos9,rhcos10,rhcos9_10,rhcos9-default, orrhcos10-default)streak:streak_length,originating_payload,is_new_failure,failure_patternbuild_log_errors,test_failure_count- Paths:
job_json,junit_results,build_log
For each failed job, read its job.json (at SNAPSHOT_DIR/<job_json> path) to get previousAttemptURLs.
3.3: Candidate PRs
For each failed job's streak.originating_payload, find the matching entry in summary.json → payloads[]. Its prs[] array contains the PRs introduced in that payload:
url,component,number,description- Paths to local artifacts:
diff,comments,jobs
Treat this as a preliminary list only. The job-level streak merges unrelated failure modes, so its originating payload is frequently earlier than the regression being investigated — and candidates gathered from it can omit the causal PR entirely. Before scoring, re-derive the originating payload per failure mode from test_failures.blocking[].first_failed_in (Step 5) and collect the candidates from that payload.
For a Sippy-backed originating payload, the PR list remains usable for candidate scoring and the normal GitHub diff/comment/job artifacts are still collected. Sippy does not provide release-controller-only nodeImageStreams, async jobs, or previousAttemptURLs; treat those fields as unavailable rather than empty evidence.
3.4: Test Failure Details
Only test_failures.blocking[] contains failures that can reject the payload. `test_failures.informing[]` and `test_failures.flakes[]` cannot fail a job or reject a payload — never score them as candidate causes, never use them to derive a failure mode's originating payload, and never propose a revert for them.
"Informing job" ≠ "informing test." These are two completely different concepts that share a name:
- Informing job (
informing_jobs.failed_jobs[]): a CI job that runs
for visibility but does not gate the payload. Its pass/fail status is job-level. An informing job can still contain blocking tests.
- Informing test (
test_failures.informing[]): an individual test case
with lifecycle="informing". It can appear inside any job — blocking or informing. Its results never count toward test_failure_count.
Never combine informing-job counts with informing-test lists. When reporting informing/flake tests, list individual test names from test_failures.informing[] / test_failures.flakes[] — do NOT report informing job failure counts in the same section.
Report informing and flake tests in their own section of the report (the template's informing-tests block carries the standard caveat). Keep them visible: informing tests are new tests being stabilized, and a badly-behaved test can occasionally damage the cluster it runs on. Investigate one only when there is evidence of that, and say plainly that it is not a rejection cause.
From summary.json → test_failures.blocking[]:
test_name,jobs,first_failed_in,payloads_failingfailure_message,failure_text(full, not truncated)
3.5: Build Log Errors
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/ci/skills/payload-analysis/SKILL.md
Popularity
- Repository stars
- 114
- Repository forks
- 307
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/openshift-eng/ai-helpers/payload-analysis)