-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: act/extract/observe not respecting timeout param #1330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: seanmcguire/stg-1020-refactor-acthandlerts
Are you sure you want to change the base?
fix: act/extract/observe not respecting timeout param #1330
Conversation
|
Greptile OverviewGreptile SummaryThis PR fixes timeout handling in Key Changes:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant ActHandler
participant TimeoutGuard
participant Page
participant LLMClient
User->>ActHandler: act(instruction, {timeout: 5000})
ActHandler->>TimeoutGuard: createTimeoutGuard(5000ms)
TimeoutGuard-->>ActHandler: ensureTimeRemaining()
ActHandler->>TimeoutGuard: ensureTimeRemaining()
Note over TimeoutGuard: Check elapsed time < 5000ms
ActHandler->>Page: waitForDomNetworkQuiet()
Page-->>ActHandler: settled
ActHandler->>TimeoutGuard: ensureTimeRemaining()
ActHandler->>Page: captureHybridSnapshot()
Page-->>ActHandler: {combinedTree, xpathMap}
ActHandler->>TimeoutGuard: ensureTimeRemaining()
ActHandler->>LLMClient: getActionFromLLM()
LLMClient-->>ActHandler: {action, response}
ActHandler->>TimeoutGuard: ensureTimeRemaining()
ActHandler->>ActHandler: takeDeterministicAction(action, ensureTimeRemaining)
ActHandler->>TimeoutGuard: ensureTimeRemaining()
ActHandler->>Page: performUnderstudyMethod()
alt Timeout Exceeded
TimeoutGuard-->>ActHandler: throw ActTimeoutError
ActHandler-->>User: ActTimeoutError
else Success
ActHandler-->>User: ActResult
end
alt Two-Step Flow
ActHandler->>TimeoutGuard: ensureTimeRemaining()
ActHandler->>Page: captureHybridSnapshot() (step 2)
ActHandler->>TimeoutGuard: ensureTimeRemaining()
ActHandler->>LLMClient: getActionFromLLM() (step 2)
ActHandler->>TimeoutGuard: ensureTimeRemaining()
ActHandler->>ActHandler: takeDeterministicAction(secondAction)
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 files reviewed, no comments
why
what changed
test plan
Summary by cubic
Fixes act, extract, and observe to honor the timeout parameter by adding step-wise timeout guards with clear, specific timeout errors. Also wires v3 deterministic actions to use the same guard.
Why:
What:
Test Plan:
Written for commit a92039c. Summary will update automatically on new commits.