Repository navigation
Ignore data left behind by participants who were already gone - #108
Merged
Merged
Conversation
Matches the core change that ignores data left behind by someone who was gone before a participant arrived. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vendors preview 1e77da41 (core 1c3623b9). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Picks up a core fix on jspsych/jsPsych#3694 (
1c3623b9, preview1e77da41).The problem
In link-based sessions (the Local adapter, or Firebase with
?mp_session=), data left behind by someone who wasn't connected when a participant joined started outaway. It becameleft10 seconds later, andonParticipantLeftfired. That data can come from a reused link or from someone who dropped out before the others arrived. A study that ends the game fromonParticipantLeftcould therefore end for a participant who never met the person who "left". The leftover data also showed ingetAll(), so it could count toward a new trial'swait().The fix (core)
Without a sealed group, a participant counts only once this client has seen them connected. Until then they are left out of
presence(),getAll()/get(), andgroup().members. In a sealed group every roster member is still tracked, so a member who never connects still becomesawayand thenleft.Trade-off: a real partner whose connection is down at the exact moment someone joins isn't counted until they reconnect from the same page. From this client's side that is indistinguishable from leftover data. Waits still end by their timeout, and sealed groups are unaffected.
This PR
remainingParticipantscomment, the test backend, the dropouts guide, and the role and match READMEs.Testing
onParticipantLeft;npm run buildis clean.🤖 Generated with Claude Code