Repository navigation
tests: match complete CLI flags in documentation checks - #8089
Open
Vasanthdev2004 wants to merge 1 commit into
Open
Vasanthdev2004 wants to merge 1 commit into
Vasanthdev2004 wants to merge 1 commit into
Conversation
|
Checked independently on Linux (CachyOS 7.3.5, CPython 3.14.9), head
AI-assisted. |
devnull34
reviewed
Nov 23, 2026
devnull34
left a comment
There was a problem hiding this comment.
Verified via Tier 2 Free Cloud (Groq gpt-oss-120b) & local test execution:
- Exact token matching via set(FLAG.findall(code)) is strictly superior to raw substring search (e.g. flag not in code), as substring matching falsely accepted prefixes like --job when only --jobs existed. The new unit test test_flags_must_match_complete_tokens passes and validates this boundary.
- Note on CI failure: Running test_docs_name_existing_flags fails with 7 unrecognized flags in docs/embedded_shaders.md (--ssa-rewrite, --eliminate-dead-code-aggressive, --cfg-cleanup, etc.). These third-party spirv-opt passes were previously masked by substring or missing from FOREIGN. Rebasing onto main (or merging with #8057 which adds these passes to FOREIGN) resolves this failure cleanly.
|
Windows check at AI-assisted verification. |
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.
Claimed in the coordination issue.
What and why
The general documentation check and the per-tool check searched source text for a flag substring. A documented
--jobpassed when the tool mentioned--jobsand--job-status, even though--jobwas ambiguous. Extract complete flag tokens from source with the same tokenizer used for the docs, then compare those tokens in both checks.The synthetic regression accepts both complete names and reports the shortened name in each check.
Tested
spirv-optflags on the parent and this branch. PR #7879 tracks that separate baseline issue. All five tests passed when those seven flags were allowed in memory for verification.git diff --checkand the changed-file no-game-data check passed.CPU-only tests. No game files, GPU, or driver were used. AI-assisted (Codex).