feat(FN-5131): add lineage-unlink flag to triage parent deletes
Adds a `lineage-unlink` flag to triage parent deletes (FN-5131), enabling the split-into-subtasks path to break parent-child lineage on deletion. The primary addition is a comprehensive new test covering that split scenario, with minor adjustments to two existing lineage-related test files. Fusion-Task-Id: FN-5131 Fusion-Task-Lineage: cb720e8f-8c49-42e4-873a-9949f3ba3427
This commit is contained in:
committed by
gsxdsm
parent
a6747c1dfd
commit
2c7ae1c1a4
@@ -1291,7 +1291,8 @@ export class TriageProcessor {
|
||||
`Converted into subtasks: ${childTaskIds}`,
|
||||
);
|
||||
try {
|
||||
await this.store.deleteTask(task.id);
|
||||
// FN-5129 / FN-5131: split-close must unlink lineage children when deleting the parent.
|
||||
await this.store.deleteTask(task.id, { removeLineageReferences: true });
|
||||
planLog.log(`✓ ${task.id} split into subtasks (${childTaskIds}) and closed`);
|
||||
} catch (err: unknown) {
|
||||
// deleteTask refuses when live tasks still depend on this id.
|
||||
@@ -1435,7 +1436,8 @@ export class TriageProcessor {
|
||||
task.id,
|
||||
`Converted into subtasks: ${childTaskIds}`,
|
||||
);
|
||||
await this.store.deleteTask(task.id);
|
||||
// FN-5129 / FN-5131: split-close must unlink lineage children when deleting the parent.
|
||||
await this.store.deleteTask(task.id, { removeLineageReferences: true });
|
||||
planLog.log(`✓ ${task.id} split into subtasks (${childTaskIds}) and closed`);
|
||||
return;
|
||||
}
|
||||
@@ -2191,7 +2193,8 @@ export class TriageProcessor {
|
||||
task.id,
|
||||
`Duplicate of ${dupId} — closed`,
|
||||
);
|
||||
await this.store.deleteTask(task.id);
|
||||
// Pass removeLineageReferences so a duplicate-close cannot be blocked by lineage children (FN-5129 / FN-5131).
|
||||
await this.store.deleteTask(task.id, { removeLineageReferences: true });
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user