Repository navigation
Conversation
…daemon
The panel synced a game when Steam reported it running, alongside the
game starting, so the game could open its old save while the newer one
was still arriving, and playing on it led to a conflict at the next
sync. Now, when a tracked Steam game is launched, the launch is held
(Steam's game action is cancelled), the save is synced - waiting for a
sync already under way if there is one - and the game is started again.
At most 30 seconds: a slower sync carries on alongside the game, and
the toast says so. The game is started again whatever the sync did. A
toggle, "Wait for the save before starting", on by default, turns the
hold off and goes back to syncing alongside.
The daemon is also told when the game starts and stops
(/api/games/{id}/session). It otherwise has to spot the game among
running programs every ten seconds, which under Proton it may not; a
session ended from here takes the "After playing" snapshot and syncs it
before the exit sync runs.
Which games to hold is decided from a list of tracked games by App ID,
refreshed every minute and with the panel, because the hold has to be
decided the moment Steam reports the launch.
A session the plugin begins is only ended by the plugin, when Steam says the game stopped. A reload of the plugin, or of Steam, while a game ran lost the session, and its stop was missed: the session stayed open in the daemon until it restarted, and with a game's save held back from syncing while it is played, that is a save that does not sync. The sessions begun here are kept in localStorage. When the plugin loads, one whose game is not running is ended; one still running is kept, and its stop ends it as usual. A session is forgotten only once the daemon has taken its end, so an end the daemon did not get is tried again at the next load.
Owner
Author
Upstream exact-head CI correction — PASS (30 October 2026)The upstream PR Liquid-co/OpenSave#139 now points to the updated public commit The two Linux E2E regressions were immediate AddRoot calls while the initial paired sync still held native admission. The E2E helper now accepts only the expected temporary 409, verifies a rejected operation did not apply its requested mapping, and retries until the original in-flight native sync drains. Production safety checks remain unchanged. GitHub Actions CI run — all 10/10 jobs GREEN: Linux+Windows Go race suites, all six Linux+Windows E2E shards, frontend and Decky plugin. The Vercel authorization check is unrelated to source correctness. No merges or deployments. |
Deck: a game's start waits for its save, and its play is told to the daemon
…p transactions Use immutable path evidence gathered outside the single-connection database writer, compare actual claims read inside the writer transaction, and fail closed if a new claim was not prepared. Cover primary registration, peer auto-track, relocation and named roots, plus deterministic slow-resolver and changed-claim regressions.
…nership conflicts as 409
Since the index cache came in with dev (Liquid-co#135), a call that does not wait can still get the newly built index when the rebuild ends first, as it does at once for a test's tiny manifest. The tests asked for the old index (or none) and failed whenever the rebuild won: once on Linux CI in Liquid-co#131. They now hold the rebuild (slowBuilds), as a real one of the whole manifest takes about a minute, and check that the call answers without waiting for it; then let it go and check the index it builds.
Index no-wait tests: the rebuild is held while they check
…ail-closed fix(daemon): fail-closed game ownership checks and transactional path admission
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13.
Ordinary root removal could acknowledge a mapping change while an already-admitted native writer still held the old filesystem path. A separate OpenSave CLI process could also bypass the daemon's admission when its published address file was absent.
This change makes those topology transitions refuse while the native writer is active, without deleting root files or introducing a new transfer mode.
Contract
RemoveRootwhile native work owns the game's pathdaemon.addris missingReview map
internal/p2p/syncengine/settle.goandengine.go: nonblocking per-game topology reservation and native reader/writer/queue admission.internal/api/routes_roots.go,routes.go: hold that admission through the Store mutation and subsequent watcher notifications.internal/daemon/daemon.go,registry_setup.go: reserve other native topology-changing producer paths.internal/api/server.go,internal/cliapp/client.go,commands_locations.go,commands_games.go: a cross-process per-home daemon presence lock and fail-closed offline CLI root edits; lock is released on server shutdown.root_topology_admission_test.go,topology_mutation_test.go,server_presence_test.go.Reproduction and validation
dev-public: native RemoveRoot writer test, with instructions.daemon.addr; attempts to change roots while the daemon's writer is admitted are refused in each case (twice under Go's race detector).go vetpassed. The published branch is a clean public port of that reviewed fix; normal upstream CI remains authoritative after later updates.Tests use isolated temporary homes, SQLite files and synthetic save bytes only; no live user save data was involved.
Failure semantics and limits
The reservation is scoped to native per-process transfer admission; the daemon-presence lock closes ordinary cooperating new-version CLI fallback against a running daemon, even without its address file. A process that bypasses OpenSave's API/CLI or a daemon running an older version without the lock is not made safe by this patch. Linux race tests and Windows cross-build are not Windows-native runtime acceptance.
No new schema, third-party integration, management state or background worker is introduced.