With PHP SDK, is this a correct mental model for UpdateMethod?

I have, roughly:

  #[UpdateMethod]
  public function getProgress(): \Generator|array {
    $return = $this->progress;
    $this->progress = [];
    return $return;
  }
  #[WorkflowMethod]
  public function run(): \Generator {
    $activity = Workflow::newActivityStub();
    $this->progress = yield $activity->do();
  }

Is the following mental model correct:

Workflow task:
schedule activity
yield
Workflow suspended

Update arrives:
replay workflow
execute update handler
return progress

Activity completes:
replay workflow
continue execution

Most importantly, is it correct that Update can only run when the WorkflowMethod hands back control with a yield?

Yes, each PHP workflow is single threaded by design, cooperative multitasking is handling the concurrent operations during yield.

Assuming that run is your entry method, this yieldshould always trigger prior to update.