refactor: Datei-Scope-Serialisierung entfernen
ScopeGlobs auf Tasks und SerializeOnFileOverlap auf der Listen-Config waren ungenutzt: der Scope wurde nie befuellt, also hat der Queue-Picker nie serialisiert. ScopeOverlap, das Picker-Gate, die DTO-Felder, die UI-Option und die Spalten fallen weg (Migration DropFileScopeSerialization).
This commit is contained in:
@@ -176,48 +176,4 @@ public sealed class QueueStateMcpToolsTests : IDisposable
|
||||
|
||||
Assert.Equal(new[] { first.Id, second.Id }, result.WaitingTaskIds);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetQueueState_ScopeBlockedTasks_Empty_WhenNoListSerializes()
|
||||
{
|
||||
var listId = await SeedListAsync();
|
||||
var (_, sut) = CreateSut();
|
||||
|
||||
var running = await SeedTaskAsync(listId, TaskStatus.Running);
|
||||
running.ScopeGlobs = "src/Foo.cs";
|
||||
await _ctx.SaveChangesAsync();
|
||||
var queued = await SeedTaskAsync(listId, TaskStatus.Queued);
|
||||
queued.ScopeGlobs = "src/Foo.cs";
|
||||
await _ctx.SaveChangesAsync();
|
||||
|
||||
var result = await sut.GetQueueState(CancellationToken.None);
|
||||
|
||||
Assert.Contains(queued.Id, result.WaitingTaskIds);
|
||||
Assert.Empty(result.ScopeBlockedTasks);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetQueueState_ScopeBlockedTasks_ReportsReasonAndBlocker_WhenListSerializes()
|
||||
{
|
||||
var listId = await SeedListAsync();
|
||||
await _listRepo.SetConfigAsync(new ListConfigEntity { ListId = listId, SerializeOnFileOverlap = true });
|
||||
|
||||
var (_, sut) = CreateSut();
|
||||
|
||||
var running = await SeedTaskAsync(listId, TaskStatus.Running);
|
||||
running.ScopeGlobs = "src/Foo.cs";
|
||||
await _ctx.SaveChangesAsync();
|
||||
|
||||
var queued = await SeedTaskAsync(listId, TaskStatus.Queued);
|
||||
queued.ScopeGlobs = "src/Foo.cs";
|
||||
await _ctx.SaveChangesAsync();
|
||||
|
||||
var result = await sut.GetQueueState(CancellationToken.None);
|
||||
|
||||
Assert.Contains(queued.Id, result.WaitingTaskIds);
|
||||
var reason = Assert.Single(result.ScopeBlockedTasks);
|
||||
Assert.Equal(queued.Id, reason.TaskId);
|
||||
Assert.Equal(running.Id, reason.BlockedByTaskId);
|
||||
Assert.Equal("scope_overlap", reason.Reason);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user