Reclassify benign WaitDelay outcome in script_legacy step
What does this MR do?
Reclassify benign WaitDelay outcome in script_legacy step
The script_legacy step (used by FF_SCRIPT_TO_STEP_MIGRATION) returned cmd.Run() raw, so a backgrounded child that inherits the step's stdout pipe and outlives a cleanly-exited script trips gracefulexitcmd's WaitDelay and fails the job with exec.ErrWaitDelay.
Route the result through normalizeExitError, mirroring the concrete run path: ErrWaitDelay with exit code 0, and non-fatal user signals (SIGUSR1/ USR2/ HUP/ PIPE), are treated as success while real failures, SIGKILL and cancellation SIGTERM still propagate.
NOTE: Much of this code is just ported from Concrete. It will eventually be removed.
Temporary duplication here is probably a good thing as it allows us to test the mechanism under the smaller scoped FF_SCRIPT_TO_STEP_MIGRATION.
Why was this MR needed?
See gitlab-com/gl-infra/production-engineering#29239
What's the best way to test this MR?
There's a test included.