Tests: a conformance title checks the runtime against the public platform documentation #2057
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2057
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2057"
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?
@0xkn0wh3r3 on GitHub · 2026-11-25 04:14 UTC · original
0xkn0wh3r3:tests/acceptance-suite→main· +3345 −0 · 15 files · 5 commits · openThe problem
VIctory is checked by unit tests inside each crate and by runs of the title. Nothing checks the runtime's platform APIs end to end, the way a title calls them, without a title, game data or the SDK. So a call that answers differently from what the public platform documentation says goes unnoticed until a title trips on it.
The fix
This adds an acceptance layer that needs no title, no game data and no SDK: a conformance title. It is a stand-in Xbox title written from the public platform documentation only, run through VIctory's own loader and runtime (
HleResolver). It calls each platform area as a title does and checks what the documentation says the call does. How to run it and whatKNOWNmeans are in the test's module docs.tests/fixtures/conformance: the title (a cdylib outside the workspace, likehle-probe); reports TAP.crates/victory-hle/tests/conformance.rs: builds it, binds it, mountsG:/T:and storage asvictory rundoes, runs it.No SDK is used: the title links no SDK library and includes no SDK header. Area ids and method slots are VIctory's own, so the binary interface itself is only checked by the title. Behaviour, constants and layouts come from the public pages, cited per test.
Coverage: 152 checks, 147 pass
QueryApiImpl.XAsyncRun, provider op order, cancel, serialized and composite queues, identity mismatch, no process queue.G:/T:through every path import VIctory binds.Five answers differ from the documentation
They are listed in the test (
KNOWN) with why, and reported rather than failed. One of them passing fails the test, so the list stays true.XSystemGetConsoleIdon retail00000000.00000000.00000000.00000000.00XUserFindUserByLocalId, no such userHRESULT_FROM_WIN32(ERROR_NOT_FOUND)E_GAMEUSER_USER_NOT_FOUNDXUserGetGamertag, invalid componentE_INVALIDARGE_NO_TASK_QUEUE-- --ignoredruns a streaming workload (DirectStorage memory sources; file sources and BCPack to come).Testing
cargo test -p victory-hle --test conformance(Windows 11, RTX 5070 Ti): passes, 152 checks, 5 known divergences.cargo clippy -p victory-hle --testsand clippy on the fixture: clean. Asset policy: ok.Related
#505 (a Wine harness for loader-level checks). This one checks runtime API behaviour against the documentation and runs under
cargo test.@Dathinel on GitHub · 2026-11-25 04:17 UTC · original
The harness catches a known divergence turning green, but it also goes green if that check disappears entirely. This can happen with a well-formed report: the fixture computes its TAP plan from the checks it actually emits, so dropping a call lowers the plan too.
I tested the unchanged acceptance function and
KNOWNat637ba6f9, using the PR'sTapwriter and replacing onlycall()with synthetic reports:1..5plan1..6plan but return only the first passing resultCould the acceptance test require every unconditional
KNOWNname to appear exactly once, and check the parsed result count against the TAP plan? The first catches a silently removed check; the second catches a partial transcript. Neither requires pinning the suite to 152 checks.This tests the report consumer in isolation. I have no evidence that the reported title run skipped a check. AI-assisted.
@Dathinel on GitHub · 2026-11-25 04:29 UTC · original
Integration result: all 152 checks pass with the five runtime fixes together. I ran the conformance title on Windows build 26200 with Rust 1.98.1 MSVC against #2057 at
637ba6f9. The baseline emitted 147 passes and the five listed divergences.I also applied each fix individually on that same baseline. Every run emitted the same 152 numbered check names. Exactly one result changed per PR:
34fe67033dd083a32ced77157f53379635fb57d4Stacking #2072 through #2075 produced 151/152, with only the console ID still failing. Adding #1717 produced 152/152. The stacked patches applied cleanly. I retained the fixture assertions throughout and removed only the corresponding entries from the host test's
KNOWNlist. Leaving that list unchanged in the four-fix stack correctly made the host test fail on the newly passing checks.Command:
cargo test --frozen -p victory-hle --test conformance the_conformance_title_runs_through_victory -- --nocapture. This used the synthetic title through the loader and runtime; the streaming benchmark was outside this run. AI-assisted.@0xkn0wh3r3 on GitHub · 2026-11-25 06:22 UTC · original
Thanks @Dathinel, both holes were real, and thanks for the integration run across the five fixes.
d594a73makes the report check strict.acceptnow requires:KNOWNcheck to appear exactly once and still fail, so a check that disappears fails even when the plan was lowered to match;It doesn't pin the total at 152. The new
reports_missing_or_cut_short_checks_are_refusedruns it on made-up reports covering your table and a few more cases: all present, a skipped check, a known check removed with the plan lowered, a report cut short, a known divergence that now passes, an unknown failure, a known check listed twice, and no checks at all. The title's real run still passes.@Marvisak on GitHub · 2026-11-25 09:23 UTC · original · edited 2026-11-26 00:26 UTC
Automated triage for the maintainers.
Needs work: needs the maintainer's decision. The content side is still in order on this head: the PR title no longer names the SDK, and a grep of the diff finds only generic "no SDK" mentions and the public Windows header
fileapi.h. The run notes and the meaning ofKNOWNare short module docs incrates/victory-hle/tests/conformance.rs. The branch merges cleanly into currentmain.Only the maintainer can decide on:
tests/fixtures/conformance/Cargo.tomland its ownCargo.lock. The lock holds onlyminiz_oxide0.9.1 andadler22.0.1, which the workspace already uses.build_fixture, which runsCommand::new(env!("CARGO"))to build the fixture, the same patterncrates/victory-loader/tests/load_probe.rsuses forhle-probe.Coordination still applies: #2072 to #2075 and #1717 each turn one
KNOWNentry into a pass, so whichever lands second must edit the list.On your reply: thanks for the title fix. Nothing more is needed from you until the maintainer decides.
CI: passing (
check).Generated by Claude Code
@0xkn0wh3r3 on GitHub · 2026-11-25 18:37 UTC · original
Thanks, done in c4785e8:
Naming the SDK: it's gone from the code, the fixture's manifest and the description. Everything now cites the public platform documentation. The console error codes used (
E_NO_TASK_QUEUE,E_GS_INVALID_CONTAINER_NAME,E_GS_UPDATE_TOO_BIG,E_GAMEUSER_USER_NOT_FOUND) are all on the public error-codes page with these values. The rest are standard Win32 codes.Short docs:
docs/acceptance.mdis deleted. The command to run the suite, and whatKNOWNmeans, are now a few lines inconformance.rs's module docs: a known divergence is reported, not failed, and one that starts passing fails the test.For your decision:
miniz_oxideisn't new to the project. It's the same 0.9.1 the workspace already uses: victory-hle inflates DirectStorage zlib requests with it. The fixture only compresses test data with it. Without it the data would have to be stored blocks, which never touch the Huffman decoding the zlib checks are there to test.CARGO_TARGET_TMPDIR, because the outer cargo holds the main target dir's lock. Abuild.rsbuilding a cdylib would avoid the spawn, at the cost of a bigger change.I'm happy to change either if you'd rather.
@0xkn0wh3r3 on GitHub · 2026-11-26 00:00 UTC · original
Thanks for re-checking. One more rule 2 fix: the PR title still named the SDK, and now reads "…against the public platform documentation". The fixture crate and the
cargo buildspawn are left for your decision. Both follow the patternload_probe.rsalready uses forhle-probe.On the
KNOWNlist: agreed, whichever of #2072–#2075 and #1717 lands after this removes its entry, and I'll do that edit for the ones of mine. The branch is rebased onto currentmainwith CI green.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.