Skip to content

USHIFT-7335: Trim prow-job-analyzer prose and make it less prescriptive - #239

Merged
openshift-merge-bot[bot] merged 3 commits into
openshift-eng:mainfrom
pmtk:trim-prose-less-prescriptive
Jul 28, 2026
Merged

USHIFT-7335: Trim prow-job-analyzer prose and make it less prescriptive#239
openshift-merge-bot[bot] merged 3 commits into
openshift-eng:mainfrom
pmtk:trim-prose-less-prescriptive

Conversation

@pmtk

@pmtk pmtk commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Documentation
    • Strengthened guidance for producing consistent, schema-compliant CI root-cause analysis reports with strict JSON-only output.
    • Expanded investigation principles and evidence correlation, with tighter rules for fields like root cause, confidence, analysis gaps, scenarios, and handling multiple independent failures.
    • Clarified where Prow job evidence (including infrastructure/hypervisor errors) lives in CI artifacts, plus per-step log locations and the step execution graph link.
    • Refined component timeline guidance for more accurate fault attribution.
  • Chores
    • Bumped the MicroShift CI plugin version to 1.5.2 (manifest and marketplace metadata).

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 23, 2026
@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pmtk

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 Jul 23, 2026
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@pmtk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: dbc6797f-4c13-4b1f-b8fe-3208977688a8

📥 Commits

Reviewing files that changed from the base of the PR and between db2141f and f175a53.

📒 Files selected for processing (4)
  • .claude-plugin/marketplace.json
  • plugins/microshift-ci/.claude-plugin/plugin.json
  • plugins/microshift-ci/agents/prow-job-analyzer.md
  • plugins/microshift-ci/agents/references/microshift-ci-primer.md

Walkthrough

The Prow job analyzer prompt now enforces JSON-only output and tighter investigation, evidence, schema, and failure-classification rules. The MicroShift CI primer documents additional Prow evidence sources and revises related guidance. Plugin metadata versions are updated to 1.5.2.

Changes

MicroShift CI guidance

Layer / File(s) Summary
Analyzer investigation and output contract
plugins/microshift-ci/agents/prow-job-analyzer.md
Adds JSON-only output, investigation principles, source correlation guidance, and more precise field and evidence requirements.
Failure classification rubric
plugins/microshift-ci/agents/prow-job-analyzer.md
Clarifies raw-error handling, stable root-cause formatting, confidence meanings, and reporting of independent failures.
Evidence documentation and plugin release metadata
plugins/microshift-ci/agents/references/microshift-ci-primer.md, .claude-plugin/marketplace.json, plugins/microshift-ci/.claude-plugin/plugin.json
Documents Prow and per-step logs plus the execution graph, revises component timeline wording, removes the SKIP_SOS note, and updates both plugin versions to 1.5.2.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ai-Attribution ⚠️ Warning PR commits include 11 Co-Authored-By: Claude Opus 4.6 trailers, while Assisted-by/Generated-by are absent, so AI attribution uses the wrong trailer. Replace AI co-author trailers with Red Hat Assisted-by or Generated-by trailers on the affected commits; remove Co-Authored-By for AI tools.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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-Weak-Crypto ✅ Passed No weak-crypto, custom crypto, or secret-comparison code appears in the PR diff; changes are docs, version bumps, and non-crypto script tweaks.
Container-Privileges ✅ Passed No new privileged or host-level settings were added; the Containerfile change is only chmod, and USER 0:0 pre-existed.
No-Sensitive-Data-In-Logs ✅ Passed HEAD^..HEAD only bumps version strings in plugin.json and marketplace.json; no log output or sensitive-data additions appear in the changed files.
No-Hardcoded-Secrets ✅ Passed No added lines contain hardcoded secrets; the diff is docs, version bumps, and a chmod change, with only benign token/password mentions.
No-Injection-Vectors ✅ Passed PASS: PR only edits markdown prompts and plugin version metadata; no code paths or dangerous APIs like eval, shell=True, yaml.load, or os.system appear in changed files.
Title check ✅ Passed The title accurately reflects the main change: trimming and softening the prow-job-analyzer guidance.
✨ 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.

@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: 3

Caution

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

⚠️ Outside diff range comments (1)
plugins/microshift-ci/agents/prow-job-analyzer.md (1)

25-147: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Run the repository markdownlint flow before committing.

Per CONTRIBUTING.md and the Markdown coding guidelines, lint the Markdown files with the repo’s configured markdownlint-cli2 invocation (scripts/lint-markdown.sh or the configured .markdownlint-cli2.jsonc command), not only npx markdownlint-cli2 '**/*.md' in this environment.

🤖 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/microshift-ci/agents/prow-job-analyzer.md` around lines 25 - 147, Run
the repository-configured Markdown lint flow for the updated agents
documentation before committing, using scripts/lint-markdown.sh or the command
specified by .markdownlint-cli2.jsonc rather than a standalone npx
markdownlint-cli2 invocation.

Sources: Coding guidelines, Path instructions

🤖 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/microshift-ci/agents/prow-job-analyzer.md`:
- Line 57: Update the validator in validate-rca-output.py to enforce the
documented output contract: reject entries containing keys outside the specified
fields, and require both analysis_gaps and scenarios to be arrays rather than
null. Keep validation of all existing required fields unchanged.
- Line 37: Update the sosreport workflow guidance near the journal-first
instructions so extraction is not limited to journal-detected crashes or
restarts. Require extracting the relevant sosreport whenever pod/container
evidence is needed, including product-versus-test diagnosis or inspecting
previous.log after multiple container creations, while retaining journal files
as the initial source and preferring the on-failure report matched by timestamp.

In `@plugins/microshift-ci/agents/references/microshift-ci-primer.md`:
- Around line 148-149: Correct the artifact-path documentation around the
artifact table in the microshift-ci primer: clarify that
<ARTIFACTS_DIR>/build-log.txt is located at the artifact root, while
<STEP>/build-log.txt remains under the scenario-info/<scenario>/ step paths.
Update the surrounding scope statement so it does not incorrectly apply the
scenario directory prefix to the root-level entry.

---

Outside diff comments:
In `@plugins/microshift-ci/agents/prow-job-analyzer.md`:
- Around line 25-147: Run the repository-configured Markdown lint flow for the
updated agents documentation before committing, using scripts/lint-markdown.sh
or the command specified by .markdownlint-cli2.jsonc rather than a standalone
npx markdownlint-cli2 invocation.
🪄 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), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 63f13b8f-5518-4a27-b927-3ba7661e4d24

📥 Commits

Reviewing files that changed from the base of the PR and between b529abe and a075e82.

📒 Files selected for processing (2)
  • plugins/microshift-ci/agents/prow-job-analyzer.md
  • plugins/microshift-ci/agents/references/microshift-ci-primer.md

Comment thread plugins/microshift-ci/agents/prow-job-analyzer.md Outdated
Comment thread plugins/microshift-ci/agents/prow-job-analyzer.md
Comment thread plugins/microshift-ci/agents/references/microshift-ci-primer.md
@pmtk
pmtk force-pushed the trim-prose-less-prescriptive branch 2 times, most recently from e719d23 to b5cd2a2 Compare July 27, 2026 13:30

@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: 3

🤖 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/microshift-ci/agents/prow-job-analyzer.md`:
- Line 25: Clarify the prompt’s no-failure behavior as a valid empty JSON array,
then update validate_json_text in validate-rca-output.py to accept [] while
rejecting arrays with more than 10 entries. Add positive tests for empty and
within-cap arrays and a negative test for arrays exceeding the cap, covering the
changed validation rules.
- Around line 92-94: Update the `error_signature` field description in the
schema documentation to call it a concise “failure signature” rather than a
root-cause description, while preserving its role as the observed failure used
for bug titles and deduplication. Keep `root_cause` explicitly focused on the
underlying failure mechanism.
- Line 33: Update the product-defect classification guidance in the analysis
purpose section to avoid treating every post-readiness failure as a product
defect. Require corroborating journal and pod-log evidence that the component
itself failed, while excluding failures caused by external infrastructure,
dependencies, or expected teardown before setting infrastructure_failure and
stack_layer.
🪄 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), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 1b440f26-5168-4b9d-95a8-ecb6efcdcf34

📥 Commits

Reviewing files that changed from the base of the PR and between e719d23 and b5cd2a2.

📒 Files selected for processing (4)
  • .claude-plugin/marketplace.json
  • plugins/microshift-ci/.claude-plugin/plugin.json
  • plugins/microshift-ci/agents/prow-job-analyzer.md
  • plugins/microshift-ci/agents/references/microshift-ci-primer.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugins/microshift-ci/agents/references/microshift-ci-primer.md

Comment thread plugins/microshift-ci/agents/prow-job-analyzer.md
Comment thread plugins/microshift-ci/agents/prow-job-analyzer.md
Comment thread plugins/microshift-ci/agents/prow-job-analyzer.md Outdated
@pmtk
pmtk force-pushed the trim-prose-less-prescriptive branch from b5cd2a2 to db2141f Compare July 28, 2026 07:13
@openshift-ci openshift-ci Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Jul 28, 2026
@pmtk
pmtk marked this pull request as ready for review July 28, 2026 07:13
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 28, 2026
pmtk and others added 3 commits July 28, 2026 09:42
Restructure the agent definition from ~275 to ~148 lines (46% reduction).
Research shows instruction compliance decays exponentially with count and
~65% of typical prompt instructions are redundant — specifying them
consumes instruction-following capacity and reduces output predictability.

Key changes:
- Replace 4-step prescriptive workflow with 7 investigation principles
- Remove Glossary, Important Files, Important Links, Tips sections
- Eliminate content duplicated with the primer reference file
  (SOS Report section, journal patterns, container restart detection)
- Consolidate sosreport extraction from 3 mentions to 1
- Reduce RAW_ERROR examples from 5 to 3
- Cut ROOT_CAUSE "How it differs" prose (contrastive table teaches this)
- Replace aggressive emphasis (MUST/NEVER/CRITICAL) with calm directives

All 16 JSON output fields retained — schema, example, severity rubric,
and downstream-critical rules (RAW_ERROR determinism, ROOT_CAUSE
consistency, CONFIDENCE calibration) are preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Absorb Important Files entries (build-log.txt, step diagram URL)
  from the analyzer into the primer's evidence table — this is the
  reference file, so file-location info belongs here
- Remove SKIP_SOS paragraph (development-only detail, irrelevant to
  CI artifact analysis)
- Rephrase behavioral instruction in journal section to factual
  reference ("supports fault attribution" vs "reconstruct before
  attributing") — behavioral guidance belongs in the agent definition,
  not the reference file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pmtk
pmtk force-pushed the trim-prose-less-prescriptive branch from db2141f to f175a53 Compare July 28, 2026 07:42
@ggiguash

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 28, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 932e3ca into openshift-eng:main Jul 28, 2026
5 checks passed
@pmtk
pmtk deleted the trim-prose-less-prescriptive branch July 28, 2026 10:58
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. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants