FN-5703: forward task:deleted events through in-process runtime

Ensure engine-side task deletes propagate through all runtime transports so GitHub tracking cleanup runs consistently.

- extend IPC protocol and child-process runtime/worker plumbing to carry `task:deleted` events
- forward `task:deleted` from in-process runtime through project runtime and project manager dispatch
- add regression coverage for in-process runtime forwarding and GitHub tracking delete handling

Files changed:
 .../src/__tests__/github-tracking-delete.test.ts   | 29 ++++++++++++++++++
 .../src/__tests__/in-process-runtime.test.ts       | 34 +++++++++++++++++++++-
 packages/engine/src/ipc/ipc-protocol.ts            | 14 ++++++++-
 packages/engine/src/project-manager.ts             |  7 +++++
 packages/engine/src/project-runtime.ts             |  4 ++-
 .../engine/src/runtimes/child-process-runtime.ts   |  6 ++++
 .../engine/src/runtimes/child-process-worker.ts    | 14 +++++++--
 packages/engine/src/runtimes/in-process-runtime.ts | 10 ++++++-
 8 files changed, 111 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-5703

Fusion-Task-Lineage: 1406838b-5abf-4b86-8161-c2dd59f88a9b
This commit is contained in:
gsxdsm
2026-05-29 18:38:43 -07:00
parent dac9b96262
commit a9d2064f66
8 changed files with 111 additions and 7 deletions

View File

@@ -18,6 +18,8 @@ import { projectManagerLog } from "./logger.js";
export interface ProjectManagerEvents {
/** Emitted when a task is created in any project */
"task:created": [data: { projectId: string; projectName: string; task: Task }];
/** Emitted when a task is deleted in any project */
"task:deleted": [data: { projectId: string; projectName: string; task: Task; meta?: { githubIssueAction?: import("@fusion/core").GithubIssueAction } }];
/** Emitted when a task is moved in any project */
"task:moved": [
data: {
@@ -397,6 +399,11 @@ export class ProjectManager extends EventEmitter<ProjectManagerEvents> {
this.emit("task:updated", { projectId, projectName, task });
});
// Forward task:deleted
runtime.on("task:deleted", (task: Task, meta?: { githubIssueAction?: import("@fusion/core").GithubIssueAction }) => {
this.emit("task:deleted", { projectId, projectName, task, meta });
});
// Forward errors
runtime.on("error", (error: Error) => {
this.emit("error", { projectId, projectName, error });