1098
return nil, err
1099
}
1101
>
// Nexus operations (and other state-machine-backed components) can be backed by either the HSM tree or the
1102
>
// CHASM tree, and both coexist on the same mutable state. Reset must rebuild the op regardless of which
1103
>
// framework owns it.
1104
>
// TODO(follow-up): the completion-token resolution path (HSM StateMachineRef vs CHASM
1105
>
// ComponentRef) also needs the same fallback; see the completion handler in nexusoperation.
1106
>
outcome, err := cherryPickHSMEvent(mutableState, stateMachineRegistry, event, resetReapplyExcludeTypes)
1107
>
if err != nil {
1108
return reappliedEvents, err
1109
}
1111
>
// HSM doesn't own this op (unknown type, or component not in the HSM tree): try the CHASM tree.
1112
>
outcome, err = cherryPickChasmEvent(ctx, mutableState, chasmWorkflowRegistry, event, resetReapplyExcludeTypes)
1113
>
if err != nil {
1114
return reappliedEvents, err
1115
}
1116
}
1118
// Either skipped (recognized but not cherry-pickable) or unhandled by both frameworks.
1119
// Only reapply hardcoded events above or ones cherry-picked in HSM or CHASM.