fix(core): type WorkflowExecutionContext.steps as WorkflowStepHistoryEntry[]#1285
Conversation
…rkflowExecutionContext WorkflowStepHistoryEntry is already exported from the same types module. The any[] was left as a placeholder (TODO comment). Removing the escape hatch surfaces type errors if callers push wrong shapes into steps[].
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR strengthens type safety in the workflow execution context by updating the ChangesWorkflow Execution Steps Typing
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Checklist
Bugs / Features
What is the current behavior?
WorkflowExecutionContext.stepsis typed asany[]with a// TODO: Type this properlycomment.What is the new behavior?
Import
WorkflowStepHistoryEntry(already exported from./types) and use it as the element type. This removes the escape hatch and lets TypeScript catch callers that push wrong shapes intosteps[].No runtime change — this is a type-only fix.
Summary by cubic
Type
WorkflowExecutionContext.stepsasWorkflowStepHistoryEntry[]instead ofany[]to enforce correct step shapes and catch type errors at compile time. No runtime behavior changes.Written for commit b036556. Summary will update on new commits. Review in cubic
Summary by CodeRabbit