You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #1311 replaces unbounded sequence-assignment collection scans with race-safe bounded allocation. Private-session HAR profiling still shows multiple serialized provider round trips for a fresh participant: participant and allocator reads, rejected-slot lookup, transaction re-reads or compare-and-swap work, and the final commit.
Reduce these remaining round trips without weakening atomic assignment, rejected-slot reuse, or compatibility with existing studies.
Design direction
Keep assignment atomicity as table stakes. Potential provider-specific approaches include:
Maintain the next reusable/rejected slot or a bounded reusable-slot queue in allocator metadata.
Select and claim a reusable slot inside the same transaction or database function that reserves the participant's indexes.
Return the committed assignment and any required completion/bootstrap information from the allocation operation.
Avoid a pre-query whose result must be read again inside the transaction when provider capabilities offer a safer single-operation alternative.
Firebase and Supabase implementations may differ, but they must expose the same storage-engine semantics. LocalStorage remains the regression baseline.
Requirements
Preserve unique, monotonically correct sequenceIndex and creationIndex allocation under simultaneous starts.
Preserve rejected-assignment reuse order and prevent two participants from claiming the same rejected slot.
Keep every provider operation bounded; do not reintroduce assignment collection scans.
Summary
PR #1311 replaces unbounded sequence-assignment collection scans with race-safe bounded allocation. Private-session HAR profiling still shows multiple serialized provider round trips for a fresh participant: participant and allocator reads, rejected-slot lookup, transaction re-reads or compare-and-swap work, and the final commit.
Reduce these remaining round trips without weakening atomic assignment, rejected-slot reuse, or compatibility with existing studies.
Design direction
Keep assignment atomicity as table stakes. Potential provider-specific approaches include:
Firebase and Supabase implementations may differ, but they must expose the same storage-engine semantics. LocalStorage remains the regression baseline.
Requirements
sequenceIndexandcreationIndexallocation under simultaneous starts.Acceptance criteria
yarn unittest --run,yarn typecheck,yarn lint, andyarn buildpass.Out of scope