Repository navigation
Conversation
sds-228
approved these changes
Nov 23, 2026
sds-228
left a comment
Contributor
There was a problem hiding this comment.
Verified at head 0770ad1: the focused suite is 16 passed; the same test on base source fails four checks. Malformed inputs now raise a harness error instead of being treated as a comparison result. Approving. AI-assisted (OpenCode).
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.
Claim: #9677 (comment)
Summary
Fixes four harness and input-validation gaps in
tools/sad_diff.pywith synthetic regression coverage intests/test_sad_diff.py:HarnessError(run_one):HarnessErrorfromreference()propagate instead of turning it into"skip".(rdna2spirv.Unsupported, UnsupportedConstruct)mapped to"skip", re-raiseHarnessError, and convert any other unexpected exception fromtranslate_listing()(includingKeyError,ValueError,IndexError, andspirv_mini_interp.InvalidModule) intoHarnessErrorsomain()reportsharness error: ...and exits2.%out_mrt0export word count (translate_listing,_first_mismatch,check,run_one):len(words) == len(EXPORT_REGS)(4) intranslate_listing()andlen(got) == len(want)in_first_mismatch(), raisingHarnessErrorinstead of accepting empty/truncated exports asNoneor("match", "")._parse_hex,_DEC,_single_word,_pair_words,_dst_index,step,reference):HarnessErroron malformed hex literals ("0xZZ"), malformed signed decimals ("+-5","--5"), invalids_mov_b32destinations ("sfoo"), and wrong operand counts, and skip whitespace-only lines inreference().--opsCLI parsing (main):2when--opsnames no opcode (e.g.--ops ""or--ops " , "). (--programs/--max-opsvalidation was left untouched.)Negative Controls (unmodified
tools/sad_diff.py)translate_listingraisingKeyError("boom")after one match causedmain()(--no-sweep --programs 2) to exit0;InvalidModule("bad spirv")escapedrun_one()uncaught;run_one(["v_unknown v8, v8, v9, v10"], ...)returned('skip', ...).translate_listingreturning[]causedcheck(["v_mov_b32 v8, 1"])to returnNoneandrun_one(...)to return('match', ''); patchedrun_fragmentreturning{"%out_mrt0": [0]}causedtranslate_listing(...)to return[0]._single_word("0xZZ", {}, {}),_single_word("+-5", {}, {}),_pair_words("--5", {}, {}),step("s_mov_b32 sfoo, 1", {}, {}),step("v_sad_u8 v8, v8, v9", {}, {}), andreference([" "])raised rawValueError/IndexError.--ops ""silently defaulted toops = None;--ops "v_sad_u8,"failed withunknown op(s) [''];--ops "v_sad_u8,v_sad_u8"kept duplicate['v_sad_u8', 'v_sad_u8'].Verification (
0770ad19d)python -I tests/test_sad_diff.py -v—Ran 16 tests in 2.573s,OK(exit 0; includes 4 new tests inHarnessErrorAndParsingTests).python -I tools/sad_diff.py --self-test— exit 0.python -I tools/sad_diff.py --no-sweep --programs 10 --ops "v_sad_u8,v_qsad_pk_u16_u8,"—random: 10/10 programs match, 0 mismatch; skips: {}(2 of 7 ops, exit 0).python -I scripts/check_no_game_data.py— exit 0.git diff --check— exit 0.git merge-tree --write-tree origin/main HEAD— exit 0 (clean merge withorigin/main2d53a8055).Synthetic inputs only; no game files or GPU used.
AI-assisted (Antigravity).