Skip to content

Steam's remotecache.vdf is the launcher's file, not a save change - #52

Open
ChakraFusion wants to merge 1 commit into
Liquid-co:dev-publicfrom
ChakraFusion:pr/launcher-files
Open

ChakraFusion wants to merge 1 commit into
Liquid-co:dev-publicfrom
ChakraFusion:pr/launcher-files

Conversation

@ChakraFusion

Copy link
Copy Markdown

As offered in #21. Steam rewrites remotecache.vdf in a game's userdata folder on every start. It counted as a new save: an automatic snapshot of a game nobody played, and a sync to every other device. Worse, the new e2e test shows that on dev-public, two PCs whose Steam keeps different bookkeeping read as diverged, so a real save change on one of them never reached the other.

  • delta.NeverSynced names such files (remotecache.vdf for now).
  • They're left out wherever sync decisions are made, exactly like an exclusion rule: one excluded() check used by filterManifest, filterLineage, filterPathList and the recorded deletions. The filtering now runs whether or not the game has rules of its own, and so does the translation of a base recorded before a rule existed. That way a base recorded while the file still counted isn't read as both sides moving.
  • The served manifest still lists the file, so a device on an older build doesn't read the gap as a deletion.
  • The watcher isn't woken by such files and leaves them out of its content hash. A hash recorded by an earlier build is recognised once and re-taken, so the update itself isn't snapshotted as a change. No migration is needed.
  • An emptied-folder hold doesn't wait for such a file to come back.

Tests: delta.NeverSynced; the content hash with and without rules, plus the hash an older build recorded; left alone on both sides, still served, one-sided is no difference; e2e TestLauncherFile_SteamRewritingRemotecacheIsNoSaveChange, which fails on dev-public.

🤖 Generated with Claude Code

Steam rewrites remotecache.vdf in a game's userdata folder on every start.
It counted as a new save: an automatic snapshot of a game nobody played,
a sync to every other device, and where the folder is under Program Files
a copy that failed with "access denied" on every pass. It is Steam's
record of what Steam Cloud uploaded for this device, not part of the save.

- delta.NeverSynced names such files (remotecache.vdf for now).
- syncengine: they are left out wherever decisions are made, exactly like
  an exclusion rule - one check, excluded(), used by filterManifest,
  filterLineage, filterPathList and the recorded deletions. The filter now
  runs whether or not the game has rules of its own, and the translation
  of a base recorded before a rule existed runs always too, so a base
  recorded while the file still counted is not read as both sides moving.
  The manifest a device serves still lists the file: a device on an older
  build must not read the gap as a deletion.
- watcher: such files do not wake it and do not count toward the content
  hash. A hash recorded by an earlier build, which counted them, is
  recognised once and re-taken, so the update itself is not snapshotted
  as a change. No migration needed.
- An emptied-folder hold does not wait for such a file to come back.

Tests: delta.NeverSynced; the content hash with and without rules, and
the hash an older build recorded; left alone on both sides, still served,
one-sided is no difference; e2e: Steam rewriting the file on one device
is no snapshot and changes nothing on the other, while a real save change
still syncs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Oct 14, 2026

Copy link
Copy Markdown

@ChakraFusion is attempting to deploy a commit to the sivadaboi's projects Team on Vercel.

A member of the Team first needs to authorize it.

@ChakraFusion

Copy link
Copy Markdown
Author

The failing job is TestIgnored_ASaveFromTheCloudLeavesAnIgnoredFileAlone on Windows ("offers = [], want the desktop's save"): a cloud offer that didn't appear. This PR only changes how remotecache.vdf is treated, and that test's saves have no such file. Without one, the watcher wakes for the same events and computes the same content hash as on dev-public, and the sync decisions see the same files. So nothing this PR changes is on that test's path.

The test passed on every run of this branch on my fork, 8/8 locally, and 50/50 with the race detector on Windows runners. It's a rare timing flake, and a re-run of the failed job should pass. I'm still trying to catch it with the daemons' logs, and will open a separate fix if I find the cause.

@ChakraFusion

Copy link
Copy Markdown
Author

Follow-up: I caught that failure with the daemons' logs (once in 150 race-detector runs), and it's a real bug, not the test. The deck took an automatic snapshot of a save it had already kept: a newly tracked game had no recorded baseline, so writing a log into its excluded folder counted as a change. That copy was then the deck's newest save, so the desktop's newer one wasn't offered. It's unrelated to this PR. The fix is #56.

This branch has not been deployed

No deployments
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