Skip to content

fix(v4): enforce operation-level timeouts - #2555

Closed
miguelg719 wants to merge 2 commits into
codex/v4-integration-parityfrom
codex/v4-operation-timeouts
Closed

fix(v4): enforce operation-level timeouts#2555
miguelg719 wants to merge 2 commits into
codex/v4-integration-parityfrom
codex/v4-operation-timeouts

Conversation

@miguelg719

@miguelg719 miguelg719 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Adds caller-facing deadlines around the full act, observe, and extract operations. Includes focused controller tests and the transferred timeout integration coverage.\n\nStacked on #2551.


Summary by cubic

Enforces per-operation timeouts for Stagehand act(), observe(), and extract() so hung models don't block. Callers use options.timeout; operations fail fast with clear "() timed out after Nms" errors.

  • Bug Fixes
    • Wrap each operation with withTimeout(..., params.options?.timeout, "<op>()") in the controller.
    • Add tests: controller timeout/pass-through; TS SDK integration with a hanging model; enable the timeouts group in local/waits-timeouts.
    • Clarify withTimeout docs that deadlines don’t cancel service/model work; use abort signals for cancellation.

Written for commit 4cdf181. Summary will update on new commits.

Review in cubic

@changeset-bot

changeset-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4cdf181

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@miguelg719
miguelg719 force-pushed the codex/v4-integration-parity branch from 6bfd3a9 to 3d906c8 Compare August 3, 2026 20:19
@miguelg719
miguelg719 force-pushed the codex/v4-operation-timeouts branch from 8351a4f to ebe0f45 Compare August 3, 2026 20:19
# Conflicts:
#	packages/sdk-go/internal/extensionassets/stagehand-extension.zip
#	packages/server/controllers/stagehandController.ts
@miguelg719

Copy link
Copy Markdown
Collaborator Author

Closing as redundant with the merged RPC timeout handling and the existing service-level timeout guards. #2556 has been restacked directly onto #2551.

@miguelg719 miguelg719 closed this Aug 4, 2026
miguelg719 added a commit that referenced this pull request Aug 4, 2026
## Summary

- port 23 public-SDK integration specs from main, growing the v4 suite
from 5 to 28 files
- adapt legacy cases to hermetic v4 fixtures and public APIs
- define ten stable local semantic groups with complete, unique test
ownership
- leave FlowLogger coverage retired because FlowLogger is absent from
both v4 implementations

## Scope boundary

This PR is mechanical test transfer only. It has no packages/server
production changes, generated extension update, or .github/workflows
diff from v4-spike.

Three transferred specs that expose runtime gaps travel with their
standalone fixes:
- operation timeouts: #2555
- well-formed snapshot Unicode: #2556
- locator screenshot masks: #2557

Together the stack grows the suite to 31 files. CI orchestration and
external-contributor approval policy remain isolated in #2553.

The remaining main integration specs are not silently omitted:
Agent/streaming/cache cases require the v4 Agent surface;
Browserbase/CDP lifecycle, downloads, OOPIF, and connection cases
require dedicated browser infrastructure; logger and FlowLogger cases
target lifecycle code removed from v4.

## Verification

- integration discovery and ownership tests: 12 passed
- focused default-page and screenshot-adjacent integration run: 9 passed
before extraction
- GitHub semantic matrix is the authoritative full-suite validation
after this history rewrite

## Review order

#2551#2555#2556#2557#2553
miguelg719 added a commit that referenced this pull request Aug 4, 2026
Repairs malformed Unicode in scoped and merged accessibility snapshots.
Includes focused unit coverage and the transferred Unicode integration
test.

Stacked directly on #2551. The now-closed #2555 timeout PR is
intentionally not part of this stack.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants