tooling: scan Zig, SPIR-V assembly and assembler sources in the bidi controls check #1527
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1534"
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 RenzoWit35 on 2026-11-24T13:43:42Z.
Change
tests/bidi_controls_check.pyscans tracked source files, scripts and build/CI configuration for explicit bidirectional controls (#254). Its suffix list omits three source kinds that the repository now tracks:main.spvasmtests/spirv_window/address_float.spvasm.zigtests/cpu/archive/reader.zig.stests/compute_mimg_msaa.sThis adds
.zig,.spvasmand.stoSOURCE_SUFFIXES. Nothing else about the scope changes: data tables (.tsv,.json), images, licence files,.txt,.svg,.gitignore, the.patchfile and Markdown stay out of scope, and there is no binary-extension list..sis the one kind beyond the two named in review. The three files are assembler sources that the fixtures assemble withllvm-mc, the same kind as the.asmfiles already listed. It is a one-token removal if it should stay out.self_test()reuses its existing synthetic controls in a.zig, a.spvasmand a.sfile, each of which must be reported, and asserts that a.tsvdata table with a control is not in scope.The first commit on this branch replaced the allowlist with an exclusion list. The second commit takes that back; the net diff against
mainis the suffix line and the self-test cases (+10/-2 in one file).Verification
Windows 11, Python 3.14.5.
python -B tests/bidi_controls_check.pyon this branch:Self-test passed.thenChecked 1258 tracked source, script and build/CI files: no bidirectional controls.(exit 0).origin/mainbe484d0f: scope goes from 1255 to 1274 files (13.spvasm, 3.zig, 3.sadded, none removed), and no control is found in them.mainand the new self-test,--self-testfails with anAssertionError; the three new findings are missing from the list.python -B tests/docs_links_check.py:Checked 16 Markdown files and 340 links.(exit 0).Not run: the other pure-Python checks, the C++ build and ctest (only this script changes; it is already in the
python-linuxjob and inAGENTS.md).Evidence and follow-up
The synthetic files are written by the self-test into a temporary directory. No issue is linked beyond the scope decision in #254.
AI-assisted.
[PR #1534] tooling: scan every tracked text file in the bidi controls checkto [PR #1534] tooling: scan Zig, SPIR-V assembly and assembler sources in the bidi controls checkImported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T14:26:01Z.
Review: CHANGES_REQUESTED
Please keep the #254 boundary for explicit bidi controls in source, scripts and build/CI configuration. Zig and SPIR-V assembly belong in that set and the existing synthetic controls can cover them. Scanning data tables and every future binary extension would also make unrelated tracked inputs fail, which the prior scope decision excluded. Please limit this PR to omitted source and configuration kinds.
Imported from R0Y00/Xbox2Windows. Originally posted by RenzoWit35 on 2026-11-24T14:41:01Z.
Thanks, that makes sense. I went too far with the exclusion list.
The branch now keeps the #254 allowlist and only adds
.zig,.spvasmand.s. The.sone is my own addition: three assembler fixtures, the same kind as the.asmfiles already listed. Happy to drop it if you'd rather keep this to the two you named.I also updated the title and description so they match what the PR does now.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T15:50:19Z.
Review: COMMENTED
Technical review (Linux only; no Windows run needed for this change, but none was done).
Checked out the PR head (
6027e253, "keep the bidi check to source kinds and add Zig, SPIR-V and .s") in a clean tree. This head already follows the earlier scope request: the data-table scan is gone and only.s,.spvasmand.zigare added toSOURCE_SUFFIXES.What I ran:
tests/bidi_controls_check.py: self-test passes, and the real run reports "Checked 1258 tracked source, script and build/CI files: no bidirectional controls.".py(471),.cpp(226),.def(205),.asm(192),.h,.hlsl,.spvasm(13),.s(3),.zig(3) and the other source/script/config kinds. Still out of scope:.md,.tsv,.svg,.png,.patch(1), two.jsonfiles, two.txtfiles and the licence files. I scanned those that decode as UTF-8 for the ten controls and found none, so today's tree is clean either way..tsvthat must stay out of scope, and the exact finding list (path, line, code point and name) is asserted.Local mutation check on
tests/bidi_controls_check.py(each reverted afterwards; tree clean):.zig, drop.s, drop.spvasmfromSOURCE_SUFFIXES: each caught by the self-test assertion..tsvin scope: caught..lower()): not caught. No control uses an upper-case suffix such as.Sor.PY, so the case-insensitive match is unpinned. Today no tracked file needs it.Suggestion (non-blocking): add one control file with an upper-case suffix (for example
tests/KERNEL.S) to the synthetic set, so the.lower()behaviour stays covered.Observation (no change requested):
.patchis the one tracked kind that carries code and is not scanned. That matches the scope decision in the earlier review, so I only note it.No defects found.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T16:44:55Z.
Review: COMMENTED
Supplementary verification of head
6027e2534d32039b3e650e840a7e21604af5d5f6(adds the Windows Server 2025 run and more mutations to the earlier Linux review).Linux:
git diff --check origin/main...HEAD: clean.python3 tests/docs_links_check.py: Checked 16 Markdown files and 340 links.python3 tests/bidi_controls_check.py: self-test passes; Checked 1258 tracked source, script and build/CI files: no bidirectional controls.Windows Server 2025 (Build 26100, MSVC 14.44.35207) via
x2w_pipe.py win2025 1534:tests/bidi_controls_check.pyself-test passed, 1258 files, no controls, exit 0 (1.0s). The change touches only this Python check and has no downstream C++ target, so there is no Debug or Release/O2build or ctest to run (0 of 0 downstream tests).Local mutation checks on
tests/bidi_controls_check.py, each reverted withgit checkout -- .(tree clean afterwards):.zigfromSOURCE_SUFFIXES: self-test fails (AssertionError,reader.zigfinding missing)..s: fails (kernel.sfinding missing)..spvasm: fails (case.spvasmfinding missing)..tsvto scope: fails (the out-of-scopetable.tsvassertion).tests/kernel.sentry from the expected finding list: fails.The diff only adds suffixes and synthetic cases; no existing assertion is weakened, and the test writes only inside its temp directory. The earlier note about the unpinned
.lower()remains non-blocking and pre-existing.0 P1, 0 P2.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T14:46:11Z.
Review: APPROVED
Rechecked this head. The tracked-source filter now adds Zig and the two assembler source forms while keeping data tables out of scope. The synthetic controls and the Windows scan of 1,258 tracked entries both passed. This clears the earlier scope finding.