SPIRE-548: Add Cursor rules for QE behavior and test plan generation#123
SPIRE-548: Add Cursor rules for QE behavior and test plan generation#123sayak-redhat wants to merge 6 commits into
Conversation
Add .cursor/rules with project-specific guidance for AI-assisted test plan generation and QE workflow conventions. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@sayak-redhat: This pull request references SPIRE-548 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
WalkthroughThis pull request adds two new Cursor MDC rule documents: ChangesTesting Guidelines and Automation Rules
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sayak-redhat The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
…traints - Add Section 3a (OLM-Managed deployment context) to qe-behavior rules - Add 8-10 test case budget with per-tier allocation to test-plan-generation - Add Generation Stats footer (Section 11) for output tracking - Add no-redundancy quality gate for both ADR and PR modes Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.cursor/rules/qe-behavior.mdc (1)
57-59: ⚡ Quick winPrefer Subscription discovery over a hard-coded name.
Hard-coding
openshift-zero-trust-workload-identity-managercan make this rule fragile across environments. Consider using<subscription-name>plus a discovery step (oc get subscription -n zero-trust-workload-identity-manager) before patching.Based on learnings: For OLM-managed ZTWIM operator, patch the Subscription for environment variables and follow operator-specific conventions.
🤖 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 @.cursor/rules/qe-behavior.mdc around lines 57 - 59, The rule currently patches a hard-coded Subscription name "openshift-zero-trust-workload-identity-manager"; instead, first discover the target Subscription in namespace "zero-trust-workload-identity-manager" (e.g., use an "oc get subscription -n zero-trust-workload-identity-manager" discovery step to select the correct Subscription resource) and then apply the patch to the discovered Subscription rather than the hard-coded string; ensure you still patch the Subscription resource (per OLM ZTWIM conventions) to inject the env var into the operator's config.
🤖 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.
Nitpick comments:
In @.cursor/rules/qe-behavior.mdc:
- Around line 57-59: The rule currently patches a hard-coded Subscription name
"openshift-zero-trust-workload-identity-manager"; instead, first discover the
target Subscription in namespace "zero-trust-workload-identity-manager" (e.g.,
use an "oc get subscription -n zero-trust-workload-identity-manager" discovery
step to select the correct Subscription resource) and then apply the patch to
the discovered Subscription rather than the hard-coded string; ensure you still
patch the Subscription resource (per OLM ZTWIM conventions) to inject the env
var into the operator's config.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 329b7817-4570-4f42-8af3-ac6bc1d532fd
📒 Files selected for processing (2)
.cursor/rules/qe-behavior.mdc.cursor/rules/test-plan-generation.mdc
🚧 Files skipped from review as they are similar to previous changes (1)
- .cursor/rules/test-plan-generation.mdc
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.cursor/rules/test-plan-generation.mdc (1)
165-169: ⚡ Quick winClarify directory creation for PR mode output.
Line 169 specifies saving to
output/test-plan-pr-<PR-NUMBER>.md, but it doesn't explicitly state whether theoutput/directory should be created if it doesn't exist. Add a note to clarify this behavior.📝 Proposed clarification
**Output file:** Save as `output/test-plan-pr-<PR-NUMBER>.md`. +Create the `output/` directory if it does not exist.🤖 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 @.cursor/rules/test-plan-generation.mdc around lines 165 - 169, Clarify that when saving the Test Plan in the "C.5 Draft test cases and finalize" step to the path `output/test-plan-pr-<PR-NUMBER>.md`, the process should ensure the `output/` directory exists and create it if missing (e.g., using a recursive mkdir behavior); update the instruction text to state “create the `output/` directory if it does not exist” and, where code performs the save, ensure the save routine for `output/test-plan-pr-<PR-NUMBER>.md` creates the directory before writing.
🤖 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.
Nitpick comments:
In @.cursor/rules/test-plan-generation.mdc:
- Around line 165-169: Clarify that when saving the Test Plan in the "C.5 Draft
test cases and finalize" step to the path `output/test-plan-pr-<PR-NUMBER>.md`,
the process should ensure the `output/` directory exists and create it if
missing (e.g., using a recursive mkdir behavior); update the instruction text to
state “create the `output/` directory if it does not exist” and, where code
performs the save, ensure the save routine for
`output/test-plan-pr-<PR-NUMBER>.md` creates the directory before writing.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: c113eafa-ff5c-474f-8510-2668bec1b663
📒 Files selected for processing (1)
.cursor/rules/test-plan-generation.mdc
|
@sayak-redhat: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
.cursor/rules/qe-behavior.mdcwith project-specific QE workflow conventions.cursor/rules/test-plan-generation.mdcwith guidance for AI-assisted test plan generationTest plan
.mdcfiles are well-formed and contain valid rule definitionsMade with Cursor
Summary by CodeRabbit
Note: These changes are internal development documentation updates with no impact on end-user functionality or features.