Repository navigation
Improvements to payload agent #511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
openshift-merge-bot
merged 27 commits into
openshift-eng:main
from
not-stbenjam:snapshot-payload
Jun 3, 2026
Merged
Changes from 12 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
7d613de
ci: add snapshot-payload skill for offline payload analysis
74724a4
ci: expand snapshot-payload with GCS links, build logs, streaks, and …
66c3a89
ci: update SKILL.md for expanded snapshot-payload features
576d66a
ci: rename snapshot-payload skill to payload-snapshot
655a8c0
ci: replace analyze-payload with snapshot-based payload-analysis skill
eafd6da
ci: add payload-analysis eval suite and fix adversarial review over-c…
not-stbenjam 07e9689
ci: add Sippy fallback, informing job artifacts, and 13 eval cases
not-stbenjam 1a20391
ci: add skill invocation judge and production system prompt to eval
not-stbenjam d1b60be
ci: drop collapsible details requirement and fix snapshot extraction …
not-stbenjam a004ffa
ci: add schema validation scripts for payload output files
not-stbenjam bc28091
ci: harden validation scripts against malformed inputs
not-stbenjam fe2917c
ci: add test fixtures for payload output validators
not-stbenjam ea3b4d9
Merge remote-tracking branch 'upstream/main' into snapshot-payload
not-stbenjam abba315
docs: regenerate docs after merge conflict resolution
not-stbenjam 499d946
ci: clean up temp files in validator tests
not-stbenjam 179eb84
ci: address CodeRabbit review feedback
not-stbenjam 6691656
Revert "ci: address CodeRabbit review feedback"
not-stbenjam 1b075b9
ci: restore analyze-payload command and skill
not-stbenjam 5bbe5ba
docs: regenerate docs without node_modules standalone skills
not-stbenjam 3752025
ci: exclude node_modules and template dirs from skillsaw
not-stbenjam 3b44915
ci: move eval snapshots to external repo
not-stbenjam 47b5e3f
ci: fix snapshot-dir path to include payload tag
not-stbenjam 2d55743
ci: trigger CI rebuild
not-stbenjam 30808d0
Merge main into snapshot-payload
not-stbenjam 826d255
docs: regenerate after merge with main
not-stbenjam 89693ad
ci: bump plugin version to 0.0.44
not-stbenjam 4d52f9a
ci: fix adversarial review over-correcting confidence scores
not-stbenjam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| --- | ||
| description: Analyze a payload snapshot to identify root causes of blocking job failures and produce an HTML report with revert recommendations | ||
| argument-hint: "<payload-tag> [--snapshot-dir DIR]" | ||
| --- | ||
|
|
||
| ## Name | ||
|
|
||
| ci:payload-analysis | ||
|
|
||
| ## Synopsis | ||
|
|
||
| ``` | ||
| /ci:payload-analysis <payload-tag> [--snapshot-dir DIR] | ||
| ``` | ||
|
|
||
| ## Description | ||
|
|
||
| The `ci:payload-analysis` command analyzes a specific payload tag using a local snapshot (from the `payload-snapshot` skill), investigates every failed blocking job, and produces a self-contained HTML report summarizing what went wrong. | ||
|
|
||
| It supports **Rejected** payloads (full analysis), **Ready** payloads (early analysis of blocking jobs that have already failed), and **Accepted** payloads (which may have been force-accepted despite blocking failures). | ||
|
|
||
| The analysis reads from a pre-built snapshot that contains all release controller, GitHub, and CI data frozen at the time of snapshot creation. This means: | ||
|
|
||
| - **Reproducible**: Re-running the analysis on the same snapshot produces consistent results | ||
| - **Historical replay**: Analyze old payloads against their original data, even after the world has moved on | ||
| - **Model-friendly**: Less capable models can perform analysis without orchestrating complex multi-skill data gathering | ||
|
|
||
| If no snapshot exists for the requested payload, one is created automatically. | ||
|
|
||
| The analysis performs **historical lookback** through the snapshot's payload chain to determine when each failure first appeared. For each originating payload, it identifies the PRs introduced as likely culprits. When a candidate PR can be correlated with high confidence (>= 85 rubric score), the report recommends it for **immediate revert** per OCP policy. | ||
|
|
||
| An **adversarial review** subagent checks the analysis for weak correlations, misattributions, and logical gaps before finalizing the report. | ||
|
|
||
| The payload results YAML output (`payload-results-{tag}.yaml`) can be consumed by composable downstream commands: `/ci:payload-revert` stages reverts for high-confidence candidates, and `/ci:payload-experiment` opens draft revert PRs for medium-confidence candidates. | ||
|
|
||
| ### Key Features | ||
|
|
||
| - **Snapshot-based**: All data pre-gathered locally — no live API orchestration during analysis | ||
| - **Historical lookback**: Uses the snapshot's chain data to identify when each job first started failing | ||
| - **PR correlation**: Reads local PR diffs from the snapshot to match error messages with code changes | ||
| - **Parallel investigation**: Kicks off subagents for each failed blocking job using the appropriate CI analysis skill | ||
| - **Adversarial review**: A dedicated reviewer subagent checks conclusions before finalizing | ||
| - **Revert recommendations**: Proposes specific PRs to revert when evidence strongly links them to a failure | ||
| - **HTML report**: Self-contained HTML report with collapsible sections, color-coded severity, and executive summary | ||
|
|
||
| ## Implementation | ||
|
|
||
| Load the "payload-analysis" skill and follow its implementation steps. The skill orchestrates: | ||
|
|
||
| 1. Locating or creating a payload snapshot | ||
| 2. Reading failure data, streaks, and candidate PRs from the snapshot | ||
| 3. Launching parallel subagents to investigate each failed job | ||
| 4. Scoring candidates and identifying revert recommendations | ||
| 5. Adversarial review of conclusions | ||
| 6. Generating the final HTML report, YAML, and JSON outputs | ||
|
|
||
| ## Return Value | ||
|
|
||
| - **Format**: Self-contained HTML file + payload results YAML + JSON data file saved to the current working directory | ||
| - **Filenames**: | ||
| - `payload-analysis-{tag}-summary.html` — HTML report | ||
| - `payload-analysis-{tag}-autodl.json` — JSON data for database ingestion | ||
| - `payload-results-{tag}.yaml` — Scored candidates for downstream commands | ||
| - **Contents** (all `<a>` links must use `target="_blank"` to open in a new tab): | ||
| - Executive summary with overall payload health | ||
| - Summary table of all blocking jobs (pass/fail with streaks and failure patterns) | ||
| - Per-job failure analysis with root cause, error messages, and logs | ||
| - Originating payload and candidate PRs for each failure | ||
| - Recommended reverts section with PR links, rationale, and copy-paste revert text | ||
| - Adversarial review notes | ||
| - Color-coded severity and collapsible detail sections | ||
|
|
||
| ## Examples | ||
|
|
||
| 1. **Analyze an amd64 nightly payload** (auto-creates snapshot if needed): | ||
| ``` | ||
| /ci:payload-analysis 4.22.0-0.nightly-2026-02-25-152806 | ||
| ``` | ||
|
|
||
| 2. **Analyze using an existing snapshot directory**: | ||
| ``` | ||
| /ci:payload-analysis 4.22.0-0.nightly-2026-02-25-152806 --snapshot-dir payload/4.22/nightly | ||
| ``` | ||
|
|
||
| 3. **Analyze an arm64 payload** (architecture inferred from tag): | ||
| ``` | ||
| /ci:payload-analysis 4.22.0-0.nightly-arm64-2026-02-25-152806 | ||
| ``` | ||
|
|
||
| ## Arguments | ||
|
|
||
| - $1: A full payload tag (e.g., `4.22.0-0.nightly-2026-02-25-152806`). Version, stream, and architecture are parsed from the tag automatically. Tags without an architecture suffix are amd64. (required) | ||
| - `--snapshot-dir DIR`: Path to an existing snapshot directory containing `summary.json` (optional). If not provided, searches standard locations or creates a new snapshot. | ||
|
|
||
| ## Skills Used | ||
|
|
||
| - `payload-snapshot`: Creates the local data snapshot (auto-invoked if needed) | ||
| - `payload-analysis`: Orchestrates the full analysis workflow | ||
| - `payload-results-yaml`: Schema for the results YAML output | ||
| - `payload-autodl-json`: Schema for the JSON data output | ||
| - `prow-job-analyze-install-failure`: Analyzes install failures (used by subagents) | ||
| - `prow-job-analyze-test-failure`: Analyzes test failures (used by subagents) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
.../payload-analysis/case-001-4.22-nightly-ci-config-and-product-regression/annotations.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| expected_phase: Rejected | ||
| expected_failed_job_count: 3 | ||
| has_revert_candidates: true | ||
| force_accept_expected: false | ||
|
|
||
| expected_candidates: | ||
| - pr_url: "https://github.com/openshift/cluster-authentication-operator/pull/839" | ||
| component: "cluster-authentication-operator" | ||
| min_confidence: 85 | ||
| expected_confidence: 92 | ||
| description: "Ginkgo v2 migration broke test binary stdout output, corrupting JSON test listing in openshift-tests" | ||
| expected_failing_jobs: | ||
| - "metal-ipi-ovn-ipv4" | ||
| - "metal-ipi-ovn-ipv6" | ||
|
|
||
| expected_ci_config_issues: | ||
| - pr_url: "https://github.com/openshift/release/pull/76852" | ||
| repo: "openshift/release" | ||
| description: "Changed vSphere VCM default lease to multi-tenant, breaking UPI workflows that require single-tenant leases" | ||
| expected_failing_jobs: | ||
| - "install-analysis-all" | ||
|
|
||
| notes: > | ||
| Mixed-root-cause case combining a product regression and a CI configuration | ||
| issue. Two metal-ipi jobs fail because cluster-authentication-operator#839 | ||
| (Ginkgo v2 migration) introduced a warning message to stdout that corrupts | ||
| JSON test listing in openshift-tests. The install-analysis-all job fails | ||
| because openshift/release#76852 changed the default vSphere VCM lease type | ||
| from single-tenant to multi-tenant, breaking UPI workflows. | ||
|
|
||
| The CI config issue is the key test: openshift/release PRs do NOT appear in | ||
| payload changelogs. The agent must recognize that install-analysis-all is a | ||
| CI step failure (not a product bug), dig into the Prow job to find the | ||
| underlying vsphere-upi error ("SUBNETS.JSON does not contain enough | ||
| addresses... expected to be a single-tenant lease"), then search | ||
| openshift/release for recent commits matching the error. This tests the | ||
| "look beyond the snapshot" capability via the prow-job-analyze sub-skills. |
1 change: 1 addition & 0 deletions
1
.../cases/payload-analysis/case-001-4.22-nightly-ci-config-and-product-regression/input.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| payload_tag: "4.22.0-0.nightly-2026-03-26-231124" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.