fix(polling-tools): pass plan execution timeout to internal polling tool routes#4884
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Polling and client timeouts no longer use the default free-tier sync limit: AssemblyAI STT and Textract async job polling, plus internal tool HTTP fetches in Workflow cancellation is wired through tool execution: when no explicit Reviewed by Cursor Bugbot for commit d5ea6ab. Configure here. |
Greptile SummaryThis PR fixes polling-tool routes (image, video, STT, Textract) that could time out prematurely when running under a long-running plan execution. Two distinct fixes are bundled: the route
Confidence Score: 5/5Safe to merge — the changes close a real gap where plan-level cancellation was never forwarded to internal polling fetches, and align route maxDuration exports with already-existing polling ceilings. The effectiveSignal plumbing is consistently applied at every call-site (direct, retry, reacquire), and the maxDuration / maxAttempts values are now in sync across all four routes. No logic regressions are introduced; the trade-offs flagged in previous threads have been accepted by the team. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Executor as Plan Executor
participant ET as executeTool()
participant ETR as executeToolRequest()
participant Route as Polling Route(image/video/stt/textract)
participant Provider as External Provider API
Executor->>ET: "executeTool(toolId, params, {executionContext})"
Note over ET: effectiveSignal = signal ?? executionContext.abortSignal
ET->>ETR: executeToolRequest(..., effectiveSignal)
Note over ETR: timeout = requestParams.timeout || (signal ? getMaxExecutionTimeout() : DEFAULT)
ETR->>Route: "fetch(internalUrl, {signal: controller.signal})"
Note over Route: maxDuration = 5400 s, maxAttempts = ceil(getMaxExecutionTimeout() / pollInterval)
loop Poll until complete or maxAttempts
Route->>Provider: status check
Provider-->>Route: IN_PROGRESS / COMPLETED
end
Route-->>ETR: result
ETR-->>ET: ToolResponse
ET-->>Executor: ToolResponse
alt Plan cancelled / timed out
Executor->>ET: executionContext.abortSignal fires
Note over ET: effectiveSignal aborts
ETR-->>ET: AbortError (caller_aborted)
end
Reviews (2): Last reviewed commit: "address comments" | Re-trigger Greptile |
|
@greptile |
Summary
Pass plan execution timeouts to internal tool routes with polling
Type of Change
Testing
Tested manually
Checklist