Scripts: validate GDK table GUIDs before generation #2724
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2724
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@luckyteagirl on GitHub · 2026-11-26 08:52 UTC · original
luckyteagirl:codex/gdk-table-validate-guids→main· +48 −1 · 2 files · 2 commits · draftgen_gdk_table.pypreviously trusted any 36-character mixture of hex digits and hyphens as a GUID and silently skipped a malformed shorter row. A bad source table could therefore generate an out-of-range Rust integer or omit an API entry without naming the bad row. Validate both identifiers before replacing the generated table.What is in it
scripts/gen_gdk_table.py: capture quoted class and interface fields, then require the canonical8-4-4-4-12hexadecimal GUID form for each row before opening the Rust output. A failure names the row and field.scripts/test_gdk_table_guids.py: exercise oversized, short, misplaced-hyphen, and quoted//inputs and confirm that a rejected row leaves the previous output intact.Tested
b49be183, the original three malformed-row cases failed the new fixture because the generator exited successfully instead of rejecting the input. The expanded fixture passes on headaae8e433.python -B -m unittest discover -s scripts -p 'test_*.py': 26 passed, 0 failed, exit 0.bad//guidrow was rejected without overwriting the output.git diff b49be183 HEAD --check: passed.Regression run
Not tested
AI use
//, and tested the combined branches.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.