fix(tools): mask the repo folder in hardware reports from source builds #16

Manually merged
github merged 1 commit from gh-pr/16/head into gh-pr/16/base 2026-11-26 19:10:53 +00:00
Owner

@⁠marquezinii on GitHub · 2026-11-22 07:33 UTC · original
marquezinii:fix/hw-report-repo-path → main · +25 −0 · 1 files · 1 commits · merged 2026-11-22 08:08 UTC

Running run_hardware_test.ps1 from a source build (build\) leaks the local repo path into the report. The loader puts its work dir under <repo>\.tmp\openscarlett_run when the executable sits in a build/bin folder (ResolveDefaultWorkDirW, src/loader/vfs_mounts.cpp), and Sanitize-Text only masks the bundle dir and the user-profile folders. In my run about 30 lines like this ended up in the report:

VFS G: CoW   : C:\<local path>\OpenScarlett\.tmp\openscarlett_run\vfs\G_overlay

The script now mirrors the loader's rule (build/bin, optionally followed by Debug/Release/RelWithDebInfo/MinSizeRel) and replaces that parent folder with <REPO_DIR>. It never masks a folder that contains the user profile or a drive root, so the existing <USER_HOME> and username rules keep working for release bundles extracted under the user folder.

Tested

Windows 11 26H2, RTX 5070 (driver 621.24), source build at 7ba25f7: run_hardware_test.ps1 -NoSubmit from build\ gives 42/42, and the report now shows <REPO_DIR>\.tmp\openscarlett_run\... with no local path left.

**@⁠marquezinii** on GitHub · 2026-11-22 07:33 UTC · [original](https://github.com/californiaAlmonds/OpenScarlett/pull/16) `marquezinii:fix/hw-report-repo-path` → `main` · +25 −0 · 1 files · 1 commits · merged 2026-11-22 08:08 UTC Running `run_hardware_test.ps1` from a source build (`build\`) leaks the local repo path into the report. The loader puts its work dir under `<repo>\.tmp\openscarlett_run` when the executable sits in a `build`/`bin` folder (`ResolveDefaultWorkDirW`, `src/loader/vfs_mounts.cpp`), and `Sanitize-Text` only masks the bundle dir and the user-profile folders. In my run about 30 lines like this ended up in the report: ``` VFS G: CoW : C:\<local path>\OpenScarlett\.tmp\openscarlett_run\vfs\G_overlay ``` The script now mirrors the loader's rule (`build`/`bin`, optionally followed by `Debug`/`Release`/`RelWithDebInfo`/`MinSizeRel`) and replaces that parent folder with `<REPO_DIR>`. It never masks a folder that contains the user profile or a drive root, so the existing `<USER_HOME>` and username rules keep working for release bundles extracted under the user folder. ### Tested Windows 11 26H2, RTX 5070 (driver 621.24), source build at `7ba25f7`: `run_hardware_test.ps1 -NoSubmit` from `build\` gives 42/42, and the report now shows `<REPO_DIR>\.tmp\openscarlett_run\...` with no local path left.
When run_hardware_test.ps1 runs from a build\ (or build\Release) folder, the
loader puts its work dir under <repo>\.tmp\openscarlett_run, and that path was
copied into the report unmasked (VFS G: CoW lines, about 30 per run). Mirror
the loader's rule from ResolveDefaultWorkDirW and replace the parent folder
with <REPO_DIR>. A folder that contains the user profile is never masked, so
the existing user-home and username rules still apply.

Checked from a source build on Windows 11 / RTX 5070: 42/42 passed, and the
report no longer contains the local repo path.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:10:52 +00:00
github manually merged commit c2c93aa811 into gh-pr/16/base 2026-11-26 19:10:53 +00:00
Author
Owner

@⁠californiaAlmonds on GitHub · 2026-11-22 08:08 UTC · original · approved these changes

Reviewed and verified against ResolveDefaultWorkDirW in src/loader/vfs_mounts.cpp (including multi-config build/Release, USERPROFILE overlap, and drive-root guards). Merging!

**@⁠californiaAlmonds** on GitHub · 2026-11-22 08:08 UTC · [original](https://github.com/californiaAlmonds/OpenScarlett/pull/16#pullrequestreview-6011165625) · **approved these changes** Reviewed and verified against ResolveDefaultWorkDirW in src/loader/vfs_mounts.cpp (including multi-config build/Release, USERPROFILE overlap, and drive-root guards). Merging!
This discussion has been locked. Commenting is limited to contributors.
No description provided.