d3d12_guid_sites: load known GDK runtime GUIDs from gdk_runtime_class… #487

Merged
kotekompotek merged 2 commits from upstream-pr/487 into main 2026-11-29 01:36:44 +00:00
kotekompotek commented 2026-11-24 06:13:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-24T06:13:19Z.


Claimed in the coordination issue as: d3d12-guid-sites-gdk-json (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149)

What and why

  • Rebased onto current main.
  • Loaded known GDK runtime class/interface GUIDs from tools/gdk_runtime_classes.json in tools/d3d12_guid_sites.py and added synthetic tests in tests/test_d3d12_guid_sites_gdk.py.

Tested

  • python -m pytest tests/test_d3d12_guid_sites_gdk.py passed after rebasing onto current main.

GPUs tested: n/a

AI-assisted: yes

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.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5467119434 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/487). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-24T06:13:19Z. --- Claimed in the coordination issue as: d3d12-guid-sites-gdk-json (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149) ### What and why - Rebased onto current `main`. - Loaded known GDK runtime class/interface GUIDs from `tools/gdk_runtime_classes.json` in `tools/d3d12_guid_sites.py` and added synthetic tests in `tests/test_d3d12_guid_sites_gdk.py`. ### Tested - `python -m pytest tests/test_d3d12_guid_sites_gdk.py` passed after rebasing onto current `main`. GPUs tested: n/a AI-assisted: yes ### 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.
PierreEbele commented 2026-11-24 20:58:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-24T20:58:37Z.


Reviewed bd6ead2: ran tests/test_d3d12_guid_sites_gdk.py (2 OK on the PR; copied onto main it fails with 2 errors for missing read_gdk_guids), tests/test_d3d12_guid_sites.py (10 OK), test_missing_input_exit_codes.py (2 OK), and test_d3d12_guid_sites_float4.py via pytest (2 passed) on both trees. Without a Windows SDK the CLI now reports "84 known GUIDs" vs "0" on main with the same one-line ERROR and exit 2; probing the real gdk_runtime_classes.json parses all 84 entries (0 skipped, 0 fixture collisions, all accepted by guid_shaped). Minor non-blocking note: if gdk_runtime_classes.json held valid non-dict JSON (e.g. [1, 2, 3]), read_gdk_guids() would raise AttributeError instead of returning {} as it does for invalid JSON — reproduced; optional isinstance(doc, dict) guard. AI-assisted review.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7144308961 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/487#issuecomment-7144308961). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-24T20:58:37Z. --- Reviewed bd6ead2: ran tests/test_d3d12_guid_sites_gdk.py (2 OK on the PR; copied onto main it fails with 2 errors for missing read_gdk_guids), tests/test_d3d12_guid_sites.py (10 OK), test_missing_input_exit_codes.py (2 OK), and test_d3d12_guid_sites_float4.py via pytest (2 passed) on both trees. Without a Windows SDK the CLI now reports "84 known GUIDs" vs "0" on main with the same one-line ERROR and exit 2; probing the real gdk_runtime_classes.json parses all 84 entries (0 skipped, 0 fixture collisions, all accepted by guid_shaped). Minor non-blocking note: if gdk_runtime_classes.json held valid non-dict JSON (e.g. `[1, 2, 3]`), read_gdk_guids() would raise AttributeError instead of returning `{}` as it does for invalid JSON — reproduced; optional `isinstance(doc, dict)` guard. AI-assisted review.
kotekompotek commented 2026-11-25 08:53:05 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-25T08:53:05Z.


Pushed e7314dbcc addressing the review nit: read_gdk_guids() now returns {} for valid non-dict JSON (list/string/number/null), matching the invalid-JSON path. Added test_read_gdk_guids_non_dict_json_returns_empty; python -I tests/test_d3d12_guid_sites_gdk.py is 3/3 OK.

AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7157592637 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/487#issuecomment-7157592637). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T08:53:05Z. --- Pushed `e7314dbcc` addressing the review nit: `read_gdk_guids()` now returns `{}` for valid non-dict JSON (list/string/number/null), matching the invalid-JSON path. Added `test_read_gdk_guids_non_dict_json_returns_empty`; `python -I tests/test_d3d12_guid_sites_gdk.py` is 3/3 OK. AI-assisted: yes
kotekompotek commented 2026-11-25 09:40:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-25T09:40:18Z.


@PierreEbele the isinstance(doc, dict) guard is in at the current head e7314dbcc (tools/d3d12_guid_sites.py read_gdk_guids: non-dict JSON returns {} same as invalid JSON). Thanks for the check.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7158644794 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/487#issuecomment-7158644794). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T09:40:18Z. --- @PierreEbele the `isinstance(doc, dict)` guard is in at the current head `e7314dbcc` (`tools/d3d12_guid_sites.py` `read_gdk_guids`: non-dict JSON returns `{}` same as invalid JSON). Thanks for the check.
zmasi commented 2026-11-28 23:49:06 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T23:49:06Z.


#487 | head e7314dbccf (merged cleanly with main a9e247cd69) | python -I tests/test_d3d12_guid_sites_gdk.py -v + live read_gdk_guids("tools/gdk_runtime_classes.json") probe + python -I tests/test_d3d12_guid_sites.py -v | red on main: FAILED (errors=3) (AttributeError: module 'd3d12_guid_sites' has no attribute 'read_gdk_guids') | green on PR+main: 3 ran, OK (test_d3d12_guid_sites_gdk.py), 10 ran, OK (test_d3d12_guid_sites.py), and live read_gdk_guids("tools/gdk_runtime_classes.json") loaded all 84 GDK runtime class/interface GUIDs cleanly | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes

Audited updated head e7314dbccf (tools/d3d12_guid_sites.py and tests/test_d3d12_guid_sites_gdk.py) merged cleanly onto main (a9e247cd69) on Windows 11 — first Windows verification report and first run on e7314dbccf. Confirmed read_gdk_guids() safely returns {} for missing files, malformed JSON, and non-dict top-level JSON (list/str/int/null), loads tools/gdk_runtime_classes.json before overlaying d3d12.h IIDs so d3d12.h wins on any overlap, and passes scripts/check_no_game_data.py.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247683414 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/487#issuecomment-7247683414). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T23:49:06Z. --- #487 | head e7314dbccf2e2181839389d033c8642f85074e4b (merged cleanly with main a9e247cd69) | `python -I tests/test_d3d12_guid_sites_gdk.py -v` + live `read_gdk_guids("tools/gdk_runtime_classes.json")` probe + `python -I tests/test_d3d12_guid_sites.py -v` | red on main: `FAILED (errors=3)` (`AttributeError: module 'd3d12_guid_sites' has no attribute 'read_gdk_guids'`) | green on PR+main: `3 ran, OK` (`test_d3d12_guid_sites_gdk.py`), `10 ran, OK` (`test_d3d12_guid_sites.py`), and live `read_gdk_guids("tools/gdk_runtime_classes.json")` loaded all `84` GDK runtime class/interface GUIDs cleanly | Windows 11 (`10.0.26200.9974`), Python 3.12.10 | AI-assisted: yes Audited updated head `e7314dbccf` (`tools/d3d12_guid_sites.py` and `tests/test_d3d12_guid_sites_gdk.py`) merged cleanly onto `main` (`a9e247cd69`) on Windows 11 — first Windows verification report and first run on `e7314dbccf`. Confirmed `read_gdk_guids()` safely returns `{}` for missing files, malformed JSON, and non-dict top-level JSON (`list`/`str`/`int`/`null`), loads `tools/gdk_runtime_classes.json` before overlaying `d3d12.h` IIDs so `d3d12.h` wins on any overlap, and passes `scripts/check_no_game_data.py`.
OreoFR commented 2026-11-29 01:31:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T01:31:51Z.


Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main 53b77df14 : red 3 errors (test_read_gdk_guids_*) / green 3 OK.

  • PR head e7314dbcc, python -I tests/test_d3d12_guid_sites_gdk.py from the repository root.
  • Red (main + only this PR's test files): 3 run, 3 errors, 0 skips. All test_read_gdk_guids_*: AttributeError: module 'd3d12_guid_sites' has no attribute 'read_gdk_guids'.
  • Green (main + git merge --no-ff of this PR, no conflict): 3 run, OK, 0 skips.
  • Skips: none.
  • Verdict: READY.

Red = main + only the test files from this PR (git checkout pr-487 -- tests/test_d3d12_guid_sites_gdk.py); green = main + the merged PR. When green runs more tests than red, it is because the merge keeps tests main added since the PR branched.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248842496 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/487#issuecomment-7248842496). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T01:31:51Z. --- Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main 53b77df14 : red 3 errors (`test_read_gdk_guids_*`) / green 3 OK. - PR head e7314dbcc, `python -I tests/test_d3d12_guid_sites_gdk.py` from the repository root. - Red (main + only this PR's test files): 3 run, 3 errors, 0 skips. All `test_read_gdk_guids_*`: `AttributeError: module 'd3d12_guid_sites' has no attribute 'read_gdk_guids'`. - Green (main + `git merge --no-ff` of this PR, no conflict): 3 run, OK, 0 skips. - Skips: none. - Verdict: READY. Red = main + only the test files from this PR (`git checkout pr-487 -- tests/test_d3d12_guid_sites_gdk.py`); green = main + the merged PR. When green runs more tests than red, it is because the merge keeps tests main added since the PR branched. AI-assisted: Claude Code (Claude Opus 5.5).
MoonEyes commented 2026-11-29 01:36:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T01:36:46Z.


Merged after OreoFR's red/green check (check) (macOS 27.2.1, Apple M5, Python 3.12) and a local re-check here. Merged after local re-verification: this PR merged onto main 204bfbbd1 without conflict, and its test file(s) (tests/test_d3d12_guid_sites_gdk.py) pass there. Earlier today the same tests failed on main without the PR (red/green) and a bundle with other open PRs showed no new failures. check_no_game_data.py is clean. Windows 11, Python 3.14; no GPU needed for these tests.

AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248898140 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/487#issuecomment-7248898140). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T01:36:46Z. --- Merged after **OreoFR**'s red/green check ([check](https://github.com/ProjectLeonida/mandy/pull/487#issuecomment-7248842496)) (macOS 27.2.1, Apple M5, Python 3.12) and a local re-check here. Merged after local re-verification: this PR merged onto `main` 204bfbbd1 without conflict, and its test file(s) (`tests/test_d3d12_guid_sites_gdk.py`) pass there. Earlier today the same tests failed on `main` without the PR (red/green) and a bundle with other open PRs showed no new failures. `check_no_game_data.py` is clean. Windows 11, Python 3.14; no GPU needed for these tests. _AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes._
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!487
No description provided.