Free practice · ordering · medium

Practice

Verify a repeating workflow

Order a disciplined loop-verification workflow.

Repeated-state trace

A loop must make visible progress toward a defined stop

  1. InitializeSet deliberate starting state
  2. ReadTake the next item or state
  3. DecideEvaluate the loop condition
  4. UpdateChange counters and accumulators
  5. RecordWrite the reached state
  6. StopConfirm the stopping rule

Record the item, condition, counter, accumulator, and stopping decision on every pass to expose skipped, duplicated, or non-terminating work.

Arrange in the correct order
  1. 1. Rerun and keep the case that exposed the defect
  2. 2. Correct the smallest proven cause
  3. 3. Reconcile processed count and accumulated result independently
  4. 4. Trace zero, one, and several iterations
  5. 5. Define what happens once per item and when repetition stops