* Format alert category for display
(category)
| 15972 | |
| 15973 | const commitMatches = !expectedCommit || |
| 15974 | (status.commit && status.commit.startsWith(expectedCommit.slice(0, 8))); |
| 15975 | const postDone = !post.state || post.state === 'finished'; |
| 15976 | |
| 15977 | if (commitMatches && postDone && sawRestart) { |
| 15978 | if (post.outcome === 'failed') { |
| 15979 | finish(`⚠️ Update applied, but some post-update steps failed: ${post.failures || 'see data/logs/post_update.log'}`, |
| 15980 | 'warning', 'Update applied with warnings. Check the log.'); |
| 15981 | } else { |
| 15982 | finish('✅ Update verified - the box is running the new version.', 'success', |
| 15983 | 'Update completed successfully. Service is online.'); |
| 15984 | } |
| 15985 | return; |
| 15986 | } |
| 15987 | if (commitMatches && postDone && !sawRestart && attempts > 3) { |