USHIFT-7435 - Repurpose create-bugs to find-regressions; clarify doctor Step 3 - #260
USHIFT-7435 - Repurpose create-bugs to find-regressions; clarify doctor Step 3#260copejon wants to merge 5 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: copejon 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 |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Pro Plus Run ID: WalkthroughThis PR replaces the ChangesRegression search workflow
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 10 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (10 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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: 9
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/scripts/search-bugs.py (1)
463-476: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winAdd positive and negative tests for the changed parser and validator.
CONTRIBUTING.md requires positive/negative tests for changed parsing or validation logic. Add tests for
modehandling,suggest/skip/linkedactions,jira_keyandskip_categorycombinations, duplicate/missing error signatures, unknown-h/--helphandling, and missing--source; extend shared coverage only rather than duplicating it.🤖 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/scripts/search-bugs.py` around lines 463 - 476, Add positive and negative tests covering the parser and validator changes near _validate_results: mode handling, suggest/skip/linked actions, valid and invalid jira_key/skip_category combinations, duplicate and missing error signatures, unknown -h/--help options, and missing --source. Extend existing shared test coverage where available instead of duplicating tests.Source: Path instructions
🧹 Nitpick comments (1)
plugins/microshift-ci/skills/find-regressions/SKILL.md (1)
1-6: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winReduce the allowed tool set.
Glob,Grep, andmcp__jira__jira_get_issueare not used by the workflow steps in this file. Remove them, or document the step that requires each tool. The skill guidelines require the minimum allowed tools to limit the skill's blast radius.As per path instructions: use minimum required allowed-tools, especially for Bash-running skills.
🤖 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/skills/find-regressions/SKILL.md` around lines 1 - 6, Update the frontmatter allowed-tools declaration for the microshift-ci:find-regressions skill to remove Glob, Grep, and mcp__jira__jira_get_issue, since no workflow step uses them; retain only the tools required by the documented workflow.Source: 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/README.md`:
- Around line 40-48: Complete the search-only terminology migration: in
plugins/microshift-ci/README.md lines 40-48, describe search results, drafted
suggestions, and manual filing; in
plugins/microshift-ci/skills/close-stale-bugs/SKILL.md line 31, identify the
actual producer or previously generated bug source; in
plugins/microshift-ci/skills/continue-session/SKILL.md lines 66-69, replace
automatic bug-creation wording with search, draft suggestions, and manual
filing; and in plugins/microshift-ci/skills/fix-test-bugs/SKILL.md line 207,
describe the analysis and candidate-workflow relationship instead of feeding bug
creation. Keep component names and cross-references aligned with the new
search-only behavior.
In `@plugins/microshift-ci/scripts/search-bugs.py`:
- Around line 508-509: Extend the validation around the existing linked-action
check so suggest and skip actions reject any non-empty jira_key. Preserve the
current requirement that linked actions have a non-empty jira_key, and add the
inverse validation for non-linked actions in the same result-validation flow.
In `@plugins/microshift-ci/skills/find-regressions/SKILL.md`:
- Around line 73-79: Make the work directory and all merged-candidate/result
output names invocation-specific rather than date- or first-source-only. Update
the `SOURCE_TAG` generation and related output paths in the workflow to include
a unique run identifier or complete normalized source list, and add protection
for shared cache writes so concurrent runs cannot overwrite or interleave
artifacts.
- Around line 87-95: Update the source parsing and preparation flow in the
find-regressions instructions to validate each `<ARGUMENTS>` source against the
documented release, PR, and rebase naming patterns, normalize it, and reject
invalid values before execution. Quote or pass each validated source as a
distinct argument to `search-bugs.py`, and derive `SOURCE_TAG` and any output
paths only from the validated normalized first source rather than raw input.
- Around line 110-123: The find-regressions workflow must make Jira cache
validation source-specific and failure-aware. Update the cache lookup and
validation in the SOURCES workflow to key entries by source and error_signature,
validate the mapping schema and complete candidate coverage, and discard the
entire cache when any check fails. Define inline guard checks around each
mandatory Jira search and foreground-agent invocation so failures stop the
workflow and prevent writing or reusing cache data; write the completion marker
only after every required search succeeds, and document these failure rules
between the relevant phases.
- Around line 116-120: Update the cached Jira results instructions in the
find-regressions skill to require explicit user confirmation before running the
wildcard rm command, and provide a non-destructive refresh option scoped to the
selected sources when available. Preserve the existing cache reuse guidance
while clearly distinguishing the destructive reset from the safer refresh path.
- Around line 142-145: Define deterministic selection for the deduplicated
Search A/B results and multiple Search C regressions. Sort results by a stable
key before selecting the first duplicate, and specify a consistent date-ordering
rule for regressions, including how missing or invalid dates are handled. Use
the selected Jira key and stale-versus-suggest outcome consistently across runs.
- Around line 161-174: Update Search C in the regression-check instructions to
run 1–2 focused text-search queries derived from candidate.keywords rather than
one array-wide query. Merge and deduplicate the closed/verified results before
recording every unique issue as a regression entry, preserving the existing JQL
filters and reporting behavior.
- Around line 131-139: Sanitize candidate keywords and test IDs before
interpolating them into JQL in the search flow. Update extract_keywords() to
allow only safe token characters or escape JQL metacharacters, and update
extract_test_ids() to accept only the documented OCP-NNNNN or numeric formats;
apply this validation consistently to the JQL clauses at all three search
construction points.
---
Outside diff comments:
In `@plugins/microshift-ci/scripts/search-bugs.py`:
- Around line 463-476: Add positive and negative tests covering the parser and
validator changes near _validate_results: mode handling, suggest/skip/linked
actions, valid and invalid jira_key/skip_category combinations, duplicate and
missing error signatures, unknown -h/--help options, and missing --source.
Extend existing shared test coverage where available instead of duplicating
tests.
---
Nitpick comments:
In `@plugins/microshift-ci/skills/find-regressions/SKILL.md`:
- Around line 1-6: Update the frontmatter allowed-tools declaration for the
microshift-ci:find-regressions skill to remove Glob, Grep, and
mcp__jira__jira_get_issue, since no workflow step uses them; retain only the
tools required by the documented workflow.
🪄 Autofix
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: 215edb06-4a98-44d8-a463-b61a01a54033
📒 Files selected for processing (10)
plugins/microshift-ci/README.mdplugins/microshift-ci/scripts/search-bugs.pyplugins/microshift-ci/skills/close-stale-bugs/SKILL.mdplugins/microshift-ci/skills/continue-session/SKILL.mdplugins/microshift-ci/skills/create-bugs/SKILL.mdplugins/microshift-ci/skills/doctor-refresh/SKILL.mdplugins/microshift-ci/skills/doctor/SKILL.mdplugins/microshift-ci/skills/find-regressions/SKILL.mdplugins/microshift-ci/skills/fix-test-bugs/SKILL.mdplugins/shared/scripts/create-report.py
💤 Files with no reviewable changes (1)
- plugins/microshift-ci/skills/create-bugs/SKILL.md
4e620e4 to
03ffc7d
Compare
|
Addressed CodeRabbit review-body and summary findings:
|
Auto-applied: - search-bugs.py:509: Add inverse jira_key validation for non-linked actions Accepted after review: - fix-test-bugs/SKILL.md:209: Update leftover "bug creation" wording to "regression search" Co-Authored-By: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
03ffc7d to
9cf9965
Compare
Auto-applied: - search-bugs.py:509: Add inverse jira_key validation for non-linked actions Accepted after review: - fix-test-bugs/SKILL.md:209: Update leftover "bug creation" wording to "regression search" Co-Authored-By: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9cf9965 to
6e28f88
Compare
Auto-applied: - search-bugs.py:509: Add inverse jira_key validation for non-linked actions Accepted after review: - fix-test-bugs/SKILL.md:209: Update leftover "bug creation" wording to "regression search" Co-Authored-By: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6e28f88 to
6cac6df
Compare
Auto-applied: - search-bugs.py:509: Add inverse jira_key validation for non-linked actions Accepted after review: - fix-test-bugs/SKILL.md:209: Update leftover "bug creation" wording to "regression search" Co-Authored-By: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9585000 to
2287f3a
Compare
2287f3a to
7c79bc1
Compare
Auto-applied: - search-bugs.py:509: Add inverse jira_key validation for non-linked actions Accepted after review: - fix-test-bugs/SKILL.md:209: Update leftover "bug creation" wording to "regression search" Co-Authored-By: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7c79bc1 to
db04908
Compare
|
/verified by ci |
Rewrite the skill to search-only: correlate CI failures against existing Jira bugs and categorize results as suggest/linked/skip. Ticket filing is deferred to the HTML report "Create Bug" buttons. Update search-bugs.py actions and report format to match. Rename skill and all references across the plugin. Signed-off-by: Jonathan H. Cope <jcope@redhat.com>
Specify the exact file (prs-status.json) and field (title) for deriving rebase source identifiers. Separate critical outputs (bug-matches files needed by Step 4) from downstream artifacts. Remove redundant argument restatement and defensive narration. Signed-off-by: Jonathan H. Cope <jcope@redhat.com>
The agent's investigation section mixed methodology directives with factual details (file paths, command syntax, tool usage) that belong in the reference material. Move PCP metrics and source correlation knowledge to the primer; slim agent directives to point there. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Auto-applied: - search-bugs.py:509: Add inverse jira_key validation for non-linked actions Accepted after review: - fix-test-bugs/SKILL.md:209: Update leftover "bug creation" wording to "regression search" Co-Authored-By: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- README.md:3: "create JIRA bugs" → "draft JIRA bug suggestions" - close-stale-bugs:20: "creates bugs" → "searches for and drafts bug suggestions" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
db04908 to
a3d7b68
Compare
Summary
microshift-ci:create-bugstomicroshift-ci:find-regressionsto reflect the skill's actual scope (search-only, no ticket creation)--createmode and Jira-write logic fromsearch-bugs.py, reducing the script by ~140 linesprs-status.json), field (title), and pattern for rebase source extraction; separates critical outputs from downstream artifactsTest plan
/microshift-ci:doctor 4.19,4.20,4.21,4.22end-to-end and verify bug mapping files are produced/microshift-ci:find-regressions 4.22standalone and verify outputs match the oldcreate-bugsbehavior (minus ticket creation)/microshift-ci:fix-test-bugsand/microshift-ci:close-stale-bugsstill reference the correct skill namedoctor-refreshandcontinue-sessioncross-references are correctMade with Cursor
Summary by CodeRabbit
New Features
Documentation