Skip to content

Commit ce13683

Browse files
rnetsercursoragent
andauthored
feat: add STP→tests cross-reference to CodeRabbit config (#148)
Add path_instructions for stps/** that flags meaningful STP changes (scenarios, goals, criteria, scope) for potential test impact in RedHatQE/openshift-virtualization-tests. Cosmetic changes (typos, formatting) are skipped. Key behaviors: - Greenfield STPs (no existing test refs) skip cross-ref entirely - Confirmed misalignment with existing tests: HIGH (informational) - New scenarios without tests / unconfirmed alignment: MEDIUM advisory - Cross-ref notice is non-blocking (STPs are source of truth) - Template files (stps/stp-template/) excluded Also adds linked_repositories pointing to the tests repo and enables review_details for linked-repo visibility. Assisted-by: Claude <noreply@anthropic.com> Signed-off-by: rnetser <rnetser@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 5665a7d commit ce13683

1 file changed

Lines changed: 78 additions & 0 deletions

File tree

.coderabbit.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,77 @@ reviews:
2121
auto_title_placeholder: "@coderabbitai"
2222
review_status: true
2323
commit_status: true
24+
review_details: true
2425
poem: false
2526
collapse_walkthrough: true
2627
sequence_diagrams: false
2728
changed_files_summary: true
2829
abort_on_close: true
2930

31+
path_instructions:
32+
- path: "stps/**"
33+
instructions: |
34+
## Test implementation cross-reference (STP → tests)
35+
36+
Skip this check entirely for files under `stps/stp-template/` — those are
37+
templates, not feature STPs.
38+
39+
When a feature STP file under `stps/` is modified, determine whether the change
40+
is **meaningful** (affects test implementation) or **cosmetic** (no test impact).
41+
42+
**Meaningful changes** (flag for test update):
43+
- Test scenarios added, removed, or modified in Section III (table rows changed)
44+
- Testing goals added, removed, or reprioritized in Section II.1
45+
- Requirements added, removed, or modified in Section I.1
46+
- Acceptance criteria added, removed, or changed in Section I.1
47+
- Tier or priority changes on existing scenarios
48+
- Scope changes in Section II.1 (Out of Scope items added or removed)
49+
- Test Limitations changes in Section II.1 that alter what QE can validate
50+
- Test strategy changes in Section II.2 that affect what is tested
51+
- Test environment changes in Section II.3 that affect how tests run
52+
53+
**Cosmetic changes** (skip cross-ref check):
54+
- Typo fixes, grammar corrections, punctuation changes
55+
- Formatting or whitespace adjustments
56+
- Rewording that preserves the same test intent and pass/fail criteria
57+
- Sign-off updates, reviewer list changes
58+
- Metadata-only changes (dates, version bumps, document conventions)
59+
- Risk section updates that do not change test scope
60+
61+
**When meaningful changes are detected:**
62+
63+
First, use the linked repository (`RedHatQE/openshift-virtualization-tests`) to check
64+
whether existing tests reference this STP via `STP:` or `STP Reference:` URLs
65+
in docstrings (both conventions are used in the tests repo).
66+
67+
**If no tests reference this STP** (greenfield STP with no test coverage yet),
68+
skip the cross-reference notice entirely. The tests repo enforces STP-to-test
69+
alignment when tests land.
70+
71+
**If tests reference this STP**, post a non-blocking MEDIUM severity advisory listing:
72+
1. Which sections changed meaningfully (scenarios, goals, criteria, scope)
73+
2. A summary of what changed (e.g., "2 scenarios added, 1 scenario priority
74+
changed from P2 to P0, 1 acceptance criterion removed")
75+
3. A cross-reference notice:
76+
77+
> **⚠️ Test implementation may need updating.**
78+
> This STP is linked to tests in
79+
> [`RedHatQE/openshift-virtualization-tests`](https://github.com/RedHatQE/openshift-virtualization-tests).
80+
> The following changes may require corresponding test updates:
81+
> - [list of meaningful changes]
82+
>
83+
> Please verify that test coverage in the tests repo reflects these STP changes.
84+
> If new scenarios were added, new tests or STDs (Software Test Descriptions) may be needed.
85+
> If scenarios were removed or modified, existing tests may need updating or removal.
86+
87+
This cross-reference notice is advisory — it should NOT trigger request changes.
88+
STPs are the source of truth; tests are updated afterward in a follow-up PR to
89+
the tests repo. If suspected misalignments with existing tests are found, note
90+
them as questions in the advisory, not as blocking defects.
91+
92+
**When only cosmetic changes are detected:**
93+
Do not post the cross-reference notice. Review normally per AGENTS.md.
94+
3095
auto_review:
3196
enabled: true
3297
auto_incremental_review: true
@@ -52,6 +117,19 @@ chat:
52117
knowledge_base:
53118
opt_out: false
54119

120+
linked_repositories:
121+
- repository: "RedHatQE/openshift-virtualization-tests"
122+
instructions: |
123+
Contains the test implementation (Python/pytest) for features defined
124+
by STPs in this repository. Tests live under tests/<sig-area>/ and
125+
reference STPs via STP: URLs in module/class/test docstrings.
126+
127+
Use this linked repo to:
128+
- Check whether modified STP scenarios already have test coverage
129+
- Identify which test files reference a changed STP (search for both
130+
`STP:` and `STP Reference:` followed by a design-docs GitHub URL)
131+
- Assess the impact of STP scenario changes on existing tests
132+
55133
code_guidelines:
56134
enabled: true
57135
filePatterns:

0 commit comments

Comments
 (0)