Skip to content

Conversation

@dmmulroy
Copy link

@dmmulroy dmmulroy commented Jan 2, 2026

Summary

Adds documentation for the Workflows saga rollback API (withRollback, rollbackAll) to both TypeScript and Python documentation.

Note: Depends on internal gitlab workflows!750 which adds the underlying engine support.

Changed Files

  • src/content/docs/workflows/build/workers-api.mdx - added "Rollback (Saga Pattern)" section
  • src/content/docs/workflows/python/python-workers-api.mdx - added "Rollback (Saga Pattern)" section

Content Added

TypeScript

  • step.withRollback() API reference
  • step.rollbackAll() API reference
  • RollbackHandler<T> and RollbackStepConfig type definitions
  • Order/payment example with compensation logic

Python

  • @step.with_rollback() decorator reference
  • @do_fn.undo() decorator reference
  • step.rollback_all() API reference
  • Equivalent Python example with decorators

Note

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"
  ]
}

@github-actions github-actions bot added size/m product:workflows Workflows: https://developers.cloudflare.com/workflows/ labels Jan 2, 2026
@dmmulroy dmmulroy marked this pull request as draft January 2, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workflows Workflows: https://developers.cloudflare.com/workflows/ size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants