Skip to content

Steam: a half-written .acf reads as unknown, not as uninstalled - #54

Closed
sevenns wants to merge 1 commit into
release/v0.9.0from
fix/steam-acf-half-written
Closed

sevenns wants to merge 1 commit into
release/v0.9.0from
fix/steam-acf-half-written

Conversation

@sevenns

@sevenns sevenns commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Fixes the red Check on #47 (macos-latest, windows-2022): steam activities > another game launches and runs while one downloads timed out waiting for notify:game-installed.

Cause

A real bug, not a test flake. When the Steam poll reads an appmanifest_<appid>.acf while it is being rewritten (truncated, no StateFlags yet), readAcfState returned null, which the batch lookup reported as absent. The watch then saw downloading → absent → installed instead of downloading → installed: the activity flickered and the "installed" notification was lost (absent → installed is "installed in Steam directly", which deliberately does not notify). The test rewrites the .acf with a plain writeFile, so the slower macOS/Windows runners hit the window; Steam rewriting its own manifests can hit it the same way.

Fix

  • readAcfState tells a missing .acf from an unparseable one.
  • steamInstallStatuses leaves an appid whose .acf could not be parsed out of the map, and SteamActivityWatch keeps what it last knew for it.
  • The single steamInstallStatus (used for GameInfo) still reads it as absent, as before.
  • New test: an .acf caught mid-rewrite changes nothing, and the finished download still notifies.

The rest of the diff in the two files is Prettier formatting carried over from the feature branch, where this fix already lives (it will merge cleanly with the next per-game-activity PR).

Verification

typecheck, lint and vitest (1395 passed, three runs in a row) on release/v0.9.0 + this change.

@sevenns

sevenns commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #55: the same fix landed in release/v0.9.0 with it.

@sevenns sevenns closed this Oct 6, 2026
@sevenns
sevenns deleted the fix/steam-acf-half-written branch October 6, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant