auth
auth copied to clipboard
Check to see if this membership resolution error is still possible
This is from a comment in membershipResolver.test.ts:
sometimes (50% of the time?) when we eliminate duplicate ADD_MEMBERs,we're eliminating one that would have needed to have come BEFORE something else, in this case the CHANGE_MEMBER_KEYs action that happens after that person is admitted. Here's an example of a bad graph that you can end up with that way:
ðĐðū ROOT
ADD_MEMBER:ðĻâðĶē
<== ADD_MEMBER:ðģð―ââïļ was removed from here
INVITE:kPFx4gwGpuWplwa
INVITE:tiKXBLLdMbDndJE
ADMIT:ðģð―ââïļ
CHANGE_MEMBER_KEYS:{"type":"MEMBER","name":"ðģð―ââïļ",...} <== we can't do this because ðģð―ââïļ hasn't been added yet
ADD_DEVICE:ðģð―ââïļ:laptop
ADD_MEMBER:ðģð―ââïļ
INVITE:dQRE52A+7UGr8X9
ADD_MEMBER:ðī
INVITE:j6cC8ZyjyhuojZw
ADMIT:ðī
CHANGE_MEMBER_KEYS:{"type":"MEMBER","name":"ðī",...}
ADD_DEVICE:ðī:laptop
Here's how that graph should have been resolved:
ðĐðū ROOT
ADD_MEMBER:ðĻâðĶē
ADD_MEMBER:ðģð―ââïļ <== in the bad graph,this ADD_MEMBER was discarded as a duplicate
INVITE:fNpSg0uBcW1vYvf
ADD_MEMBER:ðī
INVITE:PkD7SISvUt/3YlJ
ADMIT:ðģð―ââïļ
CHANGE_MEMBER_KEYS:{"type":"MEMBER","name":"ðģð―ââïļ",...}
ADD_DEVICE:ðģð―ââïļ:laptop
<== ADD_MEMBER:ðģð―ââïļ was removed from here
INVITE:Pu6NaY6HfbITAf6
INVITE:7vVS0NXz+u15Mx2
ADMIT:ðī
CHANGE_MEMBER_KEYS:{"type":"MEMBER","name":"ðī",...}
ADD_DEVICE:ðī:laptop