Skip to content

Add lvms-ci plugin with doctor and prow-job skills#147

Merged
openshift-merge-bot[bot] merged 3 commits into
openshift-eng:mainfrom
kasturinarra:lvms_ci_doctor_p2
May 15, 2026
Merged

Add lvms-ci plugin with doctor and prow-job skills#147
openshift-merge-bot[bot] merged 3 commits into
openshift-eng:mainfrom
kasturinarra:lvms_ci_doctor_p2

Conversation

@kasturinarra
Copy link
Copy Markdown
Contributor

@kasturinarra kasturinarra commented May 15, 2026

Summary

  • Add new plugins/lvms-ci/ plugin for LVMS CI triage automation
  • Symlink shared scripts from plugins/shared/scripts/ with --component lvm-operator
  • Create lvms-ci:doctor skill for orchestrating CI analysis across releases
  • Create lvms-ci:prow-job skill for single job root cause analysis
  • Register plugin in marketplace catalog

Details

Builds on the shared CI doctor infrastructure from PR #145. The LVMS plugin reuses the same
shared scripts (doctor.sh, aggregate.py, create-report.py, etc.) via symlinks, parameterized
with --component lvm-operator.

Commits

Commit Description
1 Plugin structure: plugin.json, README.md, marketplace.json entry
2 Script symlinks to plugins/shared/scripts/ (6 symlinks)
3 Doctor and prow-job SKILL.md files

LVMS doctor vs MicroShift doctor

Feature MicroShift LVMS
Multiple releases Yes Yes
Rebase PRs Yes No
PCP graphs Yes No
Jira bug correlation Yes No
Component filter microshift lvm-operator

Test plan

  • Verify symlinks resolve: ls -la plugins/lvms-ci/scripts/
  • Verify JSON validity: python3 -m json.tool plugins/lvms-ci/.claude-plugin/plugin.json
  • Dry-run: bash plugins/lvms-ci/scripts/prow-jobs-for-release.sh lvm-operator main
  • Run /lvms-ci:doctor main end-to-end

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added LVMS CI plugin (v1.0.0) providing automated CI diagnostics.
    • Added lvms-ci:doctor — analyze failed periodic CI jobs across releases.
    • Added lvms-ci:prow-job — detailed analysis of individual Prow CI jobs.
  • Documentation

    • Added comprehensive plugin docs and skill guides with usage, prerequisites, and reporting details.

kasturinarra and others added 2 commits May 15, 2026 16:55
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 15, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kasturinarra

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-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 15, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

Warning

Rate limit exceeded

@kasturinarra has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 28 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: c0499418-0351-406a-8bbd-5ab226e27ae0

📥 Commits

Reviewing files that changed from the base of the PR and between 9faa32b and f7fa244.

📒 Files selected for processing (2)
  • plugins/lvms-ci/skills/doctor/SKILL.md
  • plugins/lvms-ci/skills/prow-job/SKILL.md

Walkthrough

Adds a new lvms-ci Claude plugin: marketplace registration and manifest, README, script stubs delegating to shared implementations, plus two SKILL docs (lvms-ci:doctor and lvms-ci:prow-job) describing CI analysis workflows and deterministic reporting.

Changes

LVMS CI Plugin

Layer / File(s) Summary
Plugin registration and metadata
.claude-plugin/marketplace.json, plugins/lvms-ci/.claude-plugin/plugin.json, plugins/lvms-ci/README.md
Plugin registered in the marketplace as lvms-ci (version 1.0.0). Includes plugin manifest and README documenting lvms-ci:doctor and lvms-ci:prow-job, usage, and prerequisites.
Script delegation to shared implementations
plugins/lvms-ci/scripts/aggregate.py, plugins/lvms-ci/scripts/classify.py, plugins/lvms-ci/scripts/create-report.py, plugins/lvms-ci/scripts/doctor.sh, plugins/lvms-ci/scripts/download-jobs.sh, plugins/lvms-ci/scripts/prow-jobs-for-release.sh
Six script files replaced with single-line shims that reference corresponding shared scripts under ../../shared/scripts/, delegating runtime behavior to shared implementations.
Doctor skill definition
plugins/lvms-ci/skills/doctor/SKILL.md
Documents user-invocable lvms-ci:doctor skill: prepare (download artifacts), concurrent per-job analysis via lvms-ci:prow-job, mandatory finalize step to aggregate results, produce summary.json and an HTML report with deterministic workdir/output naming.
Prow job analysis skill definition
plugins/lvms-ci/skills/prow-job/SKILL.md
Documents user-invocable lvms-ci:prow-job skill: input formats (URL or local dir), GCS path derivation, artifact expectations, log-scanning workflow, error-context rules, and deterministic RAW_ERROR, ROOT_CAUSE, and STRUCTURED SUMMARY fields for machine-readable output.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes


Suggested labels

ready-for-human-review

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (1)
plugins/lvms-ci/skills/prow-job/SKILL.md (1)

1-7: ⚡ Quick win

Frontmatter description should use activation-style trigger wording.

Consider rewriting description to start with “Use when …” and include a negative trigger to avoid overlap with broader CI skills.

As per coding guidelines, plugins/docs/SKILL-GUIDELINES.md says descriptions should "start with an action/use-case trigger" and include "negative triggers for overlapping domains."

Also applies to: 18-20

🤖 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/lvms-ci/skills/prow-job/SKILL.md` around lines 1 - 7, Update the
SKILL frontmatter so the description field uses an activation-style trigger and
includes a negative trigger to avoid overlap: change the description for the
skill named "lvms-ci:prow-job" to start with "Use when ..." and append a clear
negative trigger (e.g., "Not for general CI failure triage; use only for Prow
job artifacts/URLs") to distinguish it from broader CI skills; apply the same
pattern to the other affected frontmatter entries referenced in the comment
(lines 18-20).
🤖 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/lvms-ci/skills/doctor/SKILL.md`:
- Around line 74-88: Add explicit guard checks after launching the Agents in
Step 2 and before moving to Step 3: after the Agent tool calls complete,
validate each Agent's returned status (e.g., success/failed) and verify the
corresponding report file named
analyze-ci-release-<RELEASE>-job-<N>-<JOB_ID>.txt exists and contains the
literal "--- STRUCTURED SUMMARY ---" block; if any Agent failed or a
file/magic-block is missing, stop the flow, surface a clear error message
listing which job(s) failed or missing the summary, and do NOT proceed to the
finalize/aggregation phase. Ensure the validation logic hooks into the Agent
results returned by the Agent tool and the file-check step that follows the
Write tool, and make this guard mandatory before calling the
aggregation/finalize steps described in Step 3.
- Around line 45-47: Replace hardcoded repo-relative script references like
"bash plugins/lvms-ci/scripts/doctor.sh ..." with the portable form using the
$PLUGIN_DIR variable (e.g., "bash $PLUGIN_DIR/scripts/doctor.sh ...") throughout
SKILL.md; update every occurrence that references the doctor.sh script
(including the snippet shown and the other two instances) so all example
commands use $PLUGIN_DIR, preserving the same arguments and flags and keeping
the script name doctor.sh unchanged.
- Around line 28-32: Replace the hard-coded date-based workdir path
(`/tmp/lvm-operator-ci-claude-workdir.<YYMMDD>`) in SKILL.md with instructions
to create an ephemeral directory using mktemp -d (e.g., "WORKDIR=$(mktemp -d
/tmp/lvm-operator-ci-claude-workdir.XXXX") and update all commands that
reference `<WORKDIR>` accordingly; also add explicit cleanup guidance at the end
(e.g., run rm -rf "$WORKDIR" or equivalent) and apply the same change for the
other occurrence mentioned around lines 42-43 so the doc uses a temporary mktemp
workdir and documents teardown.

In `@plugins/lvms-ci/skills/prow-job/SKILL.md`:
- Around line 121-127: Add explicit validation and failure-mode guards around
the input/artifact handling described in steps "0. Determine input type and set
up artifacts directory" and "1. Download all artifacts": verify the ARGUMENTS
input resolves to a valid directory or URL, ensure URL→GCS derivation succeeds
(fail with descriptive error if it does not), confirm gsutil download completed
and the expected artifact files (build-log.txt and finished.json) exist in
TMP/WORKDIR, and exit/abort the workflow with clear error messages if any check
fails; reference the TMP/WORKDIR variables, the URL→GCS derivation step, the
gsutil -q -m cp -r download, and the required artifacts build-log.txt and
finished.json when adding these guards.
- Around line 117-150: Add a new "Safety" section to SKILL.md that documents
side effects and file boundaries: state that the skill reads remote artifacts
via GCS (uses PROW_URL -> GCS_PATH and gsutil) and may write to a temporary
working directory (TMP created via mktemp) and produce reports and extracted
artifacts (e.g., build-log.txt and step logs) on disk; specify read-only vs
read-write scope (reads remote GCS, writes only to TMP and the final report),
list exact files/paths the skill MAY create (TMP/*, downloaded artifacts, report
files) and MUST NOT modify (original input directory when ARGUMENTS is a local
path, system files), describe cleanup behavior (whether TMP is removed or
retained) and required permissions (gsutil access), and include guidance for
callers on preventing unwanted writes (use of local directory ARGUMENTS to skip
downloads and intent to preserve files).

---

Nitpick comments:
In `@plugins/lvms-ci/skills/prow-job/SKILL.md`:
- Around line 1-7: Update the SKILL frontmatter so the description field uses an
activation-style trigger and includes a negative trigger to avoid overlap:
change the description for the skill named "lvms-ci:prow-job" to start with "Use
when ..." and append a clear negative trigger (e.g., "Not for general CI failure
triage; use only for Prow job artifacts/URLs") to distinguish it from broader CI
skills; apply the same pattern to the other affected frontmatter entries
referenced in the comment (lines 18-20).
🪄 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: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 634105d6-f725-4e6d-9e32-9dc6db99e19a

📥 Commits

Reviewing files that changed from the base of the PR and between 68b35aa and f834b84.

📒 Files selected for processing (11)
  • .claude-plugin/marketplace.json
  • plugins/lvms-ci/.claude-plugin/plugin.json
  • plugins/lvms-ci/README.md
  • plugins/lvms-ci/scripts/aggregate.py
  • plugins/lvms-ci/scripts/classify.py
  • plugins/lvms-ci/scripts/create-report.py
  • plugins/lvms-ci/scripts/doctor.sh
  • plugins/lvms-ci/scripts/download-jobs.sh
  • plugins/lvms-ci/scripts/prow-jobs-for-release.sh
  • plugins/lvms-ci/skills/doctor/SKILL.md
  • plugins/lvms-ci/skills/prow-job/SKILL.md

Comment thread plugins/lvms-ci/skills/doctor/SKILL.md
Comment thread plugins/lvms-ci/skills/doctor/SKILL.md
Comment thread plugins/lvms-ci/skills/doctor/SKILL.md
Comment thread plugins/lvms-ci/skills/prow-job/SKILL.md
Comment thread plugins/lvms-ci/skills/prow-job/SKILL.md
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
plugins/lvms-ci/skills/prow-job/SKILL.md (1)

123-129: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add explicit phase guard checks before log analysis.

Document hard stop conditions for: invalid <ARGUMENTS>, URL→GCS conversion failure, gsutil failure, and missing required artifacts (build-log.txt, finished.json) before proceeding to scan/context steps.

As per coding guidelines, plugins/docs/SKILL-GUIDELINES.md requires edge-case coverage and guard checks between workflow phases.

Also applies to: 138-140

🤖 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/lvms-ci/skills/prow-job/SKILL.md` around lines 123 - 129, Add
explicit guard checks before proceeding from "Determine input type and set up
artifacts directory" into "Download all artifacts" and before any log
scan/context steps: validate `<ARGUMENTS>` format (reject empty/unsupported
strings), verify URL→GCS path conversion succeeds (fail with a clear message if
stripping the web prefix cannot produce a GCS path), detect `gsutil` command
failures after the `gsutil -q -m cp -r` step and abort with a descriptive error,
and confirm required artifacts (`build-log.txt` and `finished.json`) exist in
`TMP` (or the provided local dir) before running `scan`/`context` logic; update
the SKILL.md procedure text around the TMP/mktemp and gsutil steps to describe
these hard-stop checks and the exact failure messages to present.
🤖 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/lvms-ci/skills/prow-job/SKILL.md`:
- Line 27: The SKILL.md contains hardcoded absolute temp paths (e.g., the "Local
artifacts directory" value `/tmp/lvm-operator-ci-claude-workdir....`) which must
be replaced with environment-driven variables; update the example/path strings
to use a base env variable such as `${TMPDIR:-/tmp}` or `$PLUGIN_DIR` and
similarly replace the other hardcoded occurrences referenced (lines 98-102) so
the examples use `${TMPDIR:-/tmp}/...` or `$PLUGIN_DIR/...` instead of
`/tmp/...`, and ensure the text documents the chosen env variable convention.

---

Duplicate comments:
In `@plugins/lvms-ci/skills/prow-job/SKILL.md`:
- Around line 123-129: Add explicit guard checks before proceeding from
"Determine input type and set up artifacts directory" into "Download all
artifacts" and before any log scan/context steps: validate `<ARGUMENTS>` format
(reject empty/unsupported strings), verify URL→GCS path conversion succeeds
(fail with a clear message if stripping the web prefix cannot produce a GCS
path), detect `gsutil` command failures after the `gsutil -q -m cp -r` step and
abort with a descriptive error, and confirm required artifacts (`build-log.txt`
and `finished.json`) exist in `TMP` (or the provided local dir) before running
`scan`/`context` logic; update the SKILL.md procedure text around the TMP/mktemp
and gsutil steps to describe these hard-stop checks and the exact failure
messages to present.
🪄 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: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: c65d4e80-d8d9-4464-a2cf-d1875cb32995

📥 Commits

Reviewing files that changed from the base of the PR and between f834b84 and 9faa32b.

📒 Files selected for processing (2)
  • plugins/lvms-ci/skills/doctor/SKILL.md
  • plugins/lvms-ci/skills/prow-job/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugins/lvms-ci/skills/doctor/SKILL.md

Comment thread plugins/lvms-ci/skills/prow-job/SKILL.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jeff-roche
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 15, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 4cce4ba into openshift-eng:main May 15, 2026
5 checks passed
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants