fix(ci): preserve CUDA guard polarity in DSR ratchet - #20
Open
localai-org-maint-bot wants to merge 1 commit into
Open
fix(ci): preserve CUDA guard polarity in DSR ratchet#20localai-org-maint-bot wants to merge 1 commit into
localai-org-maint-bot wants to merge 1 commit into
Conversation
Classify negative and compound CUDA-family preprocessor conditions by whether their arm is reachable in a portable build. Add RED-first mutations for direct, compound, and disjunctive guards without changing the binding DSR baseline. FOLLOWING_AGENTS_PROTOCOL Assisted-by: Codex:gpt-5 [Codex]
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.
Outcome
Fixes a fail-open branch-polarity defect in the CPU-only device-specific-reference (DSR) ratchet under
ROAD-V1-A6/BACKEND-SEAM-AUDITS1.The checker previously stored only whether a preprocessor condition mentioned a CUDA-family macro. As a result,
#ifndef VLLM_CPP_CUDAand#if !defined(VLLM_CPP_CUDA)incorrectly exempted CUDA includes in portable code, while their CUDA#elsearms were classified in reverse.Design selected
I considered three approaches:
#ifndef, which leaves equivalent!definedexpressions broken;This PR implements option 3. CUDA-family predicates are evaluated under the portable-build assumption that all such macros are undefined. A false condition marks the current arm CUDA-only; a true condition marks its
#elseCUDA-only. Unknown disjunctions are counted conservatively. The accepted S1 contract and checkpoint records are updated without changing lifecycle, support, or the DSR baseline.TDD evidence
RED first:
#ifndefand!definedarms were exactly inverteddefined(CUDA) && !defined(VT_OPTION)!defined(CUDA) || defined(VT_OPTION)armGREEN:
Verification
python3 -m unittest discover -s tests/scripts -p 'test_*.py'(103 tests)python3 scripts/check-device-leakage.py(DSR 32 equals baseline 32)python3 scripts/check-agent-record.py(ENGINE=131, MODEL=327, QUANT=82, KERNEL=45, BACKEND=68)python3 scripts/check-doc-checkpoint.py --commit HEADgit diff-tree --check HEADNo runtime C/C++, baseline count, workflow, lifecycle, support claim, README, GPU, model, download, or performance behavior changes. Benchmark disposition is
NOT APPLICABLEwithbenchmark_binding=false.Slack
The required selection notification was attempted through the bundled secret-safe sender. No Slack channel is configured;
#generalreturnedchannel_not_found. No credential was read or exposed.FOLLOWING_AGENTS_PROTOCOL