fix(steam): leave Steam's files alone until the player asks #372

Merged
llun merged 3 commits from omgitsgela/LongshotLauncher:fix/steam-access-on-demand into main 2026-11-29 20:30:17 +00:00
Member

What a player saw

A Windows player on 1.3.1 got 29 anti-stealer alerts for C:\Users\<user>\.local\share\Steam\config\loginusers.vdf, opened by an unsigned longshotlauncher.exe.

That path is ours, not Steam's. The .NET line composes a Linux Steam home on every platform — $XDG_DATA_HOME/Steam, else <home>/.local/share/Steam (Core/SteamShortcuts.cs:81-87) with <home> from $HOME, else the user profile (Core/LauncherHome.cs:38-39) — and asks for it on every Play (App/LauncherService.cs:440) while Core/SteamLaunchRoute.DecideCore throws the answer away off Linux (Core/SteamLaunchRoute.cs:211). On Windows the tick never appeared, the answer was discarded, and the file was read anyway.

The Rust launcher has the same shape of problem, minus the wrong path: it reads Steam's account and shortcuts without being asked, at startup (src/game/actions.rs:70), on version changes (src/live.rs:133), on every panel refresh for the Add/Remove label (src/game/mod.rs:199) and from Settings (src/preferences.rs:173). loginusers.vdf holds no credentials — a SteamID64, account and persona names, and RememberPassword/AutoLogin/MostRecent flags — but a launcher that opens it without being asked looks exactly like a stealer, and on this player's machine it was flagged 29 times.

The rule this makes explicit

Steam's files are read only when this home has a reason:

  • The player used the feature here (steamAccess.used). It is written before Add, Remove or Settings' toggle touches anything, so the first read is already the player's request.
  • On Linux, one look is owed to a home that predates this rule (steamAccess.import). Tiles made by an earlier launcher outlive our records, and only Steam knows about them, so a home that already has versions or .NET settings is looked at once, then settled. An explicit "SteamTile": false in the .NET settings (v1.3.1:Core/LauncherSettings.cs:82) means the player said no, and nothing is looked at.
  • A fresh home is settled in actions::bind before any thread starts, so it never probes, not even once.
  • Windows homes are never swept. The .NET line never wrote a tile there (the tick was hidden) and the route discarded the result, so a Windows home can hold nothing of ours from before; it reads only after a click.

The one look and the record of what it saw are a single settings write, held under the library lock, and a repeat with the same result writes nothing — the live watcher watches this file, so a needless write would start another migration. A look that finds no Steam is not spent; it stays owed for a later start. An account that has never saved a shortcuts.vdf counts as an empty library and does spend it; an account whose folder cannot be asked about at all does not, because "unreadable" is not an answer.

The label's look and the record it writes are one observation under the same lock, so a removal cannot be undone by a stale snapshot.

No Steam path is cached and reused: discovery happens at the moment of use, and the library's identity is re-checked after every write exactly as before (ShortcutMove::retarget).

steamAccess.tiles records what the last look or click verified. When Steam cannot be found or read, the Add/Remove label and Settings' toggle answer from it instead of claiming the tile vanished; when Steam is readable, live truth wins.

Where

File Change
src/game/steam/access.rs New: the steamAccess record, the pure decision() it gates on, and the persistence (patch_settings, serialised by a mutex).
src/game/steam.rs installed, launcher_tile_present, migrate_shortcuts, Linux Play route and shortcuts_to_move_data consult the gate; Add/Remove and the Settings toggle mark used first and update the record as they write; a migration settles its home with the tiles it saw.
src/game/actions.rs Settle the home before the startup migration thread exists.
src/game/mod.rs, src/preferences.rs The label and the toggle pass the home through.

What does not change

  • Add, Remove, re-adding and folder moves behave as before once the home has asked; the writer still keeps its backup, its symlinks and its 16 MiB cap.
  • Play routing on Linux keeps its gamescope/SteamGameId checks and its running-Steam mtime rule; it just also requires that this home has a reason to know about Steam.
  • The one look retargets tiles that still point at an older builder, exactly as today's startup migration already does. It never creates a tile and never touches a tile that is not ours.
  • A folder move the player already started is resumed from its receipt at startup, including its shortcut retarget, and re-checks the signed-in account before writing.
  • 1.3.x on Windows still reads that path, and the binary is still unsigned. Both are outside this launcher's tree: the first needs a 1.3.x hotfix if that line is still supported, the second needs code signing (#32). This PR only makes the Rust launcher stop asking Steam questions nobody asked it to ask.

Known edges

  • A home from an earlier Rust build that has no versions but did add the launcher tile is settled without a look. Settings shows its toggle off until the player toggles it once; that toggle then re-verifies the existing tile and reports "unchanged".
  • If the launcher cannot write its settings, the player's click still adds or removes the tile, but the permission is not remembered for later starts.

Tests

  • cargo fmt --all -- --check — clean
  • cargo clippy --locked --all-targets -- -D warnings — clean
  • cargo test --locked — native suite green
  • mise run lint — shellcheck, actionlint, gitleaks

New tests: a settled home never calls the injected discovery (proves no probe, not a passing None); a used home looks once; a look with no Steam stays owed; an account with no shortcuts.vdf spends its look and one whose folder cannot be read does not; an explicit .NET opt-out vetoes a home that has versions; a pre-rule home stops owing after its look; settling writes tiles and settlement in one file replacement and repeats without writing (inode check); a known tile keeps its place in the record and writes nothing (inode check); the game label and the launcher-tile toggle keep the last verified answer when Steam is absent. Discovery is injected in tests, so none of them can reach a real Steam installation.

Not verified here: a Windows build. Cross-clippy needs an x86_64-w64-mingw32 LLVM toolchain that is not installed; the changed code is platform-neutral except legacy_answer, which reports no .NET opt-out on Windows by construction.

## What a player saw A Windows player on 1.3.1 got 29 anti-stealer alerts for `C:\Users\<user>\.local\share\Steam\config\loginusers.vdf`, opened by an unsigned `longshotlauncher.exe`. That path is ours, not Steam's. The .NET line composes a Linux Steam home on every platform — `$XDG_DATA_HOME/Steam`, else `<home>/.local/share/Steam` (`Core/SteamShortcuts.cs:81-87`) with `<home>` from `$HOME`, else the user profile (`Core/LauncherHome.cs:38-39`) — and asks for it on every Play (`App/LauncherService.cs:440`) while `Core/SteamLaunchRoute.DecideCore` throws the answer away off Linux (`Core/SteamLaunchRoute.cs:211`). On Windows the tick never appeared, the answer was discarded, and the file was read anyway. The Rust launcher has the same shape of problem, minus the wrong path: it reads Steam's account and shortcuts without being asked, at startup (`src/game/actions.rs:70`), on version changes (`src/live.rs:133`), on every panel refresh for the Add/Remove label (`src/game/mod.rs:199`) and from Settings (`src/preferences.rs:173`). `loginusers.vdf` holds no credentials — a SteamID64, account and persona names, and `RememberPassword`/`AutoLogin`/`MostRecent` flags — but a launcher that opens it without being asked looks exactly like a stealer, and on this player's machine it was flagged 29 times. ## The rule this makes explicit Steam's files are read only when this home has a reason: - **The player used the feature here** (`steamAccess.used`). It is written *before* Add, Remove or Settings' toggle touches anything, so the first read is already the player's request. - **On Linux, one look is owed to a home that predates this rule** (`steamAccess.import`). Tiles made by an earlier launcher outlive our records, and only Steam knows about them, so a home that already has versions or .NET settings is looked at once, then settled. An explicit `"SteamTile": false` in the .NET settings (`v1.3.1:Core/LauncherSettings.cs:82`) means the player said no, and nothing is looked at. - **A fresh home is settled in `actions::bind` before any thread starts**, so it never probes, not even once. - **Windows homes are never swept.** The .NET line never wrote a tile there (the tick was hidden) and the route discarded the result, so a Windows home can hold nothing of ours from before; it reads only after a click. The one look and the record of what it saw are a single settings write, held under the library lock, and a repeat with the same result writes nothing — the live watcher watches this file, so a needless write would start another migration. A look that finds no Steam is not spent; it stays owed for a later start. An account that has never saved a `shortcuts.vdf` counts as an empty library and does spend it; an account whose folder cannot be asked about at all does not, because "unreadable" is not an answer. The label's look and the record it writes are one observation under the same lock, so a removal cannot be undone by a stale snapshot. No Steam path is cached and reused: discovery happens at the moment of use, and the library's identity is re-checked after every write exactly as before (`ShortcutMove::retarget`). `steamAccess.tiles` records what the last look or click verified. When Steam cannot be found or read, the Add/Remove label and Settings' toggle answer from it instead of claiming the tile vanished; when Steam is readable, live truth wins. ## Where | File | Change | | --- | --- | | `src/game/steam/access.rs` | New: the `steamAccess` record, the pure `decision()` it gates on, and the persistence (`patch_settings`, serialised by a mutex). | | `src/game/steam.rs` | `installed`, `launcher_tile_present`, `migrate_shortcuts`, Linux Play `route` and `shortcuts_to_move_data` consult the gate; Add/Remove and the Settings toggle mark `used` first and update the record as they write; a migration settles its home with the tiles it saw. | | `src/game/actions.rs` | Settle the home before the startup migration thread exists. | | `src/game/mod.rs`, `src/preferences.rs` | The label and the toggle pass the home through. | ## What does not change - Add, Remove, re-adding and folder moves behave as before once the home has asked; the writer still keeps its backup, its symlinks and its 16 MiB cap. - Play routing on Linux keeps its gamescope/`SteamGameId` checks and its running-Steam mtime rule; it just also requires that this home has a reason to know about Steam. - The one look retargets tiles that still point at an older builder, exactly as today's startup migration already does. It never creates a tile and never touches a tile that is not ours. - A folder move the player already started is resumed from its receipt at startup, including its shortcut retarget, and re-checks the signed-in account before writing. - 1.3.x on Windows still reads that path, and the binary is still unsigned. Both are outside this launcher's tree: the first needs a 1.3.x hotfix if that line is still supported, the second needs code signing (#32). This PR only makes the Rust launcher stop asking Steam questions nobody asked it to ask. ## Known edges - A home from an earlier Rust build that has no versions but did add the launcher tile is settled without a look. Settings shows its toggle off until the player toggles it once; that toggle then re-verifies the existing tile and reports "unchanged". - If the launcher cannot write its settings, the player's click still adds or removes the tile, but the permission is not remembered for later starts. ## Tests - `cargo fmt --all -- --check` — clean - `cargo clippy --locked --all-targets -- -D warnings` — clean - `cargo test --locked` — native suite green - `mise run lint` — shellcheck, actionlint, gitleaks New tests: a settled home never calls the injected discovery (proves *no probe*, not a passing `None`); a used home looks once; a look with no Steam stays owed; an account with no `shortcuts.vdf` spends its look and one whose folder cannot be read does not; an explicit .NET opt-out vetoes a home that has versions; a pre-rule home stops owing after its look; settling writes tiles and settlement in one file replacement and repeats without writing (inode check); a known tile keeps its place in the record and writes nothing (inode check); the game label and the launcher-tile toggle keep the last verified answer when Steam is absent. Discovery is injected in tests, so none of them can reach a real Steam installation. Not verified here: a Windows build. Cross-clippy needs an `x86_64-w64-mingw32` LLVM toolchain that is not installed; the changed code is platform-neutral except `legacy_answer`, which reports no .NET opt-out on Windows by construction.
fix(steam): leave Steam's files alone until the player asks
Some checks failed
CI / What the change needs (pull_request) Successful in 9s
PR title / Conventional Commit title (pull_request) Successful in 11s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 14s
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
5f6b616ac9
A Windows player reported 29 anti-stealer alerts for
C:\Users\<user>\.local\share\Steam\config\loginusers.vdf, a Linux path that
the .NET launcher composes on Windows (Core/SteamShortcuts.cs:81-87) and reads
on every Play even though the route was discarded there. The Rust launcher
reads Steam's account and shortcuts without being asked too: at startup, on
version changes, on every panel refresh and from Settings.

Read Steam only when the player used the shortcut feature on this home, or,
on Linux, when the home predates this rule and one look is still owed: tiles
made by an earlier launcher outlive our records. A fresh home is settled
before any thread starts and never probes. Add/Remove, folder moves and Play
routing keep their current behaviour once the home has asked.

The record keeps the tiles we last verified, so the label and Settings' toggle
need no read when Steam cannot be read, and a Steam that cannot be read keeps
the last answer instead of claiming the tile vanished. The look and the record
of what it did are one settings write under the library lock, and a repeat
writes nothing, so watching that file cannot start another migration.
Author
Member

Ready for a look. @review

The gate is src/game/steam/access.rs::decision: a home reads Steam only after the player used the shortcut here, or (Linux only) once while it still owes a look from before this rule. The places that can still reach library() without a click are a resumed folder-move receipt and the Linux Play route, both after a click put them there.

Worth checking: (a) any Windows path that can still open loginusers.vdf without a click, (b) whether settle_with can leave a home settled without its tiles, (c) the fresh-home settlement in actions::bind.

Ready for a look. @review The gate is `src/game/steam/access.rs::decision`: a home reads Steam only after the player used the shortcut here, or (Linux only) once while it still owes a look from before this rule. The places that can still reach `library()` without a click are a resumed folder-move receipt and the Linux Play route, both after a click put them there. Worth checking: (a) any Windows path that can still open `loginusers.vdf` without a click, (b) whether `settle_with` can leave a home settled without its tiles, (c) the fresh-home settlement in `actions::bind`.
Member

Possibly related, for context:

  • PR #353 feat(builder)!: the builder's protocol 2 command line, one launch path, launcher-owned Steam tiles — Introduced launcher-owned Steam tiles and migration logic this PR gates
Possibly related, for context: - PR #353 feat(builder)!: the builder's protocol 2 command line, one launch path, launcher-owned Steam tiles — Introduced launcher-owned Steam tiles and migration logic this PR gates
Member
@review
BeanBot left a comment

Recommendation: Request changes. The gate can still read Steam after an explicit legacy opt-out, and some homes continue to probe indefinitely. Recording multiple tiles can also cause repeated settings writes and migrations.

The change adds a per-home record to gate Steam discovery and remember shortcut state. It reduces unsolicited reads for fresh homes, but the legacy import and record-update paths need correction.

Blocking (3): must change before merging.

  1. L1 src/game/steam/access.rs:178: A listed version overrides an explicit legacy Steam opt-out. (more on the line) Do: Treat an explicit false as a veto before considering listed versions, and test a home containing both the opt-out and a listed version.
  2. L2 src/game/steam.rs:324: An existing Steam account without a shortcuts file never settles its owed look. (more on the line) Do: Distinguish an absent shortcuts file in a discovered account from an unavailable Steam installation, treat the absent file as an empty library, and settle the import.
  3. L3 src/game/steam/access.rs:124: Upserting an unchanged tile changes the record order, causing the watcher to repeatedly rewrite settings and migrate shortcuts. (more on the line) Do: Update matching entries in place or compare and store tiles in a stable canonical order, and test a refresh and migration cycle with multiple tiles.

Should fix (1): not blocking, but worth doing before merging.

  • L4 src/game/steam.rs:68: The label's read and subsequent record update are not serialized with shortcut writes. (more on the line) Do: Hold the library lock across the snapshot and corresponding remember or forget operation, including the launcher-tile reader.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5: The platform-specific discovery and migration behavior still needs a real Steam check. When: The injected discovery tests do not exercise account discovery, existing shortcuts or Windows registry paths, and the reported runs omit a Windows build. Do: Check a fresh and an upgraded home with Steam on Linux and Windows, including a shortcut add and removal and an unavailable Steam account.

@fix can do L1, L2, L3 and L4.

Checks: Still running: CI / Rust formatting, lint and tests (pull_request), CI / Release packages and stable upgrades (pull_request).

More: does it help, other systems, switches, what was read

Does it help: Unproven: the added tests use injected discovery, and the reported checks do not include a Windows build or real Steam runs.

Other systems: The gate affects Linux Play routing, startup and live migrations, folder moves, the game shortcut label and the Settings toggle. Windows discovery is gated too; a Windows build and real Steam behavior were not verified in the supplied results.

Switches: None.

Reviewed: 5f6b616ac9 against 21a83d2b44: Read AGENTS.md, CONTRIBUTING.md, the commit, the complete diff and the new access module; inspected changed Steam paths and their library, settings, startup and watcher callers. The review checklist and pull request template were absent. The larger changed files were not read fully; tests and surrounding files were skimmed. No generated files or translations changed.; nothing run (a code review).

Checked and fine:

  • No game-derived files, generated files or translations are added by the diff.
  • The access record uses the existing settings patch lock, and Steam write operations take the library lock.

Testing: No code or tests were run, as requested. The author reports formatting, Clippy, native tests and lint passing; Forgejo CI is still running.

Overlaps and merge order: No overlapping pull requests were supplied; network access was unavailable.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The gate can still read Steam after an explicit legacy opt-out, and some homes continue to probe indefinitely. Recording multiple tiles can also cause repeated settings writes and migrations. The change adds a per-home record to gate Steam discovery and remember shortcut state. It reduces unsolicited reads for fresh homes, but the legacy import and record-update paths need correction. **Blocking (3)**: must change before merging. 1. **L1** `src/game/steam/access.rs:178`: A listed version overrides an explicit legacy Steam opt-out. (more on the line) **Do:** Treat an explicit false as a veto before considering listed versions, and test a home containing both the opt-out and a listed version. 2. **L2** `src/game/steam.rs:324`: An existing Steam account without a shortcuts file never settles its owed look. (more on the line) **Do:** Distinguish an absent shortcuts file in a discovered account from an unavailable Steam installation, treat the absent file as an empty library, and settle the import. 3. **L3** `src/game/steam/access.rs:124`: Upserting an unchanged tile changes the record order, causing the watcher to repeatedly rewrite settings and migrate shortcuts. (more on the line) **Do:** Update matching entries in place or compare and store tiles in a stable canonical order, and test a refresh and migration cycle with multiple tiles. **Should fix (1)**: not blocking, but worth doing before merging. - **L4** `src/game/steam.rs:68`: The label's read and subsequent record update are not serialized with shortcut writes. (more on the line) **Do:** Hold the library lock across the snapshot and corresponding remember or forget operation, including the launcher-tile reader. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5**: The platform-specific discovery and migration behavior still needs a real Steam check. *When:* The injected discovery tests do not exercise account discovery, existing shortcuts or Windows registry paths, and the reported runs omit a Windows build. **Do:** Check a fresh and an upgraded home with Steam on Linux and Windows, including a shortcut add and removal and an unavailable Steam account. `@fix` can do L1, L2, L3 and L4. **Checks:** Still running: `CI / Rust formatting, lint and tests (pull_request)`, `CI / Release packages and stable upgrades (pull_request)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: the added tests use injected discovery, and the reported checks do not include a Windows build or real Steam runs. **Other systems:** The gate affects Linux Play routing, startup and live migrations, folder moves, the game shortcut label and the Settings toggle. Windows discovery is gated too; a Windows build and real Steam behavior were not verified in the supplied results. **Switches:** None. **Reviewed:** 5f6b616ac9d3 against 21a83d2b4420: Read AGENTS.md, CONTRIBUTING.md, the commit, the complete diff and the new access module; inspected changed Steam paths and their library, settings, startup and watcher callers. The review checklist and pull request template were absent. The larger changed files were not read fully; tests and surrounding files were skimmed. No generated files or translations changed.; nothing run (a code review). **Checked and fine:** - No game-derived files, generated files or translations are added by the diff. - The access record uses the existing settings patch lock, and Steam write operations take the library lock. **Testing:** No code or tests were run, as requested. The author reports formatting, Clippy, native tests and lint passing; Forgejo CI is still running. **Overlaps and merge order:** No overlapping pull requests were supplied; network access was unavailable. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -41,0 +65,4 @@
// Steam cannot be found right now: keep the last answer instead of claiming it is gone.
return access::recorded(home, &key, &version);
};
let Some(library) = library::Shortcuts::open(&path) else {
Member

L4 (should fix): The label's read and subsequent record update are not serialized with shortcut writes.

When: A panel refresh can read a tile while a worker removes it, then remember the stale snapshot after the worker has forgotten it. If Steam becomes unavailable, the label falls back to the stale record and offers Remove for a tile that was removed.

Do: Hold the library lock across the snapshot and corresponding remember or forget operation, including the launcher-tile reader.

**L4** (should fix): The label's read and subsequent record update are not serialized with shortcut writes. *When:* A panel refresh can read a tile while a worker removes it, then remember the stale snapshot after the worker has forgotten it. If Steam becomes unavailable, the label falls back to the stale record and offers Remove for a tile that was removed. **Do:** Hold the library lock across the snapshot and corresponding remember or forget operation, including the launcher-tile reader.
@ -199,0 +321,4 @@
if !access::may_look(home) {
return Ok(());
}
let Some(path) = discover().filter(|path| path.is_file()) else {
Member

L2 (blocking): An existing Steam account without a shortcuts file never settles its owed look.

When: For a pre-rule Linux home, discovery can find the signed-in account and return its shortcuts.vdf path even when the account has never created that file. The is_file filter returns early, so every later startup or watcher migration reads loginusers.vdf again.

Do: Distinguish an absent shortcuts file in a discovered account from an unavailable Steam installation, treat the absent file as an empty library, and settle the import.

**L2** (blocking): An existing Steam account without a shortcuts file never settles its owed look. *When:* For a pre-rule Linux home, discovery can find the signed-in account and return its shortcuts.vdf path even when the account has never created that file. The is_file filter returns early, so every later startup or watcher migration reads loginusers.vdf again. **Do:** Distinguish an absent shortcuts file in a discovered account from an unavailable Steam installation, treat the absent file as an empty library, and settle the import.
@ -0,0 +121,4 @@
/// Store what a look verified, replacing what was known for the same profile and version.
fn upsert(access: &mut Access, found: &[Tile]) {
for tile in found {
access
Member

L3 (blocking): Upserting an unchanged tile changes the record order, causing the watcher to repeatedly rewrite settings and migrate shortcuts.

When: With recorded tiles A and B, refreshing the panel for A changes the order from A,B to B,A. The settings watcher starts a migration that finds A then B and restores A,B; its settings write triggers another panel refresh, which moves A to the end again.

Do: Update matching entries in place or compare and store tiles in a stable canonical order, and test a refresh and migration cycle with multiple tiles.

**L3** (blocking): Upserting an unchanged tile changes the record order, causing the watcher to repeatedly rewrite settings and migrate shortcuts. *When:* With recorded tiles A and B, refreshing the panel for A changes the order from A,B to B,A. The settings watcher starts a migration that finds A then B and restores A,B; its settings write triggers another panel refresh, which moves A to the end again. **Do:** Update matching entries in place or compare and store tiles in a stable canonical order, and test a refresh and migration cycle with multiple tiles.
@ -0,0 +175,4 @@
if legacy_wants_tile(home) {
return true;
}
crate::game::versions::listed(home).is_ok_and(|versions| !versions.is_empty())
Member

L1 (blocking): A listed version overrides an explicit legacy Steam opt-out.

When: On Linux, a home with settings.json containing SteamTile:false and a listed version makes legacy_wants_tile return false, but has_prior_activity returns true. Startup then reads loginusers.vdf despite the player's explicit choice.

Do: Treat an explicit false as a veto before considering listed versions, and test a home containing both the opt-out and a listed version.

**L1** (blocking): A listed version overrides an explicit legacy Steam opt-out. *When:* On Linux, a home with settings.json containing SteamTile:false and a listed version makes legacy_wants_tile return false, but has_prior_activity returns true. Startup then reads loginusers.vdf despite the player's explicit choice. **Do:** Treat an explicit false as a veto before considering listed versions, and test a home containing both the opt-out and a listed version.
fix(steam): settle what the gate promises
Some checks failed
CI / What the change needs (pull_request) Successful in 6s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 12s
PR title / Conventional Commit title (pull_request) Successful in 5s
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
65880b5802
Review follow-ups on #372:

- An explicit "SteamTile": false now vetoes the one look, even on a home
  with versions. The player answered that question; the answer does not
  expire.
- An account that has never saved a shortcuts.vdf is an empty library, so
  the owed look is spent instead of reading loginusers.vdf on every start.
- Remembering a tile updates it in place. Moving it to the end of the
  record read as a change to the settings watcher and could start another
  migration from every panel refresh.
- The label's snapshot and the record it writes are one observation under
  the library lock, alongside the launcher-tile reader, so a removal cannot
  be undone by a stale snapshot.
Author
Member

All four code findings are addressed in 65880b5. @review

  • L1 access.rs: an explicit "SteamTile": false in either .NET file is now a veto, checked before listed versions (prior_activity). Tests: the veto over a home with versions, and a home where the box was unticked.
  • L2 steam.rs: discovery that finds a signed-in account whose shortcuts.vdf does not exist treats it as an empty library and settles the look. Only a home with no account at all stays owed. Test added.
  • L3 access.rs: tiles are updated in place, so refreshing a known tile leaves the record byte-identical. Test with two tiles checks the order and the settings file's inode across a repeat.
  • L4 steam.rs: installed and launcher_tile_present hold the library write lock across the snapshot and the record, the same lock order the writers use.

L5 is not done: there is no Steam on this machine, and the Windows target cannot be built here (no mingw LLVM toolchain). The description says so rather than implying a real run. 274 tests pass, fmt, clippy -D warnings and lint are clean.

All four code findings are addressed in 65880b5. @review - **L1** `access.rs`: an explicit `"SteamTile": false` in either .NET file is now a veto, checked before listed versions (`prior_activity`). Tests: the veto over a home with versions, and a home where the box was unticked. - **L2** `steam.rs`: discovery that finds a signed-in account whose `shortcuts.vdf` does not exist treats it as an empty library and settles the look. Only a home with no account at all stays owed. Test added. - **L3** `access.rs`: tiles are updated in place, so refreshing a known tile leaves the record byte-identical. Test with two tiles checks the order and the settings file's inode across a repeat. - **L4** `steam.rs`: `installed` and `launcher_tile_present` hold the library write lock across the snapshot and the record, the same lock order the writers use. L5 is not done: there is no Steam on this machine, and the Windows target cannot be built here (no mingw LLVM toolchain). The description says so rather than implying a real run. 274 tests pass, fmt, clippy `-D warnings` and lint are clean.
Owner
@review
BeanBot left a comment

Recommendation: Approve. The four code findings are addressed, but the platform-specific Steam discovery and migration behavior still needs a real Steam run. A filesystem error can also incorrectly spend the one-time migration look. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The launcher avoids unsolicited Steam reads on fresh homes and Windows, while preserving a one-time migration for eligible Linux homes. The gate and stored tile state add complexity to protect the player’s Steam files and retain shortcut behavior.

Should fix (1): not blocking, but worth doing before merging.

  • L6 src/game/steam.rs:336: The missing-file branch also treats metadata errors as an empty library and permanently settles the look. (more on the line) Do: Distinguish a confirmed missing shortcuts file from metadata errors, and leave the look owed on errors.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5: The platform-specific discovery and migration behavior still needs a real Steam check. When: The injected discovery tests do not exercise account discovery, existing shortcuts or Windows registry paths, and the reported runs omit a Windows build. Do: Check a fresh and an upgraded home with Steam on Linux and Windows, including a shortcut add and removal and an unavailable Steam account.

@fix can do L6.

Since the last review (on 5f6b616ac9)
Resolved: L1 (A listed version overrides an explicit legacy Steam opt-out.); L2 (An existing Steam account without a shortcuts file never settles its owed look.); L3 (Upserting an unchanged tile changes the record order, causing the watcher to repeatedly re…); L4 (The label's read and subsequent record update are not serialized with shortcut writes.)
Still open: L5 (The platform-specific discovery and migration behavior still needs a real Steam check.)
New: L6 (The missing-file branch also treats metadata errors as an empty library and permanently se…)

Checks: Still running: CI / Rust formatting, lint and tests (pull_request), CI / Release packages and stable upgrades (pull_request).

More: does it help, other systems, switches, what was read

Does it help: Unproven: the code and synthetic tests support the intended gate, but no real Steam run is reported. This is not a performance change.

Other systems: Linux legacy homes, Windows discovery, shortcut migration, folder moves, Play routing and settings labels use the affected paths. Real Steam behavior on Linux and Windows remains unverified.

Switches: No switches added, changed or removed.

Reviewed: 65880b5802 against 21a83d2b44: Read AGENTS.md, CONTRIBUTING.md, the fix diff, the Steam access code and relevant Steam library and migration paths. Skimmed the remaining changed files and tests; the complete changed code was not read in full. No review checklist or pull request template was found.; nothing run (a code review).

Checked and fine:

  • An explicit legacy opt-out wins over listed versions.
  • The in-place tile update avoids reordering an unchanged record.
  • The fix retains the Steam access gate and migration behavior.

Testing: No commands that execute project code were run. The author reports 274 passing tests, formatting, Clippy and lint; the two CI checks are still running. Real Steam and Windows checks are not reported.

Overlaps and merge order: Not checked; network access is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The four code findings are addressed, but the platform-specific Steam discovery and migration behavior still needs a real Steam run. A filesystem error can also incorrectly spend the one-time migration look. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The launcher avoids unsolicited Steam reads on fresh homes and Windows, while preserving a one-time migration for eligible Linux homes. The gate and stored tile state add complexity to protect the player’s Steam files and retain shortcut behavior. **Should fix (1)**: not blocking, but worth doing before merging. - **L6** `src/game/steam.rs:336`: The missing-file branch also treats metadata errors as an empty library and permanently settles the look. (more on the line) **Do:** Distinguish a confirmed missing shortcuts file from metadata errors, and leave the look owed on errors. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5**: The platform-specific discovery and migration behavior still needs a real Steam check. *When:* The injected discovery tests do not exercise account discovery, existing shortcuts or Windows registry paths, and the reported runs omit a Windows build. **Do:** Check a fresh and an upgraded home with Steam on Linux and Windows, including a shortcut add and removal and an unavailable Steam account. `@fix` can do L6. **Since the last review** (on 5f6b616ac9d3) Resolved: L1 (A listed version overrides an explicit legacy Steam opt-out.); L2 (An existing Steam account without a shortcuts file never settles its owed look.); L3 (Upserting an unchanged tile changes the record order, causing the watcher to repeatedly re…); L4 (The label's read and subsequent record update are not serialized with shortcut writes.) Still open: L5 (The platform-specific discovery and migration behavior still needs a real Steam check.) New: L6 (The missing-file branch also treats metadata errors as an empty library and permanently se…) **Checks:** Still running: `CI / Rust formatting, lint and tests (pull_request)`, `CI / Release packages and stable upgrades (pull_request)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: the code and synthetic tests support the intended gate, but no real Steam run is reported. This is not a performance change. **Other systems:** Linux legacy homes, Windows discovery, shortcut migration, folder moves, Play routing and settings labels use the affected paths. Real Steam behavior on Linux and Windows remains unverified. **Switches:** No switches added, changed or removed. **Reviewed:** 65880b580292 against 21a83d2b4420: Read AGENTS.md, CONTRIBUTING.md, the fix diff, the Steam access code and relevant Steam library and migration paths. Skimmed the remaining changed files and tests; the complete changed code was not read in full. No review checklist or pull request template was found.; nothing run (a code review). **Checked and fine:** - An explicit legacy opt-out wins over listed versions. - The in-place tile update avoids reordering an unchanged record. - The fix retains the Steam access gate and migration behavior. **Testing:** No commands that execute project code were run. The author reports 274 passing tests, formatting, Clippy and lint; the two CI checks are still running. Real Steam and Windows checks are not reported. **Overlaps and merge order:** Not checked; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -199,1 +333,4 @@
// slip between them.
let _guard = LIBRARY_WRITE.lock().unwrap_or_else(|err| err.into_inner());
// An account that has never saved a shortcut file has an empty library, not an unknown one.
let found = if path.is_file() {
Member

L6 (should fix): The missing-file branch also treats metadata errors as an empty library and permanently settles the look.

When: If Steam discovery identifies an account but accessing its shortcuts path fails, for example because the config directory temporarily denies traversal, is_file returns false. The launcher records an empty migration and will not retry when access is restored, leaving an older shortcut unretargeted.

Do: Distinguish a confirmed missing shortcuts file from metadata errors, and leave the look owed on errors.

**L6** (should fix): The missing-file branch also treats metadata errors as an empty library and permanently settles the look. *When:* If Steam discovery identifies an account but accessing its shortcuts path fails, for example because the config directory temporarily denies traversal, is_file returns false. The launcher records an empty migration and will not retry when access is restored, leaving an older shortcut unretargeted. **Do:** Distinguish a confirmed missing shortcuts file from metadata errors, and leave the look owed on errors.
HumanBean approved these changes 2026-11-29 19:20:05 +00:00
Dismissed
fix(steam): leave the look owed when the shortcut file cannot be asked about
Some checks failed
CI / What the change needs (pull_request) Successful in 10s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 18s
PR title / Conventional Commit title (pull_request) Successful in 7s
CI / Rust formatting, lint and tests (pull_request) Successful in 11m40s
CI / Release packages and stable upgrades (pull_request) Failing after 28m48s
e7794a8532
Review follow-up on #372 (L6): is_file() answers false both for a file that
is absent and for one whose folder cannot be stated, so an unreadable
account folder was recorded as an empty library and spent the one look for
good. Ask with try_exists(): absent is an empty library, and an error is no
answer at all, so the look stays owed for a start that can read the folder.
omgitsgela dismissed HumanBean's review 2026-11-29 19:36:23 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

Author
Member

L6 is fixed in e7794a8. @review

is_file() answered false for both cases, so an account folder we cannot stat was written down as an empty library and the one look was spent for good. The branch now asks: try_exists() gives Ok(false) for a shortcut file that is genuinely absent (an empty library, the look is spent) and Err(_) when the folder cannot be asked about at all, which leaves the look owed for a start that can read it. Test: an account whose config is a file, so asking about config/shortcuts.vdf fails; the record stays un-settled and the look stays owed.

275 tests pass; fmt, clippy -D warnings and lint clean.

HumanBean: your approval is against 65880b5 — this head adds that one branch and its test, nothing else.

L6 is fixed in e7794a8. @review `is_file()` answered false for both cases, so an account folder we cannot stat was written down as an empty library and the one look was spent for good. The branch now asks: `try_exists()` gives `Ok(false)` for a shortcut file that is genuinely absent (an empty library, the look is spent) and `Err(_)` when the folder cannot be asked about at all, which leaves the look owed for a start that can read it. Test: an account whose `config` is a file, so asking about `config/shortcuts.vdf` fails; the record stays un-settled and the look stays owed. 275 tests pass; fmt, clippy `-D warnings` and lint clean. HumanBean: your approval is against 65880b5 — this head adds that one branch and its test, nothing else.
Member
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The metadata-error case now leaves the migration look owed. A real Steam check of platform-specific discovery and migration is still needed. Recommend approval; not approved on the forge.

The launcher avoids unsolicited Steam-file reads on fresh homes and preserves a one-time migration for eligible Linux homes. The latest fix distinguishes an absent shortcuts file from an error checking it.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5: The platform-specific discovery and migration behavior still needs a real Steam check. When: The injected discovery tests do not exercise account discovery, existing shortcuts or Windows registry paths, and the reported runs omit a Windows build. Do: Check a fresh and an upgraded home with Steam on Linux and Windows, including a shortcut add and removal and an unavailable Steam account.

Since the last review (on 65880b5802)
Resolved: L6 (The missing-file branch also treats metadata errors as an empty library and permanently se…)
Still open: L5 (The platform-specific discovery and migration behavior still needs a real Steam check.)

Checks: Still running: CI / Rust formatting, lint and tests (pull_request), CI / Release packages and stable upgrades (pull_request).

More: does it help, other systems, switches, what was read

Does it help: Unproven: the added tests exercise the gate and migration with injected discovery, but no real Steam installation or Windows build was available for verification.

Other systems: The gate affects Windows and Linux discovery, startup and live migration, shortcut labels, settings, Play routing, and folder moves. Real Steam behavior remains unverified.

Switches: No switches added, changed, or removed. The persisted steamAccess record defaults to no prior use; eligible Linux homes retain one migration look.

Reviewed: e7794a8532 against 21a83d2b44: Read AGENTS.md, CONTRIBUTING.md, the access module and the fix diff; inspected the changed Steam code and callers. The combined output for the full changed files and base diff was truncated, so those files were not all read in full. No review checklist or pull request template was present.; nothing run (a code review).

Checked and fine:

  • The new error branch returns before settle_with, preserving the owed look.
  • The absent-file branch still settles an empty library.

Testing: No commands that build or run the project were executed. The author reports 275 tests passing, formatting, clippy and lint clean; both reported CI checks are still running.

Overlaps and merge order: Not checked; network access is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left. The metadata-error case now leaves the migration look owed. A real Steam check of platform-specific discovery and migration is still needed. Recommend approval; not approved on the forge. The launcher avoids unsolicited Steam-file reads on fresh homes and preserves a one-time migration for eligible Linux homes. The latest fix distinguishes an absent shortcuts file from an error checking it. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5**: The platform-specific discovery and migration behavior still needs a real Steam check. *When:* The injected discovery tests do not exercise account discovery, existing shortcuts or Windows registry paths, and the reported runs omit a Windows build. **Do:** Check a fresh and an upgraded home with Steam on Linux and Windows, including a shortcut add and removal and an unavailable Steam account. **Since the last review** (on 65880b580292) Resolved: L6 (The missing-file branch also treats metadata errors as an empty library and permanently se…) Still open: L5 (The platform-specific discovery and migration behavior still needs a real Steam check.) **Checks:** Still running: `CI / Rust formatting, lint and tests (pull_request)`, `CI / Release packages and stable upgrades (pull_request)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: the added tests exercise the gate and migration with injected discovery, but no real Steam installation or Windows build was available for verification. **Other systems:** The gate affects Windows and Linux discovery, startup and live migration, shortcut labels, settings, Play routing, and folder moves. Real Steam behavior remains unverified. **Switches:** No switches added, changed, or removed. The persisted steamAccess record defaults to no prior use; eligible Linux homes retain one migration look. **Reviewed:** e7794a853290 against 21a83d2b4420: Read AGENTS.md, CONTRIBUTING.md, the access module and the fix diff; inspected the changed Steam code and callers. The combined output for the full changed files and base diff was truncated, so those files were not all read in full. No review checklist or pull request template was present.; nothing run (a code review). **Checked and fine:** - The new error branch returns before settle_with, preserving the owed look. - The absent-file branch still settles an empty library. **Testing:** No commands that build or run the project were executed. The author reports 275 tests passing, formatting, clippy and lint clean; both reported CI checks are still running. **Overlaps and merge order:** Not checked; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
llun approved these changes 2026-11-29 20:30:11 +00:00
llun merged commit 6bc3e1af35 into main 2026-11-29 20:30:17 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 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!372
No description provided.