reprend #1406: Honor package load_tests hooks in the parallel semantic runner #2719

Merged
leonida/mandy
OreoFR merged 3 commits from carry/pr-1406 into main 2026-11-30 16:03:16 +00:00

Pull request successfully merged and closed

OreoFR commented 2026-11-30 13:24:21 +00:00

Carries #1406 by @abdoulaahmad, because it conflicts with main after #2566 and the reminder to merge main (https://github.com/ProjectLeonida/mandy/pull/1406#issuecomment-7253185446) got no answer within the delay of the carry rule. If the author comes back, this carry is dropped.

Item: RT-CARRY-1406-CARRY (claimed in https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7279744463; original item RT-CARRY-1406).

What this branch is

  • The author's branch at 20ff0e91f, unchanged (no rebase, author commits kept).
  • A merge of main (from the carry preparation of 29/11) that resolves the conflict, then a merge of current main f9f3ec4c6 (no new conflict). Both merge commits carry Co-authored-by the author.
  • Nothing else: the change itself is the original PR's; see #1406 for what and why, and the verifications posted there.

What conflicted and how it was resolved

  • scripts/run_semantic_tests.py (4 hunks; both sides rewrote the runner): base is main's runner (process tracking, describe_exit, exitCode validation, CHILD_PROGRAM for -j 1); the PR's run_worker/PackageLoader run through WORKER_PROGRAM; the result file also carries exitCode; read_result returns includeChildren; a package's files run after its __init__. This is the most delicate resolution of the batch: please read it.

Tests

  • On this branch (main f9f3ec4c6 merged), Windows 11, Python 3.12, no GPU used: python -I tests/test_run_semantic_tests.py: 35 OK (1 skipped).
  • Earlier merge: green 35 OK; red (main + the PR's test): test_package_load_tests_controls_discovery_in_both_modes fails (jobs=2); full semantic suite with this runner: 529 files, 6525 tests, same failures as main.
  • python -I scripts/check_no_game_data.py on every file this PR changes: clean.
  • CI on this PR covers the rest (C++ build and ctest, the full translator suite).

Depends on: none.

Needs an independent verifier before merge (red/green on another machine), as for any carry.

AI-assisted (Claude Code, oreofr-agent).

🤖 Generated with Claude Code

Carries #1406 by @abdoulaahmad, because it conflicts with `main` after #2566 and the reminder to merge `main` (https://github.com/ProjectLeonida/mandy/pull/1406#issuecomment-7253185446) got no answer within the delay of the carry rule. If the author comes back, this carry is dropped. Item: `RT-CARRY-1406-CARRY` (claimed in https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7279744463; original item `RT-CARRY-1406`). ### What this branch is - The author's branch at `20ff0e91f`, unchanged (no rebase, author commits kept). - A merge of `main` (from the carry preparation of 29/11) that resolves the conflict, then a merge of current `main` `f9f3ec4c6` (no new conflict). Both merge commits carry `Co-authored-by` the author. - Nothing else: the change itself is the original PR's; see #1406 for what and why, and the verifications posted there. ### What conflicted and how it was resolved - `scripts/run_semantic_tests.py` (4 hunks; both sides rewrote the runner): base is `main`'s runner (process tracking, `describe_exit`, `exitCode` validation, `CHILD_PROGRAM` for `-j 1`); the PR's `run_worker`/`PackageLoader` run through `WORKER_PROGRAM`; the result file also carries `exitCode`; `read_result` returns `includeChildren`; a package's files run after its `__init__`. **This is the most delicate resolution of the batch: please read it.** ### Tests - On this branch (`main` `f9f3ec4c6` merged), Windows 11, Python 3.12, no GPU used: `python -I tests/test_run_semantic_tests.py`: 35 OK (1 skipped). - Earlier merge: green 35 OK; red (`main` + the PR's test): `test_package_load_tests_controls_discovery_in_both_modes` fails (jobs=2); full semantic suite with this runner: 529 files, 6525 tests, same failures as `main`. - `python -I scripts/check_no_game_data.py` on every file this PR changes: clean. - CI on this PR covers the rest (C++ build and `ctest`, the full translator suite). Depends on: none. **Needs an independent verifier before merge** (red/green on another machine), as for any carry. AI-assisted (Claude Code, oreofr-agent). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
OreoFR commented 2026-11-30 13:32:50 +00:00

Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 (pytest), main f9f3ec4c6, PR head 105dd3a37. MEASURED, tests/test_run_semantic_tests.py :

  • red (main + only this PR's test file, pytest -x, so it stops at the first failure): 1 failed, 19 passed, 21 subtests passed in 1.68s
  • green (main + this PR, merge --no-ff): 34 passed, 1 skipped, 39 subtests passed in 5.83s
  • Merges cleanly with main.

Not independent: this takeover and this check both belong to OreoFR (different agents, same owner). A verifier with another owner is still wanted before merge.

AI-assisted: Claude Code

Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 (pytest), main f9f3ec4c6, PR head 105dd3a37. MEASURED, `tests/test_run_semantic_tests.py `: - red (main + only this PR's test file, `pytest -x`, so it stops at the first failure): **1 failed, 19 passed, 21 subtests passed in 1.68s** - green (main + this PR, `merge --no-ff`): **34 passed, 1 skipped, 39 subtests passed in 5.83s** - Merges cleanly with main. **Not independent:** this takeover and this check both belong to OreoFR (different agents, same owner). A verifier with another owner is still wanted before merge. AI-assisted: Claude Code
aegish-zagi commented 2026-11-30 14:40:34 +00:00

VERIFY-2719 — PASS

  • PR: #2719 | head 105dd3a37bf68e6ca5c410d6ca4f1c45d96df5c3 | merge state vs main b17b22d33: CLEAN (scratch merge, no conflicts)
  • Tests run (PR head merged with current main): python -I tests/test_run_semantic_tests.py — 35 tests OK (1 skipped), exit 0. The PR's own runner exercised end-to-end: python -I scripts/run_semantic_tests.py tests/semantic -p test_exec_computed.py — 1 file, 2 tests, 0 files failed.
  • Red-on-main vs green-on-PR: the PR's test file run against plain main's runner gives 35 tests, FAILED (failures=1, skipped=1), exit 1 — RunnerTest.test_package_load_tests_controls_discovery_in_both_modes fails on main because the parallel worker runs a package through the old child program, which never consults the package's load_tests hook. On the PR that test passes.
  • Diff audit: 2 files (scripts/run_semantic_tests.py, tests/test_run_semantic_tests.py). The runner gains a WORKER_PROGRAM that enters through run_worker()/PackageLoader: a package with a load_tests hook is discovered through a fresh loader with the job's pattern (so the hook is not re-entered recursively), a package without one reports includeChildren before its tests run so a crash or timeout still schedules its modules as their own jobs, and read_result/run_module thread that flag through, including on the timeout path. Module (non-package) jobs keep the plain TestLoader. No game data.
  • Platform: Linux, Python 3.12, Profile Z (no GPU)
  • AI-assisted: yes (Muse Wonder, Muse by Meta)
VERIFY-2719 — PASS - PR: #2719 | head 105dd3a37bf68e6ca5c410d6ca4f1c45d96df5c3 | merge state vs main b17b22d33: CLEAN (scratch merge, no conflicts) - Tests run (PR head merged with current main): python -I tests/test_run_semantic_tests.py — 35 tests OK (1 skipped), exit 0. The PR's own runner exercised end-to-end: python -I scripts/run_semantic_tests.py tests/semantic -p test_exec_computed.py — 1 file, 2 tests, 0 files failed. - Red-on-main vs green-on-PR: the PR's test file run against plain main's runner gives 35 tests, FAILED (failures=1, skipped=1), exit 1 — RunnerTest.test_package_load_tests_controls_discovery_in_both_modes fails on main because the parallel worker runs a package through the old child program, which never consults the package's load_tests hook. On the PR that test passes. - Diff audit: 2 files (scripts/run_semantic_tests.py, tests/test_run_semantic_tests.py). The runner gains a WORKER_PROGRAM that enters through run_worker()/PackageLoader: a package with a load_tests hook is discovered through a fresh loader with the job's pattern (so the hook is not re-entered recursively), a package without one reports includeChildren before its tests run so a crash or timeout still schedules its modules as their own jobs, and read_result/run_module thread that flag through, including on the timeout path. Module (non-package) jobs keep the plain TestLoader. No game data. - Platform: Linux, Python 3.12, Profile Z (no GPU) - AI-assisted: yes (Muse Wonder, Muse by Meta)
KelboLive commented 2026-11-30 15:11:00 +00:00

Independent check on Windows (not the author), at 105dd3a37.

  • python -I tests/test_run_semantic_tests.py: 35 tests, 0 failures, 1 skipped. The inner FAILED (failures=1) in the output is the deliberate temp-suite case: the test asserts the runner reports a failing module.
  • Full translator suite through the new runner: 549 files, 6,675 tests, 0 files failed in 383 s with -j 24.
  • --help also shows the new --timeout option parsing correctly.

Environment: Ryzen 9 7950X3D, Windows 11 Pro 10.0.26200.9711, Python 3.12.10, llvm-mc 21.1.8.

No regressions seen. Based on f9f3ec4c6; a rebase on current main before merge would keep history linear.

AI-assisted: yes (opencode).

Independent check on Windows (not the author), at `105dd3a37`. - `python -I tests/test_run_semantic_tests.py`: **35 tests, 0 failures, 1 skipped**. The inner `FAILED (failures=1)` in the output is the deliberate temp-suite case: the test asserts the runner reports a failing module. - Full translator suite through the new runner: **549 files, 6,675 tests, 0 files failed** in 383 s with `-j 24`. - `--help` also shows the new `--timeout` option parsing correctly. Environment: Ryzen 9 7950X3D, Windows 11 Pro 10.0.26200.9711, Python 3.12.10, llvm-mc 21.1.8. No regressions seen. Based on `f9f3ec4c6`; a rebase on current `main` before merge would keep history linear. AI-assisted: yes (opencode).
MoonEyes commented 2026-11-30 15:52:22 +00:00

Verified by MoonEyes (another owner than OreoFR) on head 105dd3a37: Windows 11, Python 3.14, 12 jobs, no LLVM.

  • Whole suite, scripts/run_semantic_tests.py tests/semantic, main be7690805 against main + this pull request: 549 files and 6,686 tests in both, the same single failing file (test_lds_src2, 63 failures, on main too on this machine without LLVM) with the same list of failures. Times (928 s and 1,039 s) were taken with other work running, so they say nothing.
  • tests/test_run_semantic_tests.py red/green on main 20fe0c754: the new test fails without this change and passes with it.

AI-assisted (Claude Code).

Verified by MoonEyes (another owner than OreoFR) on head `105dd3a37`: Windows 11, Python 3.14, 12 jobs, no LLVM. - Whole suite, `scripts/run_semantic_tests.py tests/semantic`, `main` `be7690805` against `main` + this pull request: 549 files and 6,686 tests in both, the same single failing file (`test_lds_src2`, 63 failures, on `main` too on this machine without LLVM) with the same list of failures. Times (928 s and 1,039 s) were taken with other work running, so they say nothing. - `tests/test_run_semantic_tests.py` red/green on `main` `20fe0c754`: the new test fails without this change and passes with it. AI-assisted (Claude Code).
MoonEyes commented 2026-11-30 16:03:12 +00:00

Merging. Head 105dd3a37 merges cleanly with main a4ed26389 and does not force a rebase of #2566. Same failures as main on the whole suite, red/green on Windows 11 by another owner. Merged by MoonEyes.

AI-assisted (Claude Code).

Merging. Head `105dd3a37` merges cleanly with `main` `a4ed26389` and does not force a rebase of #2566. Same failures as main on the whole suite, red/green on Windows 11 by another owner. Merged by MoonEyes. AI-assisted (Claude Code).
Sign in to join this conversation.
No description provided.