cubicweb #4901163 error on synchronization of computed attribute [validation pending]

class Agent(EntityType):
  asalae_id = String(formula='Any E WHERE M mirror_of X, M extid E')

class MirrorEntity(EntityType):
  """A mirror entity hold link infomation from a cubicweb entity to some
  content in an external site (e.g. Alfresco), accessed through a connector.
  """
  extid = String(required=True, unique=True,
                 description=_('external identifier of the object'))
  __unique_together__ = [('mirror_of', 'using_connector')]


class mirror_of(RelationDefinition):
  subject  = 'MirrorEntity'
  object = ('Agent', 'ConceptScheme', 'Concept')
  cardinality = '?*'
  inlined = True

gives:

TypeResolverException: Unable to resolve variables types in "SET X asalae_id "workspace://SpacesStore/50b35c66-bdc3-4d2d-ae73-1bdc1f47c901" WHERE X eid 1172"

on creation of a MirrorEntity related to something else than an agent.

prioritynormal
typebug
done in3.20.4
load1.000
load left0.000
closed by#365e5a0287d6 [computed attribute] ensure attribute's formula apply only to the correct type. Closes #4901163
patch[computed attribute] ensure attribute's formula apply only to the correct type. Closes #4901163 [applied]