Config: an alias pattern with several '*' matches its DLLs #2310

Manually merged
github merged 1 commit from gh-pr/2310/head into gh-pr/2310/base 2026-11-26 05:26:43 +00:00
Owner

@⁠gefydev on GitHub · 2026-11-25 13:32 UTC · original
gefydev:config-glob-several-stars → main · +35 −4 · 1 files · 1 commits · merged 2026-11-25 16:15 UTC

An alias in xcl.toml whose DLL pattern has more than one *, such as api-ms-win-*-l1-1-*.dll, never matched a DLL: glob_match split the pattern at the first * and compared everything after it as plain text, so the second * had to appear in the DLL's name. The alias was ignored with no message. Patterns with one * or none, which are all that XCL's own table uses, answer as before.

What is in it

  • crates/xcl/src/util.rs: glob_match reads * as any run of characters, anywhere and as often as the pattern has it: the start is matched at the start, the parts between the stars in order, the last part at the end.
  • Test globbing_with_several_stars: a two-star API-set pattern that matches and one that does not, a*b*c against names that do and do not match, the non-overlap of the two ends (ab*ba against aba), a lone * and **.

Tested

  • NVIDIA GeForce GTX 1650 (4 GB, 32-lane waves only), driver 621.24, AMD Ryzen 5 1600, 16 GB RAM, Windows 11 Pro 10.0.26300, Rust 1.100.0, debug for the tests and release for the regression runs.
  • The new test fails without the change (assertion failed: glob_match("api-ms-win-*-l1-1-*.dll", "api-ms-win-core-file-l1-1-0.dll")) and passes with it; the existing globbing test passes in both.
  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4 on f8ce21d: 1251 passed, 0 failed, 46 ignored. 26 SKIPPED, none of them on a path this change touches: 20 wave64 cases ("no wave64" on this GPU), 3 per-lane f16 cases the per-lane form refuses, 1 "no heap windows", 2 for the D3D12 debug layer not being installed.

Regression run
scripts/smoke.ps1 -Game <title folder> -Seconds 60, release builds, the same machine and title for both, one after the other. An earlier run of this branch had come out at 499 frames and 15 294 MB of peak commit, against 910 frames and 11 693 MB for main in its first run; the next two runs of each were within a few percent of each other (main 888 and 911 frames, this branch 902 and 928), so I take the first one as that machine's run-to-run spread (#2225) and show the last pair.

main:

xcl-smoke v1
commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6
gpu: NVIDIA GeForce GTX 1650
title: eddfb802
seconds: 60
exit: 0x0
frames shown: 911 (PresentX 911)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 11671 MB

PR:

xcl-smoke v1
commit: f8ce21de8f599635d9c811edbd4d6f59c8c84fc5
gpu: NVIDIA GeForce GTX 1650
title: eddfb802
seconds: 60
exit: 0x0
frames shown: 928 (PresentX 929)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 11606 MB

Not tested

  • An alias with two stars through Registry::route in a title's run: the unit test calls glob_match, the function the route uses.
  • AMD GPUs and native wave64; the title's world load (the smoke runs end in the menu on this card).

AI use

  • Claude Code, Claude Sonnet 5.5: found the defect, wrote the change, the test and this description, and ran the checks.
**@⁠gefydev** on GitHub · 2026-11-25 13:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/2310) `gefydev:config-glob-several-stars` → `main` · +35 −4 · 1 files · 1 commits · merged 2026-11-25 16:15 UTC An alias in `xcl.toml` whose DLL pattern has more than one `*`, such as `api-ms-win-*-l1-1-*.dll`, never matched a DLL: `glob_match` split the pattern at the first `*` and compared everything after it as plain text, so the second `*` had to appear in the DLL's name. The alias was ignored with no message. Patterns with one `*` or none, which are all that XCL's own table uses, answer as before. **What is in it** - `crates/xcl/src/util.rs`: `glob_match` reads `*` as any run of characters, anywhere and as often as the pattern has it: the start is matched at the start, the parts between the stars in order, the last part at the end. - Test `globbing_with_several_stars`: a two-star API-set pattern that matches and one that does not, `a*b*c` against names that do and do not match, the non-overlap of the two ends (`ab*ba` against `aba`), a lone `*` and `**`. **Tested** - NVIDIA GeForce GTX 1650 (4 GB, 32-lane waves only), driver 621.24, AMD Ryzen 5 1600, 16 GB RAM, Windows 11 Pro 10.0.26300, Rust 1.100.0, debug for the tests and release for the regression runs. - The new test fails without the change (`assertion failed: glob_match("api-ms-win-*-l1-1-*.dll", "api-ms-win-core-file-l1-1-0.dll")`) and passes with it; the existing `globbing` test passes in both. - `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4` on `f8ce21d`: **1251 passed, 0 failed, 46 ignored**. 26 SKIPPED, none of them on a path this change touches: 20 wave64 cases ("no wave64" on this GPU), 3 per-lane f16 cases the per-lane form refuses, 1 "no heap windows", 2 for the D3D12 debug layer not being installed. **Regression run** `scripts/smoke.ps1 -Game <title folder> -Seconds 60`, release builds, the same machine and title for both, one after the other. An earlier run of this branch had come out at 499 frames and 15 294 MB of peak commit, against 910 frames and 11 693 MB for main in its first run; the next two runs of each were within a few percent of each other (main 888 and 911 frames, this branch 902 and 928), so I take the first one as that machine's run-to-run spread (#2225) and show the last pair. main: ``` xcl-smoke v1 commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6 gpu: NVIDIA GeForce GTX 1650 title: eddfb802 seconds: 60 exit: 0x0 frames shown: 911 (PresentX 911) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 11671 MB ``` PR: ``` xcl-smoke v1 commit: f8ce21de8f599635d9c811edbd4d6f59c8c84fc5 gpu: NVIDIA GeForce GTX 1650 title: eddfb802 seconds: 60 exit: 0x0 frames shown: 928 (PresentX 929) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 11606 MB ``` **Not tested** - An alias with two stars through `Registry::route` in a title's run: the unit test calls `glob_match`, the function the route uses. - AMD GPUs and native wave64; the title's world load (the smoke runs end in the menu on this card). **AI use** - Claude Code, Claude Sonnet 5.5: found the defect, wrote the change, the test and this description, and ran the checks.
glob_match split the pattern at the first '*' only, so everything after it was
compared as plain text: "api-ms-win-*-l1-1-*.dll" kept a literal '*' in its tail
and matched no DLL, and an alias in xcl.toml written that way was silently
ignored. '*' now stands for any run of characters wherever it is, as often as the
pattern has it; a pattern with one '*' or none answers as before.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:26:42 +00:00
github manually merged commit f8ce21de8f into gh-pr/2310/base 2026-11-26 05:26:43 +00:00
Author
Owner

@⁠oni-swr on GitHub · 2026-11-25 13:45 UTC · original

CPU-only review of #2310 at head f8ce21de8f599635d9c811edbd4d6f59c8c84fc5, on origin/main afc5ee86ae3a9521c9f15d96505cd73fe72f2191 (the PR is based on 1a0bbe3; it merges into current main without conflicts).

Tested

  • Built a throwaway merge of #2310, #2311 and #2312 onto origin/main (all three merge cleanly together) and ran cargo test -p xcl --lib --no-run: compiles; the 2 warnings are in code these PRs do not touch.
  • cargo test -p xcl --lib util:: -- --test-threads=1: 6 passed, 0 failed, 0 ignored (includes the new globbing_with_several_stars and the old globbing)

Review

  • Read the new glob_match: prefix is stripped, middle parts are taken in order at their first occurrence, the last part is checked as the tail of what is left, so the parts cannot overlap (ab*ba vs aba, a*a vs a). Edge cases "", *, ** and no-star behave as the test says. The new test would have failed on the old split_once version (e.g. a*b*c vs aXbYbZc). No issues found. Matching is still case-sensitive as before.
    Overlap
  • No other open PR touches glob_match (searched open PRs).

Not tested

  • The full workspace suite and any GPU test (the GPU was in use by another job), the integration / e2e binaries, and scripts/smoke.ps1 / any title run. This is not a replacement for the GPU suite or the smoke run the PR template asks for.

AI use

  • Review and test run written by Claude Code (Claude Sonnet 5.5), from a real run on Windows 11 (10.0.26200), stable-x86_64-pc-windows-msvc, debug build, CPU only. I read the full diff; nothing was changed or pushed.
**@⁠oni-swr** on GitHub · 2026-11-25 13:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/2310#issuecomment-7164251246) **CPU-only review of #2310** at head `f8ce21de8f599635d9c811edbd4d6f59c8c84fc5`, on `origin/main` `afc5ee86ae3a9521c9f15d96505cd73fe72f2191` (the PR is based on `1a0bbe3`; it merges into current `main` without conflicts). **Tested** - Built a throwaway merge of #2310, #2311 and #2312 onto `origin/main` (all three merge cleanly together) and ran `cargo test -p xcl --lib --no-run`: compiles; the 2 warnings are in code these PRs do not touch. - `cargo test -p xcl --lib util:: -- --test-threads=1`: 6 passed, 0 failed, 0 ignored (includes the new `globbing_with_several_stars` and the old `globbing`) **Review** - Read the new `glob_match`: prefix is stripped, middle parts are taken in order at their first occurrence, the last part is checked as the tail of what is left, so the parts cannot overlap (`ab*ba` vs `aba`, `a*a` vs `a`). Edge cases `""`, `*`, `**` and no-star behave as the test says. The new test would have failed on the old `split_once` version (e.g. `a*b*c` vs `aXbYbZc`). No issues found. Matching is still case-sensitive as before. **Overlap** - No other open PR touches `glob_match` (searched open PRs). **Not tested** - The full workspace suite and any GPU test (the GPU was in use by another job), the integration / e2e binaries, and `scripts/smoke.ps1` / any title run. This is not a replacement for the GPU suite or the smoke run the PR template asks for. **AI use** - Review and test run written by Claude Code (Claude Sonnet 5.5), from a real run on Windows 11 (10.0.26200), `stable-x86_64-pc-windows-msvc`, debug build, CPU only. I read the full diff; nothing was changed or pushed.
Author
Owner

@⁠gefydev on GitHub · 2026-11-25 13:48 UTC · original

@⁠oni-swr thank you for the review of #2310 at f8ce21d on origin/main afc5ee8: util:: 6 passed, 0 failed, a clean merge with #2311 and #2312, and no issues in glob_match. The full suite (1251 passed, 0 failed, 46 ignored) and the smoke pair are in the description; no GPU suite was part of your run, as you say.

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @⁠gefydev.

**@⁠gefydev** on GitHub · 2026-11-25 13:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/2310#issuecomment-7164308137) @⁠oni-swr thank you for the review of #2310 at `f8ce21d` on `origin/main` `afc5ee8`: `util::` 6 passed, 0 failed, a clean merge with #2311 and #2312, and no issues in `glob_match`. The full suite (1251 passed, 0 failed, 46 ignored) and the smoke pair are in the description; no GPU suite was part of your run, as you say. AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @⁠gefydev.
Author
Owner

@⁠nnonno91 on GitHub · 2026-11-25 14:33 UTC · original

I checked a two-star alias through TOML parsing and Registry::route on f8ce21de8f599635d9c811edbd4d6f59c8c84fc5.

Tested

  • Windows 11 25H2 build 26200.9974, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, unoptimized profile. CPU-only checks.
  • cargo test --locked -p xcl --lib globbing -- --nocapture --test-threads=1 gave 2 passed, 0 failed.
  • A temporary hle::tests::local_two_star_alias_from_toml fixture parsed "api-ms-win-*-l1-1-*.dll" = "@stub" in [aliases], built the registry and checked its routes. Three matching names selected the configured route, including two empty wildcard spans. Three near misses kept their default routes. The API-set file DLL also had a different route in the default registry, so the check exercised precedence.
  • cargo test --locked -p xcl --lib hle::tests::local_two_star_alias_from_toml -- --exact --nocapture --test-threads=1 gave 1 passed, 0 failed. Both runs had 0 ignores and no skips. The temporary fixture was removed.

Not tested

A running title importing through this alias, the parent and the full workspace suite.

AI use

OpenAI Codex (GPT-6.2 Sol) wrote the temporary fixture, ran the tests and prepared this report.

**@⁠nnonno91** on GitHub · 2026-11-25 14:33 UTC · [original](https://github.com/xcl-dev/xcl/pull/2310#issuecomment-7165459753) I checked a two-star alias through TOML parsing and `Registry::route` on `f8ce21de8f599635d9c811edbd4d6f59c8c84fc5`. **Tested** - Windows 11 25H2 build 26200.9974, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, unoptimized profile. CPU-only checks. - `cargo test --locked -p xcl --lib globbing -- --nocapture --test-threads=1` gave 2 passed, 0 failed. - A temporary `hle::tests::local_two_star_alias_from_toml` fixture parsed `"api-ms-win-*-l1-1-*.dll" = "@stub"` in `[aliases]`, built the registry and checked its routes. Three matching names selected the configured route, including two empty wildcard spans. Three near misses kept their default routes. The API-set file DLL also had a different route in the default registry, so the check exercised precedence. - `cargo test --locked -p xcl --lib hle::tests::local_two_star_alias_from_toml -- --exact --nocapture --test-threads=1` gave 1 passed, 0 failed. Both runs had 0 ignores and no skips. The temporary fixture was removed. **Not tested** A running title importing through this alias, the parent and the full workspace suite. **AI use** OpenAI Codex (GPT-6.2 Sol) wrote the temporary fixture, ran the tests and prepared this report.
Author
Owner

@⁠gefydev on GitHub · 2026-11-25 14:47 UTC · original

@⁠nnonno91 thank you for the report on #2310 at f8ce21d (Ryzen 7 9800X3D, Windows 11 build 26200.9974, Rust 1.100.0, CPU only). It covers what the description lists as not tested, a two-star alias through the TOML and Registry::route: globbing 2 passed, 0 failed, and your temporary fixture with "api-ms-win-*-l1-1-*.dll" = "@stub" selected the configured route for three matching names (two with empty wildcard spans), kept the default route for three near misses, and the default registry gave the API-set file DLL a different route, so precedence was exercised. The fixture was removed and no title ran, as you say.

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @⁠gefydev.

**@⁠gefydev** on GitHub · 2026-11-25 14:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/2310#issuecomment-7165810302) @⁠nnonno91 thank you for the report on #2310 at `f8ce21d` (Ryzen 7 9800X3D, Windows 11 build 26200.9974, Rust 1.100.0, CPU only). It covers what the description lists as not tested, a two-star alias through the TOML and `Registry::route`: `globbing` 2 passed, 0 failed, and your temporary fixture with `"api-ms-win-*-l1-1-*.dll" = "@stub"` selected the configured route for three matching names (two with empty wildcard spans), kept the default route for three near misses, and the default registry gave the API-set file DLL a different route, so precedence was exercised. The fixture was removed and no title ran, as you say. AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @⁠gefydev.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 17:41 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 17:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/2310#issuecomment-7169857330) 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 discussion has been locked. Commenting is limited to contributors.
No description provided.