WIP: fix(host): a log line leaves out mount labels, UNC hosts and controller names (#1264) #2207

Draft
dazemc wants to merge 6 commits from dazemc/Longshot:fix-1264-redaction into main
Contributor

Summary

The crash window's report kept the player's disk labels, network-share hosts and controller names. All of it comes from one redaction rule, gpu/vk/compat/longshot_redact.h, shared by the saved log, the crash window and the Insert menu's Bug report; until now it took out only the home folder and the user's name. The crash window's clipboard report was also weaker than the JSON it posts: the same log line came out differently in the two public outputs.

On main, with the rule's own probe (tests/test_log_redact.py):

options: the settings file is /mnt/Games/pc-ports/Longshot-crashtest/longshot_options.ini   (a folder on a mount)
fs: mounted content: -> /run/media/<user>/JanesSSD/Longshot/romfs                          (the disk's label stays)
fs: save dir \\NAS-NAME\share\Longshot\saves                                               (the share's host stays)
hid: controller "Janes DualSense" (bluetooth)                                              (the pad's OS alias, often a person)

With this PR:

options: the settings file is /mnt/<disk>/pc-ports/Longshot-crashtest/longshot_options.ini
fs: mounted content: -> /run/media/<user>/<disk>/Longshot/romfs
fs: save dir \\<host>\share\Longshot\saves
hid: controller "<device>" (bluetooth)
  • a mount point's label is written <disk>: /mnt/<label>, /media/<user>/<label>, /run/media/<user>/<label>, a label of several words included whether it ends at a path separator, at the line's end or at punctuation (/mnt/John Smith/games, /mnt/My Disk, /mnt/Jane's SSD, /mnt/My Disk (read-only) → /mnt/<disk> (read-only));
  • a UNC path's host is written <host>: \\HOST\share, \\?\UNC\HOST\share (Windows's long-path form, which host/nn_fs.c builds) and //HOST/share, including a share written right after an arrow, a colon or a pipe with no space (->\\HOST\share, dir:\\HOST\share, |\\HOST\share); a URL's // (https://example.com) is not taken for a share, and a lone \\?\ long-path prefix names no host and is left alone;
  • a device's name is written <device>: a controller's (inside controller "…") and a sound device's (audio: output on <name> (3 devices), audio in: <name> open (48000 Hz), audio in: <name> is back);
  • and the clipboard report now runs the JSON's home-shape rules (host/hos_crash_dialog.c, redacted()): before this, it kept home-shaped paths (C:\Users\<name>, another user's /home/<name>) that the JSON already removed.

Every output goes through this one rule — the saved longshot_log.txt as it is written (host/log_redact.c), the Bug report's copy of the log (gpu/vk/vk_bug_report.cpp redact), the crash window's clipboard report and the JSON it posts — so controller and sound-device names are now out of the saved log and the copied log too, not only the window's two outputs as before; the Python port (nx2/log_redact.py) is held to the same output by the check.

Deliberately kept, so a report still says what it is about: the drive letter; the folders around and below a mount point (/mnt/<disk>/pc-ports/Longshot-crashtest/...); a controller's guid, SDL mapping and how it connected ((SDL), with a gyroscope); the audio line's shape (audio: output on <device> (3 devices)); card and driver names; repo-relative paths. A label takes its next word while that word ends at a separator, the line's end or punctuation; prose after a label (/mnt/SD, /var/home/…, and /x) is left as it is.

Files to read first: gpu/vk/compat/longshot_redact.h (longshot_redact_mount_label, the UNC and controller cases in longshot_redact_line), host/hos_crash_dialog.c redacted(), tests/test_log_redact.py CASES.

See #1264. Its other half (the consent text calling the report the team's alone) is not changed here; Risks says why.

Testing

Tested:

  • python -I -B tests/test_log_redact.py: the rule in C, its Python port (nx2/log_redact.py, byte-identical output) and the Insert menu's copy agree on all 37 cases: a /mnt path, a /run/media/<label> path, labels of several words ending at a separator, at the line's end (/mnt/My Disk, /mnt/Jane's SSD) and at punctuation (/mnt/My Disk,, /mnt/My Disk (read-only)), both host/mods.c line shapes, \\?\UNC\HOST\share, //HOST/share, a share right after ->, : and | with no space (the \\ and \\?\UNC\ forms), a URL (https://example.com) left alone, a controller's name, audio: output on …, audio in: … open (…), audio in: … is back, and a user name, and every case is idempotent (redacting twice changes nothing).
  • The five no-space/URL cases are this review fix: at 26ed5f78 the C harness and the Python port both return ->\\NAS-NAME\share…, dir:\\NAS-NAME\share… and |\\NAS-NAME\share… unchanged (the host stays); at 9885b85a all 37 pass with gcc/g++ and with clang/clang++.
  • python -I -B tests/test_crash_dialog.py: the posted JSON and the copied markdown both hold those five lines redacted, and neither holds JanesSSD, NAS-NAME, Janes DualSense, Janes Speakers or the user name.
  • python -I -B tests/test_bug_report.py, tests/test_log_levels.py, tests/test_report_privacy.py, tests/test_build_log.py, tests/test_crash_record.py and tests/test_log_open_failure.py: the Insert menu's log copy, a host log line, the builder's log and the crash record pass at 9885b85a.
  • In the game at this head 9885b85a (v3.1.1-6-g9885b85a, source b2baf8a4), Linux (Vulkan, NVIDIA RTX 4070 Ti): the queued shared smoke 2207-unc-smoke (--mode shared, description 2207 UNC redaction: boot + 20 s Kokiri, saved log) built the pack over a2dc5385 and the runtime, continued the kokiri-start save, played 20 s, took a screenshot and quit cleanly (state: finished, exit: 0, stop_method: quit; 1280x720 test profile). The saved log reads prompts: auto: controller "<device>" (SDL0 type 0): keyboard — the rule ran in the process at this head — and holds no FATAL or "could not start" line. The crash window itself was not opened.
  • In the game at the previous head f4fbe772 (26ed5f78's tree), Linux 7.3.4-zen2-2-zen (Vulkan), 2560x1440 at 67 %: a 20 s dev.py ab --scene kokiri-forest --runs 1 --seconds 20 against main @ a2dc5385. Both sides booted, loaded the save, teleported and settled with 0 cold frames (A: 1734 frames, 86.7 fps, p99 16.74 ms; B this PR: 1642 frames, 82.1 fps, p99 16.78 ms). The rule ran in the process — both saved logs, side by side:
    • A: prompts: auto: controller "(none)" (SDL0 type 0): keyboard and audio: output on the default device (0 devices), stereo;
    • B: prompts: auto: controller "<device>" (SDL0 type 0): keyboard and audio: output on <device> (0 devices), stereo.
      Neither log held a /mnt, /media or UNC path (the runs are under /home). dev.py ab exited 3 because the two runs differed in four sim-turf menu rows (B1 sim_turf_density and three more against A1's "Load an area"), so its fps table is not a measurement; the smoke's point is that both sides booted and the rule ran, which the logs show. This is the previous head; the new head's smoke is the bullet above. The crash window itself was not opened — Report manually and Report automatically are in Still to test.
  • python -I -B tests/run_all.py --strict --jobs 5 (12 GiB scope, pinned headers) at this head 9885b85a:
    911 passed, 23 failed, 18 skipped in 440 s (5 at once) — log
    /home/daze/GitHub/prrefresh-logs/head-2207-9885b85a.log. The 23 failing names are exactly the clean baseline's 23 at
    main a2dc5385 (911 passed, 23 failed, 18 skipped in 635 s): a name-by-name diff against its extracted list is
    empty, so every one is this PC environment's and none is this change's. The queued job waited for #2239's
    memrefit-head A/B to leave the machine lock and the queue before starting, so the suite ran alone.

Still to test:

  • The crash window itself, on Linux (this PC) or Windows: crash the game with the game folder on a disk whose label is personal and a Bluetooth pad connected, press Report manually, then Report automatically; expecting the clipboard and the posted JSON to read /mnt/<disk>/…, \\<host>\… and controller "<device>", with no user name. The 20 s smoke never opens the window, so in it the new rule ran in the log writer only (by hand; the Test Farm on Windows is where D:\… game folders and Bluetooth pad aliases are the common case).
  • Windows: the rule has no _WIN32 branch of its own, but neither the harness nor the helper ran there. CI's .forgejo/workflows/build-windows.yml builds the host and renderer for Windows on this PR, but nobody has opened the window there (by hand, or a Test Farm run on Windows).

Measurements

Nothing to measure: this rewrites text in logs and reports; it changes no renderer path, frame time or setting, and the only cost is the string scan per logged line that #1459 already added.

Risks

  • The rule also rewrites saved logs (as #1459 designed: a saved log holds what a report's copy holds) and the Insert menu's log copy, so a false positive hides part of a path from every report and log. The mount rule fires only under /mnt, /media and /run/media at the label's depth, and the label runs to the end of its own component (spaces included) with punctuation after it left; the UNC rule only where a path starts a token (after a space or punctuation, including >, | and a : that is not a URL's ://), never for a lone \\?\; the device rule only after controller " or an audio: line's head. There is no switch; a revert is the fix.
  • Part 1 of #1264, the window's consent text, is deliberately unchanged. The issue and the launcher say the report is posted publicly, while this repository says the opposite: host/hos_crash_dialog.h:697 ("keeps the reports where only the team reads them"), :1021, :1044 ("Only the team can read it"), docs/dev/reference/crash-window.md:15,29, and the server answer's public comment link is deliberately ignored. Which is true is a product decision about Longshot-api, not a redaction, and needs whoever owns that API.
  • After updating, a player notices only their reports' and logs' text: <disk>, <host> and <device> where their disk's label, share's host and pad's name were.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says. The queued shared smoke
    2207-unc-smoke ran at 9885b85a: boot, kokiri-start, 20 s play, clean quit, and the saved log's
    controller "<device>" line (Testing).
  • mise run test passes (any failure that also fails on main is named). This head 9885b85a: 911 passed, 23
    failed, 18 skipped in 440 s
    , --strict --jobs 5 in a 12 GiB scope with the pinned headers
    (/home/daze/GitHub/prrefresh-logs/head-2207-9885b85a.log); the 23 failing names are identical, name by name, to the
    a2dc5385 baseline's (diff empty).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here. d5fb82bf adds the five no-space/URL cases; they
    fail at 26ed5f78 (the host stays in C and in the Python port) and pass at 9885b85a.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Docs updated.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. Windows: host/log_redact.c and
    host/hos_crash_dialog.c at 9885b85a compile as x86-64 COFF objects with llvm-mingw 20261104's clang 23.1.5
    (--target=x86_64-w64-mingw32, the flags nx2/build.py gives a host file, headers from host/, gpu/vk/compat,
    third_party/a64-kit/rt and the base's generated gen/); that is a compile, not the full Windows link. Linux: the
    two changed files are compiled by tests/test_log_redact.py with gcc and clang (the C rule and the C++ menu copy).
    The in-game pack at f4fbe772 was built from these host sources; the 9885b85a pack is queued with the smoke.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers. d5fb82bf and 9885b85a carry
    Assisted-by: DeepSeek V4.1 Flash 1017 (opencode-go); head 9885b85a is the fix commit.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.
## Summary The crash window's report kept the player's disk labels, network-share hosts and controller names. All of it comes from one redaction rule, `gpu/vk/compat/longshot_redact.h`, shared by the saved log, the crash window and the Insert menu's Bug report; until now it took out only the home folder and the user's name. The crash window's clipboard report was also weaker than the JSON it posts: the same log line came out differently in the two public outputs. On `main`, with the rule's own probe (`tests/test_log_redact.py`): ``` options: the settings file is /mnt/Games/pc-ports/Longshot-crashtest/longshot_options.ini (a folder on a mount) fs: mounted content: -> /run/media/<user>/JanesSSD/Longshot/romfs (the disk's label stays) fs: save dir \\NAS-NAME\share\Longshot\saves (the share's host stays) hid: controller "Janes DualSense" (bluetooth) (the pad's OS alias, often a person) ``` With this PR: ``` options: the settings file is /mnt/<disk>/pc-ports/Longshot-crashtest/longshot_options.ini fs: mounted content: -> /run/media/<user>/<disk>/Longshot/romfs fs: save dir \\<host>\share\Longshot\saves hid: controller "<device>" (bluetooth) ``` - a mount point's label is written `<disk>`: `/mnt/<label>`, `/media/<user>/<label>`, `/run/media/<user>/<label>`, a label of several words included whether it ends at a path separator, at the line's end or at punctuation (`/mnt/John Smith/games`, `/mnt/My Disk`, `/mnt/Jane's SSD`, `/mnt/My Disk (read-only)` → `/mnt/<disk> (read-only)`); - a UNC path's host is written `<host>`: `\\HOST\share`, `\\?\UNC\HOST\share` (Windows's long-path form, which `host/nn_fs.c` builds) and `//HOST/share`, including a share written right after an arrow, a colon or a pipe with no space (`->\\HOST\share`, `dir:\\HOST\share`, `|\\HOST\share`); a URL's `//` (`https://example.com`) is not taken for a share, and a lone `\\?\` long-path prefix names no host and is left alone; - a device's name is written `<device>`: a controller's (inside `controller "…"`) and a sound device's (`audio: output on <name> (3 devices)`, `audio in: <name> open (48000 Hz)`, `audio in: <name> is back`); - and the clipboard report now runs the JSON's home-shape rules (`host/hos_crash_dialog.c`, `redacted()`): before this, it kept home-shaped paths (`C:\Users\<name>`, another user's `/home/<name>`) that the JSON already removed. **Every output goes through this one rule** — the saved `longshot_log.txt` as it is written (`host/log_redact.c`), the Bug report's copy of the log (`gpu/vk/vk_bug_report.cpp` `redact`), the crash window's clipboard report and the JSON it posts — so controller and sound-device names are now out of the saved log and the copied log too, not only the window's two outputs as before; the Python port (`nx2/log_redact.py`) is held to the same output by the check. **Deliberately kept**, so a report still says what it is about: the drive letter; the folders around and below a mount point (`/mnt/<disk>/pc-ports/Longshot-crashtest/...`); a controller's `guid`, SDL mapping and how it connected (`(SDL), with a gyroscope`); the audio line's shape (`audio: output on <device> (3 devices)`); card and driver names; repo-relative paths. A label takes its next word while that word ends at a separator, the line's end or punctuation; prose after a label (`/mnt/SD, /var/home/…`, `and /x`) is left as it is. Files to read first: `gpu/vk/compat/longshot_redact.h` (`longshot_redact_mount_label`, the UNC and `controller` cases in `longshot_redact_line`), `host/hos_crash_dialog.c` `redacted()`, `tests/test_log_redact.py` `CASES`. See #1264. Its other half (the consent text calling the report the team's alone) is not changed here; Risks says why. ## Testing **Tested:** - `python -I -B tests/test_log_redact.py`: the rule in C, its Python port (`nx2/log_redact.py`, byte-identical output) and the Insert menu's copy agree on all 37 cases: a `/mnt` path, a `/run/media/<label>` path, labels of several words ending at a separator, at the line's end (`/mnt/My Disk`, `/mnt/Jane's SSD`) and at punctuation (`/mnt/My Disk,`, `/mnt/My Disk (read-only)`), both `host/mods.c` line shapes, `\\?\UNC\HOST\share`, `//HOST/share`, a share right after `->`, `:` and `|` with no space (the `\\` and `\\?\UNC\` forms), a URL (`https://example.com`) left alone, a controller's name, `audio: output on …`, `audio in: … open (…)`, `audio in: … is back`, and a user name, and every case is idempotent (redacting twice changes nothing). - The five no-space/URL cases are this review fix: at `26ed5f78` the C harness and the Python port both return `->\\NAS-NAME\share…`, `dir:\\NAS-NAME\share…` and `|\\NAS-NAME\share…` unchanged (the host stays); at `9885b85a` all 37 pass with `gcc`/`g++` and with `clang`/`clang++`. - `python -I -B tests/test_crash_dialog.py`: the posted JSON and the copied markdown both hold those five lines redacted, and neither holds `JanesSSD`, `NAS-NAME`, `Janes DualSense`, `Janes Speakers` or the user name. - `python -I -B tests/test_bug_report.py`, `tests/test_log_levels.py`, `tests/test_report_privacy.py`, `tests/test_build_log.py`, `tests/test_crash_record.py` and `tests/test_log_open_failure.py`: the Insert menu's log copy, a host log line, the builder's log and the crash record pass at `9885b85a`. - In the game at this head `9885b85a` (`v3.1.1-6-g9885b85a`, source `b2baf8a4`), Linux (Vulkan, NVIDIA RTX 4070 Ti): the queued shared smoke `2207-unc-smoke` (`--mode shared`, description `2207 UNC redaction: boot + 20 s Kokiri, saved log`) built the pack over `a2dc5385` and the runtime, continued the `kokiri-start` save, played 20 s, took a screenshot and quit cleanly (`state: finished`, `exit: 0`, `stop_method: quit`; 1280x720 test profile). The saved log reads `prompts: auto: controller "<device>" (SDL0 type 0): keyboard` — the rule ran in the process at this head — and holds no `FATAL` or "could not start" line. The crash window itself was not opened. - In the game at the previous head `f4fbe772` (`26ed5f78`'s tree), Linux 7.3.4-zen2-2-zen (Vulkan), 2560x1440 at 67 %: a 20 s `dev.py ab --scene kokiri-forest --runs 1 --seconds 20` against `main` @ `a2dc5385`. Both sides booted, loaded the save, teleported and settled with **0 cold frames** (A: 1734 frames, 86.7 fps, p99 16.74 ms; B this PR: 1642 frames, 82.1 fps, p99 16.78 ms). The rule ran in the process — both saved logs, side by side: - A: `prompts: auto: controller "(none)" (SDL0 type 0): keyboard` and `audio: output on the default device (0 devices), stereo`; - B: `prompts: auto: controller "<device>" (SDL0 type 0): keyboard` and `audio: output on <device> (0 devices), stereo`. Neither log held a `/mnt`, `/media` or UNC path (the runs are under `/home`). `dev.py ab` exited 3 because the two runs differed in four sim-turf menu rows (B1 `sim_turf_density` and three more against A1's "Load an area"), so its fps table is not a measurement; the smoke's point is that both sides booted and the rule ran, which the logs show. This is the previous head; the new head's smoke is the bullet above. **The crash window itself was not opened** — Report manually and Report automatically are in Still to test. - `python -I -B tests/run_all.py --strict --jobs 5` (12 GiB scope, pinned headers) at this head `9885b85a`: **911 passed, 23 failed, 18 skipped in 440 s (5 at once)** — log `/home/daze/GitHub/prrefresh-logs/head-2207-9885b85a.log`. The 23 failing names are exactly the clean baseline's 23 at main `a2dc5385` (`911 passed, 23 failed, 18 skipped in 635 s`): a name-by-name `diff` against its extracted list is empty, so every one is this PC environment's and none is this change's. The queued job waited for #2239's `memrefit-head` A/B to leave the machine lock and the queue before starting, so the suite ran alone. **Still to test:** - The crash window itself, on Linux (this PC) or Windows: crash the game with the game folder on a disk whose label is personal and a Bluetooth pad connected, press **Report manually**, then **Report automatically**; expecting the clipboard and the posted JSON to read `/mnt/<disk>/…`, `\\<host>\…` and `controller "<device>"`, with no user name. The 20 s smoke never opens the window, so in it the new rule ran in the log writer only (by hand; the Test Farm on Windows is where `D:\…` game folders and Bluetooth pad aliases are the common case). - Windows: the rule has no `_WIN32` branch of its own, but neither the harness nor the helper ran there. CI's `.forgejo/workflows/build-windows.yml` builds the host and renderer for Windows on this PR, but nobody has opened the window there (by hand, or a Test Farm run on Windows). ## Measurements Nothing to measure: this rewrites text in logs and reports; it changes no renderer path, frame time or setting, and the only cost is the string scan per logged line that #1459 already added. ## Risks - The rule also rewrites **saved logs** (as #1459 designed: a saved log holds what a report's copy holds) and the Insert menu's log copy, so a false positive hides part of a path from every report and log. The mount rule fires only under `/mnt`, `/media` and `/run/media` at the label's depth, and the label runs to the end of its own component (spaces included) with punctuation after it left; the UNC rule only where a path starts a token (after a space or punctuation, including `>`, `|` and a `:` that is not a URL's `://`), never for a lone `\\?\`; the device rule only after `controller "` or an `audio:` line's head. There is no switch; a revert is the fix. - Part 1 of #1264, the window's consent text, is deliberately unchanged. The issue and the launcher say the report is posted publicly, while this repository says the opposite: `host/hos_crash_dialog.h:697` ("keeps the reports where only the team reads them"), `:1021`, `:1044` ("Only the team can read it"), `docs/dev/reference/crash-window.md:15,29`, and the server answer's public comment link is deliberately ignored. Which is true is a product decision about Longshot-api, not a redaction, and needs whoever owns that API. - After updating, a player notices only their reports' and logs' text: `<disk>`, `<host>` and `<device>` where their disk's label, share's host and pad's name were. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. The queued shared smoke `2207-unc-smoke` ran at `9885b85a`: boot, `kokiri-start`, 20 s play, clean quit, and the saved log's `controller "<device>"` line (Testing). - [x] `mise run test` passes (any failure that also fails on `main` is named). This head `9885b85a`: **911 passed, 23 failed, 18 skipped in 440 s**, `--strict --jobs 5` in a 12 GiB scope with the pinned headers (`/home/daze/GitHub/prrefresh-logs/head-2207-9885b85a.log`); the 23 failing names are identical, name by name, to the `a2dc5385` baseline's (diff empty). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. `d5fb82bf` adds the five no-space/URL cases; they fail at `26ed5f78` (the host stays in C and in the Python port) and pass at `9885b85a`. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Docs updated. - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. Windows: `host/log_redact.c` and `host/hos_crash_dialog.c` at `9885b85a` compile as x86-64 COFF objects with llvm-mingw 20261104's clang 23.1.5 (`--target=x86_64-w64-mingw32`, the flags `nx2/build.py` gives a host file, headers from `host/`, `gpu/vk/compat`, `third_party/a64-kit/rt` and the base's generated `gen/`); that is a compile, not the full Windows link. Linux: the two changed files are compiled by `tests/test_log_redact.py` with gcc and clang (the C rule and the C++ menu copy). The in-game pack at `f4fbe772` was built from these host sources; the `9885b85a` pack is queued with the smoke. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. `d5fb82bf` and `9885b85a` carry `Assisted-by: DeepSeek V4.1 Flash 1017 (opencode-go)`; head `9885b85a` is the fix commit. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold.
fix(host): a log line leaves out mount labels, UNC hosts and controller names (#1264)
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 7s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
b7e2aa3907
One rule redacts every logged line and every line of a report (gpu/vk/compat/longshot_redact.h, used by
host/log_redact.c, host/hos_crash_dialog.h and gpu/vk/vk_bug_report.cpp, ported in nx2/log_redact.py). It took out the
home folder and the user's name only, so a report kept:

  options: the settings file is /mnt/Games/pc-ports/Longshot-crashtest/longshot_options.ini
  fs: mounted content: -> /run/media/<user>/JanesSSD/Longshot/romfs
  fs: save dir \\NAS-NAME\share\Longshot\saves
  hid: controller "Janes DualSense" (bluetooth)

Now a mount point's label is <disk> (/mnt/<label>, /media/<user>/<label>, /run/media/<user>/<label>), the host of a UNC
path <host>, and the name a player gave their controller <device> (inside controller "..."). Kept, so a report still
says what it is about: the drive letter, the folders around and below a mount point, a controller's guid, mapping and
how it connected, card and driver names, repo-relative paths.

The clipboard report (Report manually) now runs the same device and home-shape rules as the JSON Report automatically
posts: the same log line came out redacted differently in the two public outputs, and the clipboard kept audio device
names and home-shaped paths that the JSON already removed.

tests/test_log_redact.py holds the five new cases, checked in C, in the Python port and in the menu's copy, each
idempotent; tests/test_crash_dialog.py checks the posted JSON and the copied markdown; test_bug_report.py and
test_log_levels.py follow the new output, and the docs say what is replaced.

See #1264: its consent-text half (public or team-only) is not changed here.

Assisted-by: OpenCode (DeepSeek V4.1 Flash)
Author
Contributor

Tested in game: Linux 7.3.4-zen2-2-zen (Vulkan), Kokiri Forest, 2560x1440 at 67 %, a 20 s dev.py ab run of this branch against main @ 9e10f6f7: both sides booted, loaded the save and settled with 0 cold frames (B: 1816 frames, 90.8 fps, p99 13.60 ms; A main: 1786 frames, 89.3 fps, p99 14.68 ms). The new rule ran in the process: this branch's saved log reads 'prompts: auto: controller "" (SDL0 type 0): keyboard' where main's reads 'controller "(none)"'. The crash window itself (Report manually / Report automatically) was not opened by this run; it is in Still to test.

Tested in game: Linux 7.3.4-zen2-2-zen (Vulkan), Kokiri Forest, 2560x1440 at 67 %, a 20 s dev.py ab run of this branch against main @ 9e10f6f7: both sides booted, loaded the save and settled with 0 cold frames (B: 1816 frames, 90.8 fps, p99 13.60 ms; A main: 1786 frames, 89.3 fps, p99 14.68 ms). The new rule ran in the process: this branch's saved log reads 'prompts: auto: controller "<device>" (SDL0 type 0): keyboard' where main's reads 'controller "(none)"'. The crash window itself (Report manually / Report automatically) was not opened by this run; it is in Still to test.
Member

Possibly related, for context:

  • issue #1093 Idea: Redact sensitive information from generated files — Broader open request for redaction in generated files
Possibly related, for context: - issue #1093 Idea: Redact sensitive information from generated files — Broader open request for redaction in generated files
fix(host): a device's name in every log line, a label with spaces, the long UNC form (#1264 review)
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 6s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
5b6ca05ae0
The rule the previous commit added had three gaps:

- audio device names: only the crash window ran the audio rule (its own copy), so the saved longshot_log.txt
  (host/nn_audio.c's "audio: output on <name> (3 devices)", host/nn_audio_in.c's "audio in: <name> open (48000 Hz)") and
  the Bug report's copied log (gpu/vk/vk_bug_report.cpp redact) kept them. Both heads are handled in
  longshot_redact_line now, the window's copy (hos_crash_devices_out) is deleted, and every output -- the saved log, the
  copied log, the clipboard and the JSON -- goes through the one implementation;
- a mount point's label with spaces was cut at the first space (/mnt/John Smith/games -> /mnt/<disk> Smith/games): a
  label now runs to the end of its own component, joining a space only when the word after it is part of the path, so
  punctuation and prose after a label ("/mnt/SD, /var/home/...") stay;
- the extended UNC forms \\?\UNC\HOST\share (which host/nn_fs.c builds) and //HOST/share were not matched: both are, and
  the comment no longer claims \\?\ names no host.

tests/test_log_redact.py holds six new cases: a spaced label, \\?\UNC\, //HOST/share, audio: output on, audio in: open,
audio in: is back -- in C, in the Python port and in the menu's copy, each idempotent.

Assisted-by: OpenCode (DeepSeek V4.1 Flash)
Author
Contributor

Review fixes in 5b6ca05a (the correctness review's three gaps):

  1. Audio device names reached the saved log and the copied log. Only the crash window ran the audio rule (its own copy), so longshot_log.txt (host/nn_audio.c's audio: output on <name> (3 devices), host/nn_audio_in.c's audio in: <name> open (48000 Hz)) and vk_bug_report.cpp's copy kept them. Both heads are in longshot_redact_line now; hos_crash_devices_out and its call in redacted() are gone. Every output — saved log, copied log, clipboard, posted JSON — is the one rule, and the Python port mirrors it.
  2. A label with spaces was cut at the first space. /mnt/John Smith/games gave /mnt/<disk> Smith/games. A label now runs to the end of its own component: a space joins only when the word after it is part of the path (it ends at a separator), so /mnt/SD, /var/home/al/x and and /x stay as they were.
  3. The long UNC form and the slash form were missed. \\?\UNC\HOST\share (which host/nn_fs.c builds) and //HOST/share are now matched, the \\?\UNC\ prefix kept; a lone \\?\ is still left alone, and the comment no longer says it names no host.

Checks: tests/test_log_redact.py has 26 cases (six new: a spaced label, \\?\UNC\, //HOST/share, audio: output on, audio in: open, audio in: is back), held to the same output in C, the Python port and the menu's copy, each idempotent; the five targeted checks pass. The full suite at this head (5b6ca05a, pinned headers, 8 GiB, --jobs 3): 911 passed, 23 failed, 18 skipped in 651 s — a name-by-name diff against the clean a2dc5385 baseline's 23 is empty.

Docs and the report's own "In both, …" line now say "a device's name" (a controller's, an audio device's). The two public outputs still go through the one rule, and the crash window itself is still in Still to test.

Review fixes in `5b6ca05a` (the correctness review's three gaps): 1. **Audio device names reached the saved log and the copied log.** Only the crash window ran the audio rule (its own copy), so `longshot_log.txt` (`host/nn_audio.c`'s `audio: output on <name> (3 devices)`, `host/nn_audio_in.c`'s `audio in: <name> open (48000 Hz)`) and `vk_bug_report.cpp`'s copy kept them. Both heads are in `longshot_redact_line` now; `hos_crash_devices_out` and its call in `redacted()` are gone. Every output — saved log, copied log, clipboard, posted JSON — is the one rule, and the Python port mirrors it. 2. **A label with spaces was cut at the first space.** `/mnt/John Smith/games` gave `/mnt/<disk> Smith/games`. A label now runs to the end of its own component: a space joins only when the word after it is part of the path (it ends at a separator), so `/mnt/SD, /var/home/al/x` and `and /x` stay as they were. 3. **The long UNC form and the slash form were missed.** `\\?\UNC\HOST\share` (which `host/nn_fs.c` builds) and `//HOST/share` are now matched, the `\\?\UNC\` prefix kept; a lone `\\?\` is still left alone, and the comment no longer says it names no host. Checks: `tests/test_log_redact.py` has 26 cases (six new: a spaced label, `\\?\UNC\`, `//HOST/share`, `audio: output on`, `audio in: open`, `audio in: is back`), held to the same output in C, the Python port and the menu's copy, each idempotent; the five targeted checks pass. The full suite at this head (`5b6ca05a`, pinned headers, 8 GiB, `--jobs 3`): 911 passed, 23 failed, 18 skipped in 651 s — a name-by-name diff against the clean `a2dc5385` baseline's 23 is empty. Docs and the report's own "In both, …" line now say "a device's name" (a controller's, an audio device's). The two public outputs still go through the one rule, and the crash window itself is still in Still to test.
dazemc changed title from fix(host): a log line leaves out mount labels, UNC hosts and controller names (#1264) to WIP: fix(host): a log line leaves out mount labels, UNC hosts and controller names (#1264) 2026-11-22 07:24:12 +00:00
Author
Contributor

Back in WIP for one box: the in-game smoke at 5b6ca05a is queued (the review fixes changed the rule after the aca310d3 run). The suite box stays ticked — it was rerun at this head (911 passed, 23 failed, 18 skipped, the same 23 names as the clean a2dc5385 baseline). When the 20 s run lands I put its A1/B1 numbers and the controller "…" and audio: output on … lines from both saved logs in Testing and mark it ready again. If either log still holds a redacted-shaped line unredacted, it stays WIP and the rule is fixed first.

Back in WIP for one box: the in-game smoke at `5b6ca05a` is queued (the review fixes changed the rule after the `aca310d3` run). The suite box stays ticked — it was rerun at this head (911 passed, 23 failed, 18 skipped, the same 23 names as the clean a2dc5385 baseline). When the 20 s run lands I put its A1/B1 numbers and the `controller "…"` and `audio: output on …` lines from both saved logs in Testing and mark it ready again. If either log still holds a redacted-shaped line unredacted, it stays WIP and the rule is fixed first.
fix(host): a mount label's last word at a line's end or punctuation is redacted too (#1264 gate)
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 5s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
f4fbe77257
longshot_redact_label_end joined a label's next word only when that word ended at a path separator, so a label that
ends the line (or is followed by punctuation) kept its last word:

  /mnt/My Disk              -> /mnt/<disk> Disk
  /mnt/Jane's SSD           -> /mnt/<disk> SSD
  /run/media/al/Jane's SSD  -> /run/media/<user>/<disk> SSD
  /mnt/My Disk,             -> /mnt/<disk> Disk,
  /mnt/My Disk (read-only)  -> /mnt/<disk> Disk (read-only)

Real log lines reach it: host/mods.c's "mods: none in <dir> (a mod: ...)" and "mods: N mods from <dir>: ...".

A word now joins the label when it ends at a separator, at the line's end, or at punctuation a path meets there
( ( ) : , ; . ] } = ), a space before such punctuation too -- so /mnt/My Disk (read-only) redacts "My Disk" and keeps
" (read-only)", while a word before a space and a separator is still prose ("/mnt/SD and /x").

tests/test_log_redact.py: seven new cases (the five above, and both mods.c line shapes), in C, the Python port and the
menu's copy, each idempotent.

Assisted-by: OpenCode (DeepSeek V4.1 Flash)
Author
Contributor

The gate is closed at f4fbe772:

  • The label hole the recheck found is fixed. A label's next word now joins it when that word ends at a separator, at the line's end, or at punctuation a path meets there, including a space before such punctuation. At 5b6ca05a the five cases gave /mnt/<disk> Disk, /mnt/<disk> SSD, /run/media/<user>/<disk> SSD, /mnt/<disk> Disk,, /mnt/<disk> Disk (read-only); at f4fbe772 they give /mnt/<disk>, /mnt/<disk>, /run/media/<user>/<disk>, /mnt/<disk>,, /mnt/<disk> (read-only). Both host/mods.c line shapes are cases too (seven new cases; 32 in all, C, Python and the menu's copy, idempotent). Prose is still safe: /mnt/SD, /var/home/… and /mnt/SD and /x are unchanged.
  • The new cases fail on the old head: the probe at a b7e2aa39 worktree stops on the first label case (/mnt/John Smith/games → /mnt/<disk> Smith/games).
  • Five checks and the suite at this head: test_log_redact, test_crash_dialog, test_bug_report, test_log_levels, test_report_privacy pass; the full suite is 911 passed, 23 failed, 18 skipped in 649 s, the same 23 names as the clean a2dc5385 baseline (diff empty).
  • Smoke at this head (20 s, Kokiri Forest): both sides booted with 0 cold frames (A 1734 frames/86.7 fps, B 1642/82.1); the saved logs show controller "(none)"/audio: output on the default device on main and controller "<device>"/audio: output on <device> on this head. dev.py ab exited 3 because the runs differ in four sim-turf menu rows, so its fps table is not a measurement; the boot and the rule are what the smoke is for. The crash window itself is still in Still to test.
The gate is closed at `f4fbe772`: - **The label hole the recheck found is fixed.** A label's next word now joins it when that word ends at a separator, at the line's end, or at punctuation a path meets there, including a space before such punctuation. At `5b6ca05a` the five cases gave `/mnt/<disk> Disk`, `/mnt/<disk> SSD`, `/run/media/<user>/<disk> SSD`, `/mnt/<disk> Disk,`, `/mnt/<disk> Disk (read-only)`; at `f4fbe772` they give `/mnt/<disk>`, `/mnt/<disk>`, `/run/media/<user>/<disk>`, `/mnt/<disk>,`, `/mnt/<disk> (read-only)`. Both `host/mods.c` line shapes are cases too (seven new cases; 32 in all, C, Python and the menu's copy, idempotent). Prose is still safe: `/mnt/SD, /var/home/…` and `/mnt/SD and /x` are unchanged. - **The new cases fail on the old head:** the probe at a `b7e2aa39` worktree stops on the first label case (`/mnt/John Smith/games` → `/mnt/<disk> Smith/games`). - **Five checks and the suite at this head:** `test_log_redact`, `test_crash_dialog`, `test_bug_report`, `test_log_levels`, `test_report_privacy` pass; the full suite is `911 passed, 23 failed, 18 skipped in 649 s`, the same 23 names as the clean `a2dc5385` baseline (diff empty). - **Smoke at this head** (20 s, Kokiri Forest): both sides booted with 0 cold frames (A 1734 frames/86.7 fps, B 1642/82.1); the saved logs show `controller "(none)"`/`audio: output on the default device` on main and `controller "<device>"`/`audio: output on <device>` on this head. `dev.py ab` exited 3 because the runs differ in four sim-turf menu rows, so its fps table is not a measurement; the boot and the rule are what the smoke is for. The crash window itself is still in Still to test.
dazemc changed title from WIP: fix(host): a log line leaves out mount labels, UNC hosts and controller names (#1264) to fix(host): a log line leaves out mount labels, UNC hosts and controller names (#1264) 2026-11-22 07:51:55 +00:00
dazemc left a comment

The mise run test [x] is the suite at 5b6ca05a, the commit before the head f4fbe772; the head adds the mount-label last-word/punctuation redaction, which that suite does not cover. Re-run at f4fbe772 or say what changed. The When it applies section is also missing the AI assistance recorded box. The five Ready-for-review boxes are otherwise settled; the crash window itself is in Still to test, as Testing says.

The `mise run test` [x] is the suite at `5b6ca05a`, the commit before the head `f4fbe772`; the head adds the mount-label last-word/punctuation redaction, which that suite does not cover. Re-run at `f4fbe772` or say what changed. The `When it applies` section is also missing the `AI assistance recorded` box. The five Ready-for-review boxes are otherwise settled; the crash window itself is in Still to test, as Testing says.
Author
Contributor

Description fixes from the quality sweep: the mise run test box is unticked — its suite is at 5b6ca05a, the commit before the head, and f4fbe772 adds the mount-label last-word/punctuation cases that run does not cover. A full suite at f4fbe772 (--strict --jobs 5, 12 GiB scope, pinned headers, same shape as the a2dc5385 baseline) is queued behind #2239's machine-lock run; I tick it from that log with the failing names compared name by name, or leave it with the reason. The missing AI-assistance box is added (recorded here; a literal trailer would rewrite f4fbe772, the commit the suite and smoke ran). No code change.

Description fixes from the quality sweep: the `mise run test` box is unticked — its suite is at `5b6ca05a`, the commit before the head, and `f4fbe772` adds the mount-label last-word/punctuation cases that run does not cover. A full suite at `f4fbe772` (`--strict --jobs 5`, 12 GiB scope, pinned headers, same shape as the `a2dc5385` baseline) is queued behind #2239's machine-lock run; I tick it from that log with the failing names compared name by name, or leave it with the reason. The missing AI-assistance box is added (recorded here; a literal trailer would rewrite `f4fbe772`, the commit the suite and smoke ran). No code change.
dazemc changed title from fix(host): a log line leaves out mount labels, UNC hosts and controller names (#1264) to WIP: fix(host): a log line leaves out mount labels, UNC hosts and controller names (#1264) 2026-11-22 10:57:25 +00:00
dazemc left a comment

The f4fbe772 suite is only in the 07:51 comment; the body's mise run test/Testing still cite 5b6ca05a and no log is named. Put the f4fbe772 run in Testing with its log. The AI box's note is stale: f4fbe772 already carries Assisted-by:.

The `f4fbe772` suite is only in the 07:51 comment; the body's `mise run test`/Testing still cite `5b6ca05a` and no log is named. Put the `f4fbe772` run in Testing with its log. The AI box's note is stale: `f4fbe772` already carries `Assisted-by:`.
chore: record the Assisted-by trailer
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 4s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
26ed5f7825
Assisted-by: DeepSeek V4.1 Flash 1017 (opencode-go)
Author
Contributor

The head suite is in and the box ticks from it: tests/run_all.py --strict --jobs 5 at the head's tree (head 26ed5f78, an empty message-only commit on f4fbe772's tree 407f997093523718fc290de6a0ec6898a47a0c1b) inside systemd-run -p MemoryMax=12G -p MemorySwapMax=0 with the pinned headers — 911 passed, 23 failed, 18 skipped in 402 s (5 at once). The 23 failing names are identical, name by name, to the clean a2dc5385 baseline's 23 (diff against the saved list empty), and the head's new mount-label cases are in this run. Log: /home/daze/GitHub/prrefresh-logs/head-2207-f4fbe772.log. The AI box ticks from the head's own Assisted-by: DeepSeek V4.1 Flash 1017 (opencode-go) (tree above, unchanged). Body updated to the head and ready again.

The head suite is in and the box ticks from it: `tests/run_all.py --strict --jobs 5` at the head's tree (head `26ed5f78`, an empty message-only commit on `f4fbe772`'s tree `407f997093523718fc290de6a0ec6898a47a0c1b`) inside `systemd-run -p MemoryMax=12G -p MemorySwapMax=0` with the pinned headers — **911 passed, 23 failed, 18 skipped in 402 s (5 at once)**. The 23 failing names are identical, name by name, to the clean `a2dc5385` baseline's 23 (diff against the saved list empty), and the head's new mount-label cases are in this run. Log: `/home/daze/GitHub/prrefresh-logs/head-2207-f4fbe772.log`. The AI box ticks from the head's own `Assisted-by: DeepSeek V4.1 Flash 1017 (opencode-go)` (tree above, unchanged). Body updated to the head and ready again.
dazemc changed title from WIP: fix(host): a log line leaves out mount labels, UNC hosts and controller names (#1264) to fix(host): a log line leaves out mount labels, UNC hosts and controller names (#1264) 2026-11-22 11:15:39 +00:00
dazemc left a comment

Code-level note: a UNC host after -> or : with no space is not redacted. The UNC case (gpu/vk/compat/longshot_redact.h:189) only fires at longshot_redact_token_start (:51), whose list is space/tab, quotes, (, [, {, =, ,, ; — not >, | or :. A line that writes the share right after the arrow or a colon, e.g. fs: mounted content: ->\\NAS-NAME\share\Longshot or fs: save dir:\\NAS-NAME\share, leaves the host. I confirmed it with the Python port's same list (nx2/log_redact.py _token_start): both lines come back unchanged, while the spaced forms give \\<host>. The test's UNC cases all have the space (tests/test_log_redact.py fs: save dir \\...), so they pass. Fix: allow >/| (and : with a :// exception, so a URL's host is not taken for a UNC host) or treat any \\/// not preceded by a name/separator as a token start, and add the no-space cases.

The rest of the rule looks sound: the mount-label last-word/punctuation cases are covered, longshot_redact_name_char includes u >= 0x80 so UTF-8 labels are taken whole, both separators are handled, and the crash window now runs the home-shape rules. The remaining gaps are that UNC boundary and the audio is back case if more text follows it on the line (the code requires the line end).

**Code-level note: a UNC host after `->` or `:` with no space is not redacted.** The UNC case (`gpu/vk/compat/longshot_redact.h:189`) only fires at `longshot_redact_token_start` (`:51`), whose list is space/tab, quotes, `(`, `[`, `{`, `=`, `,`, `;` — not `>`, `|` or `:`. A line that writes the share right after the arrow or a colon, e.g. `fs: mounted content: ->\\NAS-NAME\share\Longshot` or `fs: save dir:\\NAS-NAME\share`, leaves the host. I confirmed it with the Python port's same list (`nx2/log_redact.py` `_token_start`): both lines come back unchanged, while the spaced forms give `\\<host>`. The test's UNC cases all have the space (`tests/test_log_redact.py` `fs: save dir \\...`), so they pass. Fix: allow `>`/`|` (and `:` with a `://` exception, so a URL's host is not taken for a UNC host) or treat any `\\`/`//` not preceded by a name/separator as a token start, and add the no-space cases. The rest of the rule looks sound: the mount-label last-word/punctuation cases are covered, `longshot_redact_name_char` includes `u >= 0x80` so UTF-8 labels are taken whole, both separators are handled, and the crash window now runs the home-shape rules. The remaining gaps are that UNC boundary and the audio `is back` case if more text follows it on the line (the code requires the line end).
Author
Contributor

Claiming the review's UNC boundary gap: longshot_redact_token_start (gpu/vk/compat/longshot_redact.h:51) has no >, | or :, so ->\\NAS-NAME\share and dir:\\NAS-NAME\share keep the host. I will add the no-space cases (arrow, colon, pipe) to tests/test_log_redact.py for C, the Python port and the menu copy, show them failing at 26ed5f78, then widen the boundary with a :// exception so a URL host stays, keeping every sound case. The in-game smoke gets queued behind the current machine owner; no game run now.

Claiming the review's UNC boundary gap: `longshot_redact_token_start` (`gpu/vk/compat/longshot_redact.h:51`) has no `>`, `|` or `:`, so `->\\NAS-NAME\share` and `dir:\\NAS-NAME\share` keep the host. I will add the no-space cases (arrow, colon, pipe) to `tests/test_log_redact.py` for C, the Python port and the menu copy, show them failing at `26ed5f78`, then widen the boundary with a `://` exception so a URL host stays, keeping every sound case. The in-game smoke gets queued behind the current machine owner; no game run now.
longshot_redact_token_start's list (space/tab, quotes, ( [ { = , ;) has no >, | or :, so a share written right after
an arrow or a colon keeps its host:

  fs: mounted content: ->\\NAS-NAME\share\Longshot\romfs   -> unchanged
  fs: save dir:\\NAS-NAME\share\Longshot\saves            -> unchanged
  fs: roots: C:\Games|\\NAS-NAME\share\Longshot           -> unchanged

The new cases also hold the long \\?\UNC\ form to the same output, and keep a URL's host (https://example.com) out of
the UNC rule; the spaced forms already pass. At this head the C harness fails on the first case (the host kept), and
the Python port fails it the same way.

Assisted-by: DeepSeek V4.1 Flash 1017 (opencode-go)
fix(host): a UNC host right after ->, : or | is redacted too (#1264)
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval waiting for a BigBean's 👍 on the request
PR description / Description follows the template (pull_request_target) Successful in 5s
9885b85a47
longshot_redact_token_start's list had no >, | or :, so a share written with no space kept its host:

  fs: mounted content: ->\\NAS-NAME\share\Longshot\romfs   -> ->\\<host>\share\Longshot\romfs
  fs: save dir:\\NAS-NAME\share\Longshot\saves            -> fs: save dir:\\<host>\share\Longshot\saves
  fs: roots: C:\Games|\\NAS-NAME\share\Longshot           -> fs: roots: C:\Games|\\<host>\share\Longshot

A colon starts a token unless the two bytes after it are "//": a URL (https://example.com) still names no UNC path,
while dir:\\HOST\share does. Every spaced form, the \\?\UNC\ form and a lone \\?\ are unchanged; the C rule and
nx2/log_redact.py's port hold the same list again, and every case is idempotent.

tests/test_log_redact.py: five cases (the three above, the no-space \\?\UNC\ form, and a URL left alone), in C, the
Python port and the menu's copy.

Assisted-by: DeepSeek V4.1 Flash 1017 (opencode-go)
dazemc changed title from fix(host): a log line leaves out mount labels, UNC hosts and controller names (#1264) to WIP: fix(host): a log line leaves out mount labels, UNC hosts and controller names (#1264) 2026-11-22 12:28:57 +00:00
Author
Contributor

The no-space UNC leak is fixed at 9885b85a (test first, then fix), and the PR is back in WIP for the two boxes the new head has not run.

  • d5fb82bf adds five cases to tests/test_log_redact.py, checked in C, the Python port and the menu's copy: ->\\NAS-NAME\share, dir:\\NAS-NAME\share, |\\NAS-NAME\share, the no-space \\?\UNC\ form, and a URL (https://example.com) left alone. At 26ed5f78 the C harness fails on the first (the host stays), and the Python port returns the same three share lines unchanged.
  • 9885b85a fixes longshot_redact_token_start (gpu/vk/compat/longshot_redact.h:51) and _token_start (nx2/log_redact.py:29): > and | start a token, and : does unless the next two bytes are //, so a URL's host is not taken for a UNC host. All 37 cases pass in C, Python and the menu's copy, and are idempotent; gcc/g++ and clang/clang++ both pass.
  • Focused checks at 9885b85a: test_log_redact, test_crash_dialog, test_bug_report, test_log_levels, test_report_privacy, test_build_log, test_crash_record and test_log_open_failure all pass.
  • Windows: host/log_redact.c and host/hos_crash_dialog.c at 9885b85a compile as x86-64 COFF objects with llvm-mingw 20261104's clang 23.1.5.

The in-game smoke at 9885b85a is queued as 2207-unc-smoke (--mode shared, behind the current machine owner; the wrapper waits, then takes the machine lock and runs the pack, runtime and a 20 s Kokiri smoke). It has not run. The full suite at 9885b85a is not run either; the last one is at 26ed5f78 and does not cover the new cases. Both boxes are unticked with the reason, so the PR stays WIP.

The no-space UNC leak is fixed at `9885b85a` (test first, then fix), and the PR is back in WIP for the two boxes the new head has not run. - `d5fb82bf` adds five cases to `tests/test_log_redact.py`, checked in C, the Python port and the menu's copy: `->\\NAS-NAME\share`, `dir:\\NAS-NAME\share`, `|\\NAS-NAME\share`, the no-space `\\?\UNC\` form, and a URL (`https://example.com`) left alone. At `26ed5f78` the C harness fails on the first (the host stays), and the Python port returns the same three share lines unchanged. - `9885b85a` fixes `longshot_redact_token_start` (`gpu/vk/compat/longshot_redact.h:51`) and `_token_start` (`nx2/log_redact.py:29`): `>` and `|` start a token, and `:` does unless the next two bytes are `//`, so a URL's host is not taken for a UNC host. All 37 cases pass in C, Python and the menu's copy, and are idempotent; `gcc`/`g++` and `clang`/`clang++` both pass. - Focused checks at `9885b85a`: `test_log_redact`, `test_crash_dialog`, `test_bug_report`, `test_log_levels`, `test_report_privacy`, `test_build_log`, `test_crash_record` and `test_log_open_failure` all pass. - Windows: `host/log_redact.c` and `host/hos_crash_dialog.c` at `9885b85a` compile as x86-64 COFF objects with llvm-mingw 20261104's clang 23.1.5. The in-game smoke at `9885b85a` is queued as `2207-unc-smoke` (`--mode shared`, behind the current machine owner; the wrapper waits, then takes the machine lock and runs the pack, runtime and a 20 s Kokiri smoke). It has not run. The full suite at `9885b85a` is not run either; the last one is at `26ed5f78` and does not cover the new cases. Both boxes are unticked with the reason, so the PR stays WIP.
Author
Contributor

The queued shared smoke ran at 9885b85a and passed: version v3.1.1-6-g9885b85a (source b2baf8a4), the pack over a2dc5385 plus this checkout's runtime, kokiri-start, 20 s play, screenshot, clean quit (state: finished, exit: 0, stop_method: quit). The saved log reads prompts: auto: controller "<device>" (SDL0 type 0): keyboard — the rule ran at this head — and has no FATAL or "could not start" line. The in-game box is ticked from it.

The mise run test box stays unticked: the last full suite is at 26ed5f78 and does not cover the five new cases or the token-boundary fix. A suite at 9885b85a has not run, so the PR stays WIP; I have not marked it ready.

The queued shared smoke ran at `9885b85a` and passed: version `v3.1.1-6-g9885b85a` (source `b2baf8a4`), the pack over `a2dc5385` plus this checkout's runtime, `kokiri-start`, 20 s play, screenshot, clean quit (`state: finished`, `exit: 0`, `stop_method: quit`). The saved log reads `prompts: auto: controller "<device>" (SDL0 type 0): keyboard` — the rule ran at this head — and has no `FATAL` or "could not start" line. The in-game box is ticked from it. The `mise run test` box stays unticked: the last full suite is at `26ed5f78` and does not cover the five new cases or the token-boundary fix. A suite at `9885b85a` has not run, so the PR stays WIP; I have not marked it ready.
Author
Contributor

@Beanstalk windows: the crash window's redaction with a personal disk label and a Bluetooth pad. Crash the game with the game folder on a disk whose label is personal and a Bluetooth pad connected; press Report manually, then Report automatically; expect the clipboard and the posted JSON to read /mnt/<disk>/… (or the Windows path), \\<host>\… and controller "<device>", with no user name. The 20 s smoke never opened the window; D:\… game folders and Bluetooth pad aliases are the common Windows case.

@Beanstalk windows: the crash window's redaction with a personal disk label and a Bluetooth pad. Crash the game with the game folder on a disk whose label is personal and a Bluetooth pad connected; press Report manually, then Report automatically; expect the clipboard and the posted JSON to read `/mnt/<disk>/…` (or the Windows path), `\\<host>\…` and `controller "<device>"`, with no user name. The 20 s smoke never opened the window; `D:\…` game folders and Bluetooth pad aliases are the common Windows case.
Member

@dazemc only members of BigBeans can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.

@dazemc only members of `BigBeans` can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.
Author
Contributor

@Beanstalk windows: the crash window's redaction on this head (9885b85a, the no-space UNC fix). Crash the game with the game folder on a disk whose label is personal and a Bluetooth pad connected; press Report manually, then Report automatically; expect the clipboard and the posted JSON to read /mnt/<disk>/… (or the Windows path), \\<host>\… and controller "<device>", with no user name, including a share written right after ->, : or |. The earlier request was for 26ed5f78; this head adds the no-space UNC cases.

@Beanstalk windows: the crash window's redaction on this head (`9885b85a`, the no-space UNC fix). Crash the game with the game folder on a disk whose label is personal and a Bluetooth pad connected; press Report manually, then Report automatically; expect the clipboard and the posted JSON to read `/mnt/<disk>/…` (or the Windows path), `\\<host>\…` and `controller "<device>"`, with no user name, including a share written right after `->`, `:` or `|`. The earlier request was for `26ed5f78`; this head adds the no-space UNC cases.
Member

@dazemc only members of BigBeans can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.

@dazemc only members of `BigBeans` can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.
Author
Contributor

The full suite at 9885b85a is in, queued behind #2239's memrefit-head A/B: 911 passed, 23 failed, 18 skipped in 440 s (--strict --jobs 5, 12 GiB scope, pinned headers; log head-2207-9885b85a.log). The 23 failing names are identical, name by name, to the clean a2dc5385 baseline's 23 (diff empty), so they are this PC environment's and none is this change's. The mise run test box is ticked from it.

The PR stays WIP for the Windows crash-window/Test Farm item in Still to test; I have not marked it ready.

The full suite at `9885b85a` is in, queued behind #2239's `memrefit-head` A/B: **911 passed, 23 failed, 18 skipped in 440 s** (`--strict --jobs 5`, 12 GiB scope, pinned headers; log `head-2207-9885b85a.log`). The 23 failing names are identical, name by name, to the clean `a2dc5385` baseline's 23 (`diff` empty), so they are this PC environment's and none is this change's. The `mise run test` box is ticked from it. The PR stays WIP for the Windows crash-window/Test Farm item in Still to test; I have not marked it ready.
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval waiting for a BigBean's 👍 on the request
PR description / Description follows the template (pull_request_target) Successful in 5s
This pull request is marked as a work in progress.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix-1264-redaction:dazemc-fix-1264-redaction'
git switch 'dazemc-fix-1264-redaction'
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/Longshot!2207
No description provided.