Pcornel
Automation · Workflow Automation

Branching

Cheat sheet · https://pcornel.dk/topic.php?topic=5367

Back to the Topic

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

LayerWorkflow Automation → Branching operational reference
Runtime/ownershipWorkflow branching and conditional transitions · identify controller/parser, durable intent, identity and target ownership before mutation
Persistent intentVersioned definition/configuration with explicit dependencies, scope and credential boundary
VerificationExecute fixtures that satisfy each branch plus default/no-match behavior; capture evaluated input, expression result, selected transition and final target state.
Expected interpretationEvery 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 boundaryPreserve 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

Confirmation

Confirm action

Continue?