Skip to content

feat(workflow-executor): propagate run triggerType for observability#1705

Open
ShohanRahman wants to merge 4 commits into
mainfrom
feature/prd-613-executor-propagate-triggertype-observability
Open

feat(workflow-executor): propagate run triggerType for observability#1705
ShohanRahman wants to merge 4 commits into
mainfrom
feature/prd-613-executor-propagate-triggertype-observability

Conversation

@ShohanRahman

@ShohanRahman ShohanRahman commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Add a triggerType ("manual" | "webhook") field to the orchestrator run envelope and carry it through to step execution. Log it when a run starts executing for correlation/debugging.

Definition of Done

General

  • Write an explicit title for the Pull Request, following Conventional Commits specification
  • Test manually the implemented changes
  • Validate the code quality (indentation, syntax, style, simplicity, readability)

Security

  • Consider the security impact of the changes made

Note

Propagate triggerType through workflow run execution for observability

  • Adds a TriggerType enum (manual, webhook) to execution.ts and extends AvailableStepExecutionSchema to require the field.
  • Maps triggerType from ServerHydratedWorkflowRun in run-to-available-step-mapper.ts, defaulting to manual when absent.
  • Emits a debug log including triggerType at the start of each step execution in runner.ts.
  • Re-exports TriggerType from the package root so consumers can import it directly.
  • Behavioral Change: AvailableStepExecution validation now requires a triggerType field; any existing callers constructing this object without it will fail schema validation.

Macroscope summarized 26c8333.

Add a triggerType ("manual" | "webhook") field to the orchestrator run
envelope and carry it through to step execution. Log it when a run starts
executing for correlation/debugging.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@linear-code

linear-code Bot commented Jun 24, 2026

Copy link
Copy Markdown

PRD-613

@qltysh

qltysh Bot commented Jun 24, 2026

Copy link
Copy Markdown

1 new issue

Tool Category Rule Count
qlty Structure Function with many returns (count = 6): doExecuteStep 1

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@qltysh

qltysh Bot commented Jun 24, 2026

Copy link
Copy Markdown

Qlty


Coverage Impact

This PR will not change total coverage.

Modified Files with Diff Coverage (5)

RatingFile% DiffUncovered Line #s
Coverage rating: A Coverage rating: A
packages/workflow-executor/src/types/validated/execution.ts100.0%
Coverage rating: A Coverage rating: A
packages/workflow-executor/src/runner.ts100.0%
Coverage rating: A Coverage rating: A
packages/workflow-executor/src/adapters/server-types.ts100.0%
Coverage rating: A Coverage rating: A
...workflow-executor/src/adapters/run-to-available-step-mapper.ts100.0%
Coverage rating: A Coverage rating: A
packages/workflow-executor/src/index.ts100.0%
Total100.0%
🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

ShohanRahman and others added 2 commits June 24, 2026 16:40
Introduce a domain TriggerType enum (decoupled from the wire
ServerWorkflowTriggerType, mirroring the StepType pattern) and reference
enum members everywhere instead of repeating the 'manual'/'webhook' literals.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… comments

Export TriggerType directly from its home (validated/execution) in the
barrel instead of re-exporting through execution-context, and remove the
explanatory comments on the two trigger-type enums.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant