You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: TESTS_ORACLE_PROMPT.md
+45-10Lines changed: 45 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,16 +78,51 @@ RIGHT: "Smoke test X uses fixture Y, which depends on the changed fixture Z"
78
78
79
79
### For This Repository
80
80
81
-
This is a **test suite repository** — the changed files ARE often the tests themselves, or test infrastructure (fixtures, utilities, conftest files). Adapt analysis accordingly:
82
-
83
-
- If changed files are test files: recommend running those changed tests, plus any other tests that share fixtures, utilities, or base classes with them.
84
-
- If changed files are test utilities/fixtures/conftest: recommend running all tests that depend on or import from the changed utilities.
85
-
- If changed files are under `utilities/` or `libs/`: trace which tests import from these modules and recommend those tests.
81
+
This is a **test suite repository** — the changed files ARE often the tests themselves, or test infrastructure (fixtures, utilities, conftest files). Adapt analysis accordingly.
82
+
83
+
### Semantic Impact Analysis (CRITICAL)
84
+
85
+
Do NOT recommend tests based solely on import relationships or file proximity. Analyze the **semantic impact** of each change:
86
+
87
+
**Changes that DO require test execution:**
88
+
- Modified test logic, assertions, or parametrization
- Modified utility functions that are called during test execution
91
+
- Changed function signatures that tests depend on
92
+
- Bug fixes in shared code paths
93
+
94
+
**Changes that do NOT require test execution:**
95
+
- New opt-in features behind CLI flags (e.g., `--analyze-with-ai`) that are disabled by default
96
+
- New imports in conftest.py that only activate under explicit opt-in conditions
97
+
- Documentation files (`.md`, `README`)
98
+
- Linter configuration (`.flake8`, `.ruff.toml`)
99
+
- Dependency additions for opt-in features
100
+
- Session lifecycle hooks (`pytest_sessionstart`, `pytest_sessionfinish`) that do not affect test collection, execution, or results under default settings
101
+
- Coverage configuration changes
102
+
103
+
**For conftest.py changes specifically:**
104
+
1. Check if the change affects test COLLECTION (markers, parametrization, item modification)
105
+
2. Check if the change affects test EXECUTION (fixtures used by tests, hooks that modify test behavior)
106
+
3. Check if the change is INERT under default settings (opt-in flags, conditional imports)
107
+
4. Only recommend tests if the change affects collection or execution under default settings
86
108
87
109
### Dependency Tracing
88
110
89
-
1. Examine code changes in each modified file
90
-
2. Identify affected code paths, functions, and classes
0 commit comments