Skip to content

fix(native): atomically link games without dropping tracked roots - #24

Draft
Seagulls wants to merge 7 commits into
fix/pr139-bounded-wait-20261031from
fix/atomic-game-linking-20261031
Draft

Seagulls wants to merge 7 commits into
fix/pr139-bounded-wait-20261031from
fix/atomic-game-linking-20261031

Conversation

@Seagulls

@Seagulls Seagulls commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Scope

Stacked draft on fix/pr139-bounded-wait-20261031 (public PR #25; revised upstream Liquid-co#139). Retains all prior #24 commits through merge parentage and includes the maintainer-requested 30-second interactive topology wait. Not an independent dev-public PR.

Issue #20 documents an independently reproduced loss of tracked coverage: when root transfer is refused, existing LinkGames can log the failure but proceed to delete the original game registration. This change:

  • reserves both canonical and alias games in stable order before any persisted linking effects;
  • moves alias, mapped-root carry, history adoption, collections and deletion into a single SQLite transaction;
  • preserves original registration and previously mapped directories if an intermediate root insert fails;
  • keeps existing canonical-name-wins behaviour and does not delete physical files.

Proof

Synthetic local tests against a PR-139-equivalent prototype: busy canonical writer preserves alias registration (GREEN); injected SQL failure during second named-root carry rolls back earlier transfer and alias/history changes (GREEN); ordinary successful carry remains GREEN. Full store and daemon package suites passed locally, but an exact branch-head CI/race/e2e campaign is still required. Tests added in this branch cover both paths.

Integration and limitations

Draft; do not merge ahead of PR Liquid-co#139. When upstream Liquid-co#139 removes its current LinkGames guard in response to maintainer scope feedback, rebase this stacked branch and preserve the new two-game admission mechanism. Do not treat this as daemon cross-process ownership or SaveSync first-copy acceptance. No real save data or deployment.

31 Oct 2026 CI correction and re-stack

Original branch E2E RED on Linux and Windows: TestPeerLink_ListsPeerGamesAndLinksThem and TestMatching_LinkedGameActuallyTransfersData received HTTP 500 from LinkGames while normal track-triggered sync activity was still admitted (failed run). The immediate TryTopologyMutation refusal was incompatible with normal interactive linking; it was not evidence that root data was modified.

Commit b8494cef084d1906ec626f66b1458459d0958c97 reconciles PR #24 with passing PR #25, uses its WaitTopologyMutation primitive with one 30-second deadline and deterministic two-game reservation, and preserves the atomic link transaction. An actual busy timeout now returns HTTP 409 rather than an internal 500; cancellation or failed admission commits no alias, root or history effects. The daemon tests exercise a writer that drains and an indefinitely busy writer with a short test context.

Exact-head CI run is authoritative and was pending when this note was prepared; do not mark ready for merge until it is green and the original failed E2E cases are observed passing.

@Seagulls
Seagulls changed the base branch from fix/upstream-root-topology to fix/pr139-bounded-wait-20261031 October 31, 2026 19:43
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