fix(children): exempt improvement children from orphan-dequeue sweep
This commit is contained in:
@@ -393,6 +393,9 @@ public sealed class TaskRepository
|
||||
{
|
||||
var orphanIds = await _context.Tasks
|
||||
.Where(t => t.ParentTaskId != null && t.Status == TaskStatus.Queued)
|
||||
// Agent-suggested improvement children (CreatedBy == ParentTaskId) legitimately
|
||||
// queue under a non-planning parent — they are not orphaned planning-chain members.
|
||||
.Where(t => t.CreatedBy == null || t.CreatedBy != t.ParentTaskId)
|
||||
.Where(t => !_context.Tasks.Any(p =>
|
||||
p.Id == t.ParentTaskId && p.PlanningPhase != PlanningPhase.None))
|
||||
.Select(t => t.Id)
|
||||
|
||||
Reference in New Issue
Block a user