fix(ops): don't flag a dirty-tree skip that's already been committed

The deploy timer can record a dirty-tree skip mid-edit; once the tree is clean
that reason is stale. Verify git status before flagging it (and parse the timer
NEXT row only when it is a real timestamp).
This commit is contained in:
SkateSpots 2026-10-01 11:15:16 +07:00
parent 5fff51c814
commit 09b51a764a

View file

@ -140,8 +140,12 @@ else
throttled) throttled)
p " ${DIM}→ batching to save Netlify credits; it deploys automatically when the window elapses.${N}" ;; p " ${DIM}→ batching to save Netlify credits; it deploys automatically when the window elapses.${N}" ;;
dirty-tree) dirty-tree)
p " ${R}→ tracked files are modified — COMMIT them or the deploy stays skipped.${N}" if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
problems+=("deploy blocked: working tree is dirty"); signature+="dirty;" ;; p " ${R}→ tracked files are modified — COMMIT them or the deploy stays skipped.${N}"
problems+=("deploy blocked: working tree is dirty"); signature+="dirty;"
else
p " ${DIM}→ the tree was dirty earlier and is clean now — the next tick will deploy.${N}"
fi ;;
smoke-failed) smoke-failed)
p " ${R}→ the built bundle failed the smoke test (real breakage — check the journal).${N}" p " ${R}→ the built bundle failed the smoke test (real breakage — check the journal).${N}"
problems+=("smoke test failed during deploy"); signature+="smoke;" ;; problems+=("smoke test failed during deploy"); signature+="smoke;" ;;
@ -182,7 +186,7 @@ p ""
p "${B}▸ Timer${N}" p "${B}▸ Timer${N}"
timer_state="$(systemctl --user is-active skatespots-deploy.timer 2>/dev/null || echo unknown)" timer_state="$(systemctl --user is-active skatespots-deploy.timer 2>/dev/null || echo unknown)"
if [ "$timer_state" = "active" ]; then if [ "$timer_state" = "active" ]; then
next_at="$(systemctl --user list-timers skatespots-deploy.timer --no-legend --no-pager 2>/dev/null | awk '{print $1" "$2" "$3}')" next_at="$(systemctl --user list-timers skatespots-deploy.timer --no-legend --no-pager 2>/dev/null | awk '$1 != "-" {print $1" "$2" "$3}')"
p " ${G}✓${N} skatespots-deploy.timer active${next_at:+ ${DIM}next $next_at${N}}" p " ${G}✓${N} skatespots-deploy.timer active${next_at:+ ${DIM}next $next_at${N}}"
else else
p " ${R}✗${N} skatespots-deploy.timer: ${timer_state}" p " ${R}✗${N} skatespots-deploy.timer: ${timer_state}"