fix(FN-993): add safe-navigation for task.description in recoverCompletedTasks

- Add optional chaining (?.) on task.description.slice() to prevent null-reference crash
- Fallback to '(untitled)' when both title and description are absent
- Add changeset for @fusion/engine patch
This commit is contained in:
gsxdsm
2026-04-05 17:28:21 -07:00
parent 977fc12da1
commit 7a5d7c1b19
2 changed files with 6 additions and 1 deletions

View File

@@ -293,7 +293,7 @@ export class SelfHealingManager {
let recovered = 0;
for (const task of stuckCompleted) {
log.log(`Recovering completed task ${task.id}: ${task.title || task.description.slice(0, 60)}`);
log.log(`Recovering completed task ${task.id}: ${task.title || task.description?.slice(0, 60) || "(untitled)"}`);
const success = await recoverFn(task);
if (success) recovered++;
}