Repository navigation
ci(audit): add anti-mock Vulkan probe guard and streamline CI - #20
Merged
Merged
Conversation
- Expand SPDX Apache-2.0 header checks in scripts/clean-room-audit.sh to cover C++ extensions (.cc, .cpp, .hpp). - Require C/C++ implementation files (.c, .cc, .cpp) under canary/ or probes/ (excluding *_test.*, test_*.*, and files inside tests/) to call or reference at least one real Vulkan API symbol (vkCreateInstance, vkQueueSubmit, vkCreateComputePipelines, or vkCreateDevice), stripping comments first so CPU-only synthetic mocks fail locally and in CI. - Add unit tests in tests/test_clean_room_audit.py for fake CPU-only canaries/probes, real Vulkan canaries, allowed unit-test/header files, and C++ SPDX enforcement. - Streamline .github/workflows/ci.yml with PR concurrency cancellation, workflow_dispatch, minimal read permissions, a combined audit-and-offline-tests job, and fail-safe changed-path gating for build-sweeper-and-spirv.
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.
Summary
Deterministic anti-mock Vulkan probe/canary guard (
scripts/clean-room-audit.sh).cc,.cpp, and.hpptospdx_required_extsso C++ sources and headers requireSPDX-License-Identifier: Apache-2.0.[ANTI-MOCK]guard for C/C++ implementation files (.c,.cc,.cpp) undercanary/orprobes/(excluding explicit unit-test files matching*_test.*,test_*.*, or nested insidetests/).vkCreateInstance,vkQueueSubmit,vkCreateComputePipelines, orvkCreateDevice), preventing CPU-only synthetic mocks from passing as GPU probes or canaries.tests/test_clean_room_audit.pyverifying fake CPU-only canaries/probes fail with[ANTI-MOCK], real Vulkan canaries pass, explicit unit tests/headers are allowed, and.cc/.cpp/.hppfiles require SPDX headers.Slimmer, fail-safe CI workflow (
.github/workflows/ci.yml)concurrencycancelling supersededpull_requestruns while never cancellingmainpushes, plusworkflow_dispatchand explicitpermissions: contents: read.clean-room-auditandoffline-testsinto a singleaudit-and-offline-testsjob to avoid duplicate runner boot and checkout.build-sweeper-and-spirvon changed paths forpull_requestevents via a fail-safe step (id: paths, all GitHub context passed throughenv:with zero${{ }}shell interpolation):run_vulkan=true) onpushtomain,workflow_dispatch, or anypull_requesttouchingprobes/,canary/,tools/freeusc/,.github/workflows/ci.yml, orscripts/clean-room-audit.sh, and fails safe totruewhenever diff resolution is unavailable or uncertain.apt-geton docs-only orfreepvr-twin-only pull requests.Verification
./scripts/clean-room-audit.sh->[audit] PASS: 0 violations across 74 files.python3 -m unittest discover -s tests -v->Ran 50 tests ... OK(including all 5 new tests intests/test_clean_room_audit.py)python3 -m unittest discover -s freepvr-twin/tests -v->Ran 45 tests ... OK.github/workflows/ci.yml(volcanic_bitdiff.py,rgx_sh_parser.py,gen_spirv_probes.py,freecs_packet_validator.py,freecs-validate,freeusc-sim --self-test,freeusc-sim --mesa-proof) ->PASSyaml.safe_loadvalidation of.github/workflows/ci.yml+ zero${{ }}interpolation check across allrun:steps + 15 path-gate simulations (push,workflow_dispatch, missing/invalid/empty SHA fail-safes, docs-only,freepvr-twin-only, all 5 trigger paths, and--no-renamesmove out ofprobes/) ->PASSgit diff --check-> clean