Scripts: reject GDK vtable slots outside u8 #2658

Open
github-bot wants to merge 1 commit from github-bot/gh-2658 into main AGit
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 05:14 UTC · original
luckyteagirl:codex/gdk-generator-slot-range → main · +41 −0 · 2 files · 1 commits · open

gen_gdk_table.py accepts a vtable slot above 255 and overwrites the generated Rust table with a value that cannot fit its u8 field. Validate the slot width before opening the output file, so a bad input keeps the last usable table.

What is in it

  • Reject a parsed slot above 255 with a diagnostic that names the entry and value.
  • Add a temporary-tree CLI test that accepts slot 255, rejects 256, and checks that the generated bytes remain unchanged after rejection.

Tested

  • On current main b49be183, the new regression failed because slot 256 exited successfully and replaced the table. On this branch, full Python script discovery passed 26/26 on Windows; the focused CLI test independently passed.
  • git diff --check and an independent source review passed. Open PR #1267 reorganizes the same generator, so a mechanical rebase may be needed if it lands first.

Regression run

  • Not applicable. Only the Python generator and its test changed; the generated Rust table is unchanged.

Not tested

  • A real GDK header generation run, Rust workspace tests, GPU tests, or retail title smoke.

AI use

  • Codex (GPT-6.2 Sol) implemented and tested the change; another Codex Sol agent independently reviewed it.
**@⁠luckyteagirl** on GitHub · 2026-11-26 05:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/2658) `luckyteagirl:codex/gdk-generator-slot-range` → `main` · +41 −0 · 2 files · 1 commits · open `gen_gdk_table.py` accepts a vtable slot above 255 and overwrites the generated Rust table with a value that cannot fit its `u8` field. Validate the slot width before opening the output file, so a bad input keeps the last usable table. **What is in it** - Reject a parsed slot above 255 with a diagnostic that names the entry and value. - Add a temporary-tree CLI test that accepts slot 255, rejects 256, and checks that the generated bytes remain unchanged after rejection. **Tested** - On current main `b49be183`, the new regression failed because slot 256 exited successfully and replaced the table. On this branch, full Python script discovery passed 26/26 on Windows; the focused CLI test independently passed. - `git diff --check` and an independent source review passed. Open PR #1267 reorganizes the same generator, so a mechanical rebase may be needed if it lands first. **Regression run** - Not applicable. Only the Python generator and its test changed; the generated Rust table is unchanged. **Not tested** - A real GDK header generation run, Rust workspace tests, GPU tests, or retail title smoke. **AI use** - Codex (GPT-6.2 Sol) implemented and tested the change; another Codex Sol agent independently reviewed it.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:14:47 +00:00
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/2658/head:github-bot/gh-2658'
git switch 'github-bot/gh-2658'

Merge

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