Issue #3622167: [orchestra:node-label] is empty on an unpinned run, and the user audiences notify blocked accounts

Two readers that answered differently from the rest of the module.

  • The [orchestra:node-label] token resolved the node only through the instance's pinned definition version, so a run that pins none rendered it empty. It now goes through DefinitionResolver, which reads the pinned version when there is one and the live workflow when there is not. TokenOutcomes, which carried its own copy of that pinned-else-live branch, reads the resolver too.
  • The users and users_variable audiences loaded recipients without filtering on status, so a blocked account was dropped from the candidates but still emailed about the step. Both now drop blocked accounts on either side, through one shared filter on their base class, which is the answer the role audiences already gave.

Kernel coverage for each defect, plus the audience reference note.

Closes #3622167.


Audit round on this MR (four passes over the diff):

  • The token hook reached the node through getTokenNode($branch), which resolves the instance as $token->getInstance(): that hangs its own copy on the token's field item and pins it for the rest of the request. The replacement is already being made for an instance, so it reads the definition from that one, which is what Notify and ParkNotificationSubscriber already do for the same reason.
  • The fixture could not tell the pinned version from the live workflow - both labelled the step the same - so an implementation reading only live config would have passed. The live label is now changed, and a pinned run is asserted to keep rendering the wording it started under while an unpinned run follows the live workflow.
  • The import was inserted out of alphabetical order, which no sniff catches.
  • Two docblocks narrated the defect rather than the design, and the documentation claimed blocking an account stops task mail "at once"; it governs what is offered and sent from then on, while tasks already waiting keep the candidates they were given until the recovery sweep.
Edited by Frank Mably

Merge request reports

Loading
Loading