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

Open
emirduran707 wants to merge 1 commit from upstream-pr/1171 into main
emirduran707 commented 2026-11-24 12:49:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-24T12:49:54Z.


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

<!-- greyfinch-sync:ivall/xcl:issue:5472468730 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1171). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-24T12:49:54Z. --- `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)
thehollowedone commented 2026-11-24 14:06:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-24T13:05:18Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7132331049 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1171#issuecomment-7132331049). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-24T13:05:18Z. --- 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.
emirduran707 commented 2026-11-24 14:06:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-24T13:35:18Z.


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).

<!-- greyfinch-sync:ivall/xcl:comment:7133044698 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1171#issuecomment-7133044698). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-24T13:35:18Z. --- 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).
futurepro62 commented 2026-11-24 15:05:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:30:16Z.


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.
<!-- greyfinch-sync:ivall/xcl:comment:7134482324 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1171#issuecomment-7134482324). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T14:30:16Z. --- 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.
DavidM1911 commented 2026-11-25 08:08:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T07:46:52Z.


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

<!-- greyfinch-sync:ivall/xcl:comment:7156244630 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1171#issuecomment-7156244630). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T07:46:52Z. --- Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
DavidM1911 commented 2026-11-26 01:05:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T00:26:35Z.


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:7178761152 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1171#issuecomment-7178761152). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T00:26:35Z. --- 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
github-actions[bot] commented 2026-11-29 20:45:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:45:04Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7262328429 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1171#issuecomment-7262328429). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T20:45:04Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 04:58:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:58:52Z.


Triage (#1607) – head a74e351

No open or merged PR makes the same change.
Problem against current main: config.rs:unknown_keys takes the known keys from toml::Table::try_from(Config::default()), but main (#1824) added input_profile with #[serde(skip_serializing_if = "InputProfile::is_default")], so the default Config does not serialize it and a title with an [input_profile] table (documented in README) would get "unknown setting 'input_profile' is ignored". The PR merges textually but needs the key list to include skipped fields (or a test with [input_profile]) after a rebase.
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:7301298566 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1171#issuecomment-7301298566). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:58:52Z. --- **Triage (#1607)** – head a74e351 No open or merged PR makes the same change. Problem against current main: `config.rs:unknown_keys` takes the known keys from `toml::Table::try_from(Config::default())`, but main (#1824) added `input_profile` with `#[serde(skip_serializing_if = "InputProfile::is_default")]`, so the default Config does not serialize it and a title with an `[input_profile]` table (documented in README) would get "unknown setting 'input_profile' is ignored". The PR merges textually but needs the key list to include skipped fields (or a test with `[input_profile]`) after a rebase. 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/1171:upstream-pr/1171'
git switch 'upstream-pr/1171'

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/1171'
git switch 'upstream-pr/1171'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1171'
git switch 'upstream-pr/1171'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1171'
git switch 'main'
git merge --squash 'upstream-pr/1171'
git switch 'main'
git merge --ff-only 'upstream-pr/1171'
git switch 'main'
git merge 'upstream-pr/1171'
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!1162
No description provided.