fix(FN-1285): harden async listener error guards
- Wrap TaskExecutor task:updated async listener logic in a top-level guard and log uncaught listener failures - Add explicit catch handling for ProjectManager activity logging and dashboard stuck-detector settings-triggered checkNow calls - Document async EventEmitter guard conventions in scheduler and hybrid executor listener wiring - Add regression tests for executor and dashboard listener guards and include a patch changeset for @gsxdsm/fusion
This commit is contained in:
@@ -110,6 +110,13 @@ export class Scheduler {
|
||||
/** Tracks mission-linked tasks observed with status=failed before moveTask clears status/error. */
|
||||
private failedTaskIds = new Set<string>();
|
||||
|
||||
/**
|
||||
* Async listener guard convention:
|
||||
* - Any async mission helper invoked from event listeners is wrapped in internal try/catch
|
||||
* (`handleMissionTaskStart` / `handleMissionTaskCompletion`).
|
||||
* - Fire-and-forget Promise chains in listeners terminate with `.catch(...)`.
|
||||
* Keep this invariant when adding new async EventEmitter callbacks.
|
||||
*/
|
||||
constructor(
|
||||
private store: TaskStore,
|
||||
private options: SchedulerOptions = {},
|
||||
|
||||
Reference in New Issue
Block a user