fix(worker): survive a worker restart when cancelling a mid-merge unit-merge parent
CancelAsync only checked PlanningMergeOrchestrator's in-memory HasActiveMerge, which is empty after a restart. IActiveMergeState gains an async fallback that checks on-disk (GitService.IsMidMergeAsync) for a WaitingForReview parent with children, so the guard still blocks cancel until the merge is continued or aborted.
This commit is contained in:
@@ -66,6 +66,7 @@ file sealed class NoActiveMergeState : IActiveMergeState
|
||||
{
|
||||
public static readonly NoActiveMergeState Instance = new();
|
||||
public bool HasActiveMerge(string taskId) => false;
|
||||
public Task<bool> HasActiveMergeAsync(string taskId, CancellationToken ct) => Task.FromResult(false);
|
||||
}
|
||||
|
||||
// Never actually invoked: TicketSystemConfig.IsConfigured is false in every TaskStateServiceBuilder
|
||||
|
||||
Reference in New Issue
Block a user