Skip to content

[types] Add more to Workflow step context#6523

Open
pombosilva wants to merge 1 commit intomainfrom
osilva/WOR-1203
Open

[types] Add more to Workflow step context#6523
pombosilva wants to merge 1 commit intomainfrom
osilva/WOR-1203

Conversation

@pombosilva
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

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

I'm Bonk, and I've done a quick review of your PR.

This PR adds step (name + count) and config fields to WorkflowStepContext.

  1. [MEDIUM] config should likely be optional. The WorkflowStep.do() has an overload that takes no config argument. If a user calls that overload, will config always be populated in the context (e.g., with defaults), or will it be undefined? If there's any chance it's not always present, the type should be optional to avoid runtime surprises.
  2. [LOW] Generated snapshots need regeneration. The types/generated-snapshot/ files still show the old WorkflowStepContext shape (only attempt). CI will likely fail on the snapshot diff check. Run just generate-types (or equivalent) and include the updated snapshots.

This review was written by an AI assistant and may contain inaccuracies.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Apr 8, 2026

Review posted on PR #6523. Two findings:

  1. [MEDIUM] config on WorkflowStepContext should likely be optional (config?) since do() has an overload that takes no config argument — if the runtime doesn't always populate it, users trusting the required type will hit runtime errors. Posted as an inline suggestion.

  2. [LOW] The generated snapshots in types/generated-snapshot/ still have the old shape and will need regeneration to pass CI.

github run

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

The generated output of @cloudflare/workers-types matches the snapshot in types/generated-snapshot 🎉

@pombosilva pombosilva force-pushed the osilva/WOR-1203 branch 2 times, most recently from fcfb215 to 5c864df Compare April 8, 2026 11:07
@pombosilva pombosilva marked this pull request as ready for review April 8, 2026 11:20
@pombosilva pombosilva requested review from a team as code owners April 8, 2026 11:20
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.

3 participants