Automation · Workflow Automation
Branching
Cheat sheet · https://pcornel.dk/topic.php?topic=5367
Answer
Branching in workflows sends execution down different paths depending on a condition, such as success or failure of a step or an input value.
Remember
- Conditions choose which path runs.
- Test every branch.
- Merge branches before shared steps.
First checks
- Branch definitions (if/else, switch) — paths
- Default branch — unexpected values
- Branch coverage tests — quality
Verify in this order
decision → branch A/B/default → merge
Where it usually breaks
Commit/input → runner/job → build/test artifact → deployment request → target rollout/reconcile → effective version/config → health/readiness → workload.
Workflow Automation → Branching · operational reference
| Layer | Workflow Automation → Branching operational reference |
|---|---|
| Runtime/ownership | Workflow branching and conditional transitions · identify controller/parser, durable intent, identity and target ownership before mutation |
| Persistent intent | Versioned definition/configuration with explicit dependencies, scope and credential boundary |
| Verification | Execute fixtures that satisfy each branch plus default/no-match behavior; capture evaluated input, expression result, selected transition and final target state. |
| Expected interpretation | Every intended condition selects exactly the documented branch, ambiguous/no-match behavior is explicit, branch-specific side effects are bounded, and paths reconverge only where state contracts are compatible. |
| Recovery boundary | Preserve correlation IDs + pre-state, repair first failing boundary, then verify the target independently |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5367