tools: provide synthetic test inventory and subsystem map (DX-10) #707
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/707"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T12:27:34Z.
Summary
Implements DX-10: Synthetic test inventory and subsystem map tool.
Provides an authoritative CLI scanner (\ ools/test_inventory.py) and comprehensive architectural reference (\docs/test_inventory.md) that catalogs all 1,177 repository tests across four major subsystems (\shader,
untime, \ ools, \iewer), verifying that 99.2% (1,168 tests) are fully synthetic and executable without retail game packages.
Features
untime\ (228), and \iewer\ (34).
ode_test\ (2).
ode, \dotnet).
Verification
Imported from ubiquitarianism/leonida. Originally posted by Dezmonius on 2026-11-24T12:55:07Z.
Independent Windows 10 check of
36c8e30with CPython 3.14.7. All five inventory tests passed. The clean source archive reports 1,211 candidates and 1,202 marked synthetic (the docs quote 1,177 and 1,168).I compared the inventory to the actual parallel semantic runner on a temporary tree:
tests/semantic/test_sample.py, both see one test file. Compiling that file creates__pycache__/test_sample.cpython-314.pyc. The inventory reports two entries (the cache entry's runner isunknown), while the semantic runner still selects one.testCase.pyandpkg/__init__.pyleaves the inventory count at two, including the cache entry. The actual semantic runner executes all three tests and exits 0. Its default istest*.pyand it explicitly schedules package initializers.There is also an optional/required distinction in
--gaps:pe_loader_test.cppis flagged as requiring retail because it mentionsLEONIDA_GAME_DIR, but the source describes that as an optional section and skips that section when the variable is unset. The file-level marker is useful as a hint if labelled as such.Could the inventory restrict candidates to source file types, ignore cache directories, and share the semantic runner's discovery rules for that subtree? The cache and filename/package cases can be covered with temporary-tree tests.
Synthetic fixtures and source inspection only. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T18:47:15Z.
Thank you for the detailed review @Dezmonius! Addressed all three items in 3c31992f2:
etail_requirement (optional vs
equired) so synthetic tests with optional SKIP retail legs remain counted as synthetic while still inspectable under --gaps, and replaced static doc counts with live discovery notes.
Imported from ubiquitarianism/leonida. Originally posted by Poussistar on 2026-11-24T18:48:11Z.
One repository-wide guard is red at head
36c8e308f:tests/test_tool_stdout_encoding.py. I applied the diff to a clean worktree at6293c1c4f(origin/main), where the same file is green.Linux x86-64, 4 vCPU, CPython 3.14.7, no game files, no GPU.
tools/test_inventory.pyends withif __name__ == "__main__": raise SystemExit(main()). Every program undertools/,scripts/andviewer/starts that block with the stdout guard, for the reason the test file spells out: underpython -Ia redirected stdout is encoded with the console ANSI code page,PYTHONUTF8/PYTHONIOENCODINGare ignored, and printing an inventory path that the code page cannot write ends the run withUnicodeEncodeError. The inventory lists file paths, so it is exactly the tool that will meet such a name.Verified fix, copied from the sibling tools:
With it:
tests/test_tool_stdout_encoding.py4 tests OK,tests/test_test_inventory.py5 tests OK,tests/test_text_write_line_endings.py3 tests OK. Negative control, guard removed again: the['tools/test_inventory.py'] != []failure above returns.The five inventory tests and both docs guards (
test_docs_links.py,test_docs_cli_flags.py) pass as the PR stands; this is the only red I found.AI-assisted review; no game files were used.
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-25T16:31:03Z.
Thank you for the review @Poussistar! Resolved in commit
8fc6e427f: addedsys.stdout.reconfigure(errors="replace")totools/test_inventory.py's__main__block;test_tool_stdout_encoding.pynow passes fortest_inventory.py.AI-assisted (Claude Code)
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:43:18Z.
Verified by OreoFR
5cb45921e+ PR head52f1da288python -I tests/test_test_inventory.pyAI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T01:38:47Z.
#707 | head
52f1da2884(merged cleanly onto origin/maind8c10dd5e1) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yesIndependent Verification (Windows 11)
docs/test_inventory.md,tools/test_inventory.py, andtests/test_test_inventory.py.python -I scripts/check_no_game_data.py docs/test_inventory.md tools/test_inventory.py tests/test_test_inventory.pypassed (rc=0).#707 + origin/maind8c10dd5e1):python -I tests/test_test_inventory.py -v->6/6passed (OK,2.281s)python -I -B tools/test_inventory.py --summary-> cataloged1,526test files (1,524synthetic =99.9%:runtime353,shader707,tools427,viewer39;rc=0)python -I tests/test_ci_registration.py->18/18passed (OK)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) -> allOK.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T14:38:30Z.
Merged at head
52f1da2. Tested on this head by OreoFR, zmasi: the new test fails on main and passes with the PR (results in the comments above). AI-assisted: yes.