feat: add /qualify AI qualification workflow#474
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughAdds an end-to-end /qualify workflow: orchestrator prompt, agent and skill specifications (test-planner, cluster-verifier, proof-generator), templates, workflow diagrams, docs, and a ChangesAI Qualification Workflow for MTV API Tests
Sequence Diagram(s)sequenceDiagram
participant User
participant Orchestrator
participant TestPlannerAgent
participant PythonWriter
participant RealCluster
participant ClusterVerifier
participant ProofGenerator
participant Git
User->>Orchestrator: invoke /qualify --type --source [--cluster]
Orchestrator->>TestPlannerAgent: generate test-plan.md from source
Orchestrator->>User: request human approval of test-plan.md
Orchestrator->>PythonWriter: write tests & config (branch for permanent tests)
PythonWriter->>RealCluster: run pytest (capture output -> test-output.log)
RealCluster-->>Orchestrator: pytest stdout/stderr + exit code
Orchestrator->>ClusterVerifier: run independent cluster verification
ClusterVerifier-->>Orchestrator: cluster verification report
Orchestrator->>ProofGenerator: assemble proof.md (tests + verification + versions)
Orchestrator->>Git: create PR (permanent-test path) with proof reference
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
33becb1 to
b8ea397
Compare
e42aac5 to
077b62d
Compare
|
Clean rebase detected — no code changes compared to previous head ( |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 `@llm/qualify/agents/cluster-verifier.md`:
- Around line 146-150: Add mandatory redaction rules to the evidence collection
section that currently instructs to store "The full output" and raw evidence
into proof.md: update the cluster-verifier.md checklist to require automatic
redaction before persisting raw logs (e.g., mask secrets, API keys, tokens,
emails, IPs, and YAML anchors), provide a short canonical redaction policy and
example regex patterns, and add a one-liner command or reference to the
redaction utility to run prior to saving evidence so any step that calls out
"The full output" or writes to proof.md enforces redaction.
- Line 35: The document currently has contradictory failure semantics ("stop
immediately" vs "continue checking other items"); update the verification
guidance to clearly distinguish connectivity/authentication failures from
individual check failures: state that failure of any cluster-level connectivity
or authentication check (the sentence currently saying "stop immediately") must
abort the entire verification and report no-trust, whereas non-connectivity
per-check failures should be logged and verification should continue to collect
all failures (the area currently saying "continue checking other items"); change
the two conflicting sentences so the first explicitly names
"connectivity/authentication checks" as abort conditions and the later paragraph
(around the per-check rules) explicitly documents that per-check failures do not
abort but are aggregated as partial failures, and ensure the same clarified rule
text replaces the existing lines referenced in the doc.
In `@llm/qualify/prompts/qualify.md`:
- Around line 136-139: The doc has a conflict between the temporary test
location and the verify-only execution command: update the verify-only example
to run pytest directly against the temporary test file path
(/tmp/qualify-<name>/<test_file>.py) instead of using the repo test selector
(tests/<path>::<TestClass>); change the command shown (the "uv run pytest ..."
example) to point to /tmp/qualify-<name>/<test_file>.py, keep the same pytest
flags (--tc-file, --tc-format, -p no:xdist), and continue piping output to
.qualify/<type>/<name>/test-output.log so verify-only remains isolated from repo
state.
In `@llm/qualify/skills/proof-generator/SKILL.md`:
- Around line 130-132: Update SKILL.md's evidence policy for proof.md so raw
YAML/logs are required to be sanitized before inclusion: change the bullet that
mandates raw evidence in collapsible <details> to require "sanitized, redacted
evidence" and add a short checklist in SKILL.md/proof.md that instructs
redacting secrets/PII (API keys, tokens, passwords, private IPs, certs),
replacing values with placeholders like <REDACTED> and documenting what was
removed; ensure the collapsible details still include enough context (file
names, non-sensitive fields, and diffs) and add a statement on how to mark
omitted sections (e.g., "[…redacted…]") so reviewers know evidence was
intentionally redacted.
🪄 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: ASSERTIVE
Plan: Pro
Run ID: b340adfa-9cf1-4110-860e-e91ae4f91673
📒 Files selected for processing (15)
.gitignoreCLAUDE.mdREADME.mdllm/qualify/README.mdllm/qualify/agents/.gitkeepllm/qualify/agents/cluster-verifier.mdllm/qualify/agents/test-planner.mdllm/qualify/prompts/.gitkeepllm/qualify/prompts/qualify.mdllm/qualify/skills/proof-generator/.gitkeepllm/qualify/skills/proof-generator/SKILL.mdllm/qualify/templates/.gitkeepllm/qualify/templates/proof-template.mdllm/qualify/templates/test-plan-template.mdllm/qualify/workflow-diagrams.md
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
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 `@llm/qualify/prompts/qualify.md`:
- Around line 42-53: After the "Collect environment versions" block in
qualify.md, add explicit failure-handling instructions: if any of the three oc
commands (OCP, MTV, CNV) fail (missing CSV/namespace or RBAC denied), record
that specific version as `UNKNOWN` and capture the command's error message;
state that the proof report will include these `UNKNOWN` entries and that
missing versions will cause proof-generator/SKILL.md's qualification logic to
mark the report NOT QUALIFIED, mirroring the behavior described in
cluster-verifier.md.
🪄 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: ASSERTIVE
Plan: Pro
Run ID: b19bc28d-78cd-4c42-8328-1589dd033318
📒 Files selected for processing (3)
llm/qualify/agents/cluster-verifier.mdllm/qualify/prompts/qualify.mdllm/qualify/skills/proof-generator/SKILL.md
6453247 to
82e124d
Compare
b49325d to
252c98e
Compare
There was a problem hiding this comment.
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 `@llm/qualify/prompts/qualify.md`:
- Around line 68-71: Add explicit bug-ID extraction/validation in Phase 0
immediately after argument parsing: when type=bug, parse the --source (e.g.,
Jira/GitHub URLs or issue text) to extract a canonical bug identifier and use
that for the `.qualify/bugs/<id>/` directory; if --name is provided, validate it
against accepted patterns (e.g., JIRA-\d+, BZ-\d+, #\d+) and reject or prompt
when it does not match the extracted ID; if extraction fails and --name is
absent or invalid, prompt the user to supply a bug ID via --name and abort
directory creation until a valid ID is given so `.qualify/bugs/<id>/` always
contains a proper bug identifier.
🪄 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: ASSERTIVE
Plan: Pro
Run ID: 1bd31b3f-26b8-41c3-afcc-cf2e657b0de0
📒 Files selected for processing (15)
.gitignoreCLAUDE.mdREADME.mdllm/qualify/README.mdllm/qualify/agents/.gitkeepllm/qualify/agents/cluster-verifier.mdllm/qualify/agents/test-planner.mdllm/qualify/prompts/.gitkeepllm/qualify/prompts/qualify.mdllm/qualify/skills/proof-generator/.gitkeepllm/qualify/skills/proof-generator/SKILL.mdllm/qualify/templates/.gitkeepllm/qualify/templates/proof-template.mdllm/qualify/templates/test-plan-template.mdllm/qualify/workflow-diagrams.md
Add explicit step in Phase 0 to extract canonical bug identifiers from --source URLs (Jira/GitHub patterns), support --name override, and prompt user on extraction failure.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@llm/qualify/prompts/qualify.md`:
- Around line 68-78: Update the docs and any referenced paths to consistently
use the normalized bug identifier placeholder (<id>) for bug flows instead of
<name>: ensure step 4 clearly states that --name, if provided, overrides
extraction and that the extracted/provided bug ID is normalized using the same
slug rules from step 1 (lowercase, safe chars, max 63) and then used as the <id>
in the output path `.qualify/bugs/<id>/`; change all occurrences that currently
reference `.qualify/<type>/<name>/...` in the bug flow (the instances noted that
read/write paths) to `.qualify/bugs/<id>/...` and update any descriptive text
referencing `--source`/`--name` handling so they all point to the single
canonical identifier variable `<id>`.
- Around line 49-53: The OCP version step currently runs a direct `oc get
clusterversion` call and lacks the failure pattern used for MTV/CNV; update the
OCP version collection so it captures raw stdout/stderr and, on any non-zero
exit, records the version as `UNKNOWN` plus the diagnostics/error output (same
pattern used for MTV/CNV collection). Locate the "OCP version" command in the
"Collect environment versions" section and change its invocation to capture and
save both output and error, and ensure the resulting recorded entry follows the
`UNKNOWN + diagnostics` format used by the MTV/CNV entries.
🪄 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: ASSERTIVE
Plan: Pro
Run ID: 7c131416-be93-4d26-a2ef-62aa8f4b9024
📒 Files selected for processing (1)
llm/qualify/prompts/qualify.md
- Add UNKNOWN+diagnostics pattern for OCP version retrieval, matching the existing MTV/CNV error-capture approach - Introduce artifact_key concept (name for features, id for bugs) and unify all downstream path references to use it consistently
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary
Adds the
/qualifyAI qualification workflow — a fully automated end-to-end pipeline that takes a feature design doc or bug report and produces verified tests with cluster proof.What's Included
Prompt Template
llm/qualify/prompts/qualify.md— Main/qualifycommand that orchestrates all 4 phasesAgents
llm/qualify/agents/test-planner.md— Reads feature/bug docs → produces structured test plansllm/qualify/agents/cluster-verifier.md— Independently verifies OpenShift cluster state after test executionSkill
llm/qualify/skills/proof-generator/SKILL.md— Assembles proof.md reports with test results + cluster evidenceTemplates
llm/qualify/templates/test-plan-template.md— Test plan skeletonllm/qualify/templates/proof-template.md— Proof report skeletonDocumentation
llm/qualify/README.md— Full usage guide with setup instructions for pi, Claude Code, Cursor, and other AI CLIsllm/qualify/workflow-diagrams.md— Mermaid flowcharts (workflow, components, sequence diagram)Workflow Overview
Human Checkpoints
Do NOT auto-merge. This needs human review.
Summary by CodeRabbit
New Features
Documentation
Chores