fix(daemon,controller,tests): harden lifecycle shutdown and clean up test timers #75

Merged
clanker merged 3 commits from pr/stability-lifecycle-hygiene into main 2026-09-06 04:06:52 +00:00
Member

This PR hardens lifecycle shutdown and fixes test fixture cleanup.

  1. Daemon shutdown:
  • Stops the background move worker via actions.shutdown_worker().
  • Sends a shutdown event to active SSE subscribers and clears subscriber queues.
  • Joins the listener threads and sync worker thread with bounded timeouts.
  1. Controller cleanup:
  • Connects AppController.destroyed to _cleanup_sync.
  • Parents _NedEventBridge to AppController.
  • Stops _ned_refresh_timer and sets the stop event.
  1. Test fixture cleanup:
  • Tears down test windows and tab widgets with close() and deleteLater().
  • Stops prefix timers and auto-open timers on dummy panels.
  • Fixes the offscreen Qt segmentation fault when running the full test suite.
This PR hardens lifecycle shutdown and fixes test fixture cleanup. 1. Daemon shutdown: - Stops the background move worker via actions.shutdown_worker(). - Sends a shutdown event to active SSE subscribers and clears subscriber queues. - Joins the listener threads and sync worker thread with bounded timeouts. 2. Controller cleanup: - Connects AppController.destroyed to _cleanup_sync. - Parents _NedEventBridge to AppController. - Stops _ned_refresh_timer and sets the stop event. 3. Test fixture cleanup: - Tears down test windows and tab widgets with close() and deleteLater(). - Stops prefix timers and auto-open timers on dummy panels. - Fixes the offscreen Qt segmentation fault when running the full test suite.
Stop background workers and notify SSE subscribers during NED shutdown.
Stop refresh timer and watcher thread during controller cleanup.
Tear down test widgets and pending timers to prevent offscreen Qt segfaults.
clanker force-pushed pr/stability-lifecycle-hygiene from 88bbbb1f78 to 67076d6e34 2026-09-06 04:06:51 +00:00 Compare
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Home/lazarus!75
No description provided.