feat(engine,deploy): seed-drift guard + track current dictionary release (v1.2.1) #92
Reference in New Issue
Block a user
Delete Branch "feature/dict-version-track-release"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Track the current dictionary release (
v1.2.1) and add a seed-drift guard so a bumped build seed can never silently corrupt a live contour.Why
The dictionary release moved to
v1.2.1whileDICT_VERSIONstayed pinned atv1.0.0in CI and the image/compose seed. Beyond stale CI, the real hazard: thedawg-datavolume is seeded once and never re-seeded, and the flat DAWGs carry no embedded version — so bumping the seed on a live volume relabels the already-seeded bytes, voiding games pinned to the prior label and serving the wrong dictionary to new ones, undetectably.Changes
engine.OpenWithVersions+seedmarker.go): records the flat dir's version in a.seed_versionmarker on first boot; refuses to start when a laterBACKEND_DICT_VERSIONdisagrees.DICT_VERSIONis now the seed for a fresh volume only; a live contour migrates through the admin console (prior versions stay resident, in-progress games keep replaying).DICT_VERSIONcentralised to one workflow-levelenv(v1.2.1); image / compose /.env.exampleseed defaults →v1.2.1. The deploy job still reads the per-contourvars.TEST_DICT_VERSION.DVrow.Verification
Local against the real
v1.2.1artifact:gofmt,build,vet, unit and integration (-tags=integration) all green. Two new engine tests cover the marker record + drift refusal.Rollout (test contour — already done pre-PR)
The existing contour holds
v1.0.0(flat) +v1.1.0(resident subdir), activev1.0.0. To keep the first guarded deploy safe:.seed_version=v1.0.0onscrabble_dawg-data(matches the real bytes).TEST_DICT_VERSION=v1.0.0(so this deploy bootsv1.0.0, marker matches).After merge + deploy, the contour is moved to
v1.2.1via the admin console (keepsv1.0.0+v1.1.0resident). At the next contour wipe, bumpTEST_DICT_VERSIONtov1.2.1.