From fcd20b787326054099a6858381b9f03fd8594d60 Mon Sep 17 00:00:00 2001 From: rnetser Date: Mon, 1 Jun 2026 17:52:56 +0300 Subject: [PATCH 1/2] fix: improve smoke test conftest-hierarchy tracing in CodeRabbit instructions Add two safeguards to step 7 of the smoke/gating analysis: 1. VERIFY guard: require rg to return actual file paths before concluding 'Run smoke tests: False'. 2. conftest hierarchy check: for each smoke-marked file, scan parent conftest.py files up to the repo root for imports of modified utilities/libs symbols, since a smoke test can be transitively affected via conftest even when the test file itself has no direct import. Fixes a gap discovered in PR #4954 where smoke tests were incorrectly marked as unaffected. Assisted-by: Claude Signed-off-by: rnetser --- .../workflows/request-coderabbit-test-instructions.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/request-coderabbit-test-instructions.yml b/.github/workflows/request-coderabbit-test-instructions.yml index b69fe6d6db..1c14ad2ff2 100644 --- a/.github/workflows/request-coderabbit-test-instructions.yml +++ b/.github/workflows/request-coderabbit-test-instructions.yml @@ -79,7 +79,17 @@ jobs: Do NOT limit impact to tests that import the modified symbol only. 7. **Smoke test impact:** Intersect the affected set from step 6 with smoke-marked tests. Run: `rg -l '@pytest.mark.smoke' tests/` + VERIFY the above command returned actual file paths before concluding False. Set True ONLY if a smoke-marked file also appears in the affected set from 6b-6e. + For each smoke-marked file, ALSO check its conftest.py hierarchy (parent directory + conftest.py files up to the repo root) for imports of modified utilities/libs symbols. + A smoke test is affected if ANY conftest.py in its hierarchy imports a transitively + modified symbol — even when the test file itself has no direct import. + This includes autouse fixtures: if a conftest.py defines an autouse fixture that + calls or imports a modified function, ALL tests in that directory (and below) are affected. + Example check: for each smoke_file, scan dirname(smoke_file)/conftest.py, + dirname(dirname(smoke_file))/conftest.py, etc. for modified symbol imports + and autouse fixtures that depend on modified symbols. 8. **Gating test impact:** Intersect the affected set from step 6 with gating-marked tests. Run: `rg -l '@pytest.mark.gating' tests/` Set True if a gating-marked file also appears in the affected set from 6b-6e. From ea003f6d076a6c3e71f38b056fa24535292a1a19 Mon Sep 17 00:00:00 2001 From: rnetser Date: Mon, 1 Jun 2026 18:06:50 +0300 Subject: [PATCH 2/2] fix: resolve rule conflict in smoke test impact logic Use OR logic: smoke test is affected if (A) file is in affected set from 6b-6e OR (B) conftest.py hierarchy imports modified symbols (including autouse fixtures). Assisted-by: Claude Signed-off-by: rnetser --- .../request-coderabbit-test-instructions.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/request-coderabbit-test-instructions.yml b/.github/workflows/request-coderabbit-test-instructions.yml index 1c14ad2ff2..6b25ebf778 100644 --- a/.github/workflows/request-coderabbit-test-instructions.yml +++ b/.github/workflows/request-coderabbit-test-instructions.yml @@ -80,13 +80,11 @@ jobs: 7. **Smoke test impact:** Intersect the affected set from step 6 with smoke-marked tests. Run: `rg -l '@pytest.mark.smoke' tests/` VERIFY the above command returned actual file paths before concluding False. - Set True ONLY if a smoke-marked file also appears in the affected set from 6b-6e. - For each smoke-marked file, ALSO check its conftest.py hierarchy (parent directory - conftest.py files up to the repo root) for imports of modified utilities/libs symbols. - A smoke test is affected if ANY conftest.py in its hierarchy imports a transitively - modified symbol — even when the test file itself has no direct import. - This includes autouse fixtures: if a conftest.py defines an autouse fixture that - calls or imports a modified function, ALL tests in that directory (and below) are affected. + Set True if either condition is met: + - a smoke-marked file appears in the affected set from 6b-6e, OR + - any conftest.py in the smoke test's parent-directory hierarchy (up to repo root) + imports or calls a modified utilities/libs symbol — including autouse fixtures + that depend on modified functions. ALL tests in that directory and below are affected. Example check: for each smoke_file, scan dirname(smoke_file)/conftest.py, dirname(dirname(smoke_file))/conftest.py, etc. for modified symbol imports and autouse fixtures that depend on modified symbols.