fix: expose step-level retries typing in workflow chains#945
Conversation
🦋 Changeset detectedLatest commit: 03cad16 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📝 WalkthroughWalkthroughType definitions for workflow chain steps are enhanced to include Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (1)**/*.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧬 Code graph analysis (1)packages/core/src/workflow/chain.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
🔇 Additional comments (8)
✏️ Tip: You can disable this entire section by setting Comment |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/core/src/workflow/chain.ts (1)
389-423: Addretriesconfig property andretryCountcontext toandWhenoverloads for consistency.The
andWhenoverloads should expose retry typing likeandThenandandTap. While the runtime supports step-level retries for conditional steps (inherited fromInternalWorkflowStepConfig), the type signatures don't make this visible. Addretries?: numberto the config and includeretryCount?: numberin the condition context to match the explicit retry support in other step types.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.changeset/stupid-pens-create.mdpackages/core/src/workflow/chain.ts
🧰 Additional context used
📓 Path-based instructions (1)
**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
**/*.ts: Maintain type safety in TypeScript-first codebase
Never use JSON.stringify; use thesafeStringifyfunction instead, imported from@voltagent/internal
Files:
packages/core/src/workflow/chain.ts
🧬 Code graph analysis (1)
packages/core/src/workflow/chain.ts (1)
packages/core/src/workflow/types.ts (1)
WorkflowStreamWriter(801-820)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Test core
- GitHub Check: Test cli
- GitHub Check: Build (Node 22)
- GitHub Check: Build (Node 24)
- GitHub Check: Build (Node 20)
- GitHub Check: Cloudflare Pages
🔇 Additional comments (8)
.changeset/stupid-pens-create.md (1)
1-29: LGTM!The changeset clearly documents the typing fix and provides a useful code example demonstrating both
retriesconfiguration andretryCountaccess within the execution context.packages/core/src/workflow/chain.ts (7)
220-227: LGTM - Retry typing consistently added to andThen overload.The
retryCountin the execution context andretriesin step config are correctly typed as optional numbers.
254-261: Consistent typing across overload.
287-294: Consistent typing across overload.
320-327: Consistent typing across overload.
362-369: Consistent typing across overload.
506-513: Consistent typing for andTap with inputSchema.
547-554: Consistent typing for basic andTap.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Deploying voltagent with
|
| Latest commit: |
03cad16
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9a1bf7d6.voltagent.pages.dev |
| Branch Preview URL: | https://fix-and-then-retries.voltagent.pages.dev |
PR Checklist
Please check if your PR fulfills the following requirements:
Bugs / Features
What is the current behavior?
What is the new behavior?
fixes (issue)
Notes for reviewers
Summary by cubic
Exposed step-level retries in TypeScript for workflow chains. andThen/andTap now type retryCount in the execute context and retries in step config, matching runtime behavior.
Written for commit 03cad16. Summary will update on new commits.
Summary by CodeRabbit
retriesandretryCountproperties. Retry functionality is available across all step types, enabling more resilient and flexible workflow definitions.✏️ Tip: You can customize this high-level summary in your review settings.