Repository navigation
test: pin the hex redaction outside operand positions in a refusal reason - #1993
Merged
Merged
Conversation
…ason normalize_refusal redacts a bare 0x literal with the generic rule at line 2130; the operand rule that follows only covers positions such as offset 0x10. Removing the generic rule left the suite green, so the case it exists for was unpinned.
tedin7
reviewed
Nov 24, 2026
tedin7
left a comment
Collaborator
There was a problem hiding this comment.
Review of head 46303c0a114be4fa6de3598fc923eea5b71c7062.
Change: adds two normalization cases to tests/startup_gfx2hlsl_refusals_check.py (bare hex literal outside an operand position, redacted to N). 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- Win2025 (Build 26100, MSVC 14.44, WARP), full build: Debug
--preset devctest^startup_gfx2hlsl_refusals$1/1 passed; Release/O21/1 passed - CI: Windows, Linux Python checks, gfx1013 fixtures all pass
Mutation check (in tools/startup/gfx2hlsl.py, reverted afterwards):
- Disabling the bare-hex rule in
normalize_refusal(0x[0-9a-f]+->0xZ[0-9a-f]+): KILLED. Both new cases report MISMATCH. - Dropping the
(?<!\w)lookbehind: survives. Not covered by this PR's cases; not a blocker.
P1: 0. P2: 0.
AI-assisted; commands listed were executed locally.
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.
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