feat(worker): make turn inactivity timeouts configurable - #86
Open
andrewkcchung wants to merge 1 commit into
Open
andrewkcchung wants to merge 1 commit into
andrewkcchung wants to merge 1 commit into
Conversation
Expose a bounded worker inactivity watchdog through constructor and environment configuration while preserving the existing default behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Why
Turn silence is not inherently failure: legitimate tools and models can have very different quiet periods. Making the existing worker watchdog configurable gives every deployment a common bounded mechanism for detecting genuinely stalled turns without forcing one fleet's timing assumptions on the platform.
What changed
PILOTSWARM_TURN_INACTIVITY_TIMEOUT_MS.0intentionally disables the watchdog.Behavioral proof
Command:
main: The test failed becausemaindid not provide the timeout resolver or configurable worker behavior.Risk assessment
Relative risk: Low
The new timeout is optional and preserves the established default when absent or invalid. It changes no durable state or wire format. The main behavioral risks are disabling protection with
0or selecting a threshold below legitimate quiet operations; precedence, environment parsing, default, disable, and invalid-value tests cover these cases.Review focus
0as the explicit disable value is an acceptable public contract.