Skip to content

TRT-2612: Make payload analysis RHCOS-version-aware - #514

Merged
openshift-merge-bot[bot] merged 4 commits into
openshift-eng:mainfrom
petr-muller:trt-2612-make-job-analysis-aware-of-rhcos
Jun 2, 2026
Merged

openshift-merge-bot[bot] merged 4 commits into
openshift-eng:mainfrom
petr-muller:trt-2612-make-job-analysis-aware-of-rhcos

Conversation

@petr-muller

@petr-muller petr-muller commented Jun 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Add "Upgrade Jobs" section to jobs.md explaining micro/minor/major upgrade types and why the install-time OCP version determines initial cluster state
  • Replace outdated "RHCOS 10 (Tech Preview)" section with comprehensive "RHCOS Versions" section: detection rules from job names, defaults by OCP major version, and analysis implications of variant isolation
  • Extend analyze-payload skill to determine RHCOS version per job, pass it to subagents, collect it in ANALYSIS_RESULT, detect variant-isolated failures in cross-job pattern recognition, and surface RHCOS badges and callouts in the HTML report

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Replaced RHCOS-specific guidance with a unified “Upgrade Jobs” and “RHCOS Versions” guide clarifying install-time OCP behavior for upgrades.
    • Added per-job RHCOS-aware analysis guidance, new rhcos_version field, and variant-isolation classification for failures.
    • Enhanced HTML reports with RHCOS badges and variant-isolation callouts and styling.
    • Updated command docs to reference consolidated CI references and added a Job Pattern Reference page.
    • Bumped CI plugin version in marketplace/manifest and docs.

Add an "Upgrade Jobs" section explaining micro/minor/major upgrade
types and why the install-time OCP version matters for determining
initial cluster state. Replace the outdated "RHCOS 10 (Tech Preview)"
section with a comprehensive "RHCOS Versions" section covering both
variants, detection rules from job names, and analysis implications
of variant isolation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci
openshift-ci Bot requested review from brandisher and stbenjam June 2, 2026 10:45
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 2, 2026
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 10414c02-39ff-4d8b-8e21-19cdc363ebd9

📥 Commits

Reviewing files that changed from the base of the PR and between 2c90f74 and 9c0386b.

📒 Files selected for processing (3)
  • .claude-plugin/marketplace.json
  • docs/index.html
  • plugins/ci/.claude-plugin/plugin.json
✅ Files skipped from review due to trivial changes (3)
  • plugins/ci/.claude-plugin/plugin.json
  • .claude-plugin/marketplace.json
  • docs/index.html

Walkthrough

Adds RHCOS-aware detection and reporting to analyze-payload: documents upgrade job naming and RHCOS variants, determines per-job rhcos_version before subagents run, updates subagent prompt and schema, adds variant-isolation classification, and renders RHCOS badges and callouts in reports.

Changes

RHCOS-Aware Upgrade Job Failure Analysis

Layer / File(s) Summary
Upgrade Jobs and RHCOS Versions Documentation
plugins/ci/docs/jobs.md, plugins/ci/references/jobs.md
Documents upgrade job naming (micro/minor/major types), clarifies that install-time OCP version controls cluster state, details how to infer RHCOS variant from job-name fragments, and explains how variant-isolated failures narrow root cause to OS-specific changes.
RHCOS Version Determination Logic
plugins/ci/skills/analyze-payload/SKILL.md
Derives rhcos_version from ordered job-name fragments (including rhcos9_10) with install-time OCP major version fallback for upgrade jobs before launching subagent analysis; injects rhcos_context into the subagent prompt.
Subagent Prompt and Schema Updates
plugins/ci/skills/analyze-payload/SKILL.md
Extends the required verbatim subagent prompt to include RHCOS version/context and adds a rhcos_version enum field to the ANALYSIS_RESULT structured return format.
RHCOS Variant Isolation Pattern Recognition
plugins/ci/skills/analyze-payload/SKILL.md
Adds cross-job failure classification rules that report rhcos10-only, rhcos9-only, or mixed results, treating rhcos9_10 jobs as contributing to both variant categories.
HTML Report Rendering and Styling
plugins/ci/skills/analyze-payload/SKILL.md
Updates report template to render RHCOS badges in blocking jobs table and failed-job details; conditionally renders a variant-callout for variant-isolated failures and adds CSS classes (badge-rhcos9, badge-rhcos10, badge-rhcos-mixed, badge.variant-isolated, variant-callout).
CLI docs path update & metadata bumps
plugins/ci/commands/analyze-regression.md, plugins/ci/.claude-plugin/plugin.json, .claude-plugin/marketplace.json, docs/index.html
Points the "Load CI Context" step and example command to plugins/ci/references/ and increments plugin version metadata to 0.0.43 in manifest, marketplace JSON, and docs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • stbenjam
  • enxebre
🚥 Pre-merge checks | ✅ 10
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'TRT-2612: Make payload analysis RHCOS-version-aware' is specific and directly reflects the main objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No Real People Names In Style References ✅ Passed No real people's names used as style references found. GitHub reference is to a company, not a person. Claude references are tool attributions, not style examples.
No Assumed Git Remote Names ✅ Passed All modified files in the PR contain no hardcoded git remote names (origin/upstream) in git commands. The changes are documentation and configuration updates only.
Git Push Safety Rules ✅ Passed No git push, force push, or any other git push variants found in any of the modified files. PR contains only documentation updates and version bumps (0.0.42→0.0.43).
No Untrusted Mcp Servers ✅ Passed No untrusted MCP servers introduced. PR only bumps CI plugin version to 0.0.43 and updates documentation. CI plugin has no .mcp.json file. Existing MCP servers (Atlassian, gopls) are trusted.
Ai-Helpers Overlap Detection ✅ Passed PR enhances analyze-payload skill with RHCOS awareness and adds reference documentation; no competing open PRs or duplicate functionality detected across plugins/ci/commands/ or plugins/ci/skills/.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

- OCP 4.x → **RHCOS 9 (default)**
- OCP 5.x → **RHCOS 9 (default)** (current default; will change to RHCOS 10)

For upgrade jobs, use the **install-time** OCP version (see "Upgrade Jobs" in `jobs.md`), not the payload/target version. This matters for major upgrades: a major upgrade job in a 5.x payload installs OCP 4.x, so its RHCOS default follows OCP 4.x rules.

@stbenjam stbenjam Jun 2, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The canonical place is references/, is docs today in the plugin human or agent documentation?
https://agentskills.io/home

You should give a relative path here regardless and make it a link

@petr-muller petr-muller Jun 2, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It apparently targets agents but the doc seems to be be plugin-wide and not skill-wide. renaming probably does not hurt but not sure if we actually need to symlink this from skills or something.

@petr-muller petr-muller changed the title Make payload analysis RHCOS-version-aware TRT-2612: Make payload analysis RHCOS-version-aware Jun 2, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 2, 2026

Copy link
Copy Markdown

@petr-muller: This pull request references TRT-2612 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Add "Upgrade Jobs" section to jobs.md explaining micro/minor/major upgrade types and why the install-time OCP version determines initial cluster state
  • Replace outdated "RHCOS 10 (Tech Preview)" section with comprehensive "RHCOS Versions" section: detection rules from job names, defaults by OCP major version, and analysis implications of variant isolation
  • Extend analyze-payload skill to determine RHCOS version per job, pass it to subagents, collect it in ANALYSIS_RESULT, detect variant-isolated failures in cross-job pattern recognition, and surface RHCOS badges and callouts in the HTML report

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
  • Updated guidance on RHCOS versions and upgrade job configurations.
  • Enhanced failure reports with RHCOS variant badges and variant-isolation analysis.
  • Improved documentation for diagnosing variant-specific failures.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 2, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
plugins/ci/skills/analyze-payload/SKILL.md (1)

113-127: ⚡ Quick win

Consider adding explicit logic for determining install-time OCP version for upgrade jobs.

The documentation correctly states that upgrade jobs should use install-time OCP version for RHCOS defaults, but the implementation doesn't provide explicit logic for deriving the install-time version from job names.

For example:

  • Minor upgrade job in 4.22 payload containing "upgrade-from-stable-4.21" → installs 4.21 (install-time = 4.21)
  • Major upgrade job in 5.0 payload → installs 4.x (install-time = 4.x)

The current text assumes the implementer will know how to determine this, but adding a concrete algorithm would improve clarity:

4. No fragment → default based on the OCP major version **at install time**:
   - Determine install-time version:
     * If job name contains "upgrade-from-stable-X.Y", install-time version is X.Y
     * If job name contains "upgrade" and payload is 5.x but no "stable-5.x" fragment, install-time is 4.x (major upgrade)
     * Otherwise, install-time version equals payload version
   - Apply default: OCP 4.x → RHCOS 9, OCP 5.x → RHCOS 9
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/ci/skills/analyze-payload/SKILL.md` around lines 113 - 127, Extend
the "RHCOS Version Determination" logic to explicitly derive the install-time
OCP version from the job name for upgrade jobs: parse job names for patterns
like "upgrade-from-stable-X.Y" to set install-time = X.Y; if job name contains
"upgrade" with a 5.x payload but no "stable-5.x" fragment treat install-time as
4.x (major upgrade); otherwise default install-time to the payload version; then
use that install-time major (4.x vs 5.x) to select the RHCOS default per the
existing rules and pass the determined RHCOS to subagents.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@plugins/ci/skills/analyze-payload/SKILL.md`:
- Around line 113-127: Extend the "RHCOS Version Determination" logic to
explicitly derive the install-time OCP version from the job name for upgrade
jobs: parse job names for patterns like "upgrade-from-stable-X.Y" to set
install-time = X.Y; if job name contains "upgrade" with a 5.x payload but no
"stable-5.x" fragment treat install-time as 4.x (major upgrade); otherwise
default install-time to the payload version; then use that install-time major
(4.x vs 5.x) to select the RHCOS default per the existing rules and pass the
determined RHCOS to subagents.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 02a641b9-e290-4cc9-86f4-16573aa0c0da

📥 Commits

Reviewing files that changed from the base of the PR and between 86fd92f and 6643251.

📒 Files selected for processing (2)
  • plugins/ci/docs/jobs.md
  • plugins/ci/skills/analyze-payload/SKILL.md

Extend the analyze-payload skill to determine and pass RHCOS version
context to each subagent, detect variant-isolated failures across
jobs, and surface RHCOS information in the HTML report. Subagents now
receive the cluster's RHCOS version and return it in ANALYSIS_RESULT,
enabling cross-job pattern recognition to flag failures isolated to
one RHCOS variant.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@petr-muller
petr-muller force-pushed the trt-2612-make-job-analysis-aware-of-rhcos branch from 6643251 to edbc77b Compare June 2, 2026 10:51
Rename plugins/ci/docs/ to plugins/ci/references/ to follow the
plugin convention for reference documentation. Update all internal
links and path references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/ci/skills/analyze-payload/SKILL.md`:
- Line 124: Update the broken relative link in SKILL.md where the text contains
"[jobs.md](../docs/jobs.md)" (the sentence starting "For upgrade jobs, use the
**install-time** OCP version...") to use the correct path
"[jobs.md](../../docs/jobs.md)"; locate the markdown link text in SKILL.md and
replace "../docs/jobs.md" with "../../docs/jobs.md" so the link resolves to the
docs folder.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2540370b-c2ba-4fb4-92d6-e50b8fda2afc

📥 Commits

Reviewing files that changed from the base of the PR and between 6643251 and edbc77b.

📒 Files selected for processing (1)
  • plugins/ci/skills/analyze-payload/SKILL.md

Comment thread plugins/ci/skills/analyze-payload/SKILL.md Outdated
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
plugins/ci/skills/analyze-payload/SKILL.md (1)

120-122: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Enum value rhcos10-default in schema is unreachable from documented determination logic.

The RHCOS determination algorithm (lines 120-122) assigns RHCOS 9 as the default for both OCP 4.x and 5.x, with a note that 5.x "will change to RHCOS 10" in the future. However, the ANALYSIS_RESULT schema on line 173 already includes rhcos10-default as a valid enum value that the current logic never produces.

Either:

  1. Document when rhcos10-default will be returned (e.g., "For OCP 5.x starting from version 5.N, the default will be RHCOS 10"), or
  2. Remove rhcos10-default from the schema until the logic is updated to assign it

This prevents confusion about when subagents should return this value and ensures the schema matches the documented behavior.

Also applies to: 173-173

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/ci/skills/analyze-payload/SKILL.md` around lines 120 - 122, The
schema includes an enum value `rhcos10-default` in ANALYSIS_RESULT that the
RHCOS determination logic in SKILL.md (the "No fragment → default based on the
OCP major version" rules) never emits; either remove `rhcos10-default` from the
ANALYSIS_RESULT enum until the algorithm is updated, or update the SKILL.md
rules to document explicitly when `rhcos10-default` will be returned (e.g.,
specify the OCP 5.x version threshold and wording like "For OCP 5.x starting
with 5.N, default → RHCOS 10"), and update any consumers/tests that rely on
ANALYSIS_RESULT to match the chosen change. Ensure the change is applied
consistently by editing the ANALYSIS_RESULT enum and the RHCOS determination
text together so schema and documentation align.
🧹 Nitpick comments (1)
plugins/ci/skills/analyze-payload/SKILL.md (1)

344-344: ⚡ Quick win

Clarify the mapping from rhcos_version enum values to badge CSS classes.

The schema (line 173) defines five enum values: rhcos9, rhcos10, rhcos9_10, rhcos9-default, rhcos10-default. The CSS (lines 528-530) defines three badge classes: badge-rhcos9, badge-rhcos10, badge-rhcos-mixed.

The mapping is implicit:

  • rhcos9 and rhcos9-defaultbadge-rhcos9
  • rhcos10 and rhcos10-defaultbadge-rhcos10
  • rhcos9_10badge-rhcos-mixed

Consider adding an explicit note in section 7.2 or 7.3 documenting this mapping so implementers know how to render badges from the ANALYSIS_RESULT.rhcos_version field.

📝 Suggested clarification

After line 344 or in a new subsection, add:

**RHCOS Badge Rendering**: Map the subagent's `rhcos_version` value to CSS classes as follows:
- `rhcos9` or `rhcos9-default``badge-rhcos9` with label "RHCOS 9"
- `rhcos10` or `rhcos10-default``badge-rhcos10` with label "RHCOS 10"
- `rhcos9_10``badge-rhcos-mixed` with label "RHCOS 9+10"

When a failure is variant-isolated (see Step 5 Cross-Job Pattern Recognition), add the `variant-isolated` class to the badge.

Also applies to: 359-359

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/ci/skills/analyze-payload/SKILL.md` at line 344, Add an explicit
mapping in section 7.2 or 7.3 that documents how the
ANALYSIS_RESULT.rhcos_version enum maps to badge CSS classes and labels: state
that rhcos9 and rhcos9-default map to badge-rhcos9 with label "RHCOS 9", rhcos10
and rhcos10-default map to badge-rhcos10 with label "RHCOS 10", and rhcos9_10
maps to badge-rhcos-mixed with label "RHCOS 9+10"; also note that when a failure
is variant-isolated the renderer should add the variant-isolated class to the
badge and reference the rhcos_version field name so implementers can find it.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@plugins/ci/skills/analyze-payload/SKILL.md`:
- Around line 120-122: The schema includes an enum value `rhcos10-default` in
ANALYSIS_RESULT that the RHCOS determination logic in SKILL.md (the "No fragment
→ default based on the OCP major version" rules) never emits; either remove
`rhcos10-default` from the ANALYSIS_RESULT enum until the algorithm is updated,
or update the SKILL.md rules to document explicitly when `rhcos10-default` will
be returned (e.g., specify the OCP 5.x version threshold and wording like "For
OCP 5.x starting with 5.N, default → RHCOS 10"), and update any consumers/tests
that rely on ANALYSIS_RESULT to match the chosen change. Ensure the change is
applied consistently by editing the ANALYSIS_RESULT enum and the RHCOS
determination text together so schema and documentation align.

---

Nitpick comments:
In `@plugins/ci/skills/analyze-payload/SKILL.md`:
- Line 344: Add an explicit mapping in section 7.2 or 7.3 that documents how the
ANALYSIS_RESULT.rhcos_version enum maps to badge CSS classes and labels: state
that rhcos9 and rhcos9-default map to badge-rhcos9 with label "RHCOS 9", rhcos10
and rhcos10-default map to badge-rhcos10 with label "RHCOS 10", and rhcos9_10
maps to badge-rhcos-mixed with label "RHCOS 9+10"; also note that when a failure
is variant-isolated the renderer should add the variant-isolated class to the
badge and reference the rhcos_version field name so implementers can find it.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a1225faa-2d02-4e13-b957-dfb761a80cf1

📥 Commits

Reviewing files that changed from the base of the PR and between edbc77b and 2c90f74.

⛔ Files ignored due to path filters (1)
  • plugins/ci/references/payload-agent-flowchart.png is excluded by !**/*.png
📒 Files selected for processing (5)
  • plugins/ci/commands/analyze-regression.md
  • plugins/ci/references/jobs.md
  • plugins/ci/references/sippy-apis.md
  • plugins/ci/references/tests.md
  • plugins/ci/skills/analyze-payload/SKILL.md
💤 Files with no reviewable changes (1)
  • plugins/ci/references/jobs.md

@petr-muller

Copy link
Copy Markdown
Member Author

@stbenjam I guess it'd be better to rebase this on top of #511

/hold

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 2, 2026
@stbenjam

stbenjam commented Jun 2, 2026

Copy link
Copy Markdown
Member

I'm happy to take this PR, analyze-payload will be the entrypoint for a while, I plan to run both side-by-side at least for a little while

Do you happen to know an RHCOS-related issue we had in the last ~3 months I could use to build an evaluation case for?

@petr-muller

Copy link
Copy Markdown
Member Author

OK
/hold cancel

Do you happen to know an RHCOS-related issue we had in the last ~3 months I could use to build an evaluation case for?

I do not remember anything recent but wanted to look something up

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 2, 2026
@stbenjam

stbenjam commented Jun 2, 2026

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 2, 2026
@openshift-ci

openshift-ci Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: petr-muller, stbenjam

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit 3d4a9f1 into openshift-eng:main Jun 2, 2026
5 checks passed
@petr-muller
petr-muller deleted the trt-2612-make-job-analysis-aware-of-rhcos branch June 2, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants