Skip to content

Chain/segment IDs reset across sessions, leading to silent collisions in training data #1

Description

@JFrusher

Right now, new_chain_id() uses a simple counter that starts at 1 whenever the app launches. Because it resets every session and isn't saved when resuming a match, you end up with repeating IDs like chain-1#0 across different runs.
When feedback.training_pairs tries to clean up duplicates by taking the latest edit per (match, segment_id), a new correction from a completely different session can silently overwrite an older one on the same match. This means we accidentally throw away valid training pairs.
Suggested fix:
Give PlayChain a unique ID (like a short uuid4().hex[:8], or save the counter in the session file). Keep segment_id formatted as {chain_id}#{index}.
Definition of Done:
Two corrections logged in separate app runs for the same match both appear in training_pairs. test_feedback.py passes.

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