CNA-VGAP-041: The CNA_STRICT_XNA_API purity check calls only the Microsoft::Devices sensor surface and one SamplerStateCollection indexer
Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit c1c316b9; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
cna_strict_xna_api_check calls only Devices/Sensors members and one SamplerStateCollection indexer, and its must-fail twin includes only Accelerometer.hpp, so no automated check covers strict-mode purity or marker completeness of the other XNA surfaces.
- Identifier
CNA-VGAP-041- Category
- Verification gap
- Subsystem
- Testing & evidence
- Status
- Narrowed (partially fixed; describes only what survives)
- Verified against
- CNA
c1c316b9(c1c316b9c7a846ce8002809c151fcd1af14942c9) - Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- Yes: see Current tests
- Affected contract
- CNA_STRICT_XNA_API and the CNAEXT marker (StrictXnaApiSurfaceCheck_Compile_Run, StrictXnaApiSurfaceLeakCheck_MustFailToCompile)
Expected behaviour
The CNAEXT marker exists so that a strict build can prove a program uses only the XNA 4.0 surface. That promise is framework-wide; the evidence for it should be too.
Actual behaviour at TARGET
Harnesses.cmake builds cna_strict_xna_api_check from StrictXnaApiSurfaceCheck.cpp, which includes VibrateController and the Sensors headers (plus three math value types) and calls their members; since BL-16 and BL-18 it also parses ContentManager.hpp, CurveKeyCollection.hpp, GameComponentCollection.hpp, GameWindow.hpp and AnimationPlayer.hpp with deprecation warnings silenced (a check of CNAEXT placement on using lines, not of purity) and compiles, without calling, one use of XNA's SamplerStates[i] = state indexer setter. The must-fail twin StrictXnaApiSurfaceLeakCheck.cpp includes only Accelerometer.hpp. Apart from that indexer, no test compiles graphics, content, input, audio, media or runtime calls under the strict macro, and nothing checks that non-XNA members carry the marker at all (the unmarked Texture and GameWindow members listed in a separate Known Issues entry pass unnoticed).
Source locations
cmake/Harnesses.cmake— cna_strict_xna_api_check and cna_strict_xna_api_leak_check targets and their teststools/devices/StrictXnaApiSurfaceCheck.cpp— the strict translation unit: Devices and Sensors includes onlytools/devices/StrictXnaApiSurfaceLeakCheck.cpp— the must-fail twin: Accelerometer only
Evidence
Checked by reading at c1c316b9; not executed.
Both targets are GCC/Clang-only (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang").
Re-verified at b0e97bb1: 577fb0674 (BL-16) and 2c70eaf0f (BL-18) widened StrictXnaApiSurfaceCheck.cpp as described; the leak twin still includes only Accelerometer.hpp. Not executed.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
StrictXnaApiSurfaceCheck_Compile_Run (must compile and run) and StrictXnaApiSurfaceLeakCheck_MustFailToCompile (WILL_FAIL), Microsoft::Devices calls plus the SamplerStates indexer setter; the twin is Accelerometer only.
Regression test
Per-namespace strict translation units that call a representative XNA-only subset (must compile) and one CNAEXT member each (must fail), or a header scanner that compares public members against the XNA census and requires the marker on the rest.
Blast radius
The credibility of strict-mode purity outside Microsoft::Devices. Runtime behaviour is unaffected.
Workaround
No workaround is known.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- Known issues
- Verification gap index