fix(privacy): one shared rule keeps the user's name out of the launcher's log and every report #164

Merged
HumanBean merged 3 commits from dyst/LongshotLauncher:fix/build-report-scrub into main 2026-11-17 20:28:42 +00:00
Member

The launcher's log, its bug reports and the build summaries must never carry the OS user's name, and #162's summaries could: its filter replaced whole paths, missed some shapes, and still let folder names through. This PR makes one shared rule that takes the user's name out of every path, and leaves the rest of the path, which is what tells a helper where a build failed.

The shared helper: Privacy.Scrub (Core/Privacy.cs)

BugReport.Scrub (home folder as ~) moves into its own class and is extended. With no arguments it reads this PC's home folder and user itself; tests pass their own. Its placeholders are the game's own (Longshot's gpu/vk/vk_bug_report.cpp and hos_crash_redact_line in host/hos_crash_dialog.h), so a launcher's report and a game's read alike.

  1. The home folder as %USERPROFILE% on Windows and ~ on Linux, wherever a path starts with it: in any case on Windows, either separator, doubled as JSON writes it, %20 in a file:// link. C:\Users\Name2 and C:\Users\Name Smith\x stay as they are.
  2. The user's name as <user>, wherever it is a whole folder's name in a path: another drive (D:\Users\Ana\x), a backup or OneDrive folder (E:\Backup\Ana\saves, D:\OneDrive\Ana\x), /media/<name>, /run/media/<name>, /var/home/<name> (Steam Deck and other image-based distros), and on Windows in any case and as its 8.3 short form (C:\Users\JANEAN~1).
  3. Scrubbed text stays as it is: neither placeholder follows a separator as a name would, so %USERPROFILE% and <user> are never replaced again (checked, also for users called user and USERPROFILE).
    • Names: the home folder's last name, and Environment.UserName, which can differ from it (a renamed account, a Microsoft account's 5-letter folder).
    • Only as a folder's name: a separator before it, and the folder ending after it (a separator, the end, a quote or bracket, a full stop, or a space whose next word is no path). So Ana in a sentence, Ana2 and Ana.old stay; a name with spaces, an apostrophe or non-ASCII is taken out whole (D:\Users\Jane Ann Doe\x, D:\Users\Seán O'Brien\x).
    • Names under 2 characters are left alone: a one-letter folder is no one's name.

Where it runs:

  • LauncherLog.Add scrubs every line before it keeps it, so no caller has to remember. Whatever reads the log gets no user name either. #171 (the log in logs/launcher.log) gets this for free if its file writer uses the lines Add keeps.
  • BugReport.Make and BuildReports.Json use the same helper (on each field, then on the whole JSON).

The build summary's diagnostic (Core/BuildReports.cs)

  • Paths stay, without the user's name. The whole-path [path] patterns and Failure.Known (the player's own texts, matched as substrings) are gone.
  • Game files' names go, as [game file] (CONTRIBUTING's no-game-files rule): .nup, .nx (from GameFiles.Extensions, kept in step by a check), other dump and key formats, the game's own files; a quoted one whole, spaces and all. A call such as d.keys() or struct.pack() stays.
  • A link keeps its scheme, host and path: a user and password before the host, a query (?token=) and a fragment never go, for magicbean.dev too.
  • A long line is cut before the patterns run (a 100 KB word took seconds).

Other fixes, as before

  • why is required, and the launcher's own SIGTERM sends BuildReports.LauncherStopped. Its summary now sends no earlier error line, so it counts under one signature.
  • The fallback reasons go in English; the problem page stays in the player's language.
  • why and error the same: sent once, as why.
  • [GeneratedRegex], as in Problems.cs.
  • The statistics' consent text said "No paths, names or saves", which a summary's paths would no longer match: it now says "No user name, game files or saves", in all 12 catalogs (the new words need a native speaker's look).

Not done

  • A copy in perf_sent: perf_sent/ is the game's sender's folder, and a failed first build has no game folder yet. It needs a place of its own and a Settings wording decision: its own PR.
  • The signature as ProblemKind plus the stage and exit code: with paths kept, a free-text signature now differs per PC folder layout, so this matters more. It's a design choice for whoever owns Longshot-api's dashboards; this PR keeps the free text and makes it safe.
  • A dump's name with spaces, neither quoted nor alone, keeps the words before its last one: C:\Games\The Legend Dump v2.nup goes as C:\Games\The Legend Dump [game file].
  • e.Message on two of the build step's failures is the OS's own text, in its language on Windows: not changed.

Testing

  • python -I tests/test_launcher_core.py: 1584 checks passed. New: PrivacyChecks (the moved home-folder cases; names with several spaces, an apostrophe, non-ASCII; another drive, OneDrive, a backup folder, an 8.3 name; /media, /run/media, /var/home; Environment.UserName beside the folder's name; prose, longer names and relative paths kept; this PC's own home and user by default; a line through LauncherLog.Add), the summary's JSON end to end on Windows and Linux paths (no user name anywhere in what is sent, the rest of the path kept, %USERPROFILE% and <user> written as they are in a summary's and Send's JSON, never \u003C), the diagnostic's table, and a 100 KB word.
  • python -I tests/test_release.py: 37 tests OK.
  • dotnet build App -c Release: 0 warnings, 0 errors.
  • Windows 11, .NET SDK 10.0.404. Not run: mise run ci:smoke (no mise here), a build through the app, Linux.
The launcher's log, its bug reports and the build summaries must never carry the OS user's name, and #162's summaries could: its filter replaced whole paths, missed some shapes, and still let folder names through. This PR makes one shared rule that takes the user's name out of every path, and leaves the rest of the path, which is what tells a helper where a build failed. ## The shared helper: `Privacy.Scrub` (Core/Privacy.cs) `BugReport.Scrub` (home folder as `~`) moves into its own class and is extended. With no arguments it reads this PC's home folder and user itself; tests pass their own. Its placeholders are the game's own (Longshot's `gpu/vk/vk_bug_report.cpp` and `hos_crash_redact_line` in `host/hos_crash_dialog.h`), so a launcher's report and a game's read alike. 1. **The home folder as `%USERPROFILE%` on Windows and `~` on Linux**, wherever a path starts with it: in any case on Windows, either separator, doubled as JSON writes it, `%20` in a `file://` link. `C:\Users\Name2` and `C:\Users\Name Smith\x` stay as they are. 2. **The user's name as `<user>`**, wherever it is a whole folder's name in a path: another drive (`D:\Users\Ana\x`), a backup or OneDrive folder (`E:\Backup\Ana\saves`, `D:\OneDrive\Ana\x`), `/media/<name>`, `/run/media/<name>`, `/var/home/<name>` (Steam Deck and other image-based distros), and on Windows in any case and as its 8.3 short form (`C:\Users\JANEAN~1`). 3. **Scrubbed text stays as it is**: neither placeholder follows a separator as a name would, so `%USERPROFILE%` and `<user>` are never replaced again (checked, also for users called `user` and `USERPROFILE`). - **Names:** the home folder's last name, and `Environment.UserName`, which can differ from it (a renamed account, a Microsoft account's 5-letter folder). - **Only as a folder's name:** a separator before it, and the folder ending after it (a separator, the end, a quote or bracket, a full stop, or a space whose next word is no path). So `Ana` in a sentence, `Ana2` and `Ana.old` stay; a name with spaces, an apostrophe or non-ASCII is taken out whole (`D:\Users\Jane Ann Doe\x`, `D:\Users\Seán O'Brien\x`). - Names under 2 characters are left alone: a one-letter folder is no one's name. **Where it runs:** - **`LauncherLog.Add` scrubs every line before it keeps it**, so no caller has to remember. Whatever reads the log gets no user name either. https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/171 (the log in `logs/launcher.log`) gets this for free if its file writer uses the lines `Add` keeps. - `BugReport.Make` and `BuildReports.Json` use the same helper (on each field, then on the whole JSON). ## The build summary's diagnostic (Core/BuildReports.cs) - **Paths stay**, without the user's name. The whole-path `[path]` patterns and `Failure.Known` (the player's own texts, matched as substrings) are gone. - **Game files' names go**, as `[game file]` (CONTRIBUTING's no-game-files rule): `.nup`, `.nx` (from `GameFiles.Extensions`, kept in step by a check), other dump and key formats, the game's own files; a quoted one whole, spaces and all. A call such as `d.keys()` or `struct.pack()` stays. - **A link keeps its scheme, host and path**: a user and password before the host, a query (`?token=`) and a fragment never go, for magicbean.dev too. - **A long line is cut before the patterns run** (a 100 KB word took seconds). ## Other fixes, as before - **`why` is required**, and the launcher's own SIGTERM sends `BuildReports.LauncherStopped`. Its summary now sends no earlier error line, so it counts under one signature. - **The fallback reasons go in English**; the problem page stays in the player's language. - **why and error the same:** sent once, as `why`. - **`[GeneratedRegex]`**, as in `Problems.cs`. - **The statistics' consent text** said "No paths, names or saves", which a summary's paths would no longer match: it now says "No user name, game files or saves", in all 12 catalogs (the new words need a native speaker's look). ## Not done - **A copy in `perf_sent`:** `perf_sent/` is the game's sender's folder, and a failed first build has no game folder yet. It needs a place of its own and a Settings wording decision: its own PR. - **The signature as `ProblemKind` plus the stage and exit code:** with paths kept, a free-text signature now differs per PC folder layout, so this matters more. It's a design choice for whoever owns Longshot-api's dashboards; this PR keeps the free text and makes it safe. - **A dump's name with spaces, neither quoted nor alone,** keeps the words before its last one: `C:\Games\The Legend Dump v2.nup` goes as `C:\Games\The Legend Dump [game file]`. - **`e.Message`** on two of the build step's failures is the OS's own text, in its language on Windows: not changed. ## Testing - `python -I tests/test_launcher_core.py`: **1584 checks passed**. New: `PrivacyChecks` (the moved home-folder cases; names with several spaces, an apostrophe, non-ASCII; another drive, OneDrive, a backup folder, an 8.3 name; `/media`, `/run/media`, `/var/home`; `Environment.UserName` beside the folder's name; prose, longer names and relative paths kept; this PC's own home and user by default; a line through `LauncherLog.Add`), the summary's JSON end to end on Windows and Linux paths (no user name anywhere in what is sent, the rest of the path kept, `%USERPROFILE%` and `<user>` written as they are in a summary's and Send's JSON, never `\u003C`), the diagnostic's table, and a 100 KB word. - `python -I tests/test_release.py`: **37 tests OK**. - `dotnet build App -c Release`: 0 warnings, 0 errors. - Windows 11, .NET SDK 10.0.404. Not run: `mise run ci:smoke` (no mise here), a build through the app, Linux.
feat(build): build reports name their client, and a failed build's summary says why
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
f8a0786bfc
Every build report now carries "client": "Longshot" beside the launcher's version.
A failed or terminated build's automatic summary sends why it stopped and its last
error line, with paths and game files' names taken out, so Longshot-api's
signature label tells its failures apart (it was always "none").

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(build): a summary's diagnostic loses paths with spaces and every dump's name, and says why in English
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
46018097c1
The automatic build summary (#162) now carries why a build stopped and its last
error line, so what it takes out has to hold for every path and game file:

- The game file picked, its folders and the build's folder are taken out as they
  are, spaces and all (BuildReports.Failure.Known, from the build's job).
- A path runs through a space when the next word holds a separator too
  (D:\Jane Doe\x), and through the words of a game file's name with spaces.
  Quoted paths and names go as a whole.
- Every dump the launcher takes (GameFiles.Extensions: .nx as well as .nup) and
  the other dump, key and game formats (.nsz, .xcz, .nso, .keys, .bfres, .byml,
  .pack, .bntx, .sbfres) are game files; a check keeps the two lists together.
- Prose with a slash (3/10, N/A, and/or) is left alone. A magicbean.dev link
  is kept; any other keeps its host only; file:// is a path.
- The patterns are [GeneratedRegex], as in Problems.cs.
- why is required: the launcher's own SIGTERM says it was stopped
  (BuildReports.LauncherStopped), not an empty why.
- The summary's fallback why is English (Tr.N); the page keeps the player's
  language. One failure is one signature in every language.
- A summary's error line that only says why again is left empty.

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
futondestroyer left a comment

Request changes: automatic failure reports can still disclose parts of private paths containing multiple spaces.

Reviewed head: 46018097c1cd46c0684991e3ff6c0733c8f7c4b4, including the stacked #162 changes. The inline finding is reproduced through BuildReports.Json with an automatic failed report, using authored strings only; no telemetry was sent.

Findings

  • [P1] Redact complete paths with multiple spaces before sending automatic reports. Paths outside Failure.Known can retain middle words. See the inline reproduction on Core/BuildReports.cs:91. Please cover these cases through the final JSON serializer as well as Diagnostic.

Validation

  • python -I tests/test_launcher_core.py: 1,470 checks passed outside the sandbox. Windows symlink cases were skipped because the required privilege is unavailable.
  • python -I tests/test_release.py: 37 tests passed, with Git's OpenSSL on PATH and access to the suite's local fake HTTP server.
  • dotnet build App -c Release -warnaserror: 0 warnings, 0 errors.
  • Build qualification: the isolated review copy used installed SDK 10.0.401, replacing the copy's 10.0.404 pin for that run. This does not validate the pinned SDK. The initial locked build failed with NU1004 (runtime identifier / ILLink lock configuration); no locked-build pass is claimed.
  • Strict cross-repository checks did not complete: the local Longshot checkout's shader-cache names differ from this launcher's expectations. No native app/game build flow or Linux execution was tested.

Review and tests performed with OpenAI Codex. No repository source changes were retained.

Request changes: automatic failure reports can still disclose parts of private paths containing multiple spaces. Reviewed head: `46018097c1cd46c0684991e3ff6c0733c8f7c4b4`, including the stacked #162 changes. The inline finding is reproduced through `BuildReports.Json` with an automatic failed report, using authored strings only; no telemetry was sent. ### Findings - **[P1] Redact complete paths with multiple spaces before sending automatic reports.** Paths outside `Failure.Known` can retain middle words. See the inline reproduction on `Core/BuildReports.cs:91`. Please cover these cases through the final JSON serializer as well as `Diagnostic`. ### Validation - `python -I tests/test_launcher_core.py`: **1,470 checks passed** outside the sandbox. Windows symlink cases were skipped because the required privilege is unavailable. - `python -I tests/test_release.py`: **37 tests passed**, with Git's OpenSSL on PATH and access to the suite's local fake HTTP server. - `dotnet build App -c Release -warnaserror`: **0 warnings, 0 errors**. - Build qualification: the isolated review copy used installed SDK **10.0.401**, replacing the copy's **10.0.404** pin for that run. This does not validate the pinned SDK. The initial locked build failed with NU1004 (runtime identifier / ILLink lock configuration); no locked-build pass is claimed. - Strict cross-repository checks did not complete: the local Longshot checkout's shader-cache names differ from this launcher's expectations. No native app/game build flow or Linux execution was tested. Review and tests performed with OpenAI Codex. No repository source changes were retained.
@ -65,0 +88,4 @@
/// An absolute path: a drive (C:\, C:/, not https:/), ~\ or ~/, \\server, or a / that starts a word; through a space when the
/// word after it holds a separator too (D:\Jane Doe\x), and through the words that end a game file's name when its last name
/// has no extension (C:\Games\The Dump v2.nup)
[GeneratedRegex("""(?:(?<![A-Za-z0-9])[A-Za-z]:[\\/]|(?<![^\s'"(\[=,])(?:~[\\/]|\\\\|/(?=[^\s/'"<>|])))[^\s'"<>|]*(?:[ \t]+(?=[^\s'"<>|]*[\\/])[^\s'"<>|]*)*(?:(?<=[\\/][^\s'"<>|.\\/]*)(?:[ \t]+[^\s'"<>|\\/]+){1,6}?\.(?i:""" + GameExtensions + """)\b)?""")]
Member

[P1] Redact the whole path when a directory has multiple spaces

The continuation only crosses a space when the immediately following token contains a slash. Consequently cannot open D:\Jane Ann Doe\tools\make_game.py becomes cannot open [path] Ann [path], and /media/alex/My Very Private Drive/tools/make_game.py becomes [path] Very Private [path]. Both outputs are also present in the final BuildReports.Json payload for an automatic failed report when these paths are outside Failure.Known (for example, a tool/dependency path). This silently transmits parts of private directory names despite the diagnostic's redaction guarantee. Please redact the complete path, including intermediate words, and add end-to-end JSON regression cases for Windows and Linux paths with multiple spaces.

[P1] Redact the whole path when a directory has multiple spaces The continuation only crosses a space when the immediately following token contains a slash. Consequently `cannot open D:\Jane Ann Doe\tools\make_game.py` becomes `cannot open [path] Ann [path]`, and `/media/alex/My Very Private Drive/tools/make_game.py` becomes `[path] Very Private [path]`. Both outputs are also present in the final `BuildReports.Json` payload for an automatic failed report when these paths are outside `Failure.Known` (for example, a tool/dependency path). This silently transmits parts of private directory names despite the diagnostic's redaction guarantee. Please redact the complete path, including intermediate words, and add end-to-end JSON regression cases for Windows and Linux paths with multiple spaces.
mooki left a comment

I read this against #162's head (f8a0786) and ran its checks. The shape is good, but the "known texts" part, the main fix here, does not work yet for the most common layout (a dump or build folder under the home folder), and the tests would not notice. Changes needed before it merges.

Run (Linux only; no Windows run, no game, no real failed build): python -I tests/test_launcher_core.py on this head: 1491 checks passed (the body says 1477); on #162's head: 1465. tests/test_release.py: 37 OK. About 280 inputs of my own through BuildReports.Json, this head next to #162's, and I broke each fix once in a scratch copy to see if a test notices. Not run: dotnet build App (can't restore the apphost pack offline here), mise run ci:smoke.

Blocking

  1. Known texts never match under the home folder. BuildReports.cs L172 turns the home folder into ~ first, so a known C:\Users\Ana\Downloads\The Game v2.nup no longer matches, and the bare name then becomes [game file] (it holds a space) inside ~\Downloads\.... can't read C:\Users\Ana\Downloads\The Game v2.nup: bad header goes out as can't read [path] file]: bad header; with the file on D:\ it is [path], so one failure lands in two signatures. A build or work folder under home that ends in a spaced name leaks its last word (C:\Users\Ana\Longshot Work becomes [path] Work). The check uses D:\My Dumps, outside home, so it passes. Fix: scrub the known texts with the same home folder first, and replace them in one regex pass.
  2. Bare names in Known are plain case-insensitive substring replacements (BuildReports.cs L113-L114; what Known() adds: BuildStepViewModel.cs L544-L547). A dump called game.nup turns not a game executable into not a [game file] executable; a folder called dump rewrites try another dump of the game; main turns domain remain maintain into do[game file] re[game file] [game file]tain. What the player named the file then picks the signature (Zelda.nup, dump.nup, game.nup: three hashes for one failure). Fix: whole words only, and no bare name that is a single plain word.
  3. After a known folder is replaced, the rest of the path stays (same lines): with /data/Longshot known, /data/Longshot/My Secret Folder/x goes out as [path]/My Secret Folder/x.

Should fix

  • The launcher's own SIGTERM is still not one signature: why is fixed, but Error = lastError is still sent (L534, L596) and Longshot-api hashes why | error. Three different last stderr lines gave three signatures; the fixture sets an error line and asserts only why.
  • 6 of 13 mutants of this PR's fixes pass the tests: Fail sending the translated why, Known() never passed to the Failure, Known() without the build and work folders, and the English choice dropped on the Win32 path and in one Exited branch. Known() is in the App project, which the core tests don't compile, and the regex at BuildReportChecks.cs L253 matches no line of the code. Moving the list building into Core would let a check cover it.
  • Folder names with several spaces: the same as the inline finding in the review above (BuildReports.cs L91). More shapes for its regression cases: D:\Games\The Legend of Zelda\x.nup becomes [path] Legend of [path], a spaced last folder (/media/jane/My Passport becomes [path] Passport), and C:\Program Files (x86)\... leaves Files. make_game prints its paths unquoted, so this is the usual shape of its error lines, and the Settings text says "No paths, names or saves". Either the rule goes further or the text says less.
  • A magicbean.dev link is kept whole (L153-L155): a user name and password in front of the host, a ?token= query and a game file name in the path all go out. Keep scheme, host and path only.
  • "Always in English": e.Message (L194, L226) is the OS's own text on Windows. I could not test that here.

Nits: struct.pack, d.keys() and nx2.bntx now become [game file]; a path plus up to five words plus x.zs is swallowed as one [path]; one 100 KB word with many = takes 8 s in the regexes (3 s on #162 already; no timeout, and it runs on the window's thread); the picker filter and Finder keep their own *.nup and *.nx lists instead of GameFiles.Extensions; an apostrophe in a folder name ends the path; the body's 1477 is stale.

Held up: every home-folder spelling I tried (spaces, case, / or \, \\?\, 8.3 names, /var/home, WSL), UNC paths, non-ASCII names, 3/10, N/A, and/or, version strings, and the look-alike hosts evilmagicbean.dev and magicbean.dev.evil.com.

On the open question in the body: the problem kind plus the stage as the signature looks better to me. It needs no scrubbing for the key, though the free text would still have to be safe.

I read this against #162's head (f8a0786) and ran its checks. The shape is good, but the "known texts" part, the main fix here, does not work yet for the most common layout (a dump or build folder under the home folder), and the tests would not notice. Changes needed before it merges. **Run** (Linux only; no Windows run, no game, no real failed build): `python -I tests/test_launcher_core.py` on this head: 1491 checks passed (the body says 1477); on #162's head: 1465. `tests/test_release.py`: 37 OK. About 280 inputs of my own through `BuildReports.Json`, this head next to #162's, and I broke each fix once in a scratch copy to see if a test notices. Not run: `dotnet build App` (can't restore the apphost pack offline here), `mise run ci:smoke`. **Blocking** 1. Known texts never match under the home folder. [BuildReports.cs L172](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/src/commit/46018097c1cd46c0684991e3ff6c0733c8f7c4b4/Core/BuildReports.cs#L172) turns the home folder into `~` first, so a known `C:\Users\Ana\Downloads\The Game v2.nup` no longer matches, and the bare name then becomes `[game file]` (it holds a space) inside `~\Downloads\...`. `can't read C:\Users\Ana\Downloads\The Game v2.nup: bad header` goes out as `can't read [path] file]: bad header`; with the file on `D:\` it is `[path]`, so one failure lands in two signatures. A build or work folder under home that ends in a spaced name leaks its last word (`C:\Users\Ana\Longshot Work` becomes `[path] Work`). The check uses `D:\My Dumps`, outside home, so it passes. Fix: scrub the known texts with the same home folder first, and replace them in one regex pass. 2. Bare names in Known are plain case-insensitive substring replacements ([BuildReports.cs L113-L114](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/src/commit/46018097c1cd46c0684991e3ff6c0733c8f7c4b4/Core/BuildReports.cs#L113-L114); what `Known()` adds: [BuildStepViewModel.cs L544-L547](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/src/commit/46018097c1cd46c0684991e3ff6c0733c8f7c4b4/App/ViewModels/BuildStepViewModel.cs#L544-L547)). A dump called `game.nup` turns `not a game executable` into `not a [game file] executable`; a folder called `dump` rewrites `try another dump of the game`; `main` turns `domain remain maintain` into `do[game file] re[game file] [game file]tain`. What the player named the file then picks the signature (`Zelda.nup`, `dump.nup`, `game.nup`: three hashes for one failure). Fix: whole words only, and no bare name that is a single plain word. 3. After a known folder is replaced, the rest of the path stays (same lines): with `/data/Longshot` known, `/data/Longshot/My Secret Folder/x` goes out as `[path]/My Secret Folder/x`. **Should fix** - The launcher's own SIGTERM is still not one signature: `why` is fixed, but `Error = lastError` is still sent ([L534](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/src/commit/46018097c1cd46c0684991e3ff6c0733c8f7c4b4/App/ViewModels/BuildStepViewModel.cs#L534), [L596](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/src/commit/46018097c1cd46c0684991e3ff6c0733c8f7c4b4/App/ViewModels/BuildStepViewModel.cs#L596)) and Longshot-api hashes `why | error`. Three different last stderr lines gave three signatures; the fixture sets an error line and asserts only `why`. - 6 of 13 mutants of this PR's fixes pass the tests: `Fail` sending the translated why, `Known()` never passed to the `Failure`, `Known()` without the build and work folders, and the English choice dropped on the Win32 path and in one `Exited` branch. `Known()` is in the App project, which the core tests don't compile, and the regex at [BuildReportChecks.cs L253](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/src/commit/46018097c1cd46c0684991e3ff6c0733c8f7c4b4/tests/launcher_core/BuildReportChecks.cs#L253) matches no line of the code. Moving the list building into Core would let a check cover it. - Folder names with several spaces: the same as the inline finding in the review above ([BuildReports.cs L91](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/src/commit/46018097c1cd46c0684991e3ff6c0733c8f7c4b4/Core/BuildReports.cs#L91)). More shapes for its regression cases: `D:\Games\The Legend of Zelda\x.nup` becomes `[path] Legend of [path]`, a spaced last folder (`/media/jane/My Passport` becomes `[path] Passport`), and `C:\Program Files (x86)\...` leaves `Files`. make_game prints its paths unquoted, so this is the usual shape of its error lines, and the Settings text says "No paths, names or saves". Either the rule goes further or the text says less. - A magicbean.dev link is kept whole ([L153-L155](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/src/commit/46018097c1cd46c0684991e3ff6c0733c8f7c4b4/Core/BuildReports.cs#L153-L155)): a user name and password in front of the host, a `?token=` query and a game file name in the path all go out. Keep scheme, host and path only. - "Always in English": `e.Message` ([L194](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/src/commit/46018097c1cd46c0684991e3ff6c0733c8f7c4b4/App/ViewModels/BuildStepViewModel.cs#L194), [L226](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/src/commit/46018097c1cd46c0684991e3ff6c0733c8f7c4b4/App/ViewModels/BuildStepViewModel.cs#L226)) is the OS's own text on Windows. I could not test that here. **Nits:** `struct.pack`, `d.keys()` and `nx2.bntx` now become `[game file]`; a path plus up to five words plus `x.zs` is swallowed as one `[path]`; one 100 KB word with many `=` takes 8 s in the regexes (3 s on #162 already; no timeout, and it runs on the window's thread); the picker filter and Finder keep their own `*.nup` and `*.nx` lists instead of `GameFiles.Extensions`; an apostrophe in a folder name ends the path; the body's 1477 is stale. **Held up:** every home-folder spelling I tried (spaces, case, `/` or `\`, `\\?\`, 8.3 names, `/var/home`, WSL), UNC paths, non-ASCII names, `3/10`, `N/A`, `and/or`, version strings, and the look-alike hosts `evilmagicbean.dev` and `magicbean.dev.evil.com`. On the open question in the body: the problem kind plus the stage as the signature looks better to me. It needs no scrubbing for the key, though the free text would still have to be safe.
gab9281 changed title from WIP: fix(build): a summary's diagnostic loses paths with spaces and every dump's name, and says why in English to fix(build): a summary's diagnostic loses paths with spaces and every dump's name, and says why in English 2026-11-17 16:34:02 +00:00
dyst force-pushed fix/build-report-scrub from 46018097c1
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
to 2a75d314ae
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 4s
2026-11-17 18:51:08 +00:00
Compare
dyst changed title from fix(build): a summary's diagnostic loses paths with spaces and every dump's name, and says why in English to fix(privacy): one shared rule keeps the user's name out of the launcher's log and every report 2026-11-17 18:51:47 +00:00
Author
Member

Reworked (2a75d31, rebased onto main now that #162 is in). Thanks both: the reviews showed whole-path scrubbing couldn't be made tight. The requirement is narrower: only the OS user's name must not leave the PC; the rest of a path is fine and useful. So there is now one shared rule, Privacy.Scrub in Core/Privacy.cs, which LauncherLog.Add, bug reports and build reports all use. The description has the details.

futondestroyer, [P1] multiple spaces: paths are now kept on purpose, and the user's name in them goes whole, whatever its spaces. cannot open D:\Users\Jane Ann Doe\tools\make_game.py is sent as cannot open D:\Users\[user]\tools\make_game.py, and /media/alex/My Very Private Drive/tools/make_game.py as /media/[user]/My Very Private Drive/tools/make_game.py. New end-to-end checks go through BuildReports.Json for Windows and Linux, and assert no user name anywhere in the JSON.

mooki:

  • 1–3 (known texts under home, bare-name substrings, the rest of a path after a known folder): Failure.Known and the substring replacement are gone. The rest of a path staying is now the intent.
  • The launcher's SIGTERM: the summary sends no error line now, only why. The check asserts both.
  • Mutants of Known(): gone with it. The English-why source checks stay as they were.
  • Spaced folder names (The Legend of Zelda, My Passport, Program Files (x86)): kept by design now. The consent text said "No paths, names or saves" and now says "No user name, game files or saves", in all 12 catalogs.
  • magicbean.dev links: every link now keeps only its scheme, host and path. A password before the host, a query and a fragment never go.
  • e.Message being the OS's text: not changed, noted in the description.
  • Nits: d.keys() and struct.pack() stay; a path plus words swallowed whole is gone; a 100 KB word is cut before the patterns run (checked); an apostrophe no longer matters. nx2.bntx-style module names still become [game file], and the picker's and Finder's own *.nup/*.nx lists are unchanged (out of scope). The count is updated: 1579 checks.
  • The signature as ProblemKind plus the stage: agreed, and with paths kept it matters more. It's listed as the open question; it's a call for whoever owns the dashboards.
Reworked (2a75d31, rebased onto main now that #162 is in). Thanks both: the reviews showed whole-path scrubbing couldn't be made tight. The requirement is narrower: only the OS user's name must not leave the PC; the rest of a path is fine and useful. So there is now one shared rule, `Privacy.Scrub` in Core/Privacy.cs, which `LauncherLog.Add`, bug reports and build reports all use. The description has the details. **futondestroyer, [P1] multiple spaces:** paths are now kept on purpose, and the user's name in them goes whole, whatever its spaces. `cannot open D:\Users\Jane Ann Doe\tools\make_game.py` is sent as `cannot open D:\Users\[user]\tools\make_game.py`, and `/media/alex/My Very Private Drive/tools/make_game.py` as `/media/[user]/My Very Private Drive/tools/make_game.py`. New end-to-end checks go through `BuildReports.Json` for Windows and Linux, and assert no user name anywhere in the JSON. **mooki:** - 1–3 (known texts under home, bare-name substrings, the rest of a path after a known folder): `Failure.Known` and the substring replacement are gone. The rest of a path staying is now the intent. - The launcher's SIGTERM: the summary sends no error line now, only `why`. The check asserts both. - Mutants of `Known()`: gone with it. The English-why source checks stay as they were. - Spaced folder names (`The Legend of Zelda`, `My Passport`, `Program Files (x86)`): kept by design now. The consent text said "No paths, names or saves" and now says "No user name, game files or saves", in all 12 catalogs. - magicbean.dev links: every link now keeps only its scheme, host and path. A password before the host, a query and a fragment never go. - `e.Message` being the OS's text: not changed, noted in the description. - Nits: `d.keys()` and `struct.pack()` stay; a path plus words swallowed whole is gone; a 100 KB word is cut before the patterns run (checked); an apostrophe no longer matters. `nx2.bntx`-style module names still become `[game file]`, and the picker's and Finder's own `*.nup`/`*.nx` lists are unchanged (out of scope). The count is updated: 1579 checks. - The signature as `ProblemKind` plus the stage: agreed, and with paths kept it matters more. It's listed as the open question; it's a call for whoever owns the dashboards.
Author
Member

Screenshots: before and after

Drawn with tools/screenshots (headless, the same scene and window on both sides): before from main @ 321a9e1, after from this branch.

Settings: the performance statistics text

The consent line now says what is actually left out, since paths are kept and only the user name goes.

Before

before: launcher-settings, main

After

after: launcher-settings, this PR

## Screenshots: before and after Drawn with `tools/screenshots` (headless, the same scene and window on both sides): before from `main` @ 321a9e1, after from this branch. ### Settings: the performance statistics text The consent line now says what is actually left out, since paths are kept and only the user name goes. **Before** ![before: launcher-settings, main](https://git.magicbean.dev/attachments/110d1ee1-82b0-4250-83e2-f8d727dc37ba) **After** ![after: launcher-settings, this PR](https://git.magicbean.dev/attachments/3e777462-f5b5-458b-afc4-d53623e23a6e)
fix(privacy): the launcher's placeholders are the game's: %USERPROFILE%, ~ and <user>
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 5s
49ba742334
Longshot's own reports (gpu/vk/vk_bug_report.cpp, host/hos_crash_dialog.h's hos_crash_redact_line) write the home
folder as %USERPROFILE% on Windows and ~ on Linux, and the user's name elsewhere in a path as <user>. The launcher's
log and reports now write the same, so a launcher's and a game's report read alike.

- Privacy.Scrub: Windows' home folder as %USERPROFILE% (was ~), Linux's as ~, the name as <user> (was [user]).
  Scrubbing scrubbed text changes nothing: neither placeholder follows a separator as a name would.
- The JSON a build report sends keeps them readable: its encoder already leaves < and > alone, and the text is
  scrubbed again after it is written. A check reads the final JSON of a summary and of Send's report.
- Checks: every expectation that named ~ for a Windows home or [user], a scrubbed text scrubbed again (users called
  user and USERPROFILE too), and a bug report's <user>.

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

The placeholders now match the game's (49ba742). Longshot's gpu/vk/vk_bug_report.cpp and hos_crash_redact_line write the home folder as %USERPROFILE% on Windows and ~ on Linux, and the user's name elsewhere in a path as <user>; the launcher's log, bug reports and build reports now write the same ([user] and a Windows ~ are gone).

  • The JSON that is sent writes both as they are, not \u003C. Its encoder already leaves < and > alone, and it's scrubbed again after it is written. A check reads a summary's and Send's final JSON.
  • Scrubbing text that was already scrubbed changes nothing. That's checked too, including for users called user and USERPROFILE.
  • 1584 checks pass, 37 release tests OK, the app builds with 0 warnings.

futondestroyer, mooki: could you have another look when you have a moment? The rework from your reviews is in 2a75d31, and this commit only changes the placeholders.

The placeholders now match the game's (49ba742). Longshot's gpu/vk/vk_bug_report.cpp and hos_crash_redact_line write the home folder as `%USERPROFILE%` on Windows and `~` on Linux, and the user's name elsewhere in a path as `<user>`; the launcher's log, bug reports and build reports now write the same (`[user]` and a Windows `~` are gone). - The JSON that is sent writes both as they are, not `\u003C`. Its encoder already leaves `<` and `>` alone, and it's scrubbed again after it is written. A check reads a summary's and Send's final JSON. - Scrubbing text that was already scrubbed changes nothing. That's checked too, including for users called `user` and `USERPROFILE`. - 1584 checks pass, 37 release tests OK, the app builds with 0 warnings. futondestroyer, mooki: could you have another look when you have a moment? The rework from your reviews is in 2a75d31, and this commit only changes the placeholders.
HumanBean deleted branch fix/build-report-scrub 2026-11-17 20:28:42 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!164
No description provided.