Scripts: hash the game folder name on the smoke block's title line #1482

Closed
github-bot wants to merge 1 commit from gh-pr/1482/head into gh-pr/1482/base
Owner

@⁠ORKHANALIYEV27 on GitHub · 2026-11-24 16:47 UTC · original
ORKHANALIYEV27:scripts/smoke-hash-title → main · +21 −3 · 1 files · 1 commits · closed without merging

Scripts: hash the game folder name on the smoke block's title line

Fixes #677. scripts/smoke.ps1 printed the game folder's name on the title: line
of every xcl-smoke block, which leaked retail title names (and scene release tags)
into public PR descriptions. Print the first 8 hex chars of SHA-256 of the folder's
leaf name (lowercased) instead. Add an optional -Title <label> parameter for a
readable label.

What is in it

  • scripts/smoke.ps1: hash-based title label; new -Title parameter; updated usage comment

Tested

  • PowerShell parser check on the modified script
  • Hash computation verified against SHA-256 of a sample folder name

Not tested

  • End-to-end run of smoke.ps1 (no release build / title available in this environment)

AI use

  • Claude Code (Beam) wrote the change and this description
**@⁠ORKHANALIYEV27** on GitHub · 2026-11-24 16:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/1482) `ORKHANALIYEV27:scripts/smoke-hash-title` → `main` · +21 −3 · 1 files · 1 commits · closed without merging Scripts: hash the game folder name on the smoke block's title line Fixes #677. `scripts/smoke.ps1` printed the game folder's name on the `title:` line of every `xcl-smoke` block, which leaked retail title names (and scene release tags) into public PR descriptions. Print the first 8 hex chars of SHA-256 of the folder's leaf name (lowercased) instead. Add an optional `-Title <label>` parameter for a readable label. **What is in it** - `scripts/smoke.ps1`: hash-based title label; new `-Title` parameter; updated usage comment **Tested** - PowerShell parser check on the modified script - Hash computation verified against SHA-256 of a sample folder name **Not tested** - End-to-end run of `smoke.ps1` (no release build / title available in this environment) **AI use** - Claude Code (Beam) wrote the change and this description
Fixes #677. Print the first 8 hex chars of SHA-256 of the title folder's leaf name (lowercased) instead of the folder name itself, so PR descriptions no longer carry retail title names. Add an optional -Title parameter for a readable label.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:55:16 +00:00
github-bot closed this pull request 2026-11-26 04:55:16 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 18:53 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 18:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1482#issuecomment-7141294497) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
Author
Owner

@⁠ivall on GitHub · 2026-11-24 20:50 UTC · original

Closing this as a duplicate of #689 (group D15 in #1607): both print a hash of the game folder's name on the title: line and add -Title, and only one can land. #689 was opened first, validates the label, has a test and both checks green.

This says nothing about the quality of the code here. If this PR covers a case the other one does not, or #689 is closed without being merged, say so and I'll reopen it.

Thank you for the work.

AI use: Claude Code (Claude Opus 5.5) read the diffs and the checks in #1607 and wrote this comment, on the maintainer's behalf.

**@⁠ivall** on GitHub · 2026-11-24 20:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/1482#issuecomment-7144119174) Closing this as a duplicate of #689 (group D15 in #1607): both print a hash of the game folder's name on the `title:` line and add `-Title`, and only one can land. #689 was opened first, validates the label, has a test and both checks green. This says nothing about the quality of the code here. If this PR covers a case the other one does not, or #689 is closed without being merged, say so and I'll reopen it. Thank you for the work. AI use: Claude Code (Claude Opus 5.5) read the diffs and the checks in #1607 and wrote this comment, on the maintainer's behalf.
@ -20,0 +29,4 @@
try {
$bytes = [System.Text.Encoding]::UTF8.GetBytes($leaf.ToLowerInvariant())
$hash = $sha.ComputeHash($bytes)
$titleLabel = ([BitConverter]::ToString($hash) -replace '-', '').Substring(0, 8).ToLowerInvariant()
Author
Owner

@⁠gut0to on GitHub · 2026-11-24 18:51 UTC · original

This is deterministic, unsalted, and only 32 bits, so a public smoke block can be matched against a dictionary of likely retail folder names and release tags. That makes the default label identifying despite the comment calling it non-identifying. Could the script emit a neutral label by default and leave readable labels to the explicit -Title option, or use a per-user secret mapping? AI-assisted review; I verified the hash input and truncation.

**@⁠gut0to** on GitHub · 2026-11-24 18:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/1482#discussion_r4684935595) This is deterministic, unsalted, and only 32 bits, so a public smoke block can be matched against a dictionary of likely retail folder names and release tags. That makes the default label identifying despite the comment calling it non-identifying. Could the script emit a neutral label by default and leave readable labels to the explicit `-Title` option, or use a per-user secret mapping? AI-assisted review; I verified the hash input and truncation.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.