From c90650596b074040bca6e8d93872a1fe75a0e9d1 Mon Sep 17 00:00:00 2001 From: Stephen Benjamin Date: Wed, 4 Mar 2026 09:34:06 -0500 Subject: [PATCH] Require evidence-based install failure classification in payload analysis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subagents investigating install failures must use the prow-job-analyze-install-failure skill to download and examine actual log bundles rather than making surface-level assessments based on pass rates or job names. Failure classifications must cite specific log lines or error messages. Also adds cross-job pattern recognition guidance (e.g., all techpreview jobs failing suggests a feature-set-specific bug) and emphasizes that all new PRs — including vendor-only rebases — should be evaluated as potential causes. Co-Authored-By: Claude Opus 4.6 --- .claude-plugin/marketplace.json | 2 +- docs/data.json | 2 +- plugins/ci/.claude-plugin/plugin.json | 2 +- plugins/ci/skills/analyze-payload/SKILL.md | 13 +++++++++++- plugins/ci/skills/payload-agent/SKILL.md | 4 ++++ .../prow-job-analyze-install-failure/SKILL.md | 20 +++++++++++-------- 6 files changed, 31 insertions(+), 12 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index fd2c1fe0b..ae3dac8d5 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -26,7 +26,7 @@ "name": "ci", "source": "./plugins/ci", "description": "A plugin to work with OpenShift CI and analyze Prow job results", - "version": "0.0.16" + "version": "0.0.17" }, { "name": "teams", diff --git a/docs/data.json b/docs/data.json index cf28c8bf2..ca71d9163 100644 --- a/docs/data.json +++ b/docs/data.json @@ -530,7 +530,7 @@ "name": "Triage Regression" } ], - "version": "0.0.16" + "version": "0.0.17" }, { "commands": [ diff --git a/plugins/ci/.claude-plugin/plugin.json b/plugins/ci/.claude-plugin/plugin.json index 1694d32f8..247eb2e28 100644 --- a/plugins/ci/.claude-plugin/plugin.json +++ b/plugins/ci/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "ci", "description": "Tools for working with OpenShift CI and analyzing Prow job results", - "version": "0.0.16", + "version": "0.0.17", "author": { "name": "openshift" } diff --git a/plugins/ci/skills/analyze-payload/SKILL.md b/plugins/ci/skills/analyze-payload/SKILL.md index bacb78e4c..5830bcdce 100644 --- a/plugins/ci/skills/analyze-payload/SKILL.md +++ b/plugins/ci/skills/analyze-payload/SKILL.md @@ -110,9 +110,11 @@ Instruct each subagent as follows: > Analyze the failure at . First, check the JUnit results or build log to determine whether this is an install failure (look for `install should succeed: overall` or similar install-related test failures) or a test failure (install passed, specific tests failed). > > Based on the failure type, use the appropriate skill: -> - **Install failure**: Use the `ci:prow-job-analyze-install-failure` skill. For metal/bare-metal jobs (job name contains "metal"), perform additional analysis using the `ci:prow-job-analyze-metal-install-failure` skill as needed for dev-scripts, Metal3/Ironic, and BareMetalHost-specific diagnostics. +> - **Install failure**: Use the `ci:prow-job-analyze-install-failure` skill. **You MUST download and examine the actual installer log bundle** — do NOT skip this step or make assessments based only on high-level metadata like pass rates or job names. The log bundle contains the actual error messages that reveal the root cause. For metal/bare-metal jobs (job name contains "metal"), perform additional analysis using the `ci:prow-job-analyze-metal-install-failure` skill as needed for dev-scripts, Metal3/Ironic, and BareMetalHost-specific diagnostics. > - **Test failure**: Use the `ci:prow-job-analyze-test-failure` skill. > +> **IMPORTANT — Classify failures based on log evidence, not assumptions.** You must examine the actual logs (installer log, log bundle, bootstrap journals, kube-apiserver logs) before classifying a failure. A bootstrap timeout could be infrastructure, a product bug, or a race condition — the logs will tell you which. Cite specific error messages in your assessment. +> > Return a concise summary including: failure type (install vs test), root cause, key error messages, and any relevant log excerpts. Do not ask user questions. Keep the output concise for inclusion in a summary report. > > If the job is an aggregated job (has `aggregated-` prefix in the name or an `aggregator` container/step), also return the **underlying job name** (e.g., `periodic-ci-openshift-release-main-ci-4.22-e2e-aws-upgrade-ovn-single-node`). This is found in the junit-aggregated.xml artifacts — each `` has `` YAML data with a `humanurl` field linking to individual runs whose URL path contains the underlying job name. The underlying job name cannot be derived from the aggregated job name — it must be extracted from the artifacts. @@ -132,6 +134,15 @@ This structured format enables downstream consumers (like the `payload-agent` sk **Important**: Launch ALL subagents in parallel (single message with multiple Task tool calls) for maximum speed. Each subagent should be given `subagent_type: "general-purpose"`. Do NOT set the `model` parameter — let subagents inherit the parent model, as these analysis tasks require a capable model. +#### Cross-Platform and Cross-Job Failure Pattern Recognition + +After collecting subagent results, look for patterns across multiple jobs: + +- **Same failure across a job family** (e.g., all `techpreview` jobs, all `fips` jobs, all `upgrade` jobs): This often indicates a failure specific to that feature set or configuration. Look at what differentiates that job family (feature gates, install-config options, test parameters). +- **Same failure across multiple platforms**: Consider whether this points to a product bug in shared code, though note that cross-platform infrastructure issues (e.g., CI platform problems) are also possible. + +When patterns emerge, query Sippy for pass rates of related non-blocking jobs to see if the pattern extends beyond blocking jobs. + ### Step 6: Collect Investigation Results and Identify Revert Candidates Wait for all subagents to complete and collect their analysis results. For each failed job, you should now have: diff --git a/plugins/ci/skills/payload-agent/SKILL.md b/plugins/ci/skills/payload-agent/SKILL.md index 1d6f8c358..e21b533f7 100644 --- a/plugins/ci/skills/payload-agent/SKILL.md +++ b/plugins/ci/skills/payload-agent/SKILL.md @@ -58,6 +58,10 @@ Execute the `analyze-payload` skill Steps 1-6 to gather all analysis data: 6. Identify revert candidates (Step 6.2) 7. Check for existing reverts (Step 6.3) +**Critical — Install failure investigation must be thorough.** When subagents investigate install failures (Step 5), they MUST use the `ci:prow-job-analyze-install-failure` skill to download and examine actual log bundles. Do not allow surface-level assessments based on pass rates or job names alone. Bootstrap timeouts, for example, can be caused by admission plugin bugs, race conditions, or configuration errors — not just infrastructure problems. The log bundle contains the actual error messages that reveal root cause. + +**Critical — Evaluate ALL new PRs as potential causes.** When failures affect a specific feature set (e.g., TechPreview), examine each new PR for changes that could affect that feature set: feature gate changes, vendored dependency updates (especially kube rebases), manifest changes that add/modify annotations, and admission plugin configuration. Vendor-only rebases can still introduce behavioral changes through updated library code. + All results stay in-context (not written to files yet). The `analyze-payload` skill's Steps 7-9 (report generation) are deferred to Step 6 of this skill. ### Step 3: Apply Confidence Scoring diff --git a/plugins/ci/skills/prow-job-analyze-install-failure/SKILL.md b/plugins/ci/skills/prow-job-analyze-install-failure/SKILL.md index c56616260..6c4df6200 100644 --- a/plugins/ci/skills/prow-job-analyze-install-failure/SKILL.md +++ b/plugins/ci/skills/prow-job-analyze-install-failure/SKILL.md @@ -612,49 +612,53 @@ See that skill's documentation for details on dev-scripts, libvirt logs, sosrepo ## Important Notes -1. **Eventual Consistency Behavior** +1. **Bootstrap Failures Require Log Bundle Analysis** + - Bootstrap timeout failures can have many causes — always download and examine the installer log bundle to determine the actual root cause + - Do not classify bootstrap failures without examining the logs + +2. **Eventual Consistency Behavior** - OpenShift installations exhibit eventual consistency - Components report errors while waiting for dependencies - Early errors are EXPECTED and usually resolve automatically - **Always analyze backwards from the final timeout, not forwards from the start** - Only errors that persist until failure are relevant root causes -2. **Upgrade Jobs and Installation** +3. **Upgrade Jobs and Installation** - Jobs with "upgrade" in the name perform installation FIRST, then upgrade - If you're analyzing an installation failure in an upgrade job, it never got to the upgrade phase - "minor" upgrade: Installs 4.n-1 version (e.g., 4.20 for a 4.21 upgrade job) - "micro" upgrade: Installs earlier payload in same stream -3. **Log Bundle Availability** +4. **Log Bundle Availability** - Not all jobs produce log bundles - Older jobs may not have this feature - Installation must reach a certain point to generate log bundle -4. **Must-Gather Availability** +5. **Must-Gather Availability** - Must-gather only exists if a `must-gather*.tar` file is present - If no .tar file exists, the cluster was too unstable to collect diagnostics - **Never suggest downloading must-gather unless you verified the .tar file exists** -5. **Metal Job Specifics** +6. **Metal Job Specifics** - Metal jobs are analyzed using the specialized `prow-job-analyze-metal-install-failure` skill - That skill handles dev-scripts, libvirt console logs, sosreport, and squid logs - See the metal skill documentation for details -6. **Debugging Workflow** +7. **Debugging Workflow** - Start with installer log to find **LAST** error (not first) - Use failure stage to guide which logs to examine - Log bundle provides node-level details - For metal jobs, invoke the metal-specific skill for additional analysis - Work backwards in time to trace dependency chains -7. **Common Failure Patterns** +8. **Common Failure Patterns** - **Bootstrap etcd not starting**: Check etcd.log and bootkube.log - **API server not responding**: Check kube-apiserver.log - **Masters not joining**: Check master serial logs - **Operators degraded**: Check specific operator logs in must-gather (if it exists) - **Network issues**: Check network configuration in bootstrap/network/ -8. **File Formats** +9. **File Formats** - Installer log: Plain text, structured format - Journal logs: systemd journal format (plain text export) - Serial logs: Raw console output