Scripts: smoke blocks name the game folder by a hash, not its name #684

Merged
grahamster2 merged 1 commit from upstream-pr/689 into main 2026-11-24 20:59:34 +00:00
grahamster2 commented 2026-11-24 03:31:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by grahamster2 on 2026-11-24T03:31:33Z.


scripts/smoke.ps1 printed the game folder's name on the title: line of every xcl-smoke block, so PR descriptions named people's copies of a retail game. It now prints the first 8 hex digits of the SHA-256 of the folder name (trimmed, UTF-8), the same as Python's hashlib.sha256(name.strip().encode()).hexdigest()[:8], so existing blocks can be converted and keep matching. pr_check.py only compares the main and PR titles for equality, so the check is unchanged. -Title <label> prints a label of your choice instead. Fixes #677

What is in it

  • scripts/smoke.ps1: the title: line is the hash of the folder name, or the -Title label (trimmed; empty labels, control/format/line-separator characters and backticks are refused, since pr_check.py splits lines with str.splitlines() and a U+2028 would add keys like commit: to the block)
  • scripts/smoke-title.tests.ps1: checks the hash of ASCII, accented, CJK and emoji names against Python's values, a trailing \ on -Game, -Title, and the refused labels, with a stand-in for xcl.exe (same pattern as test-native-stderr.tests.ps1)

Tested

  • Windows 11 Pro 10.0.26200, AMD Ryzen 5 7600X, Windows PowerShell 5.1.26100.9818, pwsh 7.7.0, Python 3.12
  • powershell.exe -File scripts/smoke-title.tests.ps1 and pwsh -File scripts/smoke-title.tests.ps1: smoke-title: ok on both; the test fails on main's smoke.ps1 (prints the name, not the hash)
  • hashes from both shells compared with Python's for 8 invented folder names (ASCII, padded, accented, CJK, emoji): identical
  • python -m unittest test_pr_check in scripts/: 3 tests, OK
  • pr_check.check() on sample descriptions: hash/hash and label/label pairs pass; a main block with the plain name against a PR block with the hash is refused as different titles

Not tested

  • cargo build / cargo test not run, and no regression run: the change is only in scripts/, not the runtime
  • not run with a real xcl.exe or a real title (the tests use a stand-in that prints a log path)
  • during the switchover, a branch that is not rebased still prints the folder name, while main prints the hash, so the two blocks won't match: rebase, or pass the same -Title to both runs
  • the hash keeps the name out of the text, but it isn't anonymous: anyone who guesses the name can check it. Use -Title with a neutral label if that matters. The hash is case-sensitive, so type the folder's name with the same casing in both runs

AI use

  • Claude Code with Claude Opus 5.5 (claude-opus-5-5): wrote the change, the test and this description, ran the tests above; a separate Claude Code agent (same model) reviewed the diff adversarially, and the U+2028 label finding was fixed
<!-- greyfinch-sync:ivall/xcl:issue:6573984974 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/689). Originally posted by [grahamster2](https://github.com/grahamster2) on 2026-11-24T03:31:33Z. --- `scripts/smoke.ps1` printed the game folder's name on the `title:` line of every `xcl-smoke` block, so PR descriptions named people's copies of a retail game. It now prints the first 8 hex digits of the SHA-256 of the folder name (trimmed, UTF-8), the same as Python's `hashlib.sha256(name.strip().encode()).hexdigest()[:8]`, so existing blocks can be converted and keep matching. `pr_check.py` only compares the main and PR titles for equality, so the check is unchanged. `-Title <label>` prints a label of your choice instead. Fixes #677 **What is in it** - `scripts/smoke.ps1`: the `title:` line is the hash of the folder name, or the `-Title` label (trimmed; empty labels, control/format/line-separator characters and backticks are refused, since `pr_check.py` splits lines with `str.splitlines()` and a U+2028 would add keys like `commit:` to the block) - `scripts/smoke-title.tests.ps1`: checks the hash of ASCII, accented, CJK and emoji names against Python's values, a trailing `\` on `-Game`, `-Title`, and the refused labels, with a stand-in for `xcl.exe` (same pattern as `test-native-stderr.tests.ps1`) **Tested** - Windows 11 Pro 10.0.26200, AMD Ryzen 5 7600X, Windows PowerShell 5.1.26100.9818, pwsh 7.7.0, Python 3.12 - `powershell.exe -File scripts/smoke-title.tests.ps1` and `pwsh -File scripts/smoke-title.tests.ps1`: `smoke-title: ok` on both; the test fails on `main`'s `smoke.ps1` (prints the name, not the hash) - hashes from both shells compared with Python's for 8 invented folder names (ASCII, padded, accented, CJK, emoji): identical - `python -m unittest test_pr_check` in `scripts/`: 3 tests, OK - `pr_check.check()` on sample descriptions: hash/hash and label/label pairs pass; a main block with the plain name against a PR block with the hash is refused as different titles **Not tested** - `cargo build` / `cargo test` not run, and no regression run: the change is only in `scripts/`, not the runtime - not run with a real `xcl.exe` or a real title (the tests use a stand-in that prints a log path) - during the switchover, a branch that is not rebased still prints the folder name, while `main` prints the hash, so the two blocks won't match: rebase, or pass the same `-Title` to both runs - the hash keeps the name out of the text, but it isn't anonymous: anyone who guesses the name can check it. Use `-Title` with a neutral label if that matters. The hash is case-sensitive, so type the folder's name with the same casing in both runs **AI use** - Claude Code with Claude Opus 5.5 (claude-opus-5-5): wrote the change, the test and this description, ran the tests above; a separate Claude Code agent (same model) reviewed the diff adversarially, and the U+2028 label finding was fixed
thehollowedone commented 2026-11-24 07:05:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-24T03:38:16Z.


Tested

I ran the old and new smoke scripts with the real xcl.exe and XCL’s synthetic test title. The title fixture used a generated folder name containing CJK characters and an emoji. I removed its test-only --hello assertion so it could run under the unmodified smoke scripts.

  • 91f9a5e printed the synthetic folder’s basename.
  • 9683e7a printed the same independently computed Python SHA-256 prefix in PowerShell 7 and Windows PowerShell 5.1. The explicit -Title 'Synthetic fixture' worked in 5.1. None of the three patched blocks contained the synthetic basename or full path.

cargo build --offline --locked --workspace passed. All four scripts/smoke.ps1 invocations used the same debug launcher, a fresh title-data directory and a 20-second limit. Each block identified the script tree’s expected commit, with exit 0x0, zero crashes and zero device removals. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC.

Not tested

Retail titles or failure output.

AI use

Codex with GPT-6.2 Sol prepared the synthetic fixture, ran the checks, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7121281846 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/689#issuecomment-7121281846). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-24T03:38:16Z. --- **Tested** I ran the old and new smoke scripts with the real `xcl.exe` and XCL’s synthetic test title. The title fixture used a generated folder name containing CJK characters and an emoji. I removed its test-only `--hello` assertion so it could run under the unmodified smoke scripts. - [`91f9a5e`](https://github.com/ivall/xcl/commit/91f9a5e9f03156ea82dc55a18f7704862da7a5db) printed the synthetic folder’s basename. - [`9683e7a`](https://github.com/ivall/xcl/commit/9683e7a616ad90675e9c786cb2039fe80a160172) printed the same independently computed Python SHA-256 prefix in PowerShell 7 and Windows PowerShell 5.1. The explicit `-Title 'Synthetic fixture'` worked in 5.1. None of the three patched blocks contained the synthetic basename or full path. `cargo build --offline --locked --workspace` passed. All four `scripts/smoke.ps1` invocations used the same debug launcher, a fresh title-data directory and a 20-second limit. Each block identified the script tree’s expected commit, with exit `0x0`, zero crashes and zero device removals. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC. **Not tested** Retail titles or failure output. **AI use** Codex with GPT-6.2 Sol prepared the synthetic fixture, ran the checks, and drafted this report.
upipibi commented 2026-11-24 07:06:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-24T05:41:11Z.


Full-suite run on this PR's head 9683e7a, for the counts CONTRIBUTING.md item 2 asks for:

Tested

  • NVIDIA GeForce RTX 3070 (driver 616.56, wave32), Ryzen 9 5950X, Windows 11 Pro 26100, rustc 1.100.0 MSVC, debug
  • cargo build --workspace then cargo test --workspace --no-fail-fast -- --test-threads=4: 692 passed, 0 failed, 41 ignored (16 test binaries, the e2e title included)
  • SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64)

Not tested: AMD / wave64; no retail title (this PR changes only scripts/).

AI-assisted (Claude Code).

<!-- greyfinch-sync:ivall/xcl:comment:7123178878 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/689#issuecomment-7123178878). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-24T05:41:11Z. --- Full-suite run on this PR's head `9683e7a`, for the counts CONTRIBUTING.md item 2 asks for: **Tested** - NVIDIA GeForce RTX 3070 (driver 616.56, wave32), Ryzen 9 5950X, Windows 11 Pro 26100, rustc 1.100.0 MSVC, debug - `cargo build --workspace` then `cargo test --workspace --no-fail-fast -- --test-threads=4`: **692 passed, 0 failed, 41 ignored** (16 test binaries, the e2e title included) - SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64) **Not tested:** AMD / wave64; no retail title (this PR changes only `scripts/`). AI-assisted (Claude Code).
upstream-sync closed this pull request 2026-11-24 21:04:18 +00:00
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!684
No description provided.