d3d12_guid_sites: load known GDK runtime GUIDs from gdk_runtime_class… #487
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/487"
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 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
main.tools/gdk_runtime_classes.jsonintools/d3d12_guid_sites.pyand added synthetic tests intests/test_d3d12_guid_sites_gdk.py.Tested
python -m pytest tests/test_d3d12_guid_sites_gdk.pypassed after rebasing onto currentmain.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.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; optionalisinstance(doc, dict)guard. AI-assisted review.Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-25T08:53:05Z.
Pushed
e7314dbccaddressing the review nit:read_gdk_guids()now returns{}for valid non-dict JSON (list/string/number/null), matching the invalid-JSON path. Addedtest_read_gdk_guids_non_dict_json_returns_empty;python -I tests/test_d3d12_guid_sites_gdk.pyis 3/3 OK.AI-assisted: yes
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 heade7314dbcc(tools/d3d12_guid_sites.pyread_gdk_guids: non-dict JSON returns{}same as invalid JSON). Thanks for the check.Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T23:49:06Z.
#487 | head
e7314dbccf(merged cleanly with maina9e247cd69) |python -I tests/test_d3d12_guid_sites_gdk.py -v+ liveread_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 liveread_gdk_guids("tools/gdk_runtime_classes.json")loaded all84GDK runtime class/interface GUIDs cleanly | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yesAudited updated head
e7314dbccf(tools/d3d12_guid_sites.pyandtests/test_d3d12_guid_sites_gdk.py) merged cleanly ontomain(a9e247cd69) on Windows 11 — first Windows verification report and first run one7314dbccf. Confirmedread_gdk_guids()safely returns{}for missing files, malformed JSON, and non-dict top-level JSON (list/str/int/null), loadstools/gdk_runtime_classes.jsonbefore overlayingd3d12.hIIDs sod3d12.hwins on any overlap, and passesscripts/check_no_game_data.py.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.e7314dbcc,python -I tests/test_d3d12_guid_sites_gdk.pyfrom the repository root.test_read_gdk_guids_*:AttributeError: module 'd3d12_guid_sites' has no attribute 'read_gdk_guids'.git merge --no-ffof this PR, no conflict): 3 run, OK, 0 skips.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).
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
main204bfbbd1without conflict, and its test file(s) (tests/test_d3d12_guid_sites_gdk.py) pass there. Earlier today the same tests failed onmainwithout the PR (red/green) and a bundle with other open PRs showed no new failures.check_no_game_data.pyis clean. Windows 11, Python 3.14; no GPU needed for these tests.AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.