Tests: pin XSTS sign-request header layout and offline token contract #2476

Open
amazedturnip wants to merge 1 commit from upstream-pr/2486 into main
amazedturnip commented 2026-11-25 20:08:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by amazedturnip on 2026-11-25T20:08:17Z.


Adds a black-box integration contract suite for crates/xcl/src/hle/xgameruntime/xsign.rs so the XSTS v1 offline-signing path is pinned outside the module: offline_token starts with 'XBL3.0 x=xcl;local-' with a 16-hex-char suffix round-tripping config().user_id; current_filetime is plausible now (>= ~2020, within 1h of now, non-decreasing); base64_encode matches RFC 4648 vectors and decodes round-trip; sign_request_at with a fixed filetime yields a parseable 76-byte [version u32 BE == 1][filetime u64 BE][64-byte sig] header; sign_request returns Ok with a same-shape header within 1h of now. Test-only, 129 lines, no source changes.

What is in it

  • crates/xcl/tests/xsign_contract.rs: black-box contract suite for xcl::hle::xgameruntime::xsign — offline_token() starts with XBL3.0 x=xcl;local- and ends with 16 hex chars that round-trip config().user_id; current_filetime() is a plausible now (>= ~2020, within 1h of now, non-decreasing); base64_encode matches RFC 4648 vectors and round-trips; sign_request_at with a fixed filetime yields a base64 header whose decoded bytes are exactly [version u32 BE == 1][filetime u64 BE == fixed][64-byte signature] (76 bytes); sign_request returns Ok and decodes with version == 1 and 96-byte... wait, 76-byte payload and filetime within 1h of now.

Tested

  • Hardware / OS / Rust: AMD Ryzen 7 9800X3D 8-Core Processor, Windows 11 Pro 10.0.26100 (Build 26100), rustc 1.94.1 (e408947bf 2026-03-25), stable-x86_64-pc-windows-msvc, debug build
  • AMD (AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64), XCL_ADAPTER=radeon): cargo test --workspace -- --test-threads=1 — 1297 passed, 1 failed, 26 ignored (SKIPPED GPU tests: 1 (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 1 (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 1 (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 1 (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 1 (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), 1 (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), 1 (cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)); pre-existing upstream/main failures excluded: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1)
  • Verification / negative control: Negative control: temporarily removed the 'x=xcl;' prefix from the token format in xsign.rs, re-ran the targeted test: offline_token_has_xbl3_xcl_prefix_and_hex_user_id FAILED ("token XBL3.0 x=local-0009000000000001 must start with XBL3.0 x=xcl;local-"), 4 other tests passed; then git checkout -- crates/xcl/src/hle/xgameruntime/xsign.rs to restore.

Not tested

  • signing path through real XUserGetTokenAndSignature* thunks end-to-end (requires a running title/host)
  • NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64)

AI use

  • Local AI (thinkingmachines_inkling-2-mini) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
<!-- greyfinch-sync:ivall/xcl:issue:5498352642 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2486). Originally posted by [amazedturnip](https://github.com/amazedturnip) on 2026-11-25T20:08:17Z. --- Adds a black-box integration contract suite for crates/xcl/src/hle/xgameruntime/xsign.rs so the XSTS v1 offline-signing path is pinned outside the module: offline_token starts with 'XBL3.0 x=xcl;local-' with a 16-hex-char suffix round-tripping config().user_id; current_filetime is plausible now (>= ~2020, within 1h of now, non-decreasing); base64_encode matches RFC 4648 vectors and decodes round-trip; sign_request_at with a fixed filetime yields a parseable 76-byte [version u32 BE == 1][filetime u64 BE][64-byte sig] header; sign_request returns Ok with a same-shape header within 1h of now. Test-only, 129 lines, no source changes. **What is in it** - `crates/xcl/tests/xsign_contract.rs`: black-box contract suite for `xcl::hle::xgameruntime::xsign` — `offline_token()` starts with `XBL3.0 x=xcl;local-` and ends with 16 hex chars that round-trip `config().user_id`; `current_filetime()` is a plausible now (>= ~2020, within 1h of now, non-decreasing); `base64_encode` matches RFC 4648 vectors and round-trips; `sign_request_at` with a fixed filetime yields a base64 header whose decoded bytes are exactly [version u32 BE == 1][filetime u64 BE == fixed][64-byte signature] (76 bytes); `sign_request` returns Ok and decodes with version == 1 and 96-byte... wait, 76-byte payload and filetime within 1h of now. **Tested** - Hardware / OS / Rust: AMD Ryzen 7 9800X3D 8-Core Processor, Windows 11 Pro 10.0.26100 (Build 26100), rustc 1.94.1 (e408947bf 2026-03-25), stable-x86_64-pc-windows-msvc, debug build - AMD (`AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64)`, `XCL_ADAPTER=radeon`): `cargo test --workspace -- --test-threads=1` — 1297 passed, 1 failed, 26 ignored (SKIPPED GPU tests: 1 (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 1 (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 1 (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 1 (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 1 (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), 1 (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), 1 (cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)); pre-existing upstream/main failures excluded: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1) - Verification / negative control: Negative control: temporarily removed the 'x=xcl;' prefix from the token format in xsign.rs, re-ran the targeted test: `offline_token_has_xbl3_xcl_prefix_and_hex_user_id` FAILED ("token XBL3.0 x=local-0009000000000001 must start with XBL3.0 x=xcl;local-"), 4 other tests passed; then `git checkout -- crates/xcl/src/hle/xgameruntime/xsign.rs` to restore. **Not tested** - signing path through real XUserGetTokenAndSignature* thunks end-to-end (requires a running title/host) - NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64) **AI use** - Local AI (thinkingmachines_inkling-2-mini) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
luckyteagirl commented 2026-11-25 21:05:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T20:23:46Z.


On head eaf578bf2b6cd6635c232376100d609b4f85a833, the two FILETIME checks use 3_600_000_000_000_000 ticks as a claimed one-hour tolerance. FILETIME has 10,000,000 ticks per second, so that value is 100,000 hours (about 11.4 years). The test would accept a signing timestamp years away from now, missing the regression it intends to catch.

One hour is 3_600 * 10_000_000 = 36_000_000_000 ticks. Please use that value (ideally a shared constant) in both current_filetime_is_a_plausible_now_claps_2024_plus and sign_request_returns_ok_and_has_xsts_v1_shape, and check that a timestamp more than an hour off fails the assertion.

AI use: OpenAI Codex (GPT-6; exact variant unavailable) reviewed the diff and verified the unit conversion; no tests were run for this review.

<!-- greyfinch-sync:ivall/xcl:comment:7173607685 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2486#issuecomment-7173607685). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-25T20:23:46Z. --- On head `eaf578bf2b6cd6635c232376100d609b4f85a833`, the two FILETIME checks use `3_600_000_000_000_000` ticks as a claimed one-hour tolerance. FILETIME has 10,000,000 ticks per second, so that value is 100,000 hours (about 11.4 years). The test would accept a signing timestamp years away from now, missing the regression it intends to catch. One hour is `3_600 * 10_000_000 = 36_000_000_000` ticks. Please use that value (ideally a shared constant) in both `current_filetime_is_a_plausible_now_claps_2024_plus` and `sign_request_returns_ok_and_has_xsts_v1_shape`, and check that a timestamp more than an hour off fails the assertion. AI use: OpenAI Codex (GPT-6; exact variant unavailable) reviewed the diff and verified the unit conversion; no tests were run for this review.
fromthemoonx commented 2026-11-25 21:05:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-25T20:30:03Z.


Rerun on the new head 33ea27f: fixed on NVIDIA. With xsign::current_filetime set 1 day behind, current_filetime_is_plausible_now and sign_request_returns_ok_and_has_xsts_v1_shape now fail. 58 minutes behind, they pass.

result
cargo test --workspace --no-fail-fast -- --test-threads=4, 33ea27f merged onto main e1d84b7 (clean) 1428 passed, 0 failed, 46 ignored; 25 SKIPPED lines
cargo test -p xcl --test xsign_contract, 3 runs 5 passed, 3 of 3
clock 1 day behind / 58 min behind (scratch) 2 fail / all pass

A clock 1 h + 1 tick behind still passes: the tests' own "now" is taken in whole seconds (as_secs()), so the bound is exact only to about a second. That is fine for what the tests check.


First run, on eaf578b: For the slack point above: on NVIDIA the tests passed as they were even with the clock 1 day or 5 years off. With 36_000_000_000 ticks they still passed on a correct clock and failed when it was 1 day off.

Tested: eaf578b (it is main 6d12f58 plus this commit). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug.

result
cargo test --workspace --no-fail-fast -- --test-threads=4 1428 passed, 0 failed, 46 ignored; 25 SKIPPED lines (no wave64, refused per-lane forms)
xsign::current_filetime set 1 day, then 5 years behind (scratch) all 5 tests pass both times
the slack changed to 36_000_000_000 in both tests (scratch), 3 runs 5 passed, 3 of 3
that slack with the clock 1 day behind current_filetime_is_a_plausible_now_claps_2024_plus and sign_request_returns_ok_and_has_xsts_v1_shape fail

Also in that test: its comment says "more than a day in the past" while the assert message says 1h, and the name says 2024_plus while the floor is 2020-09.

Not tested: a release build; the signing path through the XUserGetTokenAndSignature* thunks.

AI use: Claude Code (Claude Opus 5.5) ran the suite and the scratch changes, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7173762249 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2486#issuecomment-7173762249). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-11-25T20:30:03Z. --- **Rerun on the new head `33ea27f`: fixed on NVIDIA. With `xsign::current_filetime` set 1 day behind, `current_filetime_is_plausible_now` and `sign_request_returns_ok_and_has_xsts_v1_shape` now fail. 58 minutes behind, they pass.** | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4`, `33ea27f` merged onto `main` `e1d84b7` (clean) | 1428 passed, 0 failed, 46 ignored; 25 `SKIPPED` lines | | `cargo test -p xcl --test xsign_contract`, 3 runs | 5 passed, 3 of 3 | | clock 1 day behind / 58 min behind (scratch) | 2 fail / all pass | A clock 1 h + 1 tick behind still passes: the tests' own "now" is taken in whole seconds (`as_secs()`), so the bound is exact only to about a second. That is fine for what the tests check. --- *First run, on `eaf578b`:* For the slack point above: on NVIDIA the tests passed as they were even with the clock 1 day or 5 years off. With `36_000_000_000` ticks they still passed on a correct clock and failed when it was 1 day off. **Tested:** `eaf578b` (it is `main` `6d12f58` plus this commit). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug. | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4` | 1428 passed, 0 failed, 46 ignored; 25 `SKIPPED` lines (`no wave64`, refused per-lane forms) | | `xsign::current_filetime` set 1 day, then 5 years behind (scratch) | all 5 tests pass both times | | the slack changed to `36_000_000_000` in both tests (scratch), 3 runs | 5 passed, 3 of 3 | | that slack with the clock 1 day behind | `current_filetime_is_a_plausible_now_claps_2024_plus` and `sign_request_returns_ok_and_has_xsts_v1_shape` fail | Also in that test: its comment says "more than a day in the past" while the assert message says 1h, and the name says `2024_plus` while the floor is 2020-09. **Not tested:** a release build; the signing path through the `XUserGetTokenAndSignature*` thunks. **AI use:** Claude Code (Claude Opus 5.5) ran the suite and the scratch changes, and wrote this report.
SlopTart commented 2026-11-25 21:05:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T20:52:03Z.


One non-reproducing flake burst, otherwise clean. First cold-cache gpu_ suite run (parallel, --test-threads=2): 158 passed / 9 failed, i.e. the usual trio plus six tests that are green on main: gpu_console_textures_upload_every_mip_and_slice, gpu_large_mixed_upload_keeps_tight_staging_and_exact_pixels, copy_scratch_budget_counts_resources_until_gpu_completion, cpu_watchdog_signal_with_inflight_gpu_signal_completes_cleanly, gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes, gpu_retire_queue_holds_heap_until_blocked_queue_passes_mark.

  • Second full suite run, same head, cold cache: 164 passed / 3 failed (baseline trio only).
  • Solo run of gpu_console_textures_upload_every_mip_and_slice on this head: passed. Solo runs of all six on plain main: all passed.
    So: not a deterministic red, but every test in the burst touches upload/scratch/lifetime paths this PR changes (retry after lazy mip mapping failures, split scratch reuse). If anyone sees this family go red in a parallel CI job, this PR is the first suspect on the Wine lane.
<!-- greyfinch-sync:ivall/xcl:comment:7174295647 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2486#issuecomment-7174295647). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-25T20:52:03Z. --- **One non-reproducing flake burst, otherwise clean.** First cold-cache `gpu_` suite run (parallel, `--test-threads=2`): `158 passed / 9 failed`, i.e. the usual trio plus six tests that are green on main: `gpu_console_textures_upload_every_mip_and_slice`, `gpu_large_mixed_upload_keeps_tight_staging_and_exact_pixels`, `copy_scratch_budget_counts_resources_until_gpu_completion`, `cpu_watchdog_signal_with_inflight_gpu_signal_completes_cleanly`, `gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes`, `gpu_retire_queue_holds_heap_until_blocked_queue_passes_mark`. - Second full suite run, same head, cold cache: `164 passed / 3 failed` (baseline trio only). - Solo run of `gpu_console_textures_upload_every_mip_and_slice` on this head: passed. Solo runs of all six on plain main: all passed. So: not a deterministic red, but every test in the burst touches upload/scratch/lifetime paths this PR changes (retry after lazy mip mapping failures, split scratch reuse). If anyone sees this family go red in a parallel CI job, this PR is the first suspect on the Wine lane.
DavidM1911 commented 2026-11-25 21:05:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T20:53:00Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7174317181 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2486#issuecomment-7174317181). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T20:53:00Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
amazedturnip commented 2026-11-25 22:06:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by amazedturnip on 2026-11-25T21:37:45Z.


Fixed: both FILETIME checks now use a shared ONE_HOUR_TICKS constant (36_000_000_000 ticks = 1 hour) instead of 3_600_000_000_000_000 (~11.4 years). Each test also now asserts that a timestamp more than an hour off (+1 tick past the bound, either side) fails the check. Test name/comment cleaned up (claps_2024_plus -> plausible_now_2024_plus, 'more than a day in the past' -> 'more than an hour in the past'). Verified locally: cargo test -p xcl --test xsign_contract passes 5/5.

<!-- greyfinch-sync:ivall/xcl:comment:7175331671 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2486#issuecomment-7175331671). Originally posted by [amazedturnip](https://github.com/amazedturnip) on 2026-11-25T21:37:45Z. --- Fixed: both FILETIME checks now use a shared ONE_HOUR_TICKS constant (36_000_000_000 ticks = 1 hour) instead of 3_600_000_000_000_000 (~11.4 years). Each test also now asserts that a timestamp more than an hour off (+1 tick past the bound, either side) fails the check. Test name/comment cleaned up (claps_2024_plus -> plausible_now_2024_plus, 'more than a day in the past' -> 'more than an hour in the past'). Verified locally: `cargo test -p xcl --test xsign_contract` passes 5/5.
DavidM1911 commented 2026-11-26 02:08:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T01:49:56Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7180181084 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2486#issuecomment-7180181084). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T01:49:56Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
Decodere commented 2026-11-27 04:15:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T04:15:33Z.


Independent desktop NVIDIA verification of PR #2486 at head 33ea27fbb2bb40ef4ee1227e6e9d9064440d893d (1 commit; exact parent & merge-base: 6d12f58a229bc73889878a448c64dc3af25eeba0, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (33ea27fb)

Command Result
cargo test --release -p xcl --test xsign_contract -- --nocapture (3 consecutive runs) 5 passed; 0 failed; 0 ignored; 0 filtered out × 3 (0.00s × 3, 0 skipped: base64_encode_matches_rfc4648_and_decodes_roundtrip, current_filetime_is_plausible_now, offline_token_has_xbl3_xcl_prefix_and_hex_user_id, sign_request_at_produces_parseable_xsts_v1_header, sign_request_returns_ok_and_has_xsts_v1_shape)
cargo test --release -p xcl --lib xsign (3 consecutive runs) 4 passed; 0 failed; 0 ignored; 1320 filtered out × 3 (0.00s × 3, 0 skipped)
cargo build --release -p xcl Clean build (0.07s incremental after --test/--lib build, exit 0, 0 new warnings)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (6d12f58a229bc73889878a448c64dc3af25eeba0, cached baseline on the same machine):

xcl-smoke v1
commit: 6d12f58a229bc73889878a448c64dc3af25eeba0
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1606 (PresentX 1606)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14004 MB

PR #2486 (33ea27fbb2bb40ef4ee1227e6e9d9064440d893d):

xcl-smoke v1
commit: 33ea27fbb2bb40ef4ee1227e6e9d9064440d893d
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1594 (PresentX 1594)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14023 MB

Runtime log observations (xcl.log)

  • 9220 log lines, 0 [ERROR] / device-removal / panic lines (dxil_cache: 460 hits, 0 misses, 0 compilation failures; 228 background pipelines, 0 failures).
  • Final draw/memory telemetry in log: 19519 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample 14022 MB committed by the process; video memory 6115 MB local, 4683 MB non-local.

Limits of coverage

  • This PR is test-only (crates/xcl/tests/xsign_contract.rs, +141/-0, 0 production-code changes); all 5 new black-box XSTS signing/offline-token contract tests and all 4 existing hle::xgameruntime::xsign::tests unit tests passed 3/3 in --release on Windows 11.
  • The 60 s retail smoke confirms non-regression of the unchanged runtime binary at this commit (single-run frame/commit delta vs. cached parent reflects normal startup variance, not this PR).

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7209652072 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2486#issuecomment-7209652072). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T04:15:33Z. --- Independent desktop NVIDIA verification of **PR #2486** at head `33ea27fbb2bb40ef4ee1227e6e9d9064440d893d` (`1` commit; exact parent & merge-base: `6d12f58a229bc73889878a448c64dc3af25eeba0`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted release tests & build (`33ea27fb`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --test xsign_contract -- --nocapture` (3 consecutive runs) | `5 passed; 0 failed; 0 ignored; 0 filtered out` × 3 (`0.00s` × 3, `0` skipped: `base64_encode_matches_rfc4648_and_decodes_roundtrip`, `current_filetime_is_plausible_now`, `offline_token_has_xbl3_xcl_prefix_and_hex_user_id`, `sign_request_at_produces_parseable_xsts_v1_header`, `sign_request_returns_ok_and_has_xsts_v1_shape`) | | `cargo test --release -p xcl --lib xsign` (3 consecutive runs) | `4 passed; 0 failed; 0 ignored; 1320 filtered out` × 3 (`0.00s` × 3, `0` skipped) | | `cargo build --release -p xcl` | Clean build (`0.07s` incremental after `--test`/`--lib` build, exit `0`, `0` new warnings) | ### Paired quiet 60 s retail smoke (`title: 29640639`) Exact parent & merge-base (`6d12f58a229bc73889878a448c64dc3af25eeba0`, cached baseline on the same machine): ``` xcl-smoke v1 commit: 6d12f58a229bc73889878a448c64dc3af25eeba0 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1606 (PresentX 1606) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14004 MB ``` PR #2486 (`33ea27fbb2bb40ef4ee1227e6e9d9064440d893d`): ``` xcl-smoke v1 commit: 33ea27fbb2bb40ef4ee1227e6e9d9064440d893d gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1594 (PresentX 1594) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14023 MB ``` ### Runtime log observations (`xcl.log`) - `9220` log lines, `0` `[ERROR]` / device-removal / panic lines (`dxil_cache`: `460` hits, `0` misses, `0` compilation failures; `228` background pipelines, `0` failures). - Final draw/memory telemetry in log: `19519 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped)`; last memory sample `14022 MB committed by the process; video memory 6115 MB local, 4683 MB non-local`. ### Limits of coverage - This PR is test-only (`crates/xcl/tests/xsign_contract.rs`, `+141/-0`, `0` production-code changes); all 5 new black-box XSTS signing/offline-token contract tests and all 4 existing `hle::xgameruntime::xsign::tests` unit tests passed `3/3` in `--release` on Windows 11. - The 60 s retail smoke confirms non-regression of the unchanged runtime binary at this commit (single-run frame/commit delta vs. cached parent reflects normal startup variance, not this PR). *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
throny commented 2026-11-29 00:47:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-29T00:47:34Z.


merge-check claim
head: 33ea27fbb2

<!-- greyfinch-sync:ivall/xcl:comment:7248353302 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2486#issuecomment-7248353302). Originally posted by [throny](https://github.com/throny) on 2026-11-29T00:47:34Z. --- merge-check claim head: 33ea27fbb2bb40ef4ee1227e6e9d9064440d893d
throny commented 2026-11-29 01:08:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-29T01:08:46Z.


merge-check
base: fa204595
head: 33ea27fbb2
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2613 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at fa204595: 2608 passed, 0 failed, 49 ignored. (A first run of this tree had no lib counts: the lib test binary was ended by the uma_driver fail-stop that #3187 addresses; this is the rerun.)
review: no blocking finding; tests only, all hunks read with the project's rules in mind. The token in the test is a synthetic local one and the key is the throw-away key main already makes; nothing touches the network (the URLs are plain strings) and nothing serves to get around a protection. The point from the thread about the time slack is fixed. Minor: it largely repeats unit tests the module already has and adds one more integration-test binary to link.
performance: none (tests only; a little build time).
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7248590416 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2486#issuecomment-7248590416). Originally posted by [throny](https://github.com/throny) on 2026-11-29T01:08:46Z. --- merge-check base: fa204595 head: 33ea27fbb2bb40ef4ee1227e6e9d9064440d893d merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2613 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at fa204595: 2608 passed, 0 failed, 49 ignored. (A first run of this tree had no lib counts: the lib test binary was ended by the uma_driver fail-stop that #3187 addresses; this is the rerun.) review: no blocking finding; tests only, all hunks read with the project's rules in mind. The token in the test is a synthetic local one and the key is the throw-away key main already makes; nothing touches the network (the URLs are plain strings) and nothing serves to get around a protection. The point from the thread about the time slack is fixed. Minor: it largely repeats unit tests the module already has and adds one more integration-test binary to link. performance: none (tests only; a little build time). verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
saintwolf commented 2026-11-30 02:22:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T02:22:47Z.


releasing: my merge-check claim for head 33ea27fbb2 (someone else took this slot after my claim)

<!-- greyfinch-sync:ivall/xcl:comment:7266954093 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2486#issuecomment-7266954093). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-30T02:22:47Z. --- releasing: my merge-check claim for head 33ea27fbb2bb40ef4ee1227e6e9d9064440d893d (someone else took this slot after my claim)
relativespace2K commented 2026-11-30 02:22:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by relativespace2K on 2026-11-30T02:22:48Z.


merge-check
base: 53e85fb1
head: 33ea27fbb2
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2793 passed, 6 failed, 49 ignored; failing: gpu::dxil::compact_tests::gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form, gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline, ram_budget::tests::windows_takes_a_working_set_maximum_and_lifts_it, and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (in --test gpu_two_pass_cache_e2e, so 5 failing tests give 6 failures). The same five fail on base 53e85fb1 alone (2788 passed, 6 failed, 49 ignored there), so none comes from this PR; its five new tests passed. 13 SKIPPED lines, all environmental: no D3D12 debug layer / d3d12SDKLayers.dll, no heap windows, no GPU_UPLOAD, per-lane f16/f32 forms refused.
review: no blocking finding; a new test file, crates/xcl/tests/xsign_contract.rs, every line read. It pins the offline token prefix and that its 16 hex characters round-trip state::config().user_id (read from the config, not hard-coded), the FILETIME's shape and that two readings do not go backwards, RFC 4648 base64 through the public base64_encode with an independent decoder written in the test (so it does not merely echo the module's own), and the XSTS v1 header: 76 bytes, version 1 big-endian, the FILETIME big-endian, and sign_request_at reproducing the FILETIME it was handed. Asserting that the 64-byte signature is not all zeros rather than a fixed byte string is the right trade here: it catches a signing path that returns nothing without freezing a key into the test. One note, not blocking: the 76-byte shape pins the signature to raw ECDSA P-256, so a change of curve in xsign would fail this test before the module, which is the contract it is meant to state. No duplicate: nothing else tests xsign at this level.
performance: none: tests only.
verdict: safe to merge
hardware / tool and model: AMD Radeon RX 6800 XT 16 GB (RDNA2, wave64), driver 32.0.21045.29003; Ryzen 5 5600, 32 GB RAM; Windows 10 IoT Enterprise LTSC 2024, 10.0.26100 build 26100.9974; Rust 1.100.0; DXC 1.9.2602.17; debug build. DeepSeek Harness coding agent, model DeepSeek V4.1 Flash. The first full run aborted in -p xcl --lib with 0xc0000005 (STATUS_ACCESS_VIOLATION) before that target printed a result, which is the intermittent abort under parallel scheduling (#1978); the lib target then passed twice on its own and the numbers above are the clean rerun.

<!-- greyfinch-sync:ivall/xcl:comment:7266954430 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2486#issuecomment-7266954430). Originally posted by [relativespace2K](https://github.com/relativespace2K) on 2026-11-30T02:22:48Z. --- merge-check base: 53e85fb1 head: 33ea27fbb2bb40ef4ee1227e6e9d9064440d893d merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2793 passed, 6 failed, 49 ignored; failing: gpu::dxil::compact_tests::gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form, gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline, ram_budget::tests::windows_takes_a_working_set_maximum_and_lifts_it, and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (in `--test gpu_two_pass_cache_e2e`, so 5 failing tests give 6 failures). The same five fail on base 53e85fb1 alone (2788 passed, 6 failed, 49 ignored there), so none comes from this PR; its five new tests passed. 13 SKIPPED lines, all environmental: no D3D12 debug layer / d3d12SDKLayers.dll, no heap windows, no GPU_UPLOAD, per-lane f16/f32 forms refused. review: no blocking finding; a new test file, `crates/xcl/tests/xsign_contract.rs`, every line read. It pins the offline token prefix and that its 16 hex characters round-trip `state::config().user_id` (read from the config, not hard-coded), the FILETIME's shape and that two readings do not go backwards, RFC 4648 base64 through the public `base64_encode` with an *independent* decoder written in the test (so it does not merely echo the module's own), and the XSTS v1 header: 76 bytes, version `1` big-endian, the FILETIME big-endian, and `sign_request_at` reproducing the FILETIME it was handed. Asserting that the 64-byte signature is not all zeros rather than a fixed byte string is the right trade here: it catches a signing path that returns nothing without freezing a key into the test. One note, not blocking: the 76-byte shape pins the signature to raw ECDSA P-256, so a change of curve in `xsign` would fail this test before the module, which is the contract it is meant to state. No duplicate: nothing else tests `xsign` at this level. performance: none: tests only. verdict: safe to merge hardware / tool and model: AMD Radeon RX 6800 XT 16 GB (RDNA2, wave64), driver 32.0.21045.29003; Ryzen 5 5600, 32 GB RAM; Windows 10 IoT Enterprise LTSC 2024, 10.0.26100 build 26100.9974; Rust 1.100.0; DXC 1.9.2602.17; debug build. DeepSeek Harness coding agent, model DeepSeek V4.1 Flash. The first full run aborted in `-p xcl --lib` with `0xc0000005` (`STATUS_ACCESS_VIOLATION`) before that target printed a result, which is the intermittent abort under parallel scheduling (#1978); the lib target then passed twice on its own and the numbers above are the clean rerun.
Foniass commented 2026-12-01 08:10:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:10:00Z.


Triage (#1607) – head 33ea27f

No open PR adds these tests. Part of it repeats main's own unit tests in hle/xgameruntime/xsign.rs: base64_encode_matches_rfc4648_and_decodes_roundtrip uses the same RFC 4648 vectors as base64_matches_rfc4648_vectors, and sign_request_at_produces_parseable_xsts_v1_header is a weaker copy of signature_header_verifies_with_ephemeral_p256_key, which also verifies the signature. The !within_one_hour(...) asserts only test the test's own helper. What is new: the format of offline_token, the range of current_filetime, and the shape of sign_request.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7304960005 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2486#issuecomment-7304960005). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:10:00Z. --- **Triage (#1607)** – head 33ea27f No open PR adds these tests. Part of it repeats main's own unit tests in `hle/xgameruntime/xsign.rs`: `base64_encode_matches_rfc4648_and_decodes_roundtrip` uses the same RFC 4648 vectors as `base64_matches_rfc4648_vectors`, and `sign_request_at_produces_parseable_xsts_v1_header` is a weaker copy of `signature_header_verifies_with_ephemeral_p256_key`, which also verifies the signature. The `!within_one_hour(...)` asserts only test the test's own helper. What is new: the format of `offline_token`, the range of `current_filetime`, and the shape of `sign_request`. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2486:upstream-pr/2486'
git switch 'upstream-pr/2486'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2486'
git switch 'upstream-pr/2486'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2486'
git switch 'upstream-pr/2486'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2486'
git switch 'main'
git merge --squash 'upstream-pr/2486'
git switch 'main'
git merge --ff-only 'upstream-pr/2486'
git switch 'main'
git merge 'upstream-pr/2486'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2476
No description provided.