Skip to content

Build Puzzle Versioning System #70

Description

@Mkalbani

Description

Implement a versioning layer for the puzzles module so that puzzle edits do not break active sessions or invalidate historical scores. Every time an admin modifies a puzzle's conditions, effects, or hints, a new version is created. Active sessions always reference the version that was live when they started, preserving result integrity across the game's full history.

Acceptance Criteria

  • A PuzzleVersion entity stores a full snapshot of puzzle data with a version number and createdAt
  • PATCH /puzzles/:id creates a new version instead of mutating the existing record
  • Sessions store a puzzleVersionId reference at creation time
  • GET /puzzles/:id/versions (admin-only) returns the full version history
  • GET /puzzles/:id/versions/:versionId returns a specific version snapshot
  • Scoring and evaluation always use the version attached to the session, not the latest
  • Rollback endpoint POST /puzzles/:id/rollback/:versionId restores a previous version as the latest
  • Unit tests cover version creation on edit, session version pinning, and rollback

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

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions