This PR changes type guards to be more strict, requiring that the next "entry" in the protocolLocator after the path it was given starts with the "descriptor". See the implementation of isCommonAction.
This is a draft PR since it would currently break the app: The reducers do not currently set the protocol locators. We should test the protocolLocator string as a part of itSendsTheseCommitments. To properly set the protocolLocator, one of two things is required:
A) A state must store its current "path". When a reducer of a state wants to send an action, it should append its path with the appropriate descriptor.
B) When a reducer calls a sub-reducer, and sees an outgoing message in the outbox, it pre-pends the protocolLocator with the appropriate description.
A seems like the simpler option.
In the meantime, I'd like some feedback about this protocolLocator design.
This PR changes type guards to be more strict, requiring that the next "entry" in the
protocolLocator
after the path it was given starts with the "descriptor". See the implementation ofisCommonAction
.This is a draft PR since it would currently break the app: The reducers do not currently set the protocol locators. We should test the protocolLocator string as a part of
itSendsTheseCommitments
. To properly set the protocolLocator, one of two things is required: A) A state must store its current "path". When a reducer of a state wants to send an action, it should append its path with the appropriate descriptor. B) When a reducer calls a sub-reducer, and sees an outgoing message in the outbox, it pre-pends theprotocolLocator
with the appropriate description.A seems like the simpler option.
In the meantime, I'd like some feedback about this
protocolLocator
design.