Test vectors

Deterministic portable fixtures for hold-and-win-reference. The vectors themselves are source-controlled in the backend, where they execute; this file is the index that names their identity and the commands that produce and check them.

Vector identity

A vector is only replayable if it binds all of:

FieldWhy
Canonical config path + SHA-256Different weights are a different game
Backend Git SHADifferent code is a different result
RNG algorithm/version (sha256-trunc64-be/go1-alfg#1)A stored seed alone is not replayable
Feature seed / round seedThe input
Incoming state + step IDA mid-feature vector has no meaning without the state it steps from
Exact expected outcome and final stateThe thing that fails when behaviour moves

Locations

CorpusPathRunner
Pack golden vectorslibs/mathengine/games/hold_and_win_reference/golden_test.gogo test ./libs/mathengine/games/hold_and_win_reference -count=1
Reference/runtime parity corpuslibs/mathengine/parity/vectors.gomake test-parity

Generation

Seeds are discovered by search, not chosen by hand — the existing generator walks candidate seeds until one genuinely reaches each required scenario:

cd /Users/admin/kiro/backend
go test -tags parityseed ./libs/mathengine/parity/ -run TestDiscoverParityVectors -v

Expected values are then reviewed by hand and pinned as literals.

A failing vector is never "fixed" by re-running the generator. A mismatch means the reference and the runtime disagree, or that engine behaviour moved. Both require a decision.

Required scenarios

  • No win, no trigger
  • Base line win without trigger
  • Five BONUS — no trigger, zero feature draws
  • Six BONUS — trigger with exact reel-major lock order
  • Miss-only step decrements respins by exactly one
  • Landed prize resets respins to three
  • Mini, Minor and Major landed prizes
  • Ordinary sum below the cap
  • Ordinary sum capped once at 500×
  • Full grid awarding exactly Grand 500×
  • Duplicate step replay: identical result, zero new draws
  • Persisted step execution equals RunHoldAndWinToCompletion

Contents

Empty. Populated at plan Task 9.