Skip to content

Commit 63b5d56

Browse files
committed
ci: rename run_unittest_shards scripts
Rename both unittest shard scripts to ci_* names and update their checked-in CI references.
1 parent 9ee1cc7 commit 63b5d56

8 files changed

Lines changed: 24 additions & 24 deletions

‎AGENTS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ exact engine and codegen HEADs for baseline promotion.
8383
### While developing: run only what touches your change
8484

8585
- One C++ test: `cmake --build build --target test_ta`, then `ctest --test-dir build -R '^test_ta$' --output-on-failure` (or run `./build/bin/test_integration` directly). Rows by pattern: `-R <regex>`; by label: `ctest --test-dir build -L '^fast$' --output-on-failure` after `cmake --build build --target pineforge_pr_smoke`.
86-
- One Python script test: `python3 scripts/test_<name>.py`. A big module in parallel shards: `python3 scripts/run_unittest_shards.py scripts/test_ci_preflight.py --shards 8 --log-dir <dir>` (`--class-tier fast` defers the slow classes of `scripts/test_ci_verify.py`).
86+
- One Python script test: `python3 scripts/test_<name>.py`. A big module in parallel shards: `python3 scripts/ci_run_unittest_shards.py scripts/test_ci_preflight.py --shards 8 --log-dir <dir>` (`--class-tier fast` defers the slow classes of `scripts/test_ci_verify.py`).
8787
- Workflow, source-guard or docs edits: the guard you touched (`python3 scripts/check_c_abi_runtime.py`; likewise `scripts/check_doc_anchors.py`, `scripts/check_doc_lint.py`, `scripts/check_public_role_words.py`) or `python3 scripts/ci_preflight.py --output-dir build-ci-preflight --tier fast` (needs actionlint 1.7.12 and ShellCheck). A docs-only PR gets only `--tier github-only` before merge, so its doc guards first run on the push to `main`: run them yourself.
8888
- A change that can move a trade, fill, size, margin or TA value (`src/`, `include/`): `./scripts/check_corpus_parity.sh --subset`.
89-
- Final candidate, once: the PR's CI is that run, with the maintainers' full verification behind the required statuses; never rerun a green suite. Without a PR, run it locally in the same split: C++ rows with `ctest --test-dir build --output-on-failure` after a full `cmake --build build`, Python script tests with `python3 scripts/run_unittest_shards.py scripts/test_<name>.py`, or the repo's own gate in one go, `python3 scripts/ci_preflight.py` (the full tier also needs pytest: `scripts/requirements-preflight.txt`) then `python3 scripts/ci_verify.py release --build-dir build-ci-release --jobs 4` (a separate build dir: it reconfigures the tree it is given; other profiles, `debug` `sanitizers` `native` `kernel`, only when the change needs them: `docs/ci.md`, "Profiles"), and, if the change can move a trade, `./scripts/check_corpus_parity.sh` (it runs `./scripts/run_corpus.sh`, then checks byte identity against `scripts/corpus_parity_baseline.txt`; about 32 min per `CONTRIBUTING.md`, 16-26 min on the CI runner per `corpus-parity.yml`; push-to-main and nightly CI run it, a PR does not).
89+
- Final candidate, once: the PR's CI is that run, with the maintainers' full verification behind the required statuses; never rerun a green suite. Without a PR, run it locally in the same split: C++ rows with `ctest --test-dir build --output-on-failure` after a full `cmake --build build`, Python script tests with `python3 scripts/ci_run_unittest_shards.py scripts/test_<name>.py`, or the repo's own gate in one go, `python3 scripts/ci_preflight.py` (the full tier also needs pytest: `scripts/requirements-preflight.txt`) then `python3 scripts/ci_verify.py release --build-dir build-ci-release --jobs 4` (a separate build dir: it reconfigures the tree it is given; other profiles, `debug` `sanitizers` `native` `kernel`, only when the change needs them: `docs/ci.md`, "Profiles"), and, if the change can move a trade, `./scripts/check_corpus_parity.sh` (it runs `./scripts/run_corpus.sh`, then checks byte identity against `scripts/corpus_parity_baseline.txt`; about 32 min per `CONTRIBUTING.md`, 16-26 min on the CI runner per `corpus-parity.yml`; push-to-main and nightly CI run it, a PR does not).
9090

9191
### Rules for tests
9292

‎CHANGELOG.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,8 +1735,8 @@ library.
17351735
- **Verifier tests run in parallel shards ([#404]).**
17361736
`scripts/ci_preflight.py` runs `verifier-tests` (`scripts/test_ci_verify.py`)
17371737
across parallel `unittest` subprocess shards with per-shard `TMPDIR`
1738-
isolation via `scripts/run_unittest_shards.py`
1739-
(`scripts/test_run_unittest_shards.py`).
1738+
isolation via `scripts/ci_run_unittest_shards.py`
1739+
(`scripts/ci_test_run_unittest_shards.py`).
17401740
- **Release-candidate notes link and tag commit ([#405]).**
17411741
The `1.6.1-rc.1` entry links its release and names its tag commit
17421742
`196592dd`.

‎CLAUDE.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ exact engine and codegen HEADs for baseline promotion.
8383
### While developing: run only what touches your change
8484

8585
- One C++ test: `cmake --build build --target test_ta`, then `ctest --test-dir build -R '^test_ta$' --output-on-failure` (or run `./build/bin/test_integration` directly). Rows by pattern: `-R <regex>`; by label: `ctest --test-dir build -L '^fast$' --output-on-failure` after `cmake --build build --target pineforge_pr_smoke`.
86-
- One Python script test: `python3 scripts/test_<name>.py`. A big module in parallel shards: `python3 scripts/run_unittest_shards.py scripts/test_ci_preflight.py --shards 8 --log-dir <dir>` (`--class-tier fast` defers the slow classes of `scripts/test_ci_verify.py`).
86+
- One Python script test: `python3 scripts/test_<name>.py`. A big module in parallel shards: `python3 scripts/ci_run_unittest_shards.py scripts/test_ci_preflight.py --shards 8 --log-dir <dir>` (`--class-tier fast` defers the slow classes of `scripts/test_ci_verify.py`).
8787
- Workflow, source-guard or docs edits: the guard you touched (`python3 scripts/check_c_abi_runtime.py`; likewise `scripts/check_doc_anchors.py`, `scripts/check_doc_lint.py`, `scripts/check_public_role_words.py`) or `python3 scripts/ci_preflight.py --output-dir build-ci-preflight --tier fast` (needs actionlint 1.7.12 and ShellCheck). A docs-only PR gets only `--tier github-only` before merge, so its doc guards first run on the push to `main`: run them yourself.
8888
- A change that can move a trade, fill, size, margin or TA value (`src/`, `include/`): `./scripts/check_corpus_parity.sh --subset`.
89-
- Final candidate, once: the PR's CI is that run, with the maintainers' full verification behind the required statuses; never rerun a green suite. Without a PR, run it locally in the same split: C++ rows with `ctest --test-dir build --output-on-failure` after a full `cmake --build build`, Python script tests with `python3 scripts/run_unittest_shards.py scripts/test_<name>.py`, or the repo's own gate in one go, `python3 scripts/ci_preflight.py` (the full tier also needs pytest: `scripts/requirements-preflight.txt`) then `python3 scripts/ci_verify.py release --build-dir build-ci-release --jobs 4` (a separate build dir: it reconfigures the tree it is given; other profiles, `debug` `sanitizers` `native` `kernel`, only when the change needs them: `docs/ci.md`, "Profiles"), and, if the change can move a trade, `./scripts/check_corpus_parity.sh` (it runs `./scripts/run_corpus.sh`, then checks byte identity against `scripts/corpus_parity_baseline.txt`; about 32 min per `CONTRIBUTING.md`, 16-26 min on the CI runner per `corpus-parity.yml`; push-to-main and nightly CI run it, a PR does not).
89+
- Final candidate, once: the PR's CI is that run, with the maintainers' full verification behind the required statuses; never rerun a green suite. Without a PR, run it locally in the same split: C++ rows with `ctest --test-dir build --output-on-failure` after a full `cmake --build build`, Python script tests with `python3 scripts/ci_run_unittest_shards.py scripts/test_<name>.py`, or the repo's own gate in one go, `python3 scripts/ci_preflight.py` (the full tier also needs pytest: `scripts/requirements-preflight.txt`) then `python3 scripts/ci_verify.py release --build-dir build-ci-release --jobs 4` (a separate build dir: it reconfigures the tree it is given; other profiles, `debug` `sanitizers` `native` `kernel`, only when the change needs them: `docs/ci.md`, "Profiles"), and, if the change can move a trade, `./scripts/check_corpus_parity.sh` (it runs `./scripts/run_corpus.sh`, then checks byte identity against `scripts/corpus_parity_baseline.txt`; about 32 min per `CONTRIBUTING.md`, 16-26 min on the CI runner per `corpus-parity.yml`; push-to-main and nightly CI run it, a PR does not).
9090

9191
### Rules for tests
9292

‎scripts/ci_preflight.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
from ci_verify import (ROOT, PRIVATE_FIXTURE_SKIP_LITERAL, private_fixtures_overlay,
3939
source_guard_commands)
4040
from ci_verifier_classes import verifier_class_tier
41-
from run_unittest_shards import default_shard_count
41+
from ci_run_unittest_shards import default_shard_count
4242

4343
ACTIONLINT_VERSION = '1.7.12'
4444
# File-only policy needs an identity even in an exported tree with no git remote.
@@ -1098,7 +1098,7 @@ def field(obj, *keys):
10981098
'''
10991099
# No stage of this preflight carries a timeout: the verifier self-tests
11001100
# (test_ci_verify.py) drive the real literal-aware parity, receipt and
1101-
# submodule guards across parallel unittest shards (run_unittest_shards.py),
1101+
# submodule guards across parallel unittest shards (ci_run_unittest_shards.py),
11021102
# and no bound of this file's may fail a run for slowness (owner rule,
11031103
# 2026-10-12). A stage that hangs is caught only by the job's own platform
11041104
# maximum, 360 minutes.
@@ -4713,17 +4713,17 @@ def check_commands(source: Path, output: Path | None = None,
47134713
[sys.executable, str(source / 'scripts/check_rng_draw_order.py')],
47144714
parallel=True),
47154715
('verifier-tests',
4716-
[sys.executable, str(source / 'scripts/run_unittest_shards.py'),
4716+
[sys.executable, str(source / 'scripts/ci_run_unittest_shards.py'),
47174717
str(source / 'scripts/test_ci_verify.py'),
47184718
'--log-dir', str(output_dir / 'verifier-tests-shards'), *class_args]),
47194719
CheckCommand('preflight-tests',
4720-
[sys.executable, str(source / 'scripts/run_unittest_shards.py'),
4720+
[sys.executable, str(source / 'scripts/ci_run_unittest_shards.py'),
47214721
str(source / 'scripts/test_ci_preflight.py'),
47224722
'--shards', str(min(8, default_shard_count())),
47234723
'--log-dir', str(output_dir / 'preflight-tests-shards')],
47244724
parallel=True),
47254725
('unittest-shards-tests',
4726-
[sys.executable, str(source / 'scripts/test_run_unittest_shards.py')]),
4726+
[sys.executable, str(source / 'scripts/ci_test_run_unittest_shards.py')]),
47274727
('verifier-paths-tests',
47284728
[sys.executable, str(source / 'scripts/test_ci_verifier_paths.py')]),
47294729
CheckCommand('native-c-surface-tests',
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
"""Unit tests for scripts/run_unittest_shards.py."""
2+
"""Unit tests for scripts/ci_run_unittest_shards.py."""
33
from __future__ import annotations
44

55
import io
@@ -21,12 +21,12 @@
2121

2222
import ci_preflight # noqa: E402
2323
import ci_verifier_classes as verifier_classes # noqa: E402
24-
import run_unittest_shards as shards_runner # noqa: E402
24+
import ci_run_unittest_shards as shards_runner # noqa: E402
2525
# This module is an explicit preflight entry point. Import the regression
2626
# TestCase so unittest also runs it here, without a second CI registration.
2727
from test_check_replay_off_golden import ReplayOffGoldenTests # noqa: E402,F401
2828

29-
SCRIPT = ROOT / 'scripts' / 'run_unittest_shards.py'
29+
SCRIPT = ROOT / 'scripts' / 'ci_run_unittest_shards.py'
3030

3131
FAKE_MODULE_SOURCE = textwrap.dedent("""
3232
import os
@@ -512,7 +512,7 @@ def _is_locked(lock_path: Path) -> bool:
512512
from pathlib import Path
513513
514514
sys.path.insert(0, {str(ROOT / 'scripts')!r})
515-
import run_unittest_shards
515+
import ci_run_unittest_shards
516516
517517
lock_dir = Path({str(lock_dir)!r})
518518
@@ -539,7 +539,7 @@ def _trigger_signal() -> None:
539539
time.sleep(0.02)
540540
541541
threading.Thread(target=_trigger_signal, daemon=True).start()
542-
raise SystemExit(run_unittest_shards.main([{str(sleeping_module)!r}, "--shards", "2"]))
542+
raise SystemExit(ci_run_unittest_shards.main([{str(sleeping_module)!r}, "--shards", "2"]))
543543
""")
544544
proc = subprocess.Popen(
545545
[sys.executable, '-B', '-c', driver_code],
@@ -695,7 +695,7 @@ def test_ci_preflight_wires_verifier_tests_with_log_dir_and_registers_this_test_
695695
verifier_argv,
696696
[
697697
sys.executable,
698-
str(ROOT / 'scripts/run_unittest_shards.py'),
698+
str(ROOT / 'scripts/ci_run_unittest_shards.py'),
699699
str(ROOT / 'scripts/test_ci_verify.py'),
700700
'--log-dir',
701701
str(out_dir / 'verifier-tests-shards'),
@@ -706,14 +706,14 @@ def test_ci_preflight_wires_verifier_tests_with_log_dir_and_registers_this_test_
706706
default_commands['verifier-tests'],
707707
[
708708
sys.executable,
709-
str(ROOT / 'scripts/run_unittest_shards.py'),
709+
str(ROOT / 'scripts/ci_run_unittest_shards.py'),
710710
str(ROOT / 'scripts/test_ci_verify.py'),
711711
'--log-dir',
712712
str(ROOT / 'build-ci-preflight' / 'verifier-tests-shards'),
713713
],
714714
)
715715
registered_scripts = {Path(argv[-1]).name for argv in commands.values() if argv}
716-
self.assertIn('test_run_unittest_shards.py', registered_scripts)
716+
self.assertIn('ci_test_run_unittest_shards.py', registered_scripts)
717717
self.assertIn('test_ci_verifier_paths.py', registered_scripts)
718718

719719

‎scripts/test_ci_preflight.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import ci_preflight
2121
import ci_verify
2222
from ci_verifier_classes import select_test_ids, verifier_class_tier
23-
from run_unittest_shards import discover_test_ids
23+
from ci_run_unittest_shards import discover_test_ids
2424
from ci_preflight import (AUTHZ_ALWAYS, AUTHZ_REFUSE_STEP, CORES,
2525
DOCS_ONLY_SKIP, GITHUB_ONLY_SKIP, HEAVY_SKIP, HOSTED_MATRIX_RUNNER, JOB_COMMANDS,
2626
PR_RUNNER, POST_RUNNER, MATRIX_LINUX_RUNNER, MATRIX_RUNNER,
@@ -6450,7 +6450,7 @@ def assert_release_kernel_native_full_debug_sanitizers_exclude_slow(self, ci, re
64506450
verifier_class_tier(env))), discovered)
64516451
plan = {name: argv for name, argv in check_commands(ROOT, env=env, tier='slow')}
64526452
self.assertEqual(plan['verifier-tests'], [
6453-
sys.executable, str(ROOT / 'scripts/run_unittest_shards.py'),
6453+
sys.executable, str(ROOT / 'scripts/ci_run_unittest_shards.py'),
64546454
str(ROOT / 'scripts/test_ci_verify.py'), '--log-dir',
64556455
str(ROOT / 'build-ci-preflight/verifier-tests-shards')])
64566456

@@ -6478,7 +6478,7 @@ def test_release_kernel_native_keep_rows_debug_sanitizers_exclude_slow_all_class
64786478
' steps:\n - run: python3 scripts/ci_verify.py release --exclude-label slow\n'))
64796479

64806480
def test_verifier_stage_defers_slow_only_for_an_explicit_pr_answer(self):
6481-
base = [sys.executable, str(ROOT / 'scripts/run_unittest_shards.py'),
6481+
base = [sys.executable, str(ROOT / 'scripts/ci_run_unittest_shards.py'),
64826482
str(ROOT / 'scripts/test_ci_verify.py'), '--log-dir',
64836483
str(ROOT / 'build-ci-preflight/verifier-tests-shards')]
64846484
for answer, expected in (('false', base + ['--class-tier', 'fast']),
@@ -8359,7 +8359,7 @@ def test_preflight_stage_shards_every_test_with_cpu_cap_and_separate_logs(self):
83598359
ROOT, output, env={'GITHUB_EVENT_NAME': 'pull_request'}, tier=tier)
83608360
}['preflight-tests']
83618361
self.assertEqual(argv, [
8362-
sys.executable, str(ROOT / 'scripts/run_unittest_shards.py'),
8362+
sys.executable, str(ROOT / 'scripts/ci_run_unittest_shards.py'),
83638363
str(ROOT / 'scripts/test_ci_preflight.py'),
83648364
'--shards', str(expected),
83658365
'--log-dir', str(output / 'preflight-tests-shards'),

‎scripts/test_ci_verifier_paths.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_all_direct_and_transitive_inputs_and_unknown_paths_run_slow(self):
3535
'runner/transport.cpp', 'runner/CMakeLists.txt',
3636
'scripts/collect_ci_diagnostics.py', 'scripts/ci_verify.py',
3737
'scripts/ci_preflight.py', 'scripts/test_ci_verify.py',
38-
'scripts/run_unittest_shards.py', 'scripts/check_twin_parity.py',
38+
'scripts/ci_run_unittest_shards.py', 'scripts/check_twin_parity.py',
3939
'scripts/cxxlex.py', '.github/workflows/ci.yml',
4040
'.github/workflows/new.yml', '.github/actions/setup-live-curl/action.yml',
4141
'examples/native/host.cpp', 'docker/run_failure_codes.json',

0 commit comments

Comments
 (0)