Skip to content

sync: untracking forgets served states; the served-manifest proof repairs the shared-files record - #70

Merged
Omar-VF merged 2 commits into
Liquid-co:dev-publicfrom
ChakraFusion:pr/served-proof
Oct 16, 2026
Merged

Omar-VF merged 2 commits into
Liquid-co:dev-publicfrom
ChakraFusion:pr/served-proof

Conversation

@ChakraFusion

Copy link
Copy Markdown

As agreed on #66, in two commits:

  1. Untracking a game forgets what was served for it. Served states (served.go) are kept in memory per game and peer, and weren't cleared on untrack like the rest of what a game agreed with its peers (store.ForgetGameSyncState). A game tracked again within the hour could bank a state served before the untrack. Both untrack paths, by hand and from a peer, now clear them. Test: TestForgetServed_ForgetsOnlyThatGame.
  2. The served-manifest proof repairs the shared-files record too, as sync: a lost report no longer brings back a file deleted right after #65 does for the push proof, and with the same exception while a game is held as emptied. Without it, a file the peer took from what was served and this device deleted before its watcher noted it came back. Test: TestDeletion_SurvivesALostReportWhenServed fails 3/3 without this commit (the deleted file comes back on both devices).

The order matters. With the repair but without the first commit, TestUntrack_LateLineageWriteMustNotSurviveIntoARetrack and TestUntrackThenRetrack_DoesNotInheritStaleLineage fail 3/3 (the peer's files are deleted after a re-track), which is what stopped this repair in the long test run. With both commits they pass.

CI on my fork is green.

🤖 Generated with Claude Code

ChakraFusion and others added 2 commits October 15, 2026 16:02
Served states (served.go) are kept in memory per game and peer and were not
cleared on untrack, unlike everything else the game agreed with its peers
(store.ForgetGameSyncState). A game tracked again within the hour could then
bank a state served before the untrack as agreed. Both untrack paths, by
hand and from a peer, now clear them too. (Asked for on Liquid-co#66.)

Test: TestForgetServed_ForgetsOnlyThatGame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
When a peer is found holding a state this device served it (served.go), the
base is banked as agreed, but the record of which files both hold was left
as it was, as the push proof did before Liquid-co#65. A file the peer took from what
was served and this device deleted before its watcher noted it then read as
one the peer had and this device never did, and was fetched back. The
served proof now records the served state's files as shared too, except
while the game is held as emptied (as in Liquid-co#65). (Asked for on Liquid-co#66.)

This needs the previous commit: with served records surviving an untrack,
the repair banked a re-tracked game's files as shared and deleted the
peer's copies (TestUntrack_LateLineageWriteMustNotSurviveIntoARetrack and
TestUntrackThenRetrack_DoesNotInheritStaleLineage fail 3/3 without it).

Test: TestDeletion_SurvivesALostReportWhenServed (fails 3/3 without this:
the deleted file comes back on both devices).

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

vercel Bot commented Oct 15, 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.

@Omar-VF
Omar-VF merged commit 8bc339c into Liquid-co:dev-public Oct 16, 2026
10 of 11 checks passed
ChakraFusion pushed a commit to ChakraFusion/OpenSave that referenced this pull request Oct 16, 2026
Entries for Liquid-co#49, Liquid-co#70, Liquid-co#69, Liquid-co#72, Liquid-co#68 and Liquid-co#47, added at the end of the
Fixed list so they do not touch Liquid-co#75's own entry. Liquid-co#57 is test-only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

2 participants