Rebuild the Hawkins paid pilot on the session-based multiplayer API - #26
Merged
Merged
Conversation
…iplayer API Replaces the bootstrap layer from #24/#25 with what jspsych-multiplayer now provides (#103 rejoin, #105 session IDs and shared randomness, #106 group formation): - The dyad ID is jsPsych.multiplayer.sessionId, and the schedule comes from jsPsych.multiplayer.shuffle, so both partners agree with no URL seed. - On JATOS, waitForGroup() is the waiting room: the adapter seals each pair, so a third arrival starts a new group instead of ending a formed one. - Dropouts come from presence (ended_by "participant_left"). Idle rounds are attributed to a role both partners agree on, and both then exit. - A reloaded page (previousInstance) gets its own paid exit. - One terminal screen routes every exit (Hawkins.exitFor). Carries over #25's Prolific exits, DataPipe pipeline and jzip packager, with the review fixes: Prolific IDs read from jatos.urlQueryParameters on JATOS; results saved to JATOS and the study ended with endStudyAndRedirect; flush waits for in-flight saves and always sends a final chunk with the outcome; no retry sleep after the last attempt, and a capped Retry-After; a correct zip end record. Tangrams now use the original's exact draw boxes, and the matcher's feedback highlight is green. All dependencies load from vendor/, filled by scripts/vendor.mjs at pinned versions (jspsych-multiplayer 0128c44, jsPsych preview 5cb6b05). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebuilds
reference-game-hawkins.htmlon the current jspsych-multiplayer API (#103 rejoin, #105 session IDs and shared randomness, #106 group formation). It replaces #1, #19, #24 and #25, which were written against the older API.What changed
waitForGroup()is the waiting room. The batch's Max active members must be 2, and the adapter seals each pair, so a third arrival starts a new group instead of ending one that has formed. Locally, two tabs share one?mp_session=link.jsPsych.multiplayer.sessionId. The 36-round schedule comes fromjsPsych.multiplayer.shuffle, so both partners get the same order and each dyad gets its own.ended_by: "participant_left"). For timed-out rounds, both partners attribute the idle rounds to the same role, and both exit.previousInstance) gets its own paid exit.Hawkins.exitFor). Completion codes:complete,partner_dropped,no_match,inactive,reloaded. All are still blank inCONFIG.endStudyAndRedirectwhen the participant clicks submit. DataPipe is optional.vendor/, whichnpm run vendorfills at pinned versions: jspsych-multiplayer0128c44and jsPsych preview5cb6b05.vendor/stays gitignored.Review findings fixed from the old PRs
jatos.urlQueryParameterson JATOS.Retry-Afteris capped..jzipend record is correct; the archive passesunzip -t.Testing
npm test: 33 tests, all passing. They cover the pipeline, schedule, idle attribution, exit routing, the JATOS save target, and the jzip structure.Not tested: a real JATOS server; the waiting-room timeout and the idle exit in a browser (both are covered by unit tests only).
Still open
reference-game-cwg.htmlis still on the old API.READINESS.mdpredates the upstream changes.🤖 Generated with Claude Code