Skip to content

feat: forward state.webhookResponse on step:complete#1404

Merged
josephjclark merged 18 commits into
mainfrom
1399-webhook-reponse-step-complete
May 13, 2026
Merged

feat: forward state.webhookResponse on step:complete#1404
josephjclark merged 18 commits into
mainfrom
1399-webhook-reponse-step-complete

Conversation

@midigofrank
Copy link
Copy Markdown
Contributor

Short Description

Job code sets state.webhookResponse = { status, body }; the worker forwards it on the step:complete payload as webhook_response. The key is stripped from the dataclip (worker) and from the next step's input state (runtime) so it cannot leak downstream.

Fixes #1399

QA Notes

Can be tested via OpenFn/lightning#4666

AI Usage

Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

@github-project-automation github-project-automation Bot moved this to New Issues in Core May 11, 2026
@midigofrank midigofrank marked this pull request as ready for review May 11, 2026 07:25
@josephjclark
Copy link
Copy Markdown
Collaborator

Couple of notes from me:

  1. Don't touch any of this stuff in the runtime
  2. Don't delete the webhookResponse key from state (anywhere)
  3. basically the only diff is on the worker's step complete payload assembly

@doc-han doc-han force-pushed the 1399-webhook-reponse-step-complete branch from d2c1d95 to 06221e0 Compare May 13, 2026 09:10
Copy link
Copy Markdown
Collaborator

@josephjclark josephjclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely and light and clean - nice work @doc-han

I'll release this now

Comment thread packages/ws-worker/src/events/step-complete.ts Outdated
…hjclark:OpenFn/kit into 1399-webhook-reponse-step-complete
@josephjclark josephjclark merged commit b0eb0bc into main May 13, 2026
7 checks passed
@josephjclark josephjclark deleted the 1399-webhook-reponse-step-complete branch May 13, 2026 11:18
@github-project-automation github-project-automation Bot moved this from New Issues to Done in Core May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add webhook_reponse in StepCompletePayload

4 participants