test(FN-5135): lock deletedAt SSE payload contract
Fusion-Task-Id: FN-5135 Fusion-Task-Lineage: 182c496e-4e3a-4353-be53-86dd4cc5ba19
This commit is contained in:
committed by
gsxdsm
parent
95d5c08c23
commit
ee92b71533
@@ -134,7 +134,7 @@ function safeWrite(res: Response, data: string): SafeWriteResult {
|
||||
}
|
||||
}
|
||||
|
||||
function stripTaskListHeavyFields<T>(task: T): T {
|
||||
export function stripTaskListHeavyFields<T>(task: T): T {
|
||||
if (!task || typeof task !== "object" || Array.isArray(task)) {
|
||||
return task;
|
||||
}
|
||||
@@ -156,7 +156,14 @@ function stripTaskListHeavyFields<T>(task: T): T {
|
||||
? existingTimed
|
||||
: sumTimedLogEntries(candidate.log);
|
||||
|
||||
return { ...task, log: [], timedExecutionMs, tokenUsage: candidate.tokenUsage, workflowStepResults: candidate.workflowStepResults } as T;
|
||||
return {
|
||||
...task,
|
||||
// FN-5105/FN-5135: preserve deletedAt in SSE slim payloads for soft-delete suppression.
|
||||
log: [],
|
||||
timedExecutionMs,
|
||||
tokenUsage: candidate.tokenUsage,
|
||||
workflowStepResults: candidate.workflowStepResults,
|
||||
} as T;
|
||||
}
|
||||
|
||||
function sumTimedLogEntries(log: unknown): number {
|
||||
|
||||
Reference in New Issue
Block a user