fix(web): stop config watcher on native shutdown #109

Merged
eleith merged 1 commits from fix/web-watcher-shutdown into main 2026-10-30 18:48:34 +00:00

Summary

  • Retain the existing config-watcher stop callback and invoke it once on the native sveltekit:shutdown event. Adapter-node emits this after HTTP connections close; the callback already calls unwatchFile.
  • Preserve the reload callback, shared watcher and worker lifecycle. No custom server, signal handler, forced exit, dependency or global watcher-persistence change.
  • Include a normal web patch changeset. This is follow-up PR two, after landed Google-consent PR #108.

Validation

  • Independent code and readability reviews passed.
  • Formatting, ESLint and web type checks passed (0 errors/warnings).
  • 15 focused existing unit tests passed: 5 shared config-store cases and 10 web config boot/reload cases.
  • Production build passed. Actual native entrypoint was launched with temporary fixture YAML/databases and served health successfully before signaling.
  • Negative control: original lifecycle required SIGKILL after five seconds on SIGTERM.
  • Fixed lifecycle exited naturally with code 0 and no SIGKILL: SIGTERM in 32 ms; SIGINT in 27 ms. This verifies real process termination, not only a mocked cleanup call.

No browser test changes or new committed test harness. Full CI remains the merge gate; Docker and live-provider checks were not run. No release, version bump, deployment or merge action. Owner will land this PR.

## Summary - Retain the existing config-watcher stop callback and invoke it once on the native sveltekit:shutdown event. Adapter-node emits this after HTTP connections close; the callback already calls unwatchFile. - Preserve the reload callback, shared watcher and worker lifecycle. No custom server, signal handler, forced exit, dependency or global watcher-persistence change. - Include a normal web patch changeset. This is follow-up PR two, after landed Google-consent PR #108. ## Validation - Independent code and readability reviews passed. - Formatting, ESLint and web type checks passed (0 errors/warnings). - 15 focused existing unit tests passed: 5 shared config-store cases and 10 web config boot/reload cases. - Production build passed. Actual native entrypoint was launched with temporary fixture YAML/databases and served health successfully before signaling. - Negative control: original lifecycle required SIGKILL after five seconds on SIGTERM. - Fixed lifecycle exited naturally with code 0 and no SIGKILL: SIGTERM in 32 ms; SIGINT in 27 ms. This verifies real process termination, not only a mocked cleanup call. No browser test changes or new committed test harness. Full CI remains the merge gate; Docker and live-provider checks were not run. No release, version bump, deployment or merge action. Owner will land this PR.
eleith-gitea-agent Bot added 1 commit 2026-10-30 18:43:26 +00:00
fix(web): stop config watcher on native shutdown
ci/woodpecker/pr/web Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
71da8a94db
Retain the existing watcher cleanup and invoke it once from adapter-node's post-HTTP shutdown event. Preserve reload behavior, shared watcher implementation and worker lifecycle.
eleith merged commit 71da8a94db into main 2026-10-30 18:48:34 +00:00
eleith deleted branch fix/web-watcher-shutdown 2026-10-30 18:48:34 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eleith/when#109