Add lvms-ci plugin with doctor and prow-job skills#147
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
WalkthroughAdds 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. ChangesLVMS CI Plugin
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (1)
plugins/lvms-ci/skills/prow-job/SKILL.md (1)
1-7: ⚡ Quick winFrontmatter description should use activation-style trigger wording.
Consider rewriting
descriptionto 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
📒 Files selected for processing (11)
.claude-plugin/marketplace.jsonplugins/lvms-ci/.claude-plugin/plugin.jsonplugins/lvms-ci/README.mdplugins/lvms-ci/scripts/aggregate.pyplugins/lvms-ci/scripts/classify.pyplugins/lvms-ci/scripts/create-report.pyplugins/lvms-ci/scripts/doctor.shplugins/lvms-ci/scripts/download-jobs.shplugins/lvms-ci/scripts/prow-jobs-for-release.shplugins/lvms-ci/skills/doctor/SKILL.mdplugins/lvms-ci/skills/prow-job/SKILL.md
f834b84 to
9faa32b
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
plugins/lvms-ci/skills/prow-job/SKILL.md (1)
123-129:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAdd explicit phase guard checks before log analysis.
Document hard stop conditions for: invalid
<ARGUMENTS>, URL→GCS conversion failure,gsutilfailure, 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
📒 Files selected for processing (2)
plugins/lvms-ci/skills/doctor/SKILL.mdplugins/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
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9faa32b to
f7fa244
Compare
|
/lgtm |
Summary
plugins/lvms-ci/plugin for LVMS CI triage automationplugins/shared/scripts/with--component lvm-operatorlvms-ci:doctorskill for orchestrating CI analysis across releaseslvms-ci:prow-jobskill for single job root cause analysisDetails
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
plugins/shared/scripts/(6 symlinks)LVMS doctor vs MicroShift doctor
microshiftlvm-operatorTest plan
ls -la plugins/lvms-ci/scripts/python3 -m json.tool plugins/lvms-ci/.claude-plugin/plugin.jsonbash plugins/lvms-ci/scripts/prow-jobs-for-release.sh lvm-operator main/lvms-ci:doctor mainend-to-end🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation