Repository navigation
fix(native): prevent root topology changes during admitted writers - #139
Conversation
|
@Seagulls is attempting to deploy a commit to the sivadaboi's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Thanks, the topology reservation itself is right. Two changes before we can merge:
|
|
Thanks for the specific review. Both requested corrections are now committed to this existing PR's source branch at
The revised head passed all ten exact-head fork CI jobs, including Linux/Windows tests and all E2E shards. Upstream PR-head CI is running separately. All regression evidence used synthetic saves and disposable environments, not live user data. While investigating #139, we also verified several adjacent correctness issues. We kept the fixes out of #139 rather than broadening this PR without agreement:
Our preference is to keep #139 limited to your requested revisions; submit the game-linking fix as a small dependent PR and submit the other Store corrections as independent focused PRs, not one large stack. Would you prefer upstream issues first, direct individual PRs, or to handle the game-linking safety fix within #139 before merging? Happy to follow whichever structure is easiest for you to review. Thanks again. |
|
Thanks, both changes look right, and the tests pass here too. One small thing before we merge: five files aren't gofmt-formatted ( |
|
#131 is merged now, so this needs a rebase too; please run gofmt as part of it. |
|
Thanks — both follow-up requests are complete at
Scope and behaviour are unchanged, and the adjacent fixes remain separate. |
Addresses the daemon-local root-topology admission race in #136. An ordinary native AddRoot, RemoveRoot or primary save-path change could previously commit a new mapping while an already-admitted writer, reader or queued sync still held the old path.
This revision incorporates the maintainer's requested changes. It deliberately does not implement cross-process daemon lifecycle/takeover coordination.
Changes in response to review
opensave-cli daemon. Safe ownership/takeover by independent processes needs its own design.A sync of this game is in progress. Try again in a moment.Behaviour
Root removal does not delete physical save files.
Review map
internal/p2p/syncengine/settle.go,engine.go: native per-game topology reservation and cancellation-aware bounded waiting.internal/api/routes_roots.go,routes.go,server.go: bounded admission held through authoritative mutation/watch updates, clear 409/503 results, injectable test wait period.internal/daemon/daemon.go,registry_setup.go: retain relevant daemon-local topology protection.internal/cliapp/client.go,commands_locations.go,commands_games.go: remove daemon-presence lock and related CLI logic from this PR.internal/api/root_topology_wait_test.go,root_topology_admission_test.goande2e/multiroot_test.go: verify draining writers, refusal, and single-request success.Reproduction and validation
985ef275ea4d61683ec053c09886fc8b7fcf8a19: exact-head fork CI passed all ten jobs, including Linux/Windows tests, frontend, Decky and six E2E shards. The upstream PR-head CI after publishing the revision is independently authoritative.Explicit limitations and adjacent issues
daemon.addrstill requires cross-process ownership/takeover design: fork issue #21. Accordingly, this PR does not claim to resolve every acceptance criterion of bug(native): RemoveRoot can unmap a path while its transfer writer is still admitted #136.These follow-ups are linked for transparency, not included in this PR. We propose small independent PRs, except for game linking, which depends on #139; maintainers can choose the preferred integration order.
Original public preparation: fork PR #16; original fork issue #13.
Upstream refresh — 2 November 2026
Current candidate:
8159c99fbf32ee6d5b87c73c990cfa0e098dda97, incorporatingdev-public@fdcce2445c71c0d8a78715b6d57194d6bf777677and merged #131. Upstream was merged to preserve published branch history without a force push. The only conflict was the imports inroutes_roots.go; both ownership and topology-admission checks are retained.All five requested files are gofmt-clean;
git diff --checkpasses. Exact-head local validation passes: focused API/store/daemon/syncengine race suites, full non-E2E race suite,go vet ./..., Linux amd64 CLI build and Windows amd64 CLI cross-build. All testing used disposable state. No adjacent fixes were added.Current upstream CI is running; earlier head results above are historical evidence only. Vercel deployment requires team authorization and is separate from source validation.