ci: fix the three repository checks that fail on main #1673

Closed
github-bot wants to merge 1 commit from gh-pr/1673/head into gh-pr/1673/base
Owner

@⁠xel1uz on GitHub · 2026-11-25 07:46 UTC · original
xel1uz:fix/main-consistency-checks → main · +36 −20 · 3 files · 1 commits · closed without merging

Item ID: CI-MAIN-CONSISTENCY, claimed in #1608 (#1608, done: #1608). I posted the claim there after opening this PR, because I missed that #1608 had replaced the capped #14.

Claimed as: CI-MAIN-CONSISTENCY - the standard-library job fails on main (42537e7b) for three reasons that have nothing to do with any open PR, so every fork that syncs main and every PR built on it inherits a red CI.

What and why

Three repository-consistency tests fail on main at 42537e7b. They depend on no platform, GPU or Python version:

  1. tests/test_runner_calls_all_tests.py reports tests/test_feature_scan.py: test_out_named_like_the_optional_spirv_index() as a dead test. It is not dead: that file's __main__ runner passes every test_* to run_tests([fn for name, fn in list(globals().items()) ...]). The checker only followed for loops over globals(), so test_feature_scan.py kept a hand-written RUNNER_SKIPS list of each test, and the newest test was never added to it. Any new test in that file would break main the same way.
    Fix: dispatches_tests() now also accepts a list, set or generator comprehension over globals()/locals()/vars() that yields the loop variable straight into a call. The test_feature_scan.py entry in RUNNER_SKIPS is removed. A new bite check confirms that the runner counts as dispatching, and that the same comprehension over a fixed table still reports what it misses. The existing test_a_dropped_call_is_flagged bite check is unchanged and passes.
  2. tests/test_runtime_paths.py: runtime/CMakeLists.txt builds from tools/conformance/native/src (L2089-2091), but .github/workflows/runtime.yml does not list tools/conformance/**. tools/conformance/** is now added to both the push and pull_request path filters, in alphabetical order, so the two lists stay identical.
  3. tests/test_tool_stdout_encoding.py: tools/compute_heap_layout_census.py was the one CLI tool whose __main__ block did not start with sys.stdout.reconfigure(errors="replace"). It now has the same guard as tools/ab_control_flow.py and the rest.

Tested

  • At 42537e7b: python -I tests/test_runner_calls_all_tests.py fails (1 failure). test_runtime_paths.py and test_tool_stdout_encoding.py each fail with the messages above.
  • With this branch: python -I tests/test_runner_calls_all_tests.py gives 4 tests OK, python -I tests/test_runtime_paths.py gives 5 OK, and python -I tests/test_tool_stdout_encoding.py gives 4 OK.
  • python -I tests/test_feature_scan.py: OK (0 failed checks, 0 failed tests). python -I tools/compute_heap_layout_census.py --help prints its usage.
  • git diff --check is clean. python3 -I scripts/check_no_game_data.py on the changed files is clean.

This does not touch the GPU jobs. The cs_imgatomic_ext failure on MoltenVK in Runtime is a separate issue.

GPUs tested: n/a - repository checks only.

AI-assisted: Yes.

Checklist

  • Based on current main (42537e7b) and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption; synthetic inputs only.
  • A new translator rule in the contract table of docs/design.md - not applicable, no translator change.

🤖 Generated with Claude Code

**@⁠xel1uz** on GitHub · 2026-11-25 07:46 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1673) `xel1uz:fix/main-consistency-checks` → `main` · +36 −20 · 3 files · 1 commits · closed without merging Item ID: `CI-MAIN-CONSISTENCY`, claimed in #1608 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608, done: https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608). I posted the claim there after opening this PR, because I missed that #1608 had replaced the capped #14. Claimed as: `CI-MAIN-CONSISTENCY` - the standard-library job fails on `main` (42537e7b) for three reasons that have nothing to do with any open PR, so every fork that syncs `main` and every PR built on it inherits a red CI. ### What and why Three repository-consistency tests fail on `main` at 42537e7b. They depend on no platform, GPU or Python version: 1. **`tests/test_runner_calls_all_tests.py`** reports `tests/test_feature_scan.py: test_out_named_like_the_optional_spirv_index()` as a dead test. It is not dead: that file's `__main__` runner passes every `test_*` to `run_tests([fn for name, fn in list(globals().items()) ...])`. The checker only followed `for` loops over `globals()`, so `test_feature_scan.py` kept a hand-written `RUNNER_SKIPS` list of each test, and the newest test was never added to it. Any new test in that file would break `main` the same way. Fix: `dispatches_tests()` now also accepts a list, set or generator comprehension over `globals()`/`locals()`/`vars()` that yields the loop variable straight into a call. The `test_feature_scan.py` entry in `RUNNER_SKIPS` is removed. A new bite check confirms that the runner counts as dispatching, and that the same comprehension over a fixed table still reports what it misses. The existing `test_a_dropped_call_is_flagged` bite check is unchanged and passes. 2. **`tests/test_runtime_paths.py`**: `runtime/CMakeLists.txt` builds from `tools/conformance/native/src` (L2089-2091), but `.github/workflows/runtime.yml` does not list `tools/conformance/**`. `tools/conformance/**` is now added to both the `push` and `pull_request` path filters, in alphabetical order, so the two lists stay identical. 3. **`tests/test_tool_stdout_encoding.py`**: `tools/compute_heap_layout_census.py` was the one CLI tool whose `__main__` block did not start with `sys.stdout.reconfigure(errors="replace")`. It now has the same guard as `tools/ab_control_flow.py` and the rest. ### Tested - At 42537e7b: `python -I tests/test_runner_calls_all_tests.py` fails (1 failure). `test_runtime_paths.py` and `test_tool_stdout_encoding.py` each fail with the messages above. - With this branch: `python -I tests/test_runner_calls_all_tests.py` gives 4 tests OK, `python -I tests/test_runtime_paths.py` gives 5 OK, and `python -I tests/test_tool_stdout_encoding.py` gives 4 OK. - `python -I tests/test_feature_scan.py`: OK (0 failed checks, 0 failed tests). `python -I tools/compute_heap_layout_census.py --help` prints its usage. - `git diff --check` is clean. `python3 -I scripts/check_no_game_data.py` on the changed files is clean. This does not touch the GPU jobs. The `cs_imgatomic_ext` failure on MoltenVK in Runtime is a separate issue. GPUs tested: n/a - repository checks only. AI-assisted: Yes. ### Checklist - [x] Based on current `main` (42537e7b) and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption; synthetic inputs only. - [ ] A new translator rule in the contract table of `docs/design.md` - not applicable, no translator change. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- test_runner_calls_all_tests: follow a comprehension over globals() that
  hands each test to a call, so tests/test_feature_scan.py's run_tests([...])
  runner counts as dispatching every test. Its hand-kept RUNNER_SKIPS list
  goes away; test_out_named_like_the_optional_spirv_index() was missing from
  it and failed the check on main. Adds a bite check for the comprehension.
- runtime.yml: list tools/conformance/** in both path filters, as
  runtime/CMakeLists.txt builds from tools/conformance/native/src.
- compute_heap_layout_census.py: set errors="replace" on stdout at the top
  of its __main__ block like every other CLI tool.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:00:16 +00:00
github-bot closed this pull request 2026-11-26 10:00:16 +00:00
Author
Owner

@⁠whoalin1 on GitHub · 2026-11-25 08:04 UTC · original

Independent verification — reproduced all three failures on current origin/main (3f81d46ac) then confirmed fixed on this head:

  1. test_runner_calls_all_tests.py FAILED on main (dead test_out_named_like_the_optional_spirv_index — globals()-comprehension dispatch not recognised) → 4/4 pass on PR.
  2. test_runtime_paths.py FAILED on main (tools/conformance/** missing from workflow path filters) → 5/5 pass on PR.
  3. test_tool_stdout_encoding.py FAILED on main (compute_heap_layout_census.py lacked the stdout guard) → 4/4 pass on PR; test_feature_scan.py also OK.

So main's consistency checks were genuinely red and this fixes all three. AI-assisted verification.

**@⁠whoalin1** on GitHub · 2026-11-25 08:04 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1673#issuecomment-7156575964) Independent verification — reproduced all three failures on current `origin/main` (`3f81d46ac`) then confirmed fixed on this head: 1. `test_runner_calls_all_tests.py` FAILED on main (dead `test_out_named_like_the_optional_spirv_index` — globals()-comprehension dispatch not recognised) → 4/4 pass on PR. 2. `test_runtime_paths.py` FAILED on main (`tools/conformance/**` missing from workflow path filters) → 5/5 pass on PR. 3. `test_tool_stdout_encoding.py` FAILED on main (`compute_heap_layout_census.py` lacked the stdout guard) → 4/4 pass on PR; `test_feature_scan.py` also OK. So main's consistency checks were genuinely red and this fixes all three. AI-assisted verification.
Author
Owner

@⁠GrahamboJangles on GitHub · 2026-11-25 08:17 UTC · original

Independently reproduced both sides on current main (Windows 11, python 3.14.9, python -I, CPU only).

Repro at current main 3f81d46ac (the claim cites 42537e7b; all three failures still measure red at the newer head, so the fix is still current):

  • tests/test_runner_calls_all_tests.py: 3 tests, 1 FAILURE — exactly tests/test_feature_scan.py: test_out_named_like_the_optional_spirv_index() reported dead.
  • tests/test_runtime_paths.py: 5 tests, 1 FAILURE — tools/conformance/**: missing (named in runtime/CMakeLists.txt).
  • tests/test_tool_stdout_encoding.py: 4 tests, 1 FAILURE — compute_heap_layout_census.py in the no-errors='replace' list.

At the PR diff (head 262c104e8, applied with git apply onto the fresh clone — applies with zero conflicts): all three files green. Test-count delta is real, not a swap: test_runner_calls_all_tests.py goes 3 tests FAILED -> 4 tests OK (the new test_a_globals_comprehension_dispatches_every_test executes and passes); the other two stay 5 OK and 4 OK as claimed.

Notes:

  • No checks have run on head 262c104e8 yet ("no checks reported"), so CI here is unmeasured rather than green; the local run above is the ground truth.
  • The dispatches_tests() comprehension rule matches only a bare loop-name elt; a runner wrapping the function in a call inside the comprehension still falls back to RUNNER_SKIPS. That direction is safe — the checker only ever errs toward more skips, never toward hiding a dead test.
  • No open duplicate: gh pr list --search test_runner_calls_all_tests and CI-MAIN-CONSISTENCY return no other open PRs.

Verdict: the fix does what it claims on current main; ready from my side.

**@⁠GrahamboJangles** on GitHub · 2026-11-25 08:17 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1673#issuecomment-7156846902) Independently reproduced both sides on current `main` (Windows 11, python 3.14.9, `python -I`, CPU only). **Repro at current main `3f81d46ac`** (the claim cites `42537e7b`; all three failures still measure red at the newer head, so the fix is still current): - `tests/test_runner_calls_all_tests.py`: 3 tests, 1 FAILURE — exactly `tests/test_feature_scan.py: test_out_named_like_the_optional_spirv_index()` reported dead. - `tests/test_runtime_paths.py`: 5 tests, 1 FAILURE — `tools/conformance/**: missing (named in runtime/CMakeLists.txt)`. - `tests/test_tool_stdout_encoding.py`: 4 tests, 1 FAILURE — `compute_heap_layout_census.py` in the no-`errors='replace'` list. **At the PR diff** (head `262c104e8`, applied with `git apply` onto the fresh clone — applies with zero conflicts): all three files green. Test-count delta is real, not a swap: `test_runner_calls_all_tests.py` goes 3 tests FAILED -> **4 tests OK** (the new `test_a_globals_comprehension_dispatches_every_test` executes and passes); the other two stay 5 OK and 4 OK as claimed. Notes: - No checks have run on head `262c104e8` yet ("no checks reported"), so CI here is unmeasured rather than green; the local run above is the ground truth. - The `dispatches_tests()` comprehension rule matches only a bare loop-name `elt`; a runner wrapping the function in a call inside the comprehension still falls back to `RUNNER_SKIPS`. That direction is safe — the checker only ever errs toward more skips, never toward hiding a dead test. - No open duplicate: `gh pr list --search test_runner_calls_all_tests` and `CI-MAIN-CONSISTENCY` return no other open PRs. Verdict: the fix does what it claims on current `main`; ready from my side.
Author
Owner

@⁠DeadlyChirp on GitHub · 2026-11-25 14:38 UTC · original

Tested on Windows 11, Python 3.12.10: merged 262c104e8 onto main at 71a769d7d.

  • python -I tests/test_runner_calls_all_tests.py: OK (fails on main)
  • python -I tests/test_runtime_paths.py: OK (fails on main)
  • python -I tests/test_tool_stdout_encoding.py: still FAILED, with 2 tools left:
    ['tools/game_run_summary.py', 'tools/stage_timeline.py']

Both tools landed after this PR was opened. #1837 (game_run_summary) and #1789 (stage_timeline) add the stdout guard to them. So the third check goes green only once those are merged, or this PR can cover them too.

(AI-assisted test run; output checked by hand.)

**@⁠DeadlyChirp** on GitHub · 2026-11-25 14:38 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1673#issuecomment-7165599201) Tested on Windows 11, Python 3.12.10: merged 262c104e8 onto main at 71a769d7d. - `python -I tests/test_runner_calls_all_tests.py`: OK (fails on main) - `python -I tests/test_runtime_paths.py`: OK (fails on main) - `python -I tests/test_tool_stdout_encoding.py`: still FAILED, with 2 tools left: `['tools/game_run_summary.py', 'tools/stage_timeline.py']` Both tools landed after this PR was opened. #1837 (game_run_summary) and #1789 (stage_timeline) add the stdout guard to them. So the third check goes green only once those are merged, or this PR can cover them too. (AI-assisted test run; output checked by hand.)
Author
Owner

@⁠OguzSoykan on GitHub · 2026-11-25 20:14 UTC · original

Verified on native Windows at head 262c104e8: test_runner_calls_all_tests.py, test_tool_stdout_encoding.py and test_runtime_paths.py all fail on main and pass here; test_feature_scan.py still passes. Note that #1561 (runner check + census stdout) and #1657 (runtime.yml path) overlap this one, so only one of them should land.

Native Windows 10 Pro 19045, CPython 3.12, py -3.12 -I, checkout under a non-ASCII profile path (C:\Users\Oğuz\..., TEMP is the 8.3 alias C:\Users\OUZ~1\...). No game files.

AI-assisted (Claude Code).

**@⁠OguzSoykan** on GitHub · 2026-11-25 20:14 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1673#issuecomment-7173377583) Verified on native Windows at head `262c104e8`: `test_runner_calls_all_tests.py`, `test_tool_stdout_encoding.py` and `test_runtime_paths.py` all fail on `main` and pass here; `test_feature_scan.py` still passes. Note that #1561 (runner check + census stdout) and #1657 (runtime.yml path) overlap this one, so only one of them should land. Native Windows 10 Pro 19045, CPython 3.12, `py -3.12 -I`, checkout under a non-ASCII profile path (`C:\Users\Oğuz\...`, TEMP is the 8.3 alias `C:\Users\OUZ~1\...`). No game files. AI-assisted (Claude Code).
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-26 00:56 UTC · original

Thanks for this! Closing as a duplicate of #1561, which is merged as f1afede5e.

  • Your fix landed there: the tools/conformance/** path filter in runtime.yml was what test_runtime_paths needed. It's in #1561, credited to you.
  • The checker change (following the comprehension form instead of a RUNNER_SKIPS entry) isn't carried over. It's welcome as its own PR.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-26 00:56 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1673#issuecomment-7179268482) Thanks for this! Closing as a duplicate of #1561, which is merged as `f1afede5e`. - **Your fix landed there:** the `tools/conformance/**` path filter in `runtime.yml` was what `test_runtime_paths` needed. It's in #1561, credited to you. - **The checker change** (following the comprehension form instead of a `RUNNER_SKIPS` entry) isn't carried over. It's welcome as its own PR. AI-assisted (Claude Code, Claude Opus 5.5).

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.