Write down the failure condition before automating

It’s tempting to automate the happy path first. But defining what counts as success, what should trigger human review, and when the job should stop makes a workflow easier to trust. Which edge case usually gets forgotten?