Skip to main content
Repairs and regeneration apply to scripted workflows only. AI-driven workflows have no stored script to fix or rebuild.

Repair

A repair fixes a scripted workflow’s test script when it breaks. This happens when your product changes in a way the existing script can’t handle (a renamed element, a changed flow, a new step).

Auto-repair

Lark can repair workflows on its own. When a scripted workflow’s execution fails and the workflow enters needs_repair status, Lark kicks off a repair if auto-repair is enabled for your account. Auto-repair is an account-level setting. You can enable or disable it in the dashboard.

Manual repair

Trigger a repair from the dashboard or the API: Navigate to the workflow in the dashboard and click Repair. Or trigger a repair through the API:
curl -X POST https://api.getlark.ai/workflows/wf_abc123/repair \
  -H "X-API-Key: $LARKCI_API_KEY"

Regeneration

You can also regenerate a scripted workflow if you materially change the purpose of the test. Navigate to the workflow in the dashboard and click Regenerate under the menu.
curl -X POST https://api.getlark.ai/workflows/wf_abc123/regenerate \
  -H "X-API-Key: $LARKCI_API_KEY"

Repair vs. regeneration

RepairRegeneration
Does whatPatches the existing scriptRebuilds the script from scratch
Use whenA small change broke the testThe test needs a full rewrite
Can be automaticYes (auto-repair)No, manual only
Preserves existing logicYes, changes only what brokeNo, starts fresh