runtime: return documented GameInput v0 temporal refusal #2269
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!2269
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2269/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@chadhyatt on GitHub · 2026-11-25 09:00 UTC · original
chadhyatt:backport/gameinput-temporal-refusal→main· +38 −0 · 3 files · 1 commits · merged 2026-11-25 09:18 UTCAI-assisted backport patch from x2w-microlift.
The published v0 GameInput.h places GetTemporalReading in slot 7 with timestamp, device, and reading arguments. Microsoft documents it as never implemented (
E_NOTIMPL); bind the typed refusal instead of the generic unknown-slot result. Retain the existing output-pointer checks and add an authored contract case.Verification at
7f2da71822: Clang 23.1.6, Windows x86_64 GNU target and MinGW headers, compiledsrc/startup_stubs/gameinput.cppto an AMD64 COFF object. The local full build is blocked by existing MSVC-specific casts inruntime_proxy.cppand the GameInput fixture vtable wrappers; no workaround applied and no native runtime pass claimed at this exact head. The same refusal and ABI were independently checked on native Windows with SDK 10.0.26100.0 and an equivalent source-built fixture on another revision. Pending exact public branch reproduction:ctest --preset dev --no-tests=error -R "^startup_gameinput_(contracts_check|history)$" -V.@R0Y00 on GitHub · 2026-11-25 09:05 UTC · original
Independent Windows Release
startup_gameinput_contracts_checkpassed at7f2da718. The Windows SDK 10.0.26100.0um/GameInput.hconfirms the slot 7 parameters are timestamp, device, and reading output. The Learn page supports theE_NOTIMPLresult, but its prototype lists extra parameters. Use the shipped header for the ABI and the page for the status. The local fixture also verified null output and unwritable output refusals.@chadhyatt on GitHub · 2026-11-25 09:09 UTC · original
Thanks for the exact-head Windows verification and SDK confirmation. Agreed: the shipped v0 header defines the three-argument ABI, and the Learn page establishes E_NOTIMPL. The contract and output-pointer refusal checks are now verified on Windows.
@tedin7 on GitHub · 2026-11-25 09:13 UTC · original · reviewed
Review at head
7f2da71822876363d0c307706d950fffbe9bb08e(3 files, +38).Verdict: no blocking findings (P1=0, P2=0).
What I checked
src/startup_stubs/gameinput.cpp:724-732: newinput_temporal_reading(Object*, u64 timestamp, Object* device, Reading** out)matches the v0 slot-7 signature (timestamp, device, out). It uses the same output-pointer guard (!out || !writable->E_POINTER) and*out = nullptrpattern asinput_previous_reading, then returnsE_NOTIMPL. Consistent with the documented behavior.gameinput.cpp:830: slot 7 is bound between slot 6 (GetPreviousReading) and slot 8 (RegisterReadingCallback); no overlap with other bindings. Before this change slot 7 fell tounknown_slot<0,7>, which returns 0 (S_OK) without writing*out, so a caller could read an uninitialized pointer. The typed refusal is a real improvement.tests/startup_gameinput_contracts_check.cpp: wrapper usesvtbl[7]with the right argument types. The new cases coverE_NOTIMPLwith a non-null sentinel that must become null, null out ->E_POINTER, and read-only page ->E_POINTER. The read-only case is guarded byif (ro_page).docs/startup-runtime.md: short and accurate; the link resolves under the docs link check./O2and coverage publish skipped).Nits
static LONG callscounter in the new stub is only used bynote; fine, matches siblings.Commands run locally in a worktree at the head above
git diff --stat origin/main...HEAD-> 3 files, 38 insertionsgit diff --check origin/main...HEAD-> cleanpython3 tests/docs_links_check.py-> self-test passed, 18 files, 433 linkspython3 tests/bidi_controls_check.py-> self-test passed, 1562 files, no bidi controlsgh pr checks 2269-> see CI summary aboveNot done: the touched C++ test is Windows-only, so I did not run it locally, and I did not run a mutation (for example removing the slot-7 binding) here. By reading, dropping the binding would restore the old
unknown_slotresult (0) and fail theE_NOTIMPLcheck, so the test should kill it. No Win2025 run was requested for this change.AI-assisted; commands listed were executed locally.