runtime: add unit test suite for console command list IID mapping (RT-XS-COMMAND-LIST-IID-COVERAGE) #2039

Closed
leonida/mandy
abnalstlll-byte wants to merge 0 commits from feat/rt-xs-command-list-iid-coverage into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

abnalstlll-byte commented 2026-11-25 18:45:23 +00:00

Claimed in the coordination issue as: RT-XS-COMMAND-LIST-IID-COVERAGE (claim)

What and why

runtime/shims/d3d12_xs_command_list_iid.h provides mapping for console command-list interface IDs passed to device slot 73 (CreateCommandListX). The console passes a specific GUID whose PC counterpart is ID3D12GraphicsCommandList6 (sharing identical first 32 bits Data1). Unmapped console IIDs fail on the PC device with E_NOINTERFACE.

Previously, d3d12_xs_command_list_iid.h had no dedicated unit test.

This adds runtime/test/d3d12_xs_command_list_iid_test.cpp verifying:

  1. kCommandListIidPairs & command_list_iid_for_pc:
    • Maps measured console command list IID c3827890-4024-474c-98cf-645b51dc4874 to PC ID3D12GraphicsCommandList6 (c3827890-e548-4cfa-96cf-5689a9370f80), verifying identical Data1 and setting mapped == true.
    • Safely handles mapped == nullptr.
  2. is_pc_command_list_iid:
    • Validates that standard PC command list interfaces (ID3D12CommandList, ID3D12GraphicsCommandList, and 1 through 7) are recognized as PC IIDs.
    • Rejects non-command list interfaces (IUnknown, ID3D12Device, ID3D12Resource) and console IIDs.
  3. Pass-through of unmodified PC IIDs and unknown random IIDs (mapped == false).

Registers d3d12_xs_command_list_iid_test and CTest in runtime/CMakeLists.txt.

Tested

  • Unit test execution: 24/24 checks passed (0 failures).
  • python -I tests/test_ci_registration.py: 16/16 pass.
  • python -I tests/test_text_write_line_endings.py: 3/3 pass.
  • python -I scripts/check_no_game_data.py: clean (0 violations, no game data).

AI-assisted (Claude Code)

Claimed in the coordination issue as: RT-XS-COMMAND-LIST-IID-COVERAGE ([claim](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7171221106)) ### What and why `runtime/shims/d3d12_xs_command_list_iid.h` provides mapping for console command-list interface IDs passed to device slot 73 (`CreateCommandListX`). The console passes a specific GUID whose PC counterpart is `ID3D12GraphicsCommandList6` (sharing identical first 32 bits `Data1`). Unmapped console IIDs fail on the PC device with `E_NOINTERFACE`. Previously, `d3d12_xs_command_list_iid.h` had no dedicated unit test. This adds `runtime/test/d3d12_xs_command_list_iid_test.cpp` verifying: 1. `kCommandListIidPairs` & `command_list_iid_for_pc`: - Maps measured console command list IID `c3827890-4024-474c-98cf-645b51dc4874` to PC `ID3D12GraphicsCommandList6` (`c3827890-e548-4cfa-96cf-5689a9370f80`), verifying identical `Data1` and setting `mapped == true`. - Safely handles `mapped == nullptr`. 2. `is_pc_command_list_iid`: - Validates that standard PC command list interfaces (`ID3D12CommandList`, `ID3D12GraphicsCommandList`, and 1 through 7) are recognized as PC IIDs. - Rejects non-command list interfaces (`IUnknown`, `ID3D12Device`, `ID3D12Resource`) and console IIDs. 3. Pass-through of unmodified PC IIDs and unknown random IIDs (`mapped == false`). Registers `d3d12_xs_command_list_iid_test` and CTest in `runtime/CMakeLists.txt`. ### Tested - Unit test execution: `24/24 checks passed` (0 failures). - `python -I tests/test_ci_registration.py`: 16/16 pass. - `python -I tests/test_text_write_line_endings.py`: 3/3 pass. - `python -I scripts/check_no_game_data.py`: clean (0 violations, no game data). AI-assisted (Claude Code)
zmasi commented 2026-11-28 12:50:52 +00:00

Verified on Windows 11 (10.0.26200.9974) with MSVC 19.44.35228 (x64, Windows SDK 10.0.26100+, /std:c++20 /EHsc /W4 /permissive- /utf-8 /O2) against main d48a957bb + c22177dd67 (claim #2570#issuecomment-7239425776):

  • Line-by-line diff audit: Clean (runtime/CMakeLists.txt, runtime/test/d3d12_xs_command_list_iid_test.cpp); adds Win32/D3D12 unit coverage for command_list_iid_for_pc (console GCL6 -> PC ID3D12GraphicsCommandList6, mapped out-pointer & nullptr safety, PC/unknown pass-through) and is_pc_command_list_iid (ID3D12CommandList..ID3D12GraphicsCommandList7 vs IUnknown/ID3D12Device/ID3D12Resource/console IID). check_no_game_data.py clean.
  • Red (d48a957bb / fault injection): d3d12_xs_command_list_iid_test.cpp is absent on main (C1083), and mutating 0xe548 -> 0xe549 in d3d12_xs_command_list_iid.h fails Red (rc=1, FAIL console command list IID maps to PC ID3D12GraphicsCommandList6, 22/24 checks passed).
  • Green (d48a957bb + c22177dd67 merge): Auto-merges cleanly (rc=0), compiles with 0 warnings under /W4 /permissive-, and passes (24/24 checks passed, rc=0).
  • Coordination note with #2034: Both #2034 and #2039 insert adjacent blocks at the same lines of runtime/CMakeLists.txt (git merge-tree rc=1 trivial additive conflict once the first merges).

AI-assisted.

Verified on Windows 11 (`10.0.26200.9974`) with MSVC `19.44.35228` (`x64`, Windows SDK `10.0.26100+`, `/std:c++20 /EHsc /W4 /permissive- /utf-8 /O2`) against `main` `d48a957bb` + `c22177dd67` (claim `#2570#issuecomment-7239425776`): - **Line-by-line diff audit**: Clean (`runtime/CMakeLists.txt`, `runtime/test/d3d12_xs_command_list_iid_test.cpp`); adds Win32/D3D12 unit coverage for `command_list_iid_for_pc` (console GCL6 -> PC `ID3D12GraphicsCommandList6`, `mapped` out-pointer & `nullptr` safety, PC/unknown pass-through) and `is_pc_command_list_iid` (`ID3D12CommandList`..`ID3D12GraphicsCommandList7` vs `IUnknown`/`ID3D12Device`/`ID3D12Resource`/console IID). `check_no_game_data.py` clean. - **Red (`d48a957bb` / fault injection)**: `d3d12_xs_command_list_iid_test.cpp` is absent on `main` (`C1083`), and mutating `0xe548 -> 0xe549` in `d3d12_xs_command_list_iid.h` fails Red (`rc=1`, `FAIL console command list IID maps to PC ID3D12GraphicsCommandList6`, `22/24 checks passed`). - **Green (`d48a957bb` + `c22177dd67` merge)**: Auto-merges cleanly (`rc=0`), compiles with `0` warnings under `/W4 /permissive-`, and passes (`24/24 checks passed`, `rc=0`). - **Coordination note with `#2034`**: Both `#2034` and `#2039` insert adjacent blocks at the same lines of `runtime/CMakeLists.txt` (`git merge-tree` `rc=1` trivial additive conflict once the first merges). AI-assisted.
OreoFR commented 2026-11-29 02:39:03 +00:00

Verified by OreoFR

  • Base: main aa918e5d9 + PR head c22177dd6
  • Test: ctest -R ^d3d12_xs_command_list_iid$
  • Red on main: passes (test-only PR, the new test covers behaviour already on main)
  • Green with the PR: passes; package builds, full ctest shows no new failure
  • Verdict: NO RED (test-only PR, no fix to show)
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

Note: shares runtime/CMakeLists.txt with the open #2566; a rebase may be needed if #2566 lands first.

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

**Verified by OreoFR** - Base: main `aa918e5d9` + PR head `c22177dd6` - Test: `ctest -R ^d3d12_xs_command_list_iid$` - Red on main: passes (test-only PR, the new test covers behaviour already on main) - Green with the PR: passes; package builds, full ctest shows no new failure - Verdict: NO RED (test-only PR, no fix to show) - Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11 Note: shares `runtime/CMakeLists.txt` with the open #2566; a rebase may be needed if #2566 lands first. AI-assisted (Claude Code, Claude Opus 5.5).
fiestorra commented 2026-11-30 09:22:13 +00:00

Independent verification on this machine (Windows 11, MSVC 19.44.35226): this pull request cannot compile, and the reason suggests it is obsolete rather than broken - main deleted the header it tests, calling it dead code.

1. It applies. merge-tree clean; the commit cherry-picks onto main dcba958e5 without a conflict. Two files: runtime/CMakeLists.txt and runtime/test/d3d12_xs_command_list_iid_test.cpp.

2. It does not compile:

d3d12_xs_command_list_iid_test.cpp(9): fatal error C1083:
  Cannot open include file: 'd3d12_xs_command_list_iid.h': No such file or directory

3. The header exists in the branch and in the branch's base, but not in main:

runtime/shims/d3d12_xs_command_list_iid.h
  at the merge base 73cc1a2ba:  present
  on main dcba958e5:            absent

main commit that removed it:
  18936010d  chore: remove dead Tier 1 files, wire 5 unwired C++ tests, and fix play.ps1

So the file this test was written for was removed from main as a dead Tier 1 file. The cherry-pick succeeds because the test is new - nothing conflicts - and the result cannot build because its subject no longer exists.

What I would do with it: close it rather than rebase it. A rebase would have to reintroduce d3d12_xs_command_list_iid.h, which is a decision main already made in the opposite direction. If the interface-ID mapping is still wanted, that is a new pull request against whatever replaced it.

The one thing I cannot rule out: that the mapping logic was moved rather than dropped, and the test could be retargeted to a new file. 18936010d is titled "remove dead Tier 1 files" and lists 5 tests wired, so the author or a maintainer can check in a minute whether d3d12_xs_command_list_iid survives anywhere - I did not search for a replacement.

How it was found: a sweep of open pull requests that replay onto main, building what each test's command[0] says to build. 16 of the 25 in this batch built and passed; this one, #2045 (a \uD834 surrogate literal) and two that fail on the known xbox_present red are the exceptions.

Written with an AI assistant.

Independent verification on this machine (Windows 11, MSVC 19.44.35226): **this pull request cannot compile, and the reason suggests it is obsolete rather than broken - `main` deleted the header it tests, calling it dead code.** **1. It applies.** `merge-tree` clean; the commit cherry-picks onto `main` `dcba958e5` without a conflict. Two files: `runtime/CMakeLists.txt` and `runtime/test/d3d12_xs_command_list_iid_test.cpp`. **2. It does not compile:** ``` d3d12_xs_command_list_iid_test.cpp(9): fatal error C1083: Cannot open include file: 'd3d12_xs_command_list_iid.h': No such file or directory ``` **3. The header exists in the branch and in the branch's base, but not in `main`:** ``` runtime/shims/d3d12_xs_command_list_iid.h at the merge base 73cc1a2ba: present on main dcba958e5: absent main commit that removed it: 18936010d chore: remove dead Tier 1 files, wire 5 unwired C++ tests, and fix play.ps1 ``` **So the file this test was written for was removed from `main` as a dead Tier 1 file.** The cherry-pick succeeds because the *test* is new - nothing conflicts - and the result cannot build because its subject no longer exists. **What I would do with it:** **close it rather than rebase it.** A rebase would have to reintroduce `d3d12_xs_command_list_iid.h`, which is a decision `main` already made in the opposite direction. If the interface-ID mapping is still wanted, that is a new pull request against whatever replaced it. **The one thing I cannot rule out:** that the mapping logic was *moved* rather than dropped, and the test could be retargeted to a new file. `18936010d` is titled "remove dead Tier 1 files" and lists 5 tests wired, so the author or a maintainer can check in a minute whether `d3d12_xs_command_list_iid` survives anywhere - I did not search for a replacement. **How it was found:** a sweep of open pull requests that replay onto `main`, building what each test's `command[0]` says to build. **16 of the 25 in this batch built and passed**; this one, #2045 (a `\uD834` surrogate literal) and two that fail on the known `xbox_present` red are the exceptions. Written with an AI assistant.
MoonEyes commented 2026-11-30 12:07:09 +00:00

Closing as no longer applicable, after the check by fiestorra above: the header this tests, d3d12_xs_command_list_iid.h, is gone from main (removed as dead code in 18936010d), so the test cannot compile. Read on main ec1d85846. Thank you for the work; please reopen it if the header comes back.

AI-assisted (Claude Code). Closed at the owner's request (MoonEyes).

Closing as no longer applicable, after the check by fiestorra above: the header this tests, `d3d12_xs_command_list_iid.h`, is gone from `main` (removed as dead code in `18936010d`), so the test cannot compile. Read on `main` `ec1d85846`. Thank you for the work; please reopen it if the header comes back. AI-assisted (Claude Code). Closed at the owner's request (MoonEyes).
Sign in to join this conversation.
No description provided.