Skip to content

bug(native): stale full-row game updates can restore an obsolete save path #19

Open

Description

@Seagulls

Summary

A metadata-only Store.UpdateGame call can write an older full Game snapshot and overwrite a more recent, topology-admitted save_path change. Existing UpdateGame SQL updates all mutable fields including save_path, sync_ignore, branch and snapshot/lineage metadata, regardless of which fields the caller intended to change.

Independent synthetic RED witness

Using disposable SQLite/store fixtures against upstream dev-public@a0f6032b8ba36da25e3e0e5e90c5ace9ba0c1fc7:

  1. Read a Game at path /old as a metadata editor.
  2. Update its path to /new.
  3. Commit the stale metadata edit using Store.UpdateGame.
  4. Observed: the path returns to /old without native topology admission.

No production save or user filesystem was used.

Narrow acceptance contract

  • Metadata-only updates must not write topology or other unrelated protected fields from stale records; enforce at SQL write time (handler re-read alone is insufficient).
  • Intentional save-path changes must use exclusive native topology admission and an expected-old-state comparison, returning a typed conflict when stale.
  • Preserve existing legitimate API, CLI, daemon, session, peer, and settings callers.
  • Include deterministic interleaving and race tests, including a metadata update racing an admitted remap and a combined path/ignore update.
  • Do not invent a generalized versioning framework or claim daemon-external direct SQLite exclusion.

Relationship to other work

Discovered during upstream topology admission PR #139; upstream #136. This is a separate underlying Store safety issue. Coordinate any necessary prerequisite before accepting Liquid-co#139 as fully bypass-free.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions