“Review my
order_processingworkflow and tell me what to fix.”
# 1. Load the definition
conductor workflow get order_processing > /tmp/wf.json
# 2. For each SIMPLE task, load the task definition
conductor taskDef get charge_card
conductor taskDef get send_email
conductor taskDef get update_inventory
Walk the checklist in ../references/optimization.md. Group findings by severity.
Workflow: order_processing v3 (12 tasks)
CRITICAL (2)
✗ B1 SIMPLE task `charge_card` (taskDef): responseTimeoutSeconds=0, timeoutSeconds=0
A hung payment worker hangs the workflow. Set responseTimeoutSeconds=30,
pollTimeoutSeconds=60, timeoutSeconds=300 on the task definition.
✗ D1 Workflow input `stripeApiKey` is a secret being passed in plaintext.
Move to ${workflow.secrets.STRIPE_KEY} or to the worker's environment.
WARN (3)
⚠ A1 description is empty
⚠ B2 No workflow timeoutSeconds — a stuck workflow can run forever.
Suggest 1800s with timeoutPolicy=TIME_OUT_WF.
⚠ B3 SIMPLE task `send_email` has retryCount=0. Email is transient by nature —
set retryCount=3, retryLogic=EXPONENTIAL_BACKOFF, retryDelaySeconds=30.
INFO
• A4 12 tasks — well within the 100-task limit
• B4 No failureWorkflow. This workflow mutates inventory and charges cards;
consider a failureWorkflow that releases the inventory hold and notifies ops.
Recommended Changes (priority order)
[ ] task_def_charge_card.json set responseTimeoutSeconds=30, pollTimeoutSeconds=60, timeoutSeconds=300
[ ] order_processing.json move stripeApiKey to ${workflow.secrets.STRIPE_KEY}
[ ] order_processing.json add description, timeoutSeconds=1800, timeoutPolicy=TIME_OUT_WF
[ ] task_def_send_email.json set retryCount=3, retryLogic=EXPONENTIAL_BACKOFF, retryDelaySeconds=30
[ ] order_processing.json (discussion) add failureWorkflow for inventory rollback + ops alert
Want me to apply any of these? I can:
- update the
charge_cardandsend_emailtask definitions and re-register them- rewrite the workflow to add
timeoutSeconds,timeoutPolicy,description- move
stripeApiKeyout of inputs (need to know where you want it: secrets or worker env)The
failureWorkflowand the inventory-rollback design are bigger calls — I’d want to know your retry/refund policy before scaffolding that.
Don’t apply silently. Each fix gets confirmed.