From f54e54fd9f390d3736b33887eaac4d9845737636 Mon Sep 17 00:00:00 2001 From: Ricardo Zanini Date: Fri, 24 Jul 2026 12:54:20 -0400 Subject: [PATCH 1/4] [Fix #1174] Event source auto-generated by runtime implementations Clarify that runtime implementations generate the event source at emission time (e.g., from the workflow identity /{namespace}/{name}/{version}) when not explicitly provided. When the workflow author supplies a value, it takes precedence over the auto-generated one. Signed-off-by: Ricardo Zanini --- dsl-reference.md | 2 +- schema/workflow.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dsl-reference.md b/dsl-reference.md index ee1e9c74..9d534b60 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -2138,7 +2138,7 @@ An event object typically includes details such as the event type, source, times | Property | Type | Required | Description | |----------|:----:|:--------:|-------------| | id | `string` | `no` | Identifies the event. `source` + `id` is unique for each distinct event.
*Required when emitting an event using `emit.event.with`, generated by runtime implementations (e.g., UUID) at emission time.* | -| source | `string` | `no` | An URI formatted string, or [runtime expression](dsl.md#runtime-expressions), that identifies the context in which an event happened. `source` + `id` is unique for each distinct event.
*Required when emitting an event using `emit.event.with`.* | +| source | `string` | `no` | An URI formatted string, or [runtime expression](dsl.md#runtime-expressions), that identifies the context in which an event happened. `source` + `id` is unique for each distinct event.
*Required when emitting an event using `emit.event.with`, generated by runtime implementations (e.g., from the workflow identity `/{namespace}/{name}/{version}`) at emission time. When explicitly provided by the workflow author, the supplied value takes precedence over the auto-generated one.* | | type | `string` | `no` | Describes the type of event related to the originating occurrence.
*Required when emitting an event using `emit.event.with`.* | | time | `string` | `no` | A string, or [runtime expression](dsl.md#runtime-expressions), representing the timestamp of when the occurrence happened. | | subject | `string` | `no` | Describes the subject of the event in the context of the event producer. | diff --git a/schema/workflow.yaml b/schema/workflow.yaml index a443ed50..27874e32 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -1483,7 +1483,7 @@ $defs: description: The event's unique identifier. source: title: EventSource - description: Identifies the context in which an event happened. + description: Identifies the context in which an event happened. Generated by runtime implementations (e.g., from the workflow identity) at emission time when not explicitly provided. oneOf: - $ref: '#/$defs/uriTemplate' - $ref: '#/$defs/runtimeExpression' From ea1f691e3233b0a890aee037c3f5c0bcadc43087 Mon Sep 17 00:00:00 2001 From: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com> Date: Fri, 24 Jul 2026 14:35:15 -0400 Subject: [PATCH 2/4] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- schema/workflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/workflow.yaml b/schema/workflow.yaml index 27874e32..6213ce26 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -1483,7 +1483,7 @@ $defs: description: The event's unique identifier. source: title: EventSource - description: Identifies the context in which an event happened. Generated by runtime implementations (e.g., from the workflow identity) at emission time when not explicitly provided. + description: Identifies the context in which an event happened. If not explicitly provided, runtime implementations generate it at emission time (e.g., from the workflow identity). oneOf: - $ref: '#/$defs/uriTemplate' - $ref: '#/$defs/runtimeExpression' From fa69d8e934c9a8198e3ba800e1035860f05d4dc3 Mon Sep 17 00:00:00 2001 From: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com> Date: Fri, 24 Jul 2026 14:38:43 -0400 Subject: [PATCH 3/4] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- schema/workflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/workflow.yaml b/schema/workflow.yaml index 6213ce26..db4ee2e7 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -1483,7 +1483,7 @@ $defs: description: The event's unique identifier. source: title: EventSource - description: Identifies the context in which an event happened. If not explicitly provided, runtime implementations generate it at emission time (e.g., from the workflow identity). + description: Identifies the context in which an event happened. If not explicitly provided, runtime implementations generate it at emission time (e.g., from the workflow identity). If explicitly provided by the workflow author, the supplied value takes precedence. oneOf: - $ref: '#/$defs/uriTemplate' - $ref: '#/$defs/runtimeExpression' From 84c814c9e62a50d204a0ef6e37cca3e7283648b4 Mon Sep 17 00:00:00 2001 From: Ricardo Zanini Date: Fri, 24 Jul 2026 14:48:28 -0400 Subject: [PATCH 4/4] Remove source from required event properties when emitting The source property should not be required when emitting events. Runtime implementations auto-generate it (e.g., from the workflow identity /{namespace}/{name}/{version}) at emission time. When explicitly provided, the supplied value takes precedence. Fixes open-workflow-specification/sdk-typescript#298 Signed-off-by: Ricardo Zanini --- schema/workflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/workflow.yaml b/schema/workflow.yaml index db4ee2e7..eaef7c38 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -671,7 +671,7 @@ $defs: $ref: '#/$defs/eventProperties' title: EmitEventWith description: Defines the properties of event to emit. - required: [ source, type ] + required: [ type ] additionalProperties: true required: [ event ] forTask: