Repository navigation
lds_fuzz, valu_fuzz: handle UTF-8 BOM on index.json reads - #6131
Open
jaybeebabageyus wants to merge 1 commit into
Open
jaybeebabageyus wants to merge 1 commit into
jaybeebabageyus wants to merge 1 commit into
Conversation
LAKSHYA-cmd-tech
approved these changes
Nov 23, 2026
LAKSHYA-cmd-tech
left a comment
There was a problem hiding this comment.
Independent review on Windows 11 x64, Python 3.12 (-I).
- Red-first verification: On parent revision before the fix, a synthetic BOM-prefixed \spirv/index.json\ (\xef\xbb\xbf{...}) raised \json.decoder.JSONDecodeError: Unexpected UTF-8 BOM (decode using utf-8-sig): line 1 column 1 (char 0)\ in both \ ools/lds_fuzz.py:translate()\ and \ ools/valu_fuzz.py:translate(). On head, both correctly decode and return the expected index dictionary.
- \python -I -m compileall -q tools/lds_fuzz.py tools/valu_fuzz.py tests/test_valu_fuzz.py tests/test_lds_fuzz_cli.py\ (exit 0)
- \python -I tests/test_lds_fuzz_cli.py -v\ (9/9 passed, including \ est_translate_reads_index_with_utf8_bom)
- \python -I tests/test_lds_fuzz.py -v\ (36/36 passed)
- \python -I tests/test_ci_registration.py\ (14/14 passed)
- \python -I tests/test_text_write_line_endings.py\ (3/3 passed)
- \python -I scripts/check_no_game_data.py\ (exit 0)
- \git diff --check\ clean (0).
LGTM. AI-assisted; synthetic tests only, zero game data or GPU used.
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes UTF-8 BOM handling when reading
index.jsonintools/lds_fuzz.pyandtools/valu_fuzz.py(sibling of #6017 / #5877, claimed in #5934).Changes
tools/lds_fuzz.py: useencoding="utf-8-sig"when readingspirv/index.jsonintranslate().tools/valu_fuzz.py: useencoding="utf-8-sig"when readingspirv/index.jsonintranslate().tests/test_lds_fuzz_cli.py: add synthetic UTF-8 BOMindex.jsonunit test (test_translate_reads_index_with_utf8_bom).tests/test_valu_fuzz.py: add synthetic UTF-8 BOMindex.jsonunit test (test_translate_reads_index_with_utf8_bom).Testing
Tested on Windows CPU with Blender Python 3.11 (
-I):python -I -m compileall -q tools/lds_fuzz.py tools/valu_fuzz.py tests/test_valu_fuzz.py tests/test_lds_fuzz_cli.py(exit 0)python -I tests/test_lds_fuzz_cli.py -v(9/9 passed)python -I tests/test_lds_fuzz.py -v(36/36 passed)python -I tests/test_ci_registration.py -v(14/14 passed)python -I scripts/check_no_game_data.py(exit 0)test_valu_fuzz.test_translate_reads_index_with_utf8_bomexecuted directly viaunittest.mockshim (passed;pytestnot installed in Blender Python 3.11)AI-assisted; synthetic tests only, no copyrighted game files or GPU used.