fix: fail task when update handler continues as new
Fixes #436.
ContinueAsNewError derives from BaseException, so the update-handler task bypassed the normal update exception path and escaped as an unobserved detached-task exception. The update never completed and the workflow task was not failed.
Treat that control-flow exception as a workflow-task failure in the update path. On retry, the update can complete normally; it never continues the workflow from the update handler.
Regression coverage proves the baseline failure (an unhandled update task and timed-out update RPC) and verifies the retry completes after exactly one task failure.
Validation:
pytest tests/worker/test_workflow.py::test_workflow_update_continue_as_new_fails_task tests/worker/test_workflow.py::test_workflow_update_task_fails tests/worker/test_workflow.py::test_workflow_update_handlers_unhappy -q(3 passed)ruff format --check temporalio/worker/_workflow_instance.py tests/worker/test_workflow.pygit diff --check
Note: whole-file Ruff reports seven existing diagnostics in unrelated lines of tests/worker/test_workflow.py.
Corrected the inaccurate comment in 592e6e6. Continue-as-new is now documented as valid only from the top-level workflow; the update-handler path fails the workflow task rather than allowing that control-flow exception to escape. The change is comment-only and source compilation passes.