shaders: reject and retry truncated disassembly listings and name failing shaders (SHADERS-DISASM-TRUNCATED-CHECK) #2553
Closed
kirigayakazima wants to merge 4 commits from
upstream-pr/2553 into main
pull from: upstream-pr/2553
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
ProjectLeonida/mandy!2553
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2553"
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 ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-11-28T02:03:58Z.
SHADERS-DISASM-TRUNCATED-CHECK. Claim. Fixes #2539.
In #2539, an
llvm-mcrun left a.sdisassembly listing truncated mid-line befores_endpgm, yettools/shader_disasm.pystill published it,--skip-existingandmake_game.py(disassembly_listings) accepted any non-empty file, andtools/rdna2spirv.pyonly printed failure counts without naming which shaders hitbranch without encodingor other refusal reasons.This removes the root causes rather than adding a manual workaround:
tools/shader_stage_manifest.py: add sharedlisting_is_complete()and fast tail-checkinglisting_file_is_complete()(requiring trailing newline, a complete non-comment endings_endpgm, and a closed; encoding: [...]when encoding comments are present, while ignoring optional trailing; --- llvm-mc messages ---footers).tools/shader_disasm.py: retry truncatedllvm-mcdisassemblies (up to 3 total attempts) before refusing to publish partial.sfiles (FAILEDguarded byFAILED_LOCK), and reject incomplete existing.slistings under--skip-existing.make_game.py: havedisassembly_listings()validate completeness vialisting_file_is_complete()so truncated listings invalidate reuse and get repaired automatically on--skip-existing.tools/rdna2spirv.py: record up to 5 failing shader stems per failure/refusal reason (Unsupported, translator errors,INVALID:) and print them alongside counts in the shard/run summary.tests/: add 6 targeted regression tests acrosstest_shader_disasm.py,test_shader_stage_resume.py, andtest_rdna2spirv_cli.py, and update the 7 test suites whose placeholder.sfixtures wrote plain text instead of a valids_endpgmlisting.Verification on Windows 11 (RTX 4070 Laptop host; stdlib/synthetic tests only, no game files or GPU execution tested):
python -I tests/test_shader_disasm.py: 35 tests OKpython -I tests/test_shader_stage_resume.py: 48 tests OKpython -I tests/test_rdna2spirv_cli.py: 37 tests OK (1 skipped without SPIRV-Tools)python -I tests/test_make_game_dry_run.py: 24 tests OKpython -I tests/test_make_game_empty_translation.py: 14 tests OKpython -I tests/test_make_game_resume.py: 14 tests OKpython -I tests/test_make_game_translator_flags.py: 34 tests OKpython -I tests/test_text_write_line_endings.py: 3 tests OKpython -I tests/test_make_game_preflight.py: 108/109 passed (test_preflight_charges_space_only_when_shaders_need_to_be_rebuiltpassed; only pre-existing repo-rename failuretest_ensure_submodule_names_the_clone_command_the_readme_givesfailed on1a441d336)python -m compileall -q,python -I make_game.py --help, andpython -I scripts/check_no_game_data.pyover all 12 modified files passed.AI-assisted: Antigravity (Gemini).
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T03:13:34Z.
#2553 | head
aee75f002e(merged cleanly with main02f71ccfe) |python -I tests/test_rdna2spirv_cli.py && python -I tests/test_shader_disasm.py && python -I tests/test_shader_stage_resume.py| red on main: rdna2spirv_cli FAILED (failures=1, skipped=2) in 37 tests; shader_disasm FAILED (failures=3, errors=1 importing newlisting_is_complete) in 35 tests; shader_stage_resume FAILED (failures=1) in 48 tests | green on PR+main: rdna2spirv_cli 37 tests OK (skipped=2); shader_disasm 35 tests OK; shader_stage_resume 48 tests OK | Windows 11, Python 3.12.10 | AI-assisted: yesDiff reviewed across all 12 touched files (
FAILED_LOCKguards concurrent failure recording, tail check handles trailing; --- llvm-mc messages ---footers, and--skip-existingrepairs truncated.sfiles). Also verified on mergedPR+main:test_make_game_dry_run.py(24/24 OK),test_make_game_empty_translation.py(14/14 OK),test_make_game_resume.py(14/14 OK),test_make_game_translator_flags.py(34/34 OK),test_make_game_preflight.py(same single pre-existing clone-URL failure as plainmain, 108/109 pass, skipped=2),test_runner_calls_all_tests.py(3/3 OK),test_text_write_line_endings.py(3/3 OK),compileall,git diff --check, andscripts/check_no_game_data.py(clean).Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-28T09:20:42Z.
Review: APPROVED
Reviewed the diff and tested merged onto
main(493867366).The shared
listing_is_complete/listing_file_is_completetail check,TRUNCATED_RETRY_ATTEMPTSretry loop withFAILED_LOCK,--skip-existingrepair path, and per-reason failing-shader stem summaries intools/rdna2spirv.pycleanly address #2539.Tests run
python -m unittestacrosstest_shader_disasm.py,test_shader_stage_resume.py,test_rdna2spirv_cli.py,test_make_game_dry_run.py,test_make_game_empty_translation.py,test_make_game_resume.py, andtest_make_game_translator_flags.py: 205 passed (1 skipped, 0 failures).AI-assisted (Antigravity, Gemini).
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-28T23:37:57Z.
Re-checked on
mainc8bf0e7b6(headaee75f002unchanged): Python 3.12.4, Windows 11 10.0.26300, CPU only.check_no_game_data.pyis clean. I ran only the tests, not the shader stage.test_shader_disasm.py(38),test_rdna2spirv_cli.py(37),test_shader_stage_resume.py(48),test_make_game_dry_run.py,test_make_game_empty_translation.py,test_make_game_resume.pyandtest_make_game_translator_flags.py.test_make_game_preflight.py: not run here (it starts bash).make_game.py,tools/rdna2spirv.py,tools/shader_disasm.pyandtools/shader_stage_manifest.pyback tomain, the same three files fail as before:test_rdna2spirv_cli.py:branch without encoding (ps_branch_no_enc)is not reported.test_shader_disasm.py: 3 failures and 1 error ('reused': 1).test_shader_stage_resume.py:test_finished_disassembly_repairs_a_truncated_listingfails.main, the 7 files pass. The PR adds 6 tests (34 to 38, 36 to 37, 47 to 48).No blocker from my side. AI-assisted (Claude Code).
Tested
aee75f002merged (no commit) withmainaa918e5d9: Python 3.12.4, Windows 11 10.0.26300, CPU only.check_no_game_data.pyis clean.I ran only the tests, not the shader stage.
test_make_game_preflight.py. Its one failure,test_ensure_submodule_names_the_clone_command_the_readme_gives, fails the same way on plainmain, so it is unrelated.make_game.py,tools/rdna2spirv.py,tools/shader_disasm.pyandtools/shader_stage_manifest.pyback tomain, three files fail:test_rdna2spirv_cli.py:branch without encoding (ps_branch_no_enc)is not reported.test_shader_disasm.py: 3 failures and 1 error ('reused': 1).test_shader_stage_resume.py: 1 failure.No blocker from my side.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-29T01:06:12Z.
Review: COMMENTED
Static audit of
aee75f002against48bae6cad, with line numbers on the patched base. Request changes.tools/shader_stage_manifest.py:33accepts a truncated prefix ending at an earliers_endpgmin a multi-program range. The prefix is published and reusable. Verify coverage of the selected byte range.tools/shader_disasm.py:345rejects a complete Python decode when a trailing literal consumes the marker bytes. Validate completeness independently of program-end detection.make_game.py:1236hides unexpected truncated listings from the resume inventory, while translation still scans them. Check observed stems before choosing which expected files to repair.tools/shader_disasm.py:338skips retry for LLVM truncation inauto. In default mode an empty response also stops an incomplete sequence before its final attempt. Apply the same bounded policy to LLVM in both modes.tools/shader_disasm.py:357can abort a repair on a transient Windows sharing violation. Reusereplace_retryand keep the original error if temp cleanup also fails.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-29T02:48:51Z.
Retested
aee75f002ef33fc9daeb526348da19e1e128b3acmerged withmainc8bf0e7b65on Windows 10/CPython 3.12.1. The 38 stock disassembler tests passed. Two new synthetic probes confirm the later review findings:one()a hand-built 16-byte range containing twonop; endpgmprograms and stubbed the decoder to return only the first 8 bytes' listing. The result wasclean, it was published on the first attempt, andlisting_file_is_complete()accepted it for reuse.The first probe checks coverage of the selected byte range. The second checks the retry policy with a transient failure. They use no game files.
AI-assisted. Codex (GPT-6).
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T17:22:59Z.
Verification of this one on current
main, since it is 1780 commits behind and nobody has said whether it still applies.I cherry-picked its single commit onto
origin/main4364a4fa6:So the change applies to today's tree and the tests written for it hold, including
make_game.pyandtools/rdna2spirv.py, whichmainhas moved on since thebranch was cut. It still wants a rebase before merging - 1780 commits is a lot of drift in the diff a reviewer would see - but the content itself is not stale.
Not verified: any behaviour that needs the game. Everything above is the standard-library side, which is what these eight files cover.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-11-30T16:28:09Z.
Independent check on Windows (not the author), at
aee75f002.Green:
tests/test_shader_disasm.py: 35 passedtests/test_make_game_resume.py: 14 passedtests/test_shader_stage_resume.py: 48 passedtests/test_make_game_empty_translation.py: 14 passedOne failure, and it is a stale base, not this PR's logic:
tests/test_make_game_preflight.py: 109 passed, 1 failed — the test still expectsgit clone --recursive https://github.com/ubiquitarianism/leonida, while the branch's README (and currentmain) sayhttps://github.com/ProjectLeonida/mandy.mainb17b22d33has the updated expectation and passes 110 tests, OK.So merging/rebase on current
mainshould clear it; the branch is based onf9f3ec4c6, where the expectation had not yet been renamed.Environment: Windows 11 Pro 10.0.26200.9711, Python 3.12.10.
AI-assisted: yes (opencode).
Imported from ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-12-01T11:26:16Z.
Merged
upstream/main(3ee508b46) atefe1a42ea(no rebase, no force-push) and addressed all five review findings at594469b99:tools/shader_stage_manifest.py,tools/shader_disasm.py):listing_is_completenow parses; code 0x..<end>, ..., N invalid words(or uses explicitexpected_bytesandinvalid_words) and verifiessum(encoded_instruction_bytes) + invalid_words * 4 == expected_bytesacross all instructions in the code section. A truncated prefix ending on an earliers_endpgmin a multi-program range is rejected during bothone()andlisting_file_is_complete().s_endpgm(tools/shader_stage_manifest.py): Because completeness now validates full byte coverage independently of a trailings_endpgmmnemonic line when the byte range is known, a complete Python-backend decode whose final instruction consumes0xbf810000as a literal is accepted and reused..sfiles during resume (make_game.py): Added_disassembly_inventory(dxbc)returning(observed, complete)stems.disassembly_statusnow validatesobserved <= activeandobserved <= expected <= activebefore reusing or preserving files, andshaders()verifiesobserved == listingsaftershader_disasm.py, so unexpected truncated.sfiles cannot be hidden whiletranslate()still scans the folder.llvm-mcandautomodes (tools/shader_disasm.py):one()now runs the same boundedTRUNCATED_RETRY_ATTEMPTSloop for bothllvm-mcandautowhen the initial response is non-empty, and keeps retrying through intermediate empty responses up to the final attempt.tools/shader_disasm.py): Publication now usesreplace_retry(tools/replace_retry.py), and temp.tmpcleanup usesreplacedtracking with atry/except OSError: passunlink so transient Windows sharing violations retry and cleanup errors cannot mask the original exception.Thanks @timbot103 for the thorough static audit, @lixonik for both synthetic probes (both cases now have dedicated regression tests in
tests/test_shader_disasm.py), and @fiestorra / @KelboLive for checking againstmain(mergingmainalso resolves the stale clone-URL test intests/test_make_game_preflight.py).Verification (Windows 11, Python 3.12, no game data)
python -I tests/test_shader_disasm.py: 44 tests OKpython -I tests/test_shader_stage_resume.py: 49 tests OK (includingTranslationSourcesTest)python -I tests/test_rdna2spirv_cli.py: 37 tests OK (skipped=1)python -I tests/test_make_game_dry_run.py: 25 tests OKpython -I tests/test_make_game_empty_translation.py: 20 tests OK (skipped=1)python -I tests/test_make_game_resume.py: 14 tests OKpython -I tests/test_make_game_translator_flags.py: 42 tests OKpython -I tests/test_make_game_preflight.py: 110 tests OK (skipped=1)python -I tests/test_text_write_line_endings.py: 3 tests OKpython -I scripts/check_no_game_data.py&git diff --check upstream/main...HEAD: clean (exit 0)AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:33:23Z.
Review: CHANGES_REQUESTED
Reviewed against current
main: the sharedshader_stage_manifest.listing_file_is_completedesign and retry logic look cleaner than duplicating checks, but this branch currently has merge conflicts againstmain, failing CI, and competes with#2646for the same#2539truncated-disassembly and named-refusal issue. Please rebase ontomainso CI runs cleanly and a maintainer can select between#2553and#2646.(AI-assisted review.)
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:52:04Z.
Review: CHANGES_REQUESTED
Keeping #2553 over closed duplicate #2646 for
#2539(SHADERS-DISASM-TRUNCATED-CHECK).Your latest update (
594469b99) cleanly addresses all five findings from@timbot103and@lixonik(full byte-range coverage, trailing-literals_endpgm, observed vs. complete_disassembly_inventory, consistent bounded retries inllvm-mcandautomodes, andreplace_retry) while keeping completeness validation centralized intools/shader_stage_manifest.pywithout special-casing test strings in production code.Holding from merge for now because
CI/linux-python-and-vieweris currently red on594469b99(andCI/check/Runtime/windowsare still pending). Please check that failure and ping once all required CI checks are green!(AI-assisted review.)
Imported from ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-12-01T12:44:13Z.
Updated the
fake_mc.pytest stubs intests/test_bvh_shaders_stage.pyandtests/test_exe_shaders_stage.py(494a4384f7) to echo encoded instruction bytes (; encoding: [...]) per input dword instead of bare\ts_endpgm, soshader_disasm.py's byte-range coverage check accepts them cleanly.Verified locally (Windows 11, Python 3.14, no game data):
python -m unittest tests.test_bvh_shaders_stage: 13 OKpython -m unittest tests.test_exe_shaders_stage: 11 OKpython -m unittest tests.test_fspx_shaders_stage: 24 OKpython -m unittest tests.test_library_shaders_stage: 17 OK (1 skipped)python -m unittest tests.test_shader_disasm: 44 OKpython -m unittest tests.test_text_write_line_endings: 3 OKpython -I scripts/check_no_game_data.pyandgit diff --check: cleanAI-assisted: yes
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T12:57:20Z.
Real LLVM resume check for a truncated two-stage listing at
494a4384f+c95183fd8, using LLVM 23.1.5 on Linux. I preseeded a synthetic listing whose header declared 16 bytes but contained only the first two encoded instructions. With--backend llvm-mc --skip-existing, main reportedreusedand left two instructions. The PR reportedcleanand rewrote all four. I also ran ten affected Python suites against that tree. 364 tests passed and two skipped.AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T15:21:16Z.
I tested a local resolution of the publication-path conflict between
494a4384and main88a9f133e. The conflict is in tools/shader_disasm.py, after the temporary listing has been written. The local merge keeps main’s destination mode calculation and writable-temp cleanup, and retains the PR’s replace_retry. Best-effort cleanup preserves the original replacement exception if the temporary file cannot be removed.Ten affected suites passed with this resolution: 263 tests and 153 subtests passed, with one skip. This includes the existing mode-restoration-on-failure and transient replacement retry checks, along with truncated-listing repair and the affected stage suites. The merge resolution here is a local test, and the published branch still has the conflict. MEASURED on Linux using synthetic fixtures. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T17:26:13Z.
Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (
d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools,d3d12/, or general docs), please feel free to reopen it.Pull request closed