CNA-VGAP-060: HeadlessPlatform::InjectEvent, the display-free event seam, has no caller and no test

CNA snapshot 009d40f5  ·  Known Issues › Verification gaps  ·  source links pinned to 009d40f5

✓

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 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.

HeadlessPlatform::InjectEvent is documented as the way to test input, runtime and lifecycle behaviour with no display, yet nothing calls it and no test covers inject-then-PollEvents delivery; the only refill test drives a test-local FakePlatform.

Identifier
CNA-VGAP-060
Category
Verification gap
Subsystem
Platforms
Status
Open
Verified against
CNA 009d40f5 (009d40f5dd085c4e674d3479675fac84b12b3e0a)
Evidence basis
Source-verified: read at TARGET, not executed
Tests touching this area
Yes: see Current tests
Affected contract
CNA::Platform HeadlessPlatform::InjectEvent (the display-free event-injection seam, plans/plan_platform.md PLAT-115)

Expected behaviour

PLAT-115 is marked done with the acceptance that tests can push PlatformEvents into the queue, which is described as what lets input, runtime and lifecycle behaviour be tested with no display server, and the InjectEvent header comment calls it the mechanism that makes those behaviours testable. A seam with that role should have at least one test that injects events into a HeadlessPlatform and reads them back through PollEvents, in order, then finds the queue empty.

Actual behaviour at TARGET

At 009d40f5 InjectEvent appears only in its declaration in the private header HeadlessPlatform.hpp, its one-line definition in HeadlessPlatform.cpp and the PLAT-115 plan row. PlatformConformance runs against Headless but only checks that PollEvents clears a stale batch, is safe on an empty queue and keeps capacity. IPlatformTests checks clear-and-refill on FakePlatform, a test-local class that reimplements the queue, so a regression in HeadlessPlatform's own queue would go unseen. Input tests call PlatformInputBridge::ProcessEvent directly. InjectEvent is not on IPlatform, so code outside the platform module cannot reach it through a public header. The CnaPlatformTests filter names a HeadlessPlatform* token that no suite matches, and no test suite named for the class has ever existed.

Source locations

Evidence

Read the files named and searched modules, tools, tests, cmake and docs at 009d40f5 for InjectEvent and for HeadlessPlatform test suites; searched history up to the target for a TEST(HeadlessPlatform...) suite and found none. Nothing was built or executed.

Focused reproduction

No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.

Current tests

PlatformConformance runs against the headless platform but checks only that PollEvents clears a stale batch, tolerates an empty queue and keeps capacity; IPlatformTests drives a test-local FakePlatform. No test injects an event into HeadlessPlatform.

Regression test

Inject two PlatformEvent values into a HeadlessPlatform, read them back through PollEvents in order, and expect the queue to be empty on the next poll.

Blast radius

Maintainers who rely on the seam to test input, runtime and lifecycle behaviour without a display server: it is marked done but nothing exercises it, so a regression in the headless queue would go unseen.

Workaround

None needed for users; maintainers can call PlatformInputBridge::ProcessEvent directly, as the input tests do.

The same subject is explained at several altitudes. These are the neighbouring pages at each one.