Skip to content

fix(server): progress-aware shutdown escalation with live countdown - #129

Merged
jkyberneees merged 1 commit into
mainfrom
fix/shutdown-progress
Sep 19, 2026
Merged

jkyberneees merged 1 commit into
mainfrom
fix/shutdown-progress

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

What

  • Stop escalates to SIGKILL only when the spawned server goes silent (12s activity grace from stderr writes) or the 30s hard deadline expires — a working teardown is never killed faster than the old uniform 8s wait.
  • Clean exits emit a new StopStopped event.
  • cmd/bodek renders a live tty-gated countdown (⏻ shutting down odek serve… Ns / 30s) and states the consequence — not a blame — when a force kill cuts a possible memory flush.

Tests

  • 4 new RED-first tests pin the contract: 30s/12s defaults, idle→early escalation, activity→full deadline, monotonic progress ticks.
  • Full gate chain green: fmt, vet (0 issues), golangci-lint (0 issues), race-enabled suite, build.

Stop now escalates to SIGKILL only when the spawned server goes
silent (12s activity grace, stamped from stderr writes) or the 30s
hard deadline expires, so a working teardown is never killed faster
than the old uniform 8s wait. Clean exits emit a StopStopped event.

cmd/bodek renders a live 'shutting down… Ns / 30s' countdown on an
in-place stderr line (tty-gated) and states the consequence — not a
blame — when a force kill cuts a possible memory flush.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bodek 0f1a8ad Commit Preview URL

Branch Preview URL
Sep 19 2026, 07:39 AM

@jkyberneees
jkyberneees merged commit 734e6a5 into main Sep 19, 2026
9 checks passed
@jkyberneees
jkyberneees deleted the fix/shutdown-progress branch September 19, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant