Skip to content

[bug] E4-4: Graceful shutdown incomplete — jsonlWatcher, PipelineManager, MemoryBridge not stopped #1427

@OneStepAt4time

Description

@OneStepAt4time

Finding

ID: S-1–S-4 | Severity: 🟠 MEDIUM

jsonlWatcher, PipelineManager, and MemoryBridge.stopReaper() are never called during gracefulShutdown(). SwarmMonitor's in-flight scans are not awaited.

Fix Required

  1. Call jsonlWatcher.close() in gracefulShutdown()
  2. Call pipelines.destroy() in gracefulShutdown()
  3. Call memoryBridge.stopReaper() in gracefulShutdown()
  4. SwarmMonitor.stop(): await in-flight scans with a 2-second timeout before force-stop

Files: src/server.ts

Acceptance Criteria

SIGTERM completes without open file handle warnings.

Milestone

M-E4: Reliability & Robustness

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2bugSomething isn't workingpriority: mediumreadyTriaged and ready for an agent to pick up

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions