Add workflow try helpers and visualizer support#4413
Add workflow try helpers and visualizer support#4413NathanFlurry wants to merge 6 commits intomainfrom
Conversation
|
🚅 Deployed to the rivet-pr-4413 environment in rivet-frontend
|
PR Review: Add workflow try helpers and visualizer supportThis is a well-architected feature that correctly solves a real problem: recovering from terminal workflow failures without swallowing scheduler control-flow errors. The implementation is thorough and the test coverage is solid. A few issues worth addressing before merge. Issues1.
2. Non-null assertion without a runtime guard in the engine In 3.
4. No tests for nested The 5. The old code checked Minor notes
Strengths
|





Description
Adds
ctx.tryStep()andctx.try()to the workflow engine and RivetKit wrapper so workflows can recover from terminal step, join, and race failures without swallowing scheduler control flow. It also updates the workflow visualizer to render named try scopes and handled failures, plus adds docs, stories, and integration coverage for the new behavior.Type of change
How Has This Been Tested?
pnpm exec vitest run tests/try.test.ts tests/join.test.ts tests/race.test.tsinrivetkit-typescript/packages/workflow-enginepnpm exec vitest run tests/driver-memory.test.ts -t "tryStep and try recover terminal workflow failures"inrivetkit-typescript/packages/rivetkitpnpm test workflow-to-xyflowinfrontendpnpm exec biome check src/components/actors/workflow/workflow-to-xyflow.ts src/components/actors/workflow/workflow-to-xyflow.test.ts src/components/actors/workflow/xyflow-nodes.tsx src/components/actors/workflow/workflow-visualizer.tsx src/components/actors/workflow/workflow-example-data.ts src/components/actors/workflow/xyflow-nodes.stories.tsxinfrontendChecklist: