fix(worker): add failureReason field to batch_get_tasks
The tool description claimed Failed tasks carry failureReason, but the field was missing from BatchTaskDetailDto and rejected when requested in `fields`. Add failureReason to the DTO, KnownDetailFields, and BuildDetail so list handlers and other callers can read failure reasons without per-task get_task calls. Tested: 31 BatchMcpToolsTests pass, including two new cases for failureReason retrieval on Failed and Idle tasks. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 4.5
parent
56bc1651a8
commit
912201770f
@@ -45,6 +45,7 @@ public sealed record BatchTaskDetailDto(
|
||||
int? SortOrder = null,
|
||||
int? RoadblockCount = null,
|
||||
string? RoadblockText = null,
|
||||
string? FailureReason = null,
|
||||
bool DescriptionTruncated = false,
|
||||
int? DescriptionFullLength = null,
|
||||
bool ResultTruncated = false,
|
||||
@@ -80,6 +81,7 @@ public sealed class BatchMcpTools
|
||||
{
|
||||
"listId", "title", "description", "status", "result", "createdBy", "createdAt",
|
||||
"startedAt", "finishedAt", "isMyDay", "sortOrder", "roadblockCount", "roadblockText",
|
||||
"failureReason",
|
||||
};
|
||||
|
||||
private readonly ExternalMcpService _svc;
|
||||
@@ -187,6 +189,7 @@ public sealed class BatchMcpTools
|
||||
SortOrder: Want("sortOrder") ? t.SortOrder : null,
|
||||
RoadblockCount: Want("roadblockCount") ? t.RoadblockCount : null,
|
||||
RoadblockText: Want("roadblockText") ? ExtractRoadblockText(t.Result) : null,
|
||||
FailureReason: Want("failureReason") ? t.FailureReason : null,
|
||||
DescriptionTruncated: descTruncated,
|
||||
DescriptionFullLength: descFullLength,
|
||||
ResultTruncated: resultTruncated,
|
||||
|
||||
Reference in New Issue
Block a user