Files
dashcaddy/dashcaddy-api
Krystie 4853f1feb8
CI / Test & Lint (push) Has been cancelled
CI / Security audit (push) Has been cancelled
fix(server): unbreak workflow engine init - import fetchT, new NotificationManager, hoist servicesStateManager
Three cascading bugs in server.js's workflow engine init block:

1. fetchT was referenced but never imported from ./src/utils/http
2. notification-manager was called as factory function but the module
   now exports a class (NotificationManager) - need 'new'
3. servicesStateManager was referenced in workflowCtx but only created
   later inside an async IIFE (out of scope at workflow init time)

Result: every container start logged
  Workflow engine failed to initialize - fetchT is not defined
and the workflow engine never actually wired to resourceMonitor/
updateManager event sources. The 'app' context workflow engine
still ran but didn't get those connections.

Fix:
- Import fetchT at top of file
- Use 'new' for NotificationManager instantiation
- Hoist servicesStateManager creation before workflow init and
  remove the duplicate inside the health-checker async IIFE

Verified: container restart shows
  [server] Workflow engine initialized
  [ResourceMonitor] Workflow engine configured
  [UpdateManager] Workflow engine configured
in the log, no more errors at startup.

Also bumps VERSION to current SHA (bump from c64bbe2).
2026-06-18 20:15:23 -07:00
..
2026-03-05 02:26:12 -08:00
2026-03-05 02:26:12 -08:00
2026-03-29 18:46:02 -07:00
2026-03-29 18:46:02 -07:00
2026-03-05 02:26:12 -08:00
2026-03-05 02:26:12 -08:00