Skip to content

Scripts: hash the smoke block title instead of the folder name (#677) - #704

Closed
Luxuryig wants to merge 1 commit into
xcl-dev:mainfrom
Luxuryig:scripts-smoke-title-hash
Closed

Luxuryig wants to merge 1 commit into
xcl-dev:mainfrom
Luxuryig:scripts-smoke-title-hash

Conversation

@Luxuryig

Copy link
Copy Markdown
Contributor

scripts/smoke.ps1 printed the game folder's leaf name on the title: line of every xcl-smoke block. Those blocks are pasted into pull requests, so the folder name (sometimes a scene tag) became public text. The line is now the first 8 hex characters of SHA-256 over the UTF-8 of that leaf, lowercased. pr_check.py only compares the two title: strings, so a main run and a head run of the same folder still match. -Title prints a label instead, as given; both runs of a pair have to use the same label. This does not edit descriptions already on other pull requests.

Fixes #677

What is in it

  • scripts/smoke_title.ps1: Get-XclSmokeTitle hashes the lowercased folder leaf, or returns -Title when it is not blank
  • scripts/smoke.ps1: the title: line uses that function, and -Title is an optional parameter
  • scripts/test-smoke-title.tests.ps1: known SHA-256 prefixes for an ASCII leaf, a mixed-case leaf, a spaced name, and café, plus the label override

Tested

  • NVIDIA GeForce RTX 4060 Ti (driver 32.0.16.1664, 7949 MiB VRAM), AMD Ryzen 5 5500, Windows NT 10.0.26200.0, rustc/cargo 1.99.1, DXC dxcompiler/dxil 1.8.2502.11 from Windows Kits 10.0.26100.0 x64
  • .\scripts\test.ps1 (debug) on this commit: exit 0. 692 passed, 0 failed, 41 ignored
  • SKIPPED: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64)
  • not set, their tests are skipped: XCL_SAMPLE_RPF, XCL_SAMPLE_DLLS, XCL_SAMPLE_TTPF, XCL_SAMPLE_BK2, XCL_SAMPLE_BVH4, XCL_SAMPLE_AWC, XCL_SAMPLE_XG, XCL_SAMPLE_DXC
  • powershell.exe -NoProfile -File .\scripts\test-smoke-title.tests.ps1: smoke title tests passed
  • python .\scripts\test_pr_check.py: 3 tests, OK
  • pre-existing warning only: deprecated Atomic::fetch_update in crates/xcl/src/hle/xgameruntime/mod.rs:547 (not touched)

Regression run
Not a runtime change. No xcl-smoke blocks.

Not tested

  • AMD, wave64
  • no retail title was launched; the script change does not run one
  • existing pull-request descriptions were left as they are

AI use

  • Grok Build (Grok 4.7) wrote the script, the test, and this description.

The title line printed the game folder's leaf, so PR descriptions
published that name. Print 8 hex chars of SHA-256 of the lowercased
leaf, and keep an optional -Title label.

Fixes xcl-dev#677

Assisted-by: Grok Build (Grok 4.7)
@RandomGithub12309

Copy link
Copy Markdown
Contributor

Independent test report and review of 4f39d23db396b2ab6b30d6a9917acce74c7f73e2:

Tested

  • OS / Shell: Windows 11 Build 26300, Windows PowerShell 5.1
  • Commands:
    • powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\test-smoke-title.tests.ps1 → smoke title tests passed
    • Verified Get-XclSmokeTitle produces matching hashes for 'C:\Games\MyTitle' and 'C:\Games\MyTitle\' (2ab7d6c1).

Review

  • Overlaps #689: Both PRs address #677 in scripts/smoke.ps1 and produce different hashes (#704 lowercases without trimming whitespace; #689 trims without lowercasing).
  • Unvalidated -Title control characters: Get-XclSmokeTitle returns -Title verbatim when non-whitespace (verified Get-XclSmokeTitle -Game 'C:\Games\MyTitle' -Title "a\nb"returns"a\nb"), which splits the single-line title:field forscripts/pr_check.py`.
  • Windows PowerShell 5.1 $PSScriptRoot default-parameter bug remains: smoke.ps1 still defaults -Xcl = (Join-Path $PSScriptRoot '..\target\release\xcl.exe') inside param(), failing when invoked without -Xcl from the repo root on PowerShell 5.1 (fixed in #629).

Not tested

  • PowerShell 7 (pwsh), full retail smoke.ps1 run

AI use

  • Antigravity with Gemini 4 Hydrogen — checked out 4f39d23, audited the diff, ran the PowerShell checks, and wrote this report.

@futurepro62

Copy link
Copy Markdown

Tested exact head 4f39d23.

Tested

  • Windows 11 Home 26300, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here), Python 3.14.3.
  • powershell -NoProfile -File scripts/test-smoke-title.tests.ps1: smoke title tests passed. This test exercises smoke_title.ps1 alone, so it also passes with the parent's smoke.ps1; I checked the wiring into smoke.ps1 separately:
  • End to end with a temporary game folder My Game Folder and a fake xcl.cmd that prints a log path (the same kind of fixture smoke-environment.tests.ps1 uses), smoke.ps1 -Game <folder> -Seconds 1 -Xcl <fake>: the block says title: 1c6c7aa2, which is the first 8 hex digits of SHA-256 of my game folder (checked in Python). On the parent 63cdc25 the same run prints title: My Game Folder.

Not tested

  • -Title, PowerShell 7, a real title.

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and the fixture runs and wrote this report. I checked it before posting.

@raylitebull

Copy link
Copy Markdown
Member

Closing as a duplicate of #689, which already passes both Build and test and PR description cleanly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scripts: smoke blocks print the game folder's name

4 participants