From e58e446444d8ddbb3fc6f5599a3c90cfa2344442 Mon Sep 17 00:00:00 2001 From: Hongming Wang Date: Thu, 30 Apr 2026 20:52:34 -0700 Subject: [PATCH] =?UTF-8?q?docs(ci):=20correct=20test-ops-scripts.yml=20he?= =?UTF-8?q?ader=20=E2=80=94=20discover=20does=20NOT=20recurse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous header said `unittest discover from the scripts/ root walks recursively`, contradicting the workflow body which runs two passes precisely because discover does NOT recurse without __init__.py. Fixed self-review feedback on PR #2440. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/test-ops-scripts.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-ops-scripts.yml b/.github/workflows/test-ops-scripts.yml index a6f342e1..ca8cb0af 100644 --- a/.github/workflows/test-ops-scripts.yml +++ b/.github/workflows/test-ops-scripts.yml @@ -4,11 +4,13 @@ name: Ops Scripts Tests # anything under scripts/. Kept separate from the main CI so a script-only # change doesn't trigger the heavier Go/Canvas/Python pipelines. # -# Discovery: `unittest discover` from the scripts/ root walks recursively, -# so both `scripts/test_*.py` and `scripts/ops/test_*.py` are picked up. -# Tests should sit alongside the code they test (see +# Discovery layout: tests sit alongside the code they test (see # scripts/ops/test_sweep_cf_decide.py for the pattern; scripts/ -# test_build_runtime_package.py for the rewriter coverage). +# test_build_runtime_package.py for the rewriter coverage). The job +# below runs `unittest discover` TWICE — once from `scripts/`, once +# from `scripts/ops/` — because neither dir has an `__init__.py`, so +# a single discover from `scripts/` doesn't recurse into the ops +# subdir. Two passes is simpler than retrofitting namespace packages. on: push: