tools: chain_check.py, one page of counts for the whole shader chain (TOOL-CHAIN-CHECK) #2231

Merged
leonida/mandy
MoonEyes merged 7 commits from tools/chain-check into main 2026-12-01 11:46:49 +00:00

Pull request successfully merged and closed

MoonEyes commented 2026-11-26 08:51:52 +00:00

Claimed in the coordination issue as: TOOL-CHAIN-CHECK

What and why

The shader chain (game files → llvm-mc → translator → SPIR-V → runtime pipelines) fails quietly link by link. On one Windows machine, llvm-mc 21.1.8 left 840 of the 2,684 compute programs of the pipeline library untranslated (839 "fall-through into undecodable words", 1 s_sethalt; #1923 measures the same gap). At boot the runtime then logged 843 slot 67 ... failed with 0x80070057 lines. Today nothing connects those two counts: the build prints no "N of M" for the library, and boot.ps1's digest shows neither slot failures nor failed CreatePipelineState calls.

tools/chain_check.py prints one page with one block per link, each with OK / WARN / FAIL and its most likely cause, then the weakest link:

  • tools: the llvm-mc each family was disassembled with (disasm.done, <family>_build.json) and its AMDGPU target, spirv-val, and the recorded translator digest against the same digest recomputed from make_game.py's TRANSLATION_SOURCES (a test pins it equal to translation_sources_digest());
  • per family (game, library, FSPX, BVH, exe): unpacked, listings, listings with rejected words (invalid_words), translated (index entries with their .spv), up to 5 refusal reasons from logs/shaders.log;
  • contract: tagged vs plain modules (#2098) and which of the runtime's folders exist (fspx_compute...);
  • runtime, from --log: modules loaded, failed slot calls by slot and HRESULT, failed D3D12 calls, compute builds, compile-gate waits, device faults, exit code.

Counts and fixed words only. A refusal reason is printed only when it matches a message rdna2spirv.py raises (read from its source), with a variable part kept only when it is a mnemonic of tools/rdna2_isa_tables.py or a built-in exception name; everything else counts as other. A D3D12 method name from a trace is printed only when it is a string literal of the runtime's sources (or Interface::Method with such an interface), and the end of a boot digest only in the three forms boot.ps1 writes. Paths appear only with --show-paths. Standard library only. It reads files; probing runs only llvm-mc --version, spirv-val --version and git rev-parse (--no-probe runs nothing). Exit 0 (a report), 1 with --strict on FAIL, 2 for bad arguments. Documented in docs/dev-tools.md.

Not done here (possible follow-up, separate PR): making make_game.py print "N of M translated" for the library and FSPX and warn on llvm-mc older than 23, and adding the slot failures, failed CreatePipelineState calls and tagged/plain count to scripts/windows-boot/boot.ps1's digest. The tool reports; it does not fix, retranslate or change any threshold of the build.

Sample report (real work folder after a full build with llvm-mc 21.1.8, and one 783 s boot; work folder path removed):

chain check
[WARN] tools
  llvm-mc     recorded 21.1.8 in 5 (5 records, amdgcn yes, via wsl); LLVM_MC now 21.1.8
  spirv-val   v2026.4
  translator  local dafa68abb710 in 5; checkout 7fb850e4e08b at a73a57e13; stale: bvh, exe, fspx, game, library
[OK] game  game programs (shaders.rpf)
  expected 26503  listings 26503  translated 26503 (100.0%)  failed 0
[FAIL] library  pipeline library compute
  expected 2684  listings 2684 (944 with rejected words)  translated 1844 (68.7%)  failed 840
  reasons     839 fall-through into undecodable words; 1 s_sethalt
  cause: llvm-mc 21.x leaves undecodable words (839 refusals; #1923)
[FAIL] fspx  FidelityFX FSPX
  expected 29  listings 29 (11 with rejected words)  translated 22 (75.9%)  failed 7
[OK] bvh  BVH builder  (52/52)    [OK] exe  executable  (12/12)
[WARN] contract
  modules     plain 28433; translator default tagged
  folders     present fspx, bvh, exe, library; absent fspx_compute, fspx_gfx
[FAIL] runtime
  loaded      total 28433, fspx 1866, fspx_compute 0, fspx_gfx 0, bvh 52, exe 12; descriptor table plain
  slot fails  slot 67 0x80070057 843; no translated compute shader 843
  d3d12       ID3D12Device2::CreatePipelineState failed 4, ID3D12Device2::CreatePipelineState unsupported 1
  pipelines   compute builds 830 (slow 40); compile gate waits 0
  device      fault lines 0, device lost lines 0, stalled dispatch lines 0; exit code none logged; boot.ps1: ran its full time limit (783 s), stopped
weakest link: library [FAIL]: llvm-mc 21.x leaves undecodable words (839 refusals; #1923)

(abridged: the cause lines of the tools, game, fspx, bvh, exe, contract and runtime blocks and the fspx reasons line are left out, and the bvh/exe count lines are shortened)

Tested

  • python -I tests/test_chain_check.py: 23 tests OK (synthetic work folders built by the test: broken and clean chains, mixed llvm-mc versions, refusal reasons and trace method names closed to what the sources contain, an index entry without its .spv is not counted, the 1% threshold on both sides, no names/paths without --show-paths, empty and partial folders give n/a or a verdict, --strict, --help thresholds, digest equal to make_game.translation_sources_digest(), UTF-16 log with and without BOM). One test reads the runtime sources and boot.ps1 and checks the 21 format-string fragments the log patterns depend on, so a reworded log line fails the test instead of silently reporting zero.
  • tests/test_runner_calls_all_tests.py 3 OK, tests/test_ci_registration.py 16 OK, all 13 tests/test_docs_*.py OK.
  • python -I scripts/check_no_game_data.py tools/chain_check.py tests/test_chain_check.py docs/dev-tools.md: exit 0; git diff --check origin/main..HEAD clean.
  • Real run: a full work folder (26,503 + 2,684 + 29 + 52 + 12 programs) and a 1.25-million-line boot log, about 28 s.

GPUs tested: n/a for the tool; the sample report comes from an NVIDIA RTX 4060, driver 610.88

AI-assisted: yes (Claude Code, Claude Opus 5.5, wrote the tool and its test; a second agent reviewed it)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🤖 Generated with Claude Code

Claimed in the coordination issue as: [TOOL-CHAIN-CHECK](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7185891745) ### What and why The shader chain (game files → llvm-mc → translator → SPIR-V → runtime pipelines) fails quietly link by link. On one Windows machine, llvm-mc 21.1.8 left 840 of the 2,684 compute programs of the pipeline library untranslated (839 "fall-through into undecodable words", 1 `s_sethalt`; #1923 measures the same gap). At boot the runtime then logged 843 `slot 67 ... failed with 0x80070057` lines. Today nothing connects those two counts: the build prints no "N of M" for the library, and `boot.ps1`'s digest shows neither slot failures nor failed `CreatePipelineState` calls. `tools/chain_check.py` prints one page with one block per link, each with OK / WARN / FAIL and its most likely cause, then the weakest link: - tools: the llvm-mc each family was disassembled with (`disasm.done`, `<family>_build.json`) and its AMDGPU target, spirv-val, and the recorded translator digest against the same digest recomputed from `make_game.py`'s `TRANSLATION_SOURCES` (a test pins it equal to `translation_sources_digest()`); - per family (game, library, FSPX, BVH, exe): unpacked, listings, listings with rejected words (`invalid_words`), translated (index entries with their `.spv`), up to 5 refusal reasons from `logs/shaders.log`; - contract: tagged vs plain modules (#2098) and which of the runtime's folders exist (`fspx_compute`...); - runtime, from `--log`: modules loaded, failed slot calls by slot and HRESULT, failed D3D12 calls, compute builds, compile-gate waits, device faults, exit code. Counts and fixed words only. A refusal reason is printed only when it matches a message `rdna2spirv.py` raises (read from its source), with a variable part kept only when it is a mnemonic of `tools/rdna2_isa_tables.py` or a built-in exception name; everything else counts as `other`. A D3D12 method name from a trace is printed only when it is a string literal of the runtime's sources (or `Interface::Method` with such an interface), and the end of a boot digest only in the three forms `boot.ps1` writes. Paths appear only with `--show-paths`. Standard library only. It reads files; probing runs only `llvm-mc --version`, `spirv-val --version` and `git rev-parse` (`--no-probe` runs nothing). Exit 0 (a report), 1 with `--strict` on FAIL, 2 for bad arguments. Documented in `docs/dev-tools.md`. Not done here (possible follow-up, separate PR): making `make_game.py` print "N of M translated" for the library and FSPX and warn on llvm-mc older than 23, and adding the slot failures, failed `CreatePipelineState` calls and tagged/plain count to `scripts/windows-boot/boot.ps1`'s digest. The tool reports; it does not fix, retranslate or change any threshold of the build. Sample report (real work folder after a full build with llvm-mc 21.1.8, and one 783 s boot; work folder path removed): ``` chain check [WARN] tools llvm-mc recorded 21.1.8 in 5 (5 records, amdgcn yes, via wsl); LLVM_MC now 21.1.8 spirv-val v2026.4 translator local dafa68abb710 in 5; checkout 7fb850e4e08b at a73a57e13; stale: bvh, exe, fspx, game, library [OK] game game programs (shaders.rpf) expected 26503 listings 26503 translated 26503 (100.0%) failed 0 [FAIL] library pipeline library compute expected 2684 listings 2684 (944 with rejected words) translated 1844 (68.7%) failed 840 reasons 839 fall-through into undecodable words; 1 s_sethalt cause: llvm-mc 21.x leaves undecodable words (839 refusals; #1923) [FAIL] fspx FidelityFX FSPX expected 29 listings 29 (11 with rejected words) translated 22 (75.9%) failed 7 [OK] bvh BVH builder (52/52) [OK] exe executable (12/12) [WARN] contract modules plain 28433; translator default tagged folders present fspx, bvh, exe, library; absent fspx_compute, fspx_gfx [FAIL] runtime loaded total 28433, fspx 1866, fspx_compute 0, fspx_gfx 0, bvh 52, exe 12; descriptor table plain slot fails slot 67 0x80070057 843; no translated compute shader 843 d3d12 ID3D12Device2::CreatePipelineState failed 4, ID3D12Device2::CreatePipelineState unsupported 1 pipelines compute builds 830 (slow 40); compile gate waits 0 device fault lines 0, device lost lines 0, stalled dispatch lines 0; exit code none logged; boot.ps1: ran its full time limit (783 s), stopped weakest link: library [FAIL]: llvm-mc 21.x leaves undecodable words (839 refusals; #1923) ``` (abridged: the cause lines of the tools, game, fspx, bvh, exe, contract and runtime blocks and the fspx reasons line are left out, and the bvh/exe count lines are shortened) ### Tested - `python -I tests/test_chain_check.py`: 23 tests OK (synthetic work folders built by the test: broken and clean chains, mixed llvm-mc versions, refusal reasons and trace method names closed to what the sources contain, an index entry without its `.spv` is not counted, the 1% threshold on both sides, no names/paths without `--show-paths`, empty and partial folders give n/a or a verdict, `--strict`, `--help` thresholds, digest equal to `make_game.translation_sources_digest()`, UTF-16 log with and without BOM). One test reads the runtime sources and `boot.ps1` and checks the 21 format-string fragments the log patterns depend on, so a reworded log line fails the test instead of silently reporting zero. - `tests/test_runner_calls_all_tests.py` 3 OK, `tests/test_ci_registration.py` 16 OK, all 13 `tests/test_docs_*.py` OK. - `python -I scripts/check_no_game_data.py tools/chain_check.py tests/test_chain_check.py docs/dev-tools.md`: exit 0; `git diff --check origin/main..HEAD` clean. - Real run: a full work folder (26,503 + 2,684 + 29 + 52 + 12 programs) and a 1.25-million-line boot log, about 28 s. GPUs tested: n/a for the tool; the sample report comes from an NVIDIA RTX 4060, driver 610.88 AI-assisted: yes (Claude Code, Claude Opus 5.5, wrote the tool and its test; a second agent reviewed it) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
GrahamboJangles commented 2026-11-26 10:11:32 +00:00

Ran the suite here rather than only reading it — Windows 11, CPython 3.14 (the author's runs were Linux/3.13), at head 044e27122 vs base a73a57e13.

  • The diff is three new files (+1207/−0, nothing existing touched): tools/chain_check.py, tests/test_chain_check.py, docs/dev-tools.md.
  • python -I tests/test_chain_check.py -v at head, branch pr2231: 23 tests, 23 OK, 6.6 s. The base has no chain_check files (git ls-tree a73a57e13 finds none), so the delta is 0 → 23 — every test exercises the new tool; nothing pre-existing was displaced.
  • Live runs of the tool itself, matching the documented exit-code contract:
    • python -I tools/chain_check.py /nonexistent-folder-xyz → exit 2 (bad arguments);
    • python -I tools/chain_check.py . --no-probe on a folder with no shader tree → all blocks n/a ("not unpacked in this work folder"), exit 0 — the graceful partial-folder path works end to end, not just under unittest.
  • Repo gates at head: python -I scripts/check_no_game_data.py quiet, exit 0 (the new tool and docs pass the no-game-data scan, including the free-text-closing rules in its header); python3 -m compileall -q clean on both new files; python -I tests/test_ci_registration.py -v → 16 tests OK, so the new tool doesn't desync the CI registration tests.
  • Behaviour checks I traced against the code: an index entry whose .spv is absent is not counted as translated (family_block filters present via os.path.isfile, and test_entry_without_module_is_not_translated pins it); the FAIL_FRACTION boundary matches the docstring's "99 of 100 is WARN, 197 of 200 is FAIL" arithmetic and test_threshold_bounds covers both edges; the deliberate broad except (Exception, SystemExit) around the LLVM_MC probe is the one noqa:ed spot, and it is the documented intent ("a broken LLVM_MC is reported, not raised").

Merge state as read today: mergeable=true, mergeStateStatus=unstable with change-scope and no-game-data both pending (no failures) — CI just hadn't settled when I checked.

VERDICT: OK on the evidence I could run — 23/23 local, gates clean, live runs reproduce the documented contract; CPython 3.14 on Windows reproduces the same counts as the author's Linux/3.13 run. I read ~520 of the 775 tool lines closely (helpers, repo side, blocks); the runtime-log tail I lean on the closed-set regexes plus test_utf16_log/test_no_names_or_log_text_printed for, so the free-text closing is test-backed but not personally line-verified end to end.

Ran the suite here rather than only reading it — Windows 11, CPython 3.14 (the author's runs were Linux/3.13), at head `044e27122` vs base `a73a57e13`. - The diff is three new files (+1207/−0, nothing existing touched): `tools/chain_check.py`, `tests/test_chain_check.py`, `docs/dev-tools.md`. - `python -I tests/test_chain_check.py -v` at head, branch `pr2231`: **23 tests, 23 OK, 6.6 s.** The base has no chain_check files (`git ls-tree a73a57e13` finds none), so the delta is 0 → 23 — every test exercises the new tool; nothing pre-existing was displaced. - Live runs of the tool itself, matching the documented exit-code contract: - `python -I tools/chain_check.py /nonexistent-folder-xyz` → exit **2** (bad arguments); - `python -I tools/chain_check.py . --no-probe` on a folder with no shader tree → all blocks `n/a` ("not unpacked in this work folder"), exit **0** — the graceful partial-folder path works end to end, not just under unittest. - Repo gates at head: `python -I scripts/check_no_game_data.py` quiet, exit **0** (the new tool and docs pass the no-game-data scan, including the free-text-closing rules in its header); `python3 -m compileall -q` clean on both new files; `python -I tests/test_ci_registration.py -v` → 16 tests OK, so the new tool doesn't desync the CI registration tests. - Behaviour checks I traced against the code: an index entry whose `.spv` is absent is not counted as translated (`family_block` filters `present` via `os.path.isfile`, and `test_entry_without_module_is_not_translated` pins it); the FAIL_FRACTION boundary matches the docstring's "99 of 100 is WARN, 197 of 200 is FAIL" arithmetic and `test_threshold_bounds` covers both edges; the deliberate broad `except (Exception, SystemExit)` around the LLVM_MC probe is the one noqa:ed spot, and it is the documented intent ("a broken LLVM_MC is reported, not raised"). Merge state as read today: `mergeable=true`, `mergeStateStatus=unstable` with `change-scope` and `no-game-data` both **pending** (no failures) — CI just hadn't settled when I checked. VERDICT: OK on the evidence I could run — 23/23 local, gates clean, live runs reproduce the documented contract; CPython 3.14 on Windows reproduces the same counts as the author's Linux/3.13 run. I read ~520 of the 775 tool lines closely (helpers, repo side, blocks); the runtime-log tail I lean on the closed-set regexes plus `test_utf16_log`/`test_no_names_or_log_text_printed` for, so the free-text closing is test-backed but not personally line-verified end to end.
real-rusher commented 2026-11-26 10:12:52 +00:00

Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13, no GPU, no game data). Merges cleanly. python -I tests/test_chain_check.py: 23 tests OK with this PR (the tool is new, so there is no main baseline to fail against). compileall clean.

AI-assisted: yes (Claude Code)

Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13, no GPU, no game data). Merges cleanly. python -I tests/test_chain_check.py: 23 tests OK with this PR (the tool is new, so there is no main baseline to fail against). compileall clean. AI-assisted: yes (Claude Code)
lixonik reviewed 2026-11-26 11:12:35 +00:00
lixonik left a comment
No description provided.
Windows 11: 23/23 chain check tests passed, including strict exit status, absent data and path/name redaction in counts-only output. Tested with synthetic fixtures. No findings. AI-assisted.
DadaCap commented 2026-11-28 07:21:05 +00:00

Thanks for this! One page of counts for the whole shader chain makes a gap easy to spot.

During maintainer testing (local, 2026-11-28) (head 1b1fb2db4, merged on main b1619e0a3 / 6dfca6428, Windows 11, Python tests via pytest/unittest) we found:

  • tests/test_text_encoding.py fails: tools/chain_check.py opens text files without encoding= (3 calls, e.g. around line 624), against the AGENTS.md convention.

To get this merged:

  • Pass encoding='utf-8' on every open() in chain_check.py, plus newline='\n' where it writes.

AI-assisted (Claude Code), posted for DadaCap (maintainer).

Thanks for this! One page of counts for the whole shader chain makes a gap easy to spot. During maintainer testing (local, 2026-11-28) (head 1b1fb2db4, merged on main b1619e0a3 / 6dfca6428, Windows 11, Python tests via pytest/unittest) we found: - `tests/test_text_encoding.py` fails: `tools/chain_check.py` opens text files without `encoding=` (3 calls, e.g. around line 624), against the AGENTS.md convention. To get this merged: - Pass `encoding='utf-8'` on every `open()` in `chain_check.py`, plus `newline='\n'` where it writes. _AI-assisted (Claude Code), posted for DadaCap (maintainer)._
zmasi commented 2026-11-29 01:49:53 +00:00

#2231 | head 1b1fb2db426f2ee76fa9a69ec7ee11b4794ed702 (merged cleanly onto origin/main 59e65849b0) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes

Independent Verification (Windows 11)

  • Diff & safety audit: Inspected 100% of the diff across docs/dev-tools.md, tools/chain_check.py, and tests/test_chain_check.py (including the closed-vocabulary normalization against rdna2spirv.py Unsupported(...) AST patterns, rdna2_isa_tables.py mnemonics, runtime/{shims,src} string literals, and scripts/windows-boot/boot.ps1 digest endings). python -I scripts/check_no_game_data.py docs/dev-tools.md tools/chain_check.py tests/test_chain_check.py passed (rc=0).
  • Verification on native Windows 11 (#2231 + origin/main 59e65849b0):
    • python -I tests/test_chain_check.py -v -> 23/23 passed (0 skipped, OK, 7.693s), covering Windows backslash path suppression unless --show-paths is passed, UTF-16 BOM / UTF-16LE / UTF-16BE PowerShell log decoding, live source-string pinning against current main (runtime/shims/*, runtime/src/*, scripts/windows-boot/boot.ps1), and make_game.translation_sources_digest() parity.
    • python -I tests/test_ci_registration.py -> 18/18 passed (OK)
    • Doc verification suites: test_docs_table_rows.py (2/2), test_docs_repo_paths.py (5/5), test_docs_encoding.py (1/1), test_docs_env_vars.py (5/5) -> all OK.
#2231 | head 1b1fb2db426f2ee76fa9a69ec7ee11b4794ed702 (merged cleanly onto origin/main 59e65849b0) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes ### Independent Verification (Windows 11) - **Diff & safety audit**: Inspected 100% of the diff across `docs/dev-tools.md`, `tools/chain_check.py`, and `tests/test_chain_check.py` (including the closed-vocabulary normalization against `rdna2spirv.py` `Unsupported(...)` AST patterns, `rdna2_isa_tables.py` mnemonics, `runtime/{shims,src}` string literals, and `scripts/windows-boot/boot.ps1` digest endings). `python -I scripts/check_no_game_data.py docs/dev-tools.md tools/chain_check.py tests/test_chain_check.py` passed (`rc=0`). - **Verification on native Windows 11 (`#2231 + origin/main` `59e65849b0`)**: - `python -I tests/test_chain_check.py -v` -> **`23/23` passed (`0` skipped, `OK`, `7.693s`)**, covering Windows backslash path suppression unless `--show-paths` is passed, UTF-16 BOM / UTF-16LE / UTF-16BE PowerShell log decoding, live source-string pinning against current `main` (`runtime/shims/*`, `runtime/src/*`, `scripts/windows-boot/boot.ps1`), and `make_game.translation_sources_digest()` parity. - `python -I tests/test_ci_registration.py` -> `18/18` passed (`OK`) - Doc verification suites: `test_docs_table_rows.py` (`2/2`), `test_docs_repo_paths.py` (`5/5`), `test_docs_encoding.py` (`1/1`), `test_docs_env_vars.py` (`5/5`) -> all `OK`.
timbot103 reviewed 2026-11-29 04:26:54 +00:00
timbot103 left a comment
No description provided.
Static audit of head `1b1fb2db4` against `b6bf3aa0b`. I reviewed the diff, the build and runtime producers, and the relevant CI checks. No tests, builds, or GPU runs. I’d request changes for the following. - **Blocker** at `tools/chain_check.py:230`. The encoding check flags the three calls to the local `read_text` helper, even though its `open()` already pins UTF-8. Rename the helper and its calls. - **Major** at `tools/chain_check.py:437`. A malformed recorded translator digest can copy a path fragment or other free text into both report formats without `--show-paths`. Validate the entire digest as SHA-256 hex before displaying its prefix. - **Minor** at `tools/chain_check.py:762`. Invalid work and log arguments echo their paths on stderr. Use fixed diagnostics by default and add the path only with `--show-paths`. - **Major** at `tools/chain_check.py:391`. Work paths with spaces truncate the journal’s disassembly argument, so its translation summaries and reasons lose their family. Parse through the producer’s ` --out ` delimiter. - **Major** at `tools/chain_check.py:412`. The translator emits its optional wave64 tiers line between the summary and the refusal rows. That line stops reason collection. Keep collection active through the tiers line and exercise that sequence in a fixture. - **Major** at `tools/chain_check.py:422`. The tool ignores the legacy LLVM marker accepted by `make_game.py:1268`. A saved signature with a non-string version field also raises at `tools/chain_check.py:251`. Accept both marker forms and validate signature fields before parsing. - **Major** at `tools/chain_check.py:513`. A module with an error-only metadata row can make the BVH or executable family look complete even though the producer counts that program as missing. Match modules to the expected stems and require their runtime lookup metadata. - **Major** at `tools/chain_check.py:556`. `fspx_compute` and `fspx_gfx` can be present and loaded while contributing nothing to the local descriptor census or the expected boot total. Count all indexes the runtime reads using its metadata acceptance rules. AI-assisted.
MoonEyes commented 2026-11-29 18:31:18 +00:00

Tested 2dd72a453 merged (no commit) with main 4755667f5: Python 3.12, Windows 11 10.0.26300, CPU only. Ran the PR's tests plus every test file that imports the changed tool.

  • Green: python -I tests/test_chain_check.py passes.
  • tools/chain_check.py is new in this PR, so the only red is the test failing to import it on main.
  • Does not force a rebase of #2566 (merge-tree against 8db8335d2).

AI-assisted (Claude Code).

Tested `2dd72a453` merged (no commit) with `main` `4755667f5`: Python 3.12, Windows 11 10.0.26300, CPU only. Ran the PR's tests plus every test file that imports the changed tool. - Green: `python -I tests/test_chain_check.py` passes. - `tools/chain_check.py` is new in this PR, so the only red is the test failing to import it on `main`. - Does not force a rebase of #2566 (merge-tree against `8db8335d2`). AI-assisted (Claude Code).
enlight3d commented 2026-11-30 19:18:07 +00:00

RUN (independent run on Windows, #2231 head 8a2736fe6, tested as it is; it merges cleanly into main 8f41d7d01 per git merge-tree --write-tree. CI on 8a2736fe6: change-scope, check, linux-python-and-viewer, no-game-data and semantic-tests all pass.)

Commands, from the repository root:

  • python -I -m unittest discover -s tests -p test_chain_check.py on the head: 23 tests OK.
  • Red, import: on main df151972c with only the PR's test file added, the module does not import (ImportError, no chain_check). That alone proves little.
  • Red, behavioural: with a family's verdict forced to WARN, whatever its failures (the FAIL_FRACTION test removed) and the tests kept, 6 tests fail: test_broken_chain_names_each_link, test_empty_and_partial_folders_are_na, test_entry_without_module_is_not_translated, test_strict_exit_code, test_threshold_bounds, test_untranslated_without_build_log.
  • Neighbours, since the tool reads make_game.py's TRANSLATION_SOURCES and its digest, and docs/dev-tools.md changes: test_shader_stage_resume.py 47 OK, test_cmake_translator_deps.py 5 OK and test_boot_matrix.py 36 OK on the head.
  • Not covered: a real work folder and a real boot log. The tests write synthetic ones.

Python 3.13.12 (python -I), run at low priority.
Machine: Windows 11 Pro 26300, i9-13900K, 64 GB, RTX 3090 24 GB (not used), NVIDIA 621.40.

RUN (independent run on Windows, #2231 head 8a2736fe6, tested as it is; it merges cleanly into main 8f41d7d01 per `git merge-tree --write-tree`. CI on 8a2736fe6: change-scope, check, linux-python-and-viewer, no-game-data and semantic-tests all pass.) Commands, from the repository root: - `python -I -m unittest discover -s tests -p test_chain_check.py` on the head: 23 tests OK. - Red, import: on main df151972c with only the PR's test file added, the module does not import (`ImportError`, no `chain_check`). That alone proves little. - Red, behavioural: with a family's verdict forced to WARN, whatever its failures (the `FAIL_FRACTION` test removed) and the tests kept, 6 tests fail: `test_broken_chain_names_each_link`, `test_empty_and_partial_folders_are_na`, `test_entry_without_module_is_not_translated`, `test_strict_exit_code`, `test_threshold_bounds`, `test_untranslated_without_build_log`. - Neighbours, since the tool reads `make_game.py`'s `TRANSLATION_SOURCES` and its digest, and `docs/dev-tools.md` changes: `test_shader_stage_resume.py` 47 OK, `test_cmake_translator_deps.py` 5 OK and `test_boot_matrix.py` 36 OK on the head. - Not covered: a real work folder and a real boot log. The tests write synthetic ones. Python 3.13.12 (`python -I`), run at low priority. Machine: Windows 11 Pro 26300, i9-13900K, 64 GB, RTX 3090 24 GB (not used), NVIDIA 621.40.
aslan2142 approved these changes 2026-12-01 11:43:15 +00:00
aslan2142 left a comment

Reviewed tools/chain_check.py, tests/test_chain_check.py, and docs/dev-tools.md on head 8a2736f. Standard-library-only, clean-room, with closed-set redaction for shader names, paths, log lines, refusal reasons, and trace methods, plus explicit UTF-8/UTF-16 handling (open(..., encoding="utf-8") fixes from prior review are in place). Mergeable cleanly with all 5 CI checks green. Approving and merging.

(AI-assisted review.)

Reviewed `tools/chain_check.py`, `tests/test_chain_check.py`, and `docs/dev-tools.md` on head `8a2736f`. Standard-library-only, clean-room, with closed-set redaction for shader names, paths, log lines, refusal reasons, and trace methods, plus explicit UTF-8/UTF-16 handling (`open(..., encoding="utf-8")` fixes from prior review are in place). Mergeable cleanly with all 5 CI checks green. Approving and merging. *(AI-assisted review.)*
Sign in to join this conversation.
No description provided.