fix(workflows): fill in the activity timeouts a workflow left unset - #443
Merged
KillerX merged 1 commit intoAug 14, 2026
Merged
Conversation
A workflow only has activity options if it called workflow.WithActivityOptions, and nothing tells the author when it did not: activities are mostly reached through helpers like CreateFolder or WriteFile rather than through an Execute call in view. Four registered workflows are in that position — BulkExportShorts, ExportShort, ImportSubtitles and MoveFilesWorkerFlow — and Execute backfilled only ScheduleToCloseTimeout. Two consequences. StartToCloseTimeout stayed zero, so the server falls back to the schedule-to-close budget: a single attempt is allowed to run the full three hours, and the ten-attempt retry policy above it has nothing left to retry into. And that three hours is a number nobody chose — every workflow that does call WithActivityOptions gets 4h/12h from GetDefaultActivityOptions, so the workflows that forgot ran under a quieter, tighter regime than the ones that did not. Execute now fills any unset timeout from GetDefaultActivityOptions, and so does ExecuteWithLowPrioQueue, which had no timeout backfill at all — latent only because both its callers happen to set options. HeartbeatTimeout is deliberately left alone. Filling it in would put a ten minute heartbeat timeout on activities that never call RecordHeartbeat, turning a slow success into a certain failure, and Execute cannot tell which activities heartbeat. Verified: with the old backfill the no-options workflow reports a 3h attempt budget where the test expects 4h. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
4/n of a stack. Base:
refactor/remove-xml-ingest-entrypoint(#442).A workflow only has activity options if it called
workflow.WithActivityOptions, and nothing tells the author when it did not: activities are mostly reached through helpers likeCreateFolderorWriteFilerather than through anExecutecall in view. Four registered workflows are in that position —BulkExportShorts,ExportShort,ImportSubtitlesandMoveFilesWorkerFlow(the audit listed the first three) — andExecutebackfilled onlyScheduleToCloseTimeout.Two consequences:
StartToCloseTimeoutstayed zero, so the server falls back to the schedule-to-close budget. A single attempt is allowed to run the full three hours, and the ten-attempt retry policy above it has nothing left to retry into.WithActivityOptionsgets 4h/12h fromGetDefaultActivityOptions, so the workflows that forgot ran under a tighter, quieter regime than the ones that did not.Executenow fills any unset timeout fromGetDefaultActivityOptions, and so doesExecuteWithLowPrioQueue, which had no timeout backfill at all — latent only because both its callers happen to set options.HeartbeatTimeoutis deliberately left alone. Filling it in would put a ten-minute heartbeat timeout on activities that never callRecordHeartbeat, turning a slow success into a certain failure, andExecutecannot tell which activities heartbeat. (That is its own finding —activities/vizualizer.gois already in exactly that trap.)Verified: with the old backfill the no-options workflow reports a 3h attempt budget where the test expects 4h.
🤖 Generated with Claude Code