Scripts: validate GDK table GUIDs before generation #2714
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2724"
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 ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T08:52:50Z.
Stacked on #2681
Validate both GUIDs in active GDK table rows before replacing the generated Rust table. The prerequisite filters commented rows first, so a malformed GUID in a disabled row does not stop regeneration.
What is in it
8-4-4-4-12hexadecimal form for class and interface GUIDs. A diagnostic names the row and field, and the existing output survives a rejected row.//and/*...*/markers. The stack follows the integration reviewed by RavenCurseBurg. Reviewer findingsTested
aae8e433rejected a commented-outbad//guidrow. On the comment-filter-only prerequisite, the GUID fixture failed all five malformed-active-row cases. One46d5135,python -B -m unittest discover -s scripts -p 'test_*.py'passed 27 tests with 0 failures.c2ee10e4as temporary input and added a disabled malformed row. The generated output matched the checked-in table byte for byte.git diff HEAD^ HEAD --checkpassed.Regression run
This changes the Python generator and its tests. The checked-in Rust output is unchanged.
Not tested
A fresh GDK extraction, Rust or GPU tests, and a retail title run.
AI use
OpenAI Codex (GPT-6.2 Sol) implemented the original GUID validation and failing-first fixture. OpenAI Codex (GPT-6.2 Astra) reviewed the original diff and tested its composition with adjacent changes. RavenCurseBurg used OpenAI Codex (GPT-6) to prepare and test the integration and interface regression. OpenAI Codex (GPT-6, exact variant unavailable) prepared the local stack and verified its regression and regeneration results.
Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-26T09:45:55Z.
I tested
aae8e43308dad4df7c9fefd00c4250cd637e2f72alongside #2681 at499738640791. This head reports an invalid GUID from a disabled row. Integration candidate a6dd26db4ea5 applies luckyteagirl’s comment handling from #2681 before this PR’s active-row validation. Onpython -B scripts/gen_gdk_table.py <synthetic-table>, the candidate preserved the source URL, slot order and exact generated bytes after I inserted disabled entries. A malformed active class and a malformed active interface each produced a field-specific diagnostic and left the output unchanged.python -B -m unittest discover -s scripts -p "test_*.py"passed all 27 tests on the integration commit. Windows build 26100, Core i7-13700, Python 3.14.3. OpenAI Codex (GPT-6) wrote and ran the synthetic tests. Codex prepared the integration and added the interface fixture. The Windows GDK library and Rust runtime were outside this run.Retest on
e46d5135c2fe23291437c24ad0bd867ba85084c6I reran
python -B scripts/gen_gdk_table.pyon the new head stacked on #2681. Adding disabled rows left the output byte-identical to the clean input’s output, including the source URL and slot order. Malformed active class and interface GUIDs each produced the expected field diagnostic and preserved the existing output. Python test discovery passed all 27 tests.OpenAI Codex (GPT-6) ran the synthetic fixtures on Windows 11. No retail title, GPU workload or Rust workspace build was used.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:49:05Z.
Triage (#1607) – head
e46d513Stacked on #2681: the first two commits and
scripts/test_gdk_table_comments.pyare #2681's. Onlye46d513(GUID validation) belongs here. #2658 also adds a check togen_gdk_table.py(slot <= 255), but a different one, so they only touch the same lines. #1267 restructures the same script and will conflict textually.The new row regex takes any quoted field, and the canonical 8-4-4-4-12 check then rejects bad GUIDs before the output is opened, so a rejected input leaves the old table in place. No problems found in the diff.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.