You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
raise and listen timeout set the error instance to the workflow ID instead of a JSON Pointer to the task #629
raise and the listen timeout set the error's instance to the Temporal workflow ID. The docs for raise (docs/docs/dsl/tasks/raise.md), following the Open Workflow Specification, say instance is a JSON Pointer to the component the error originates from, and that runtimes MUST set it when raising an error. raise also discards an instance the user writes.
Run it with zigflow run --file <file>, start it with temporal workflow start --task-queue inst-uncaught --type workflow --workflow-id Q-3, then read the workflow's error from a Go client.
Actual: the error is [400] Custom: (https://example.com/errors/custom). Origin: 'Q-3'. Origin is the workflow ID, not the instance the workflow defines.
Expected:Origin: '/my/own/pointer'. When the user sets no instance, a JSON Pointer to the task, for example /do/0/failing.
The listen timeout does the same. With the try from #624, a catch sees it as $data.<as>.instance.
Cause
pkg/zigflow/tasks/task_builder_raise.go: instanceID := info.WorkflowExecution.ID is passed to the standard error constructors, and the custom-type branch sets raiseErr.Instance to instanceID, which overwrites definition.Instance.
pkg/zigflow/tasks/task_builder_listen.go: the timeout builds models.NewErrTimeout(...) with the workflow ID as the instance.
Suggested fix
Keep an instance the user supplies. Otherwise derive a JSON Pointer to the task. The builders already track a task path, but it holds task names rather than the index based pointer the spec describes, so that needs a decision. Add tests for both builders.
Affected versions
Reproduced on the #624 branch (34d1a09ee). Neither file is changed by #624, so main (7f0dd16) behaves the same. YJ-928 raised this while reviewing #624.
Thanks for filing this, @ShlomitSibony. Would you like to take it? If not, I'm happy to. Since the spec has instance as a JSON Pointer to the task, changing it changes what a catch sees, so it would be good to get it into the same breaking release as #624.
Activity
YJ-928 commentedon Oct 16, 2026
Thanks for filing this, @ShlomitSibony. Would you like to take it? If not, I'm happy to. Since the spec has
instanceas a JSON Pointer to the task, changing it changes what acatchsees, so it would be good to get it into the same breaking release as #624.ShlomitSibony commentedon Oct 16, 2026
You can take it @YJ-928 , agreed
fix(tasks)!: set the error instance to a JSON Pointer to the task