docs(workflows): add rollback (saga pattern) documentation #27378
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds documentation for the Workflows saga rollback API (
withRollback,rollbackAll) to both TypeScript and Python documentation.Changed Files
src/content/docs/workflows/build/workers-api.mdx- added "Rollback (Saga Pattern)" sectionsrc/content/docs/workflows/python/python-workers-api.mdx- added "Rollback (Saga Pattern)" sectionContent Added
TypeScript
step.withRollback()API referencestep.rollbackAll()API referenceRollbackHandler<T>andRollbackStepConfigtype definitionsPython
@step.with_rollback()decorator reference@do_fn.undo()decorator referencestep.rollback_all()API referenceNote
This PR was written with AI assistance.
AI Session Export
{ "info": { "title": "workflow rollback documentation", "agent": "opencode", "model": "claude opus 4.5" }, "summary": [ "user requested docs update for rollback API", "agent cloned cloudflare-docs repo", "agent explored existing workflows docs structure", "agent added rollback section to workers-api.mdx with TypeScript API and example", "agent added rollback section to python-workers-api.mdx with Python decorator API and example", "agent forked repo and pushed to fork", "agent created PR against production branch" ] }