xcl run: warn when title network access is enabled #299

Open
github-bot wants to merge 1 commit from github-bot/gh-299 into main AGit
Owner

@⁠SandimL on GitHub · 2026-11-23 22:42 UTC · original
SandimL:xcl-run-network-warning → main · +23 −5 · 3 files · 1 commits · open

Part of #156. XCL already has an opt-in network shim because bring-up titles can upload crash dumps, but xcl run did not tell users that title network access was enabled when XCL_NETWORK was unset. This adds a visible preflight/report warning and documents the safe opt-out.

What is in it

  • crates/xcl/src/preflight.rs: record whether title network imports are blocked; warn when they are not, with the exact XCL_NETWORK=0 remedy; add focused coverage.
  • crates/xcl/src/launcher.rs: label the final repeated output as preflight warnings instead of claiming every warning is a missing PC component.
  • README.md: document the default and the privacy impact.

Tested

  • Windows 11 build 26300, Rust 1.100.0 stable-x86_64-pc-windows-msvc, AMD Radeon RX 6750 XT (12 GiB detected), DXC 1.9.2602.17.
  • cargo build --workspace.
  • cargo test --workspace -- --test-threads=4: 652 passed, 0 failed, 40 ignored, 0 skipped.
  • cargo build --release -p xcl.
  • Controlled repository test title for 20 seconds, with XCL_NETWORK=0: xcl_testtitle: done, failures: 0.

Regression run
The same controlled test title and settings were used on both commits. The title's own test result was clean in both runs.

xcl-smoke v1
commit: 9ab7d763197c7f420bff10cd9bf1310f07e2a9aa
gpu: AMD Radeon RX 6750 XT
title: smoke-game
seconds: 20
exit: 0x0
frames shown: none logged (the test title has no frame-summary line)
presents per 2 s (last 3): 1
device removals: 0
crashes: 0
peak commit: 2340 MB
xcl-smoke v1
commit: 4d95ee83796f06d9bc6837c823be4b6ff0f6d516
gpu: AMD Radeon RX 6750 XT
title: smoke-game
seconds: 20
exit: 0x0
frames shown: none logged (the test title has no frame-summary line)
presents per 2 s (last 3): 1
device removals: 0
crashes: 0
peak commit: 2483 MB

Not tested

  • A retail title; this is a preflight-only change and the controlled title exercises the launcher/report path.
  • AMD driver version and exact CPU model were not exposed by the restricted test environment.

AI use

  • Codex; the exact model name was not exposed in this session. It wrote and reviewed the code, tests, and description.
**@⁠SandimL** on GitHub · 2026-11-23 22:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/299) `SandimL:xcl-run-network-warning` → `main` · +23 −5 · 3 files · 1 commits · open Part of #156. XCL already has an opt-in network shim because bring-up titles can upload crash dumps, but xcl run did not tell users that title network access was enabled when XCL_NETWORK was unset. This adds a visible preflight/report warning and documents the safe opt-out. **What is in it** - crates/xcl/src/preflight.rs: record whether title network imports are blocked; warn when they are not, with the exact XCL_NETWORK=0 remedy; add focused coverage. - crates/xcl/src/launcher.rs: label the final repeated output as preflight warnings instead of claiming every warning is a missing PC component. - README.md: document the default and the privacy impact. **Tested** - Windows 11 build 26300, Rust 1.100.0 stable-x86_64-pc-windows-msvc, AMD Radeon RX 6750 XT (12 GiB detected), DXC 1.9.2602.17. - cargo build --workspace. - cargo test --workspace -- --test-threads=4: 652 passed, 0 failed, 40 ignored, 0 skipped. - cargo build --release -p xcl. - Controlled repository test title for 20 seconds, with XCL_NETWORK=0: xcl_testtitle: done, failures: 0. **Regression run** The same controlled test title and settings were used on both commits. The title's own test result was clean in both runs. `````` xcl-smoke v1 commit: 9ab7d763197c7f420bff10cd9bf1310f07e2a9aa gpu: AMD Radeon RX 6750 XT title: smoke-game seconds: 20 exit: 0x0 frames shown: none logged (the test title has no frame-summary line) presents per 2 s (last 3): 1 device removals: 0 crashes: 0 peak commit: 2340 MB `````` `````` xcl-smoke v1 commit: 4d95ee83796f06d9bc6837c823be4b6ff0f6d516 gpu: AMD Radeon RX 6750 XT title: smoke-game seconds: 20 exit: 0x0 frames shown: none logged (the test title has no frame-summary line) presents per 2 s (last 3): 1 device removals: 0 crashes: 0 peak commit: 2483 MB `````` **Not tested** - A retail title; this is a preflight-only change and the controlled title exercises the launcher/report path. - AMD driver version and exact CPU model were not exposed by the restricted test environment. **AI use** - Codex; the exact model name was not exposed in this session. It wrote and reviewed the code, tests, and description.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:19:16 +00:00
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-24 00:15 UTC · original

Tested 4d95ee8 merged onto main 4017f8f (merge 7ffd807, whole suite) and rechecked on main a6f5f7a (merge cd76636, no conflicts). The warning works as described, and since db1ddb2 on main what it says is true.

The warning and #305.

  • The warning is pushed when XCL_NETWORK is not exactly 0 (netoff::enabled()), and not otherwise.
  • #305 (a crash dump uploaded with XCL_NETWORK=0) was fixed on main in db1ddb2: the switch now also hooks the refusals into the system's winhttp.dll, wininet.dll and ws2_32.dll for the whole process. The reporter of #305 reran on db1ddb2 and the upload stopped at WinHttpConnect. So on current main the fix text ("set XCL_NETWORK=0 to block title network access") and the README's line about a crash reporter hold for that case.
  • Three wordings are now behind main, all small:
    • README: "XCL blocks its WinHTTP and Winsock traffic". Main refuses WinHTTP, WinINet and Winsock for the whole process; loopback and local names go through.
    • Found::network_off: "Whether the title's WinHTTP and Winsock imports are blocked". Not only imports since db1ddb2.
    • The description: "record whether title network imports are blocked".
  • One case the warning cannot see, from reading: preflight looks only at the variable. If a system function cannot be hooked, main logs XCL_NETWORK=0: not every system network function could be hooked in xcl.log and preflight still shows no warning.

The new test does test the change: with the condition made never true, network_access_is_a_warning_until_explicitly_disabled fails (left: Ok, right: Warning). It cannot run on main, where Found has no network_off.

Tested

RTX 5070 Ti (NVIDIA 610.74), Ryzen 9 9950X, Windows 11 26200, debug.

  • cargo build --workspace, then cargo test --workspace -- --test-threads=4 on the merge 7ffd807 (onto 4017f8f): 653 passed, 0 failed, 40 ignored. SKIPPED on this card: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware (no wave64).
  • cargo test -p xcl --lib preflight::tests on 7ffd807: 7 passed, 0 failed; with the warning never pushed 6 passed, 1 failed.
  • cargo test -p xcl --lib -- preflight::tests netoff:: on the merge cd76636 (onto a6f5f7a): 9 passed, 0 failed (the 7 preflight tests and main's 2 tests of the switch).
  • scripts/pr_check.py from main 0e946cf on the description: ok.

Not tested

  • The whole suite on the merge onto a6f5f7a.
  • A title that uses the network, with or without XCL_NETWORK=0: the points about #305 are from the code on main and that thread.
  • AMD and Intel.

🤖 Claude Fable 5.2

**@⁠Kalmarv** on GitHub · 2026-11-24 00:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/299#issuecomment-7117867234) Tested 4d95ee8 merged onto main 4017f8f (merge 7ffd807, whole suite) and rechecked on main a6f5f7a (merge cd76636, no conflicts). The warning works as described, and since db1ddb2 on main what it says is true. **The warning and #305.** - The warning is pushed when `XCL_NETWORK` is not exactly `0` (`netoff::enabled()`), and not otherwise. - #305 (a crash dump uploaded with `XCL_NETWORK=0`) was fixed on main in db1ddb2: the switch now also hooks the refusals into the system's `winhttp.dll`, `wininet.dll` and `ws2_32.dll` for the whole process. The reporter of #305 reran on db1ddb2 and the upload stopped at `WinHttpConnect`. So on current main the fix text ("set XCL_NETWORK=0 to block title network access") and the README's line about a crash reporter hold for that case. - Three wordings are now behind main, all small: - README: "XCL blocks its WinHTTP and Winsock traffic". Main refuses WinHTTP, WinINet and Winsock for the whole process; loopback and local names go through. - `Found::network_off`: "Whether the title's WinHTTP and Winsock imports are blocked". Not only imports since db1ddb2. - The description: "record whether title network imports are blocked". - One case the warning cannot see, from reading: preflight looks only at the variable. If a system function cannot be hooked, main logs `XCL_NETWORK=0: not every system network function could be hooked` in `xcl.log` and preflight still shows no warning. The new test does test the change: with the condition made never true, `network_access_is_a_warning_until_explicitly_disabled` fails (`left: Ok, right: Warning`). It cannot run on main, where `Found` has no `network_off`. **Tested** RTX 5070 Ti (NVIDIA 610.74), Ryzen 9 9950X, Windows 11 26200, debug. - `cargo build --workspace`, then `cargo test --workspace -- --test-threads=4` on the merge 7ffd807 (onto 4017f8f): 653 passed, 0 failed, 40 ignored. SKIPPED on this card: `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware` (no wave64). - `cargo test -p xcl --lib preflight::tests` on 7ffd807: 7 passed, 0 failed; with the warning never pushed 6 passed, 1 failed. - `cargo test -p xcl --lib -- preflight::tests netoff::` on the merge cd76636 (onto a6f5f7a): 9 passed, 0 failed (the 7 preflight tests and main's 2 tests of the switch). - `scripts/pr_check.py` from main 0e946cf on the description: ok. **Not tested** - The whole suite on the merge onto a6f5f7a. - A title that uses the network, with or without `XCL_NETWORK=0`: the points about #305 are from the code on main and that thread. - AMD and Intel. 🤖 Claude Fable 5.2
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 04:27 UTC · original

Test run of 4d95ee83796f06d9bc6837c823be4b6ff0f6d516 on AMD RDNA4. I merged it onto current main 64b3f35 locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 702 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 661 passed, 0 failed, 21 ignored
  • 0 SKIPPED; network_access_is_a_warning_until_explicitly_disabled passes.

Review: A preflight warning and a README note only; nothing in the network path changes. I found nothing to change.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

**@⁠MesshM** on GitHub · 2026-11-24 04:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/299#issuecomment-7122043937) Test run of `4d95ee83796f06d9bc6837c823be4b6ff0f6d516` on AMD RDNA4. I merged it onto current `main` `64b3f35` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **702 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 661 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `network_access_is_a_warning_until_explicitly_disabled` passes. **Review:** A preflight warning and a README note only; nothing in the network path changes. I found nothing to change. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 14:43 UTC · original

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!

**@⁠DavidM1911** on GitHub · 2026-11-25 14:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/299#issuecomment-7165719975) 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!
This pull request has changes conflicting with the target branch.
  • README.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/299/head:github-bot/gh-299'
git switch 'github-bot/gh-299'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-299'
git switch 'github-bot/gh-299'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-299'
git switch 'github-bot/gh-299'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-299'
git switch 'main'
git merge --squash 'github-bot/gh-299'
git switch 'main'
git merge --ff-only 'github-bot/gh-299'
git switch 'main'
git merge 'github-bot/gh-299'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.