openshift-eng/ai-helpers/payload-snapshot

Claude Code and agent skill by openshift-eng/ai-helpers

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Snapshot OpenShift payload data (release controller, PR diffs, comments, CI jobs, JUnit results, regression tracking) to a local directory for offline analysis

Install

npx vskill@latest install openshift-eng/ai-helpers/payload-snapshot

SKILL.md

The same SKILL.md was published earlier as openshift-eng/ai-helpers/payload-snapshot.

Payload Snapshot

This skill downloads all data needed to analyze an OpenShift payload into a local directory tree. The resulting snapshot can be navigated entirely via file reads — no live API calls required during analysis.

When to Use This Skill

Use this skill when you need to:

  • Analyze a rejected payload and want all data available locally before starting
  • Create a reproducible snapshot of payload state at a point in time
  • Track test failure regressions across multiple payloads
  • Work offline or reduce API calls during payload analysis

Prerequisites

  1. Python 3 (3.10 or later)
  • Uses only standard library (no external dependencies)
  1. GitHub CLI (`gh`) — for PR diff, comment, and job data
  • Install: brew install gh (macOS) or see https://cli.github.com
  • Authenticate: gh auth login
  • Without gh, release controller data is still fetched; PR data is skipped
  1. Google Cloud SDK (`gcloud`) — for JUnit test result download
  • Install: brew install google-cloud-sdk (macOS) or see https://cloud.google.com/sdk
  • Authentication is not required — the CI artifact buckets are public and

are read anonymously when no account is configured

  • Without gcloud entirely, JUnit data is skipped and the snapshot is

reported as incomplete (see Data completeness)

  1. Container runtime (`podman`) — for RHCOS RPMDB extraction
  • Install: available in most Linux distributions; brew install podman on macOS
  • Requires access to the release image registry (e.g., registry.ci.openshift.org)
  • Without podman, RPMDB data is skipped; all other data is still collected
  1. `rpm` CLI — for the RPM changelog diffs between payloads
  • Queries the already-extracted RPMDBs locally; no network, no root
  • Without rpm, changelog diffs are skipped; the RPMDBs themselves are still extracted
  1. Network access to:
  • *.ocp.releases.ci.openshift.org (release controller)
  • sippy.dptools.openshift.org (historical payload fallback)
  • api.github.com (via gh CLI)
  • storage.googleapis.com (via gcloud CLI)

Implementation Steps

Step 1: Run the Snapshot Script
bash
script_path="plugins/ci/skills/payload-snapshot/scripts/payload_snapshot.py"
# Snapshot a specific payload
python3 "$script_path" 4.22.0-0.nightly-2026-02-25-152806
# Custom output directory
python3 "$script_path" 4.22.0-0.nightly-2026-02-25-152806 --output-dir .work/snapshot
# Limit chain depth
python3 "$script_path" 4.22.0-0.nightly-2026-02-25-152806 --max-chain 5
# Skip JUnit download (faster, still generates job structure and summary)
python3 "$script_path" 4.22.0-0.nightly-2026-02-25-152806 --no-junit
# Skip RPMDB extraction
python3 "$script_path" 4.22.0-0.nightly-2026-02-25-152806 --no-rpmdb
# Skip the RPM changelog diffs (RPMDBs are still extracted)
python3 "$script_path" 4.22.0-0.nightly-2026-02-25-152806 --no-rpm-changelogs
# Force Sippy for all payload metadata (normally fallback is automatic)
python3 "$script_path" 4.22.0-0.nightly-2026-02-25-152806 --sippy

The script will:

  1. Parse the payload tag to determine version, stream, and architecture
  2. Probe all available streams for the version (nightly, ci, across architectures)
  3. Chain backwards through Sippy's time-ordered release tag list until finding one where all blocking jobs passed, restoring tags garbage collected from the release controller
  4. For each payload in the chain, prefer release controller data and changelogs; fall back per historical tag or cross-tag diff to Sippy payload, PR, and job data
  5. Split jobs into blocking/informing directories with metadata and GCS browser links
  6. For each failed blocking job, download and parse JUnit XML test results
  7. For each failed blocking job, download build-log.txt from GCS and extract error/warning lines + log tail
  8. Track test failure regressions — when did each failure first appear?
  9. Track per-job failure streaks — consecutive failures, originating payload, failure pattern
  10. For each unique PR across all changelogs, fetch the git diff, comments, and CI jobs via gh
  11. For each payload in the chain, extract the full RPM database from RHCOS images via podman
  12. Diff the target payload's RPM changelogs against every older payload in the chain, using the extracted RPMDBs
  13. Generate summary.json with comprehensive triage data, plus AGENTS.md/CLAUDE.md for agent orientation
Step 2: Navigate the Snapshot

The output directory is structured for easy navigation:

text
payload/
<version>/
<stream>/
summary.json # START HERE — full triage data
CLAUDE.md # Imports AGENTS.md for Claude Code
AGENTS.md # Dynamic snapshot orientation doc
streams.json # All streams for this version
<tag>/ # Each payload in the chain
payload.json # Release controller API response
changelog.json # PRs that changed vs. previous payload
regressions.json # Test failure regression tracking
jobs/
blocking/
<job-name>/
job.json # Job metadata (state, URLs, GCS link, retries)
build_log.json # Error/warning lines + log tail (failed only)
junit/ # Only for failed jobs
junit_operator.xml # CI phase results
junit-aggregated.xml # Aggregated jobs only
results.json # Parsed test failures (full output)
informing/
<job-name>/
job.json # Job metadata only (no JUnit/build log)
<component>/ # e.g., machine-config-operator
prs/
<pr_number>/
code.diff # Git diff of the PR
comments.json # PR comments and reviews
jobs.json # CI check runs
rpmdb/ # RPMDB from RHCOS images
rhel-coreos/ # queryable with rpm --dbpath
rpmdb.sqlite
rhel-coreos-10/
rpmdb.sqlite
rpm-changelogs/ # Target payload only
rhel-coreos-10/ # One diff per older payload
<older-payload-tag>.md
Step 3: Use the Data

Find failed blocking jobs (with streaks):

bash
jq '.blocking_jobs.failed_jobs[] | {name, state, streak: .streak.streak_length, pattern: .streak.failure_pattern}' payload/<version>/<stream>/summary.json

Check test failures and when they started:

bash
jq '.[] | {test: .test_name, first_failed: .first_failed_in, payloads: .payloads_failing, jobs: .jobs}' payload/<version>/<stream>/<tag>/regressions.json

List PRs in a payload:

bash
jq '.changeLogJson.updatedImages[].commits[] | {component: .name, pr: .pullURL, subject: .subject}' payload/<version>/<stream>/<tag>/changelog.json

Read a specific PR's diff:

bash
cat payload/<version>/<stream>/<tag>/<component>/prs/<number>/code.diff

Check JUnit failures for a specific job:

bash
jq '.[].name' payload/<version>/<stream>/<tag>/jobs/blocking/<job-name>/junit/results.json

Query RHCOS RPM packages (using the extracted rpmdb.sqlite):

bash
rpm -qa --dbpath $(pwd)/payload/<version>/<stream>/<tag>/rpmdb/rhel-coreos

See what changed in the RHCOS RPMs since the baseline (inline in summary.json — no file read needed):

bash
jq '.rpm_changelogs[] | select(.diff) | {variant, compared_tag, diff}' payload/<version>/<stream>/summary.json

Find which payload in the chain introduced a package bump:

bash
cat payload/<version>/<stream>/<target-tag>/rpm-changelogs/<variant>/<older-tag>.md

CLI Reference

text
python3 payload_snapshot.py <payload_tag> [OPTIONS]
Positional:
payload_tag Payload tag (e.g., 4.22.0-0.nightly-2026-02-25-152806)
Options:
--output-dir DIR Base output directory (default: payload)
--max-chain N Maximum backward chain depth (default: 20)
--workers N Parallel workers for API calls (default: 8)
--no-junit Skip JUnit download and regression tracking
--no-rpmdb Skip RHCOS RPMDB extraction
--no-rpm-changelogs Skip the RPM changelog diffs between the target payload
and the older payloads in the chain
--sippy Force Sippy for all payload metadata instead of using
the automatic release-controller-first fallback
--fail-on-incomplete Exit 1 if any requested data could not be collected

Output Files

streams.json

Lists all available streams for the payload's version.

summary.json

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/openshift-eng/ai-helpers/payload-snapshot/badge)](https://verified-skill.com/skills/openshift-eng/ai-helpers/payload-snapshot)

Something wrong with this skill or its page? Tell us.