fix!: --fast corrupts deck order after a Tarot/Spectral pack closes — every later deal silently wrong

Aperta
#234 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
lua, python
Ambito
game-dev

Direzione di ricerca

Riproduci il problema con il differential harness descritto nel report, confrontando tracce di azioni identiche a velocità normale e con --fast. Ispeziona la sequenza di chiusura del pack e restituzione della mano e confrontane l’ordine con il riferimento vanilla in misc_functions.lua:209. Il lavoro è completato quando i deal successivi rimangono fedeli al seed dopo i pack Tarot o Spectral e l’ordine di visualizzazione dei pack non risulta alterato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

Under --fast (10× speed), SMODS deal events race. When an Arcana or Spectral
pack's dealt targeting hand returns to the deck at pack close, the live deck
order ends up permuted relative to vanilla. From that point on, every
subsequent deal in the run is silently wrong
— no error, no visible glitch,
just different cards drawn than the seed should produce.

We caught this with a differential harness replaying identical action traces on
a vanilla-faithful simulator: divergence always appeared at the first re-deal
after a pack close, and the same traces replay byte-exact at normal speed. A
cosmetic form of the same race also shows up as scrambled pack display order
(contents correct as a multiset, order permuted).

Note the corruption usually hides: the game's seeded shuffles re-sort by
sort_id before shuffling (misc_functions.lua:209 in the vanilla dump), which
heals most deck-order drift — so the bug only bites between pack close and the
next full shuffle, which is exactly when it's hardest to notice.

Impact

Any run made with --fast stops being vanilla-faithful at its first tarot or
spectral pack: draws after the pack differ from what the seed produces at normal
speed, so results are not comparable across speed settings and not reproducible
against the real game. For benchmark data this is a silent validity problem.

We retired --fast entirely for validation work and run --no-audio only.

Suggested Fix

Sequence the pack-close hand-return like vanilla regardless of G.SETTINGS.GAMESPEED
(the return events need to complete in deck order before control returns), or —
as a stopgap — document that --fast is not seed-faithful once a Tarot/Spectral
pack has been opened.

Lingua principale
Python
Stelle
80
Fork
23
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di coder/balatrobot

Tutte le issue di coder/balatrobot

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.