test(FN-4826): complete Step 4 — cover handoff telemetry paths

Fusion-Task-Id: FN-4826
Fusion-Task-Lineage: b08a58c8-66ab-43d4-bdf9-69d2b56b7bcc
This commit is contained in:
Fusion (runfusion.ai)
2026-05-16 23:30:38 -07:00
committed by gsxdsm
parent 3453e77396
commit 1553f1dd0d
4 changed files with 88 additions and 1 deletions

View File

@@ -1075,6 +1075,9 @@ export class Scheduler {
schedulerLog.log(`Task ${task.id} dispatch blocked — ${reason}`);
await this.store.logEntry(task.id, reason);
await (this.store as any).recordRunAuditEvent?.({
taskId: freshTask.id,
agentId: "scheduler",
runId: generateSyntheticRunId("scheduler", freshTask.id),
domain: "database",
mutationType: "node:handoff:parked",
target: freshTask.id,
@@ -1097,6 +1100,9 @@ export class Scheduler {
await this.store.logEntry(task.id, `Owning-node handoff applied: ${handoffDecision.reason}`);
await (this.store as any).recordRunAuditEvent?.({
taskId: freshTask.id,
agentId: "scheduler",
runId: generateSyntheticRunId("scheduler", freshTask.id),
domain: "database",
mutationType: handoffDecision.action === "reassign-local" ? "node:handoff:reassign-local" : "node:handoff:reassign-any",
target: freshTask.id,