Brings the Space up to main. What changes for a running session:
- ?rando=<n> picks the design from the predetermined pool (randos.py), so a
dyad can share one pid and still get two different tasks.
- dyad_mode sessions write to bear/<pid>/ and bear_randomization_log.csv,
leaving data/ and randomization_log.csv to the SONA sample.
- every screen is timed into a per-participant CSV with PsychoPy's column
names, including the quiz answer and whether it was right.
- savequeue_fix.py no longer carries two real participant ID codes, which
this repository has been serving publicly.
The two .docx files on main are left out; HF rejects loose binaries.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Stop a reload from stranding a participant at the end of the hunt
SONA 64408 finished all 192 trials and all 12 ratings, and then the page
never advanced. 64450 hit the same wall the night before and gave up without
writing in. Both sessions are complete in the data and neither one ended.
Reloading mid-game sends EnvStage.activate down its "load stage state from
memory" branch, where flax restores every array as numpy. custom_data_fn then
indexes those arrays and gets numpy scalars back, which make_serializable does
not convert because np.generic is not np.ndarray, so msgpack refuses the
record. That raise lands inside _process_save_queue ahead of its task_done(),
the queue keeps an unfinished task forever, and the queue.join() that ends the
stage can never return. Every later reload blocks at the same await.
Three guards, because the last step turns a lost record into a lost two-hour
session and that should not be possible however a record goes bad:
- get_latest_stage_state runs the restored state through match_types, so a
reload hands back…