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

Open
github-bot wants to merge 2 commits from github-bot/gh-487 into main AGit
Owner

@⁠kotekompotek on GitHub · 2026-11-24 06:13 UTC · original
kotekompotek:work/d3d12-guid-sites-gdk-json → main · +81 −0 · 2 files · 2 commits · open

Claimed in the coordination issue as: d3d12-guid-sites-gdk-json (#14)

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.
**@⁠kotekompotek** on GitHub · 2026-11-24 06:13 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/487) `kotekompotek:work/d3d12-guid-sites-gdk-json` → `main` · +81 −0 · 2 files · 2 commits · open Claimed in the coordination issue as: d3d12-guid-sites-gdk-json (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### 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's review of #487 noted read_gdk_guids() raised AttributeError
on valid non-dict JSON (e.g. a list); it now returns {} as it does for
invalid JSON. Regression test covers list/string/number/null documents.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:03:46 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-24 20:58 UTC · original

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.

**@⁠PierreEbele** on GitHub · 2026-11-24 20:58 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/487#issuecomment-7144308961) 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.
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 08:53 UTC · original

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** on GitHub · 2026-11-25 08:53 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/487#issuecomment-7157592637) 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
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 09:40 UTC · original

@⁠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.

**@⁠kotekompotek** on GitHub · 2026-11-25 09:40 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/487#issuecomment-7158644794) @⁠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.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/487/head:github-bot/gh-487'
git switch 'github-bot/gh-487'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-487'
git switch 'github-bot/gh-487'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-487'
git switch 'github-bot/gh-487'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-487'
git switch 'main'
git merge --squash 'github-bot/gh-487'
git switch 'main'
git merge --ff-only 'github-bot/gh-487'
git switch 'main'
git merge 'github-bot/gh-487'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.