test(privacy): the log check compares the scrubbed line, not a substring #280

Merged
HumanBean merged 1 commit from riqmarmes/LongshotLauncher:fix/tests-privacy-account-name into main 2026-11-25 15:15:31 +00:00
Contributor

Why

The full core suite cannot run on a Windows account literally named user: the PC-specific privacy check searches the scrubbed log line for the user string, but the line intentionally contains %USERPROFILE%, <user> and the literal D:\Users, all of which contain it. The scrub is correct; the test's substring check is not.

What changed

  • tests/launcher_core/PrivacyChecks.cs: the PC-specific log check compares the whole scrubbed line, and the clock before it, with what it should be, instead of searching for the account name as a substring. A real user name outside the placeholders still fails the check.

Test-only; no product code, settings or behaviour changes.

Testing

  • On this Windows account (user), python -I tests/test_launcher_core.py --dotnet … now passes PrivacyChecks and runs on to SavesChecks' symlink checks; those stop on this machine's missing symlink privilege (Developer Mode/elevation), a separate, pre-existing environment limit, not this change.
  • The changed test compiles and runs in that suite; no product code was touched.

This also unblocks the full core run for #279 (the shortcut setting), whose remaining caveat was this assertion.

No existing PR fixes this. #164 introduced the privacy rule and this check; #225 made the suite green again and #242 redacts paths on screen, but neither covers an account name that also appears in %USERPROFILE%, <user> or Users.

Assisted-by: DeepSeek Harness (deepseek-flash)

### Why The full core suite cannot run on a Windows account literally named `user`: the PC-specific privacy check searches the scrubbed log line for the `user` string, but the line intentionally contains `%USERPROFILE%`, `<user>` and the literal `D:\Users`, all of which contain it. The scrub is correct; the test's substring check is not. ### What changed - `tests/launcher_core/PrivacyChecks.cs`: the PC-specific log check compares the whole scrubbed line, and the clock before it, with what it should be, instead of searching for the account name as a substring. A real user name outside the placeholders still fails the check. Test-only; no product code, settings or behaviour changes. ### Testing - On this Windows account (`user`), `python -I tests/test_launcher_core.py --dotnet …` now passes `PrivacyChecks` and runs on to `SavesChecks`' symlink checks; those stop on this machine's missing symlink privilege (Developer Mode/elevation), a separate, pre-existing environment limit, not this change. - The changed test compiles and runs in that suite; no product code was touched. This also unblocks the full core run for #279 (the shortcut setting), whose remaining caveat was this assertion. ### Related work No existing PR fixes this. [#164](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/164) introduced the privacy rule and this check; [#225](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/225) made the suite green again and [#242](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/242) redacts paths on screen, but neither covers an account name that also appears in `%USERPROFILE%`, `<user>` or `Users`. Assisted-by: DeepSeek Harness (deepseek-flash)
test(privacy): the log check compares the scrubbed line, not a substring
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Compile and test (pull_request) Blocked by required conditions
73757b4d6a
The PC-specific privacy check asserted that the scrubbed log line contains no `user` string. The line carries `%USERPROFILE%`, `<user>` and the literal `D:\Users` by design, so an account literally named `user` fails it even when the scrub is right.

Compare the whole scrubbed line, and the clock before it, with what it should be instead. A real user name outside the placeholders still fails the check. Test-only; no product code changes.

Assisted-by: DeepSeek Harness (deepseek-flash)
HumanBean deleted branch fix/tests-privacy-account-name 2026-11-25 15:15:32 +00:00
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Compile and test (pull_request) Blocked by required conditions
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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!280
No description provided.