Move the branch resume-target resolution to the base InteractionResolver

Follows up [#3608540]. See #3608543.

The webform handler's private resumeTarget() reimplemented "resolve a (possibly consumed) branch handle to the branch's live token" that is a general interaction concern, not webform-specific: the base orchestra_interaction module already resolves the same handle to a display outcome (CapabilityResolver::consumedBranchOutcome() via InteractionResolver::branchContinuation()).

This moves the resume-target resolution into the base resolver as InteractionResolver::liveBranchToken(), and has the webform handler call it, so the branch resolution lives in one layer instead of being reimplemented per channel:

  • Adds InteractionResolver::liveBranchToken(instance, token_id): the still-parked named token, else the branch's chain-advanced re-parked token (sibling-safe), else the token parked on the node (the plain single-branch loop).
  • OrchestraInteractionHandler drops its resumeTarget() and calls the resolver instead (handler shrinks by ~50 lines).
  • Behavior is unchanged: the moved logic is identical to what [#3608540] shipped, so the existing webform resume tests (exact resume, loop re-entry, branch-scoped, bound re-edit after expiry, and the L1 sibling test) still pass. Adds a base-level InteractionResolverTest::testLiveBranchTokenResolvesOwnBranch covering exact/consumed/sibling-safe/unknown at the resolver where the logic now lives.

Not folded in (kept as-is): CapabilityResolver still builds a display outcome via branchContinuation(); liveBranchToken is the resume-token counterpart. Both now live in the base resolver.

Verified locally: InteractionResolverTest (5 tests) and OrchestraInteractionHandlerTest (15 tests) green, phpcs and cspell clean.

Merge request reports

Loading