test: pin the hex redaction outside operand positions in a refusal reason #1986
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1993"
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 R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T22:44:08Z.
What
normalize_refusalintools/startup/gfx2hlsl.pyredacts a bare0x…literal with the generic rule at line 2130:The operand-position rule that follows (2132–2133) only covers labelled positions such as
offset 0x10ordmask:0xf, so a literalin free text is covered only by the generic line. The check added by #1978 never feeds such a reason, so removing that line leaves
the suite green:
Change
Two rows in the existing table in
check_normalization(), one for a literal in prose and one for a NaN pattern:tests/startup_gfx2hlsl_refusals_check.pyonly. No production change, no new file, no CMake change.Why it matters
Two properties of a census key are at stake, and both are stated in that function's own comment:
0x7fc00000is exactly that;exists to reduce.
Tested
Fail-first, with the redaction line removed and restored:
and with the line back,
exit 0.Notes
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T22:51:22Z.
Review: COMMENTED
Review of head
46303c0a114be4fa6de3598fc923eea5b71c7062.Change: adds two normalization cases to
tests/startup_gfx2hlsl_refusals_check.py(bare hex literal outside an operand position, redacted toN). Test-only, one file, no CMake change, no new dependency. Clean-room: only synthetic strings.Commands executed locally:
git merge-tree --write-tree --name-only origin/main HEAD: clean, no conflictspython3 tests/startup_gfx2hlsl_refusals_check.py: PASS (both new cases ok)python3 tests/docs_links_check.py: PASS (18 files, 388 links)python3 tests/bidi_controls_check.py: PASS (1382 files)git diff --check origin/main...HEAD: clean--preset devctest^startup_gfx2hlsl_refusals$1/1 passed; Release/O21/1 passedMutation check (in
tools/startup/gfx2hlsl.py, reverted afterwards):normalize_refusal(0x[0-9a-f]+->0xZ[0-9a-f]+): KILLED. Both new cases report MISMATCH.(?<!\w)lookbehind: survives. Not covered by this PR's cases; not a blocker.P1: 0. P2: 0.
AI-assisted; commands listed were executed locally.