Config: warn about xcl.toml keys and tables XCL does not know #1171

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

@⁠emirduran707 on GitHub · 2026-11-24 12:49 UTC · original
emirduran707:config-unknown-keys → main · +34 −2 · 3 files · 1 commits · open

xcl.toml is read with serde's defaults, which skip keys Config does not have. A typo (pls_md = 512), or a setting put under a table of its own, had no effect, and nothing said so.

config::unknown_keys returns a file's top-level keys and tables that Config does not know. The known keys come from serializing Config::default(), so the struct stays the only list of them. xcl run reads the file's keys with it and prints one warning per unknown key, after the data: line. Config::load_or_create keeps its signature, which other code calls (e.g. #759). Unknown keys are still not an error, so existing files keep working. The tables mounts, aliases and stub_returns take any key and are not checked inside.

What is in it

  • crates/xcl/src/config.rs: unknown_keys; test unknown_keys_and_tables_are_reported. It checks a typo and an unknown table, and that the file XCL writes itself and the keys the README and the file header name report nothing.
  • crates/xcl/src/launcher.rs: the warning.
  • README.md: one sentence in the "Title data" item.

Tested

  • AMD Radeon RX 9060 XT (driver 32.0.31044.16), Ryzen 5 5600, Windows 11 Pro 26300, Rust 1.100.0; tests debug, smoke release
  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4 on a74e351 (rebased onto main de36462): 1003 passed, 2 failed, 45 ignored; 8 SKIPPED (6 in lower_dxil::tests::{f16,f32}_programs_on_the_gpu; heap_window_out_of_memory_falls_back_to_the_switch_form; pso_measurement_compiles_an_exact_synthetic_record)
    • The 2 failures (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3) fail identically on unmodified main de36462 on this GPU (seeds 722 and 1599).
  • the new test fails with unknown_keys returning nothing (what serde did before: left: [], right: ["d3d12", "pls_md"]); with the change cargo test -p xcl --lib config passes, 16 passed

Regression run

main:

xcl-smoke v1
commit: de36462e0b1043b915a418d4591ed1e397622ede
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1500 (PresentX 1500)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 18920 MB

this PR:

xcl-smoke v1
commit: a74e3513c2d17c8a27efc1aefe5af9969d990a04
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1527 (PresentX 1527)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 21934 MB

Not tested

  • The warning on a real title's xcl.toml with a typo: the smoke run's file has none.
  • A key typed by mistake under [mounts], [aliases] or [stub_returns] is still accepted without a warning.
  • NVIDIA and Intel GPUs.

AI use

  • Claude Code with Claude Opus 5.5: found the problem, wrote the change, the test and this description; I reviewed the diff and ran the tests and smoke runs above.
  • Claude Code with Claude Opus 5.5: rebased the change onto main de36462 (a conflict in config.rs and launcher.rs; both additions kept) and reran the suite and smoke runs above.

🤖 Generated with Claude Code

**@⁠emirduran707** on GitHub · 2026-11-24 12:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/1171) `emirduran707:config-unknown-keys` → `main` · +34 −2 · 3 files · 1 commits · open `xcl.toml` is read with serde's defaults, which skip keys `Config` does not have. A typo (`pls_md = 512`), or a setting put under a table of its own, had no effect, and nothing said so. `config::unknown_keys` returns a file's top-level keys and tables that `Config` does not know. The known keys come from serializing `Config::default()`, so the struct stays the only list of them. `xcl run` reads the file's keys with it and prints one warning per unknown key, after the `data:` line. `Config::load_or_create` keeps its signature, which other code calls (e.g. #759). Unknown keys are still not an error, so existing files keep working. The tables `mounts`, `aliases` and `stub_returns` take any key and are not checked inside. **What is in it** - `crates/xcl/src/config.rs`: `unknown_keys`; test `unknown_keys_and_tables_are_reported`. It checks a typo and an unknown table, and that the file XCL writes itself and the keys the README and the file header name report nothing. - `crates/xcl/src/launcher.rs`: the warning. - `README.md`: one sentence in the "Title data" item. **Tested** - AMD Radeon RX 9060 XT (driver 32.0.31044.16), Ryzen 5 5600, Windows 11 Pro 26300, Rust 1.100.0; tests debug, smoke release - `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4` on a74e351 (rebased onto `main` `de36462`): 1003 passed, 2 failed, 45 ignored; 8 SKIPPED (6 in `lower_dxil::tests::{f16,f32}_programs_on_the_gpu`; `heap_window_out_of_memory_falls_back_to_the_switch_form`; `pso_measurement_compiles_an_exact_synthetic_record`) - The 2 failures (`gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`, `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3`) fail identically on unmodified `main` `de36462` on this GPU (seeds 722 and 1599). - the new test fails with `unknown_keys` returning nothing (what serde did before: `left: []`, `right: ["d3d12", "pls_md"]`); with the change `cargo test -p xcl --lib config` passes, 16 passed **Regression run** main: ``` xcl-smoke v1 commit: de36462e0b1043b915a418d4591ed1e397622ede gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1500 (PresentX 1500) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 18920 MB ``` this PR: ``` xcl-smoke v1 commit: a74e3513c2d17c8a27efc1aefe5af9969d990a04 gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1527 (PresentX 1527) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 21934 MB ``` **Not tested** - The warning on a real title's `xcl.toml` with a typo: the smoke run's file has none. - A key typed by mistake under `[mounts]`, `[aliases]` or `[stub_returns]` is still accepted without a warning. - NVIDIA and Intel GPUs. **AI use** - Claude Code with Claude Opus 5.5: found the problem, wrote the change, the test and this description; I reviewed the diff and ran the tests and smoke runs above. - Claude Code with Claude Opus 5.5: rebased the change onto `main` `de36462` (a conflict in `config.rs` and `launcher.rs`; both additions kept) and reran the suite and smoke runs above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Config is deserialized with serde's default behaviour, which skips keys
it has no field for. A typo (`pls_md = 512`) or a setting written under
a table of its own (`[d3d12]`) therefore did nothing, and the user was
not told.

unknown_keys() compares the file's top-level keys with the ones Config
serializes, so the known-key list stays the struct itself; serde
attributes on Config (and with them its error messages and boot.json)
are unchanged. `xcl run` reads the file's keys with it and prints a
WARNING line per key next to the other startup lines; load_or_create
keeps its signature, which other callers use. Unknown keys stay
non-fatal, so existing files keep working. Keys inside mounts, aliases
and stub_returns are free-form and are not checked.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:45:57 +00:00
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-24 13:05 UTC · original

Independent Windows launcher check on 47efa2e and b393f32. Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, release.

I built with cargo build --offline --locked --release --workspace and ran the bundled synthetic title with xcl run <test-title> -- --hello, using a separate data root per build. The config set keyboard_mouse = false, included the typo pls_md = 512, and put debug in an unknown [d3d12] table. Main emitted no unknown-setting warnings. The PR emitted one each for d3d12 and pls_md. Both kept the known keyboard/mouse value and the manifest's 2048 MiB PLS quota. Both completed 50 title checks with zero failures, and the title folder and both config files kept their original hashes.

Synthetic title only. AI-assisted. Codex (GPT-6, exact variant unavailable) ran the comparison and drafted this report.

**@⁠thehollowedone** on GitHub · 2026-11-24 13:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/1171#issuecomment-7132331049) Independent Windows launcher check on [`47efa2e`](https://github.com/ivall/xcl/commit/47efa2ecea0a12934719ae69b81930cf02a4b1c3) and [`b393f32`](https://github.com/ivall/xcl/commit/b393f3204e6f31af6573dd55f468295eabd6629d). Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, release. I built with `cargo build --offline --locked --release --workspace` and ran the bundled synthetic title with `xcl run <test-title> -- --hello`, using a separate data root per build. The config set `keyboard_mouse = false`, included the typo `pls_md = 512`, and put `debug` in an unknown `[d3d12]` table. Main emitted no unknown-setting warnings. The PR emitted one each for `d3d12` and `pls_md`. Both kept the known keyboard/mouse value and the manifest's 2048 MiB PLS quota. Both completed 50 title checks with zero failures, and the title folder and both config files kept their original hashes. Synthetic title only. AI-assisted. Codex (GPT-6, exact variant unavailable) ran the comparison and drafted this report.
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-24 13:35 UTC · original

Pushed b07f906: Config::load_or_create keeps its signature (#759 calls it and would no longer build); xcl run now reads the file's unknown keys with config::unknown_keys itself. The warnings are the same. Reran the suite and the smoke run on b07f906 and updated the description. Thanks for the check, @⁠thehollowedone.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠emirduran707** on GitHub · 2026-11-24 13:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/1171#issuecomment-7133044698) Pushed b07f906: `Config::load_or_create` keeps its signature (#759 calls it and would no longer build); `xcl run` now reads the file's unknown keys with `config::unknown_keys` itself. The warnings are the same. Reran the suite and the smoke run on b07f906 and updated the description. Thanks for the check, @⁠thehollowedone. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 14:30 UTC · original

Full-suite run, since this PR has no test report yet. Tested exact head b07f906 (on its base 47efa2e).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 742 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: unknown_keys_and_tables_are_reported.

Not tested

  • AMD, a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 14:30 UTC · [original](https://github.com/xcl-dev/xcl/pull/1171#issuecomment-7134482324) Full-suite run, since this PR has no test report yet. Tested exact head `b07f906` (on its base `47efa2e`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **742 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `unknown_keys_and_tables_are_reported`. **Not tested** - AMD, a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 07:46 UTC · original

Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-25 07:46 UTC · [original](https://github.com/xcl-dev/xcl/pull/1171#issuecomment-7156244630) Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 00:26 UTC · original

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

**@⁠DavidM1911** on GitHub · 2026-11-26 00:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/1171#issuecomment-7178761152) 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
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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