script: require matching root schema and instance sizes #186
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!186
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/186/head"
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?
@Vonsek on GitHub · 2026-11-21 18:10 UTC · original
Vonsek:codex/script-tree-validation→main· +22 −3 · 2 files · 1 commits · merged 2026-11-21 18:13 UTCChange
Require the root schema's declared size to match the 80-byte instance before interpreting its five arrays. The probe still counts the section record, but a size mismatch excludes it from tree counts and state lookup. The replay's anchor selector uses the same check.
Verification
Windows 11 build 26200.9974, Visual Studio Build Tools 2022 17.14.45 (MSVC 19.44.35230), Python 3.12.10, CMake 3.31.6.
python -B tests/script_state_check.pywith the new fixture on baseccfa703: the probe counted two trees instead of one, and replay selection raisedAnchor appears in multiple records.cmake --preset devandcmake --build --preset dev --target script_path_hostconfigured and built the host from a clean output directory.ctest --preset dev --no-tests=error -R '^script_(state_literals|path_links|dispatch_pairs)$' -V: 2/3 on base with the new fixture, 3/3 at6080055, with zero skips.out/pe-env/Scripts/python.exe -B tests/script_state_check.py: 13 tests passed at6080055.out/pe-env/Scripts/python.exe -B tests/script_path_check.py out/build/dev/script_path_host.dll: 4 tests passed at6080055.out/pe-env/Scripts/python.exe -B tests/script_dispatch_check.py out/build/dev/script_path_host.dll: 5 tests passed at6080055.git diff --check: passed.Evidence and follow-up
The MIT-licensed test constructs two paged records with the same synthetic state label. The first has an 80-byte root block and declares a 64-byte root schema. The second declares the correct size. Both readers must select the second record, whose camera priority is 17.
Checklist
AI-assisted with Codex.
@chatgpt-codex-connector[bot] on GitHub · 2026-11-21 18:10 UTC · original · edited 2026-11-21 18:12 UTC
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
6080055ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.