package wire // WithoutUnfinished is a step report as an instance below // ProtocolUnfinishedWork must read it. Such an instance drops the reason // of a done Engineering step, so a timed-out step's pushed work (done, // step_timeout) would read as finished: it goes as the step failing // step_timeout, its candidate unpublished, as before protocol 32. This // holds for a report saved while the instance spoke 32 and sent after it // went back (Encode at each send). Reports whether it changed rep. func WithoutUnfinished(rep *StepReport) bool { if rep.State != StepDone || rep.Reason != "step_timeout" { return false } rep.State, rep.Pushed, rep.CandidateSHA, rep.Askable = StepFailed, false, "", false return true }