Skip to content

fix: Report active context on device timeout#137

Closed
mrousavy wants to merge 1 commit into
callstackincubator:mainfrom
mrousavy:fix/report-active-test-timeout
Closed

fix: Report active context on device timeout#137
mrousavy wants to merge 1 commit into
callstackincubator:mainfrom
mrousavy:fix/report-active-test-timeout

Conversation

@mrousavy
Copy link
Copy Markdown

@mrousavy mrousavy commented Jun 2, 2026

Summary

When a Harness bridge RPC times out with DeviceNotRespondingError, include the last started Harness context in the Jest file failure message. The context can be the active test, the active suite before a test starts, or the active file if no suite has started yet.

This does not change timeout values, retry behavior, app lifecycle, or test execution. It only preserves context that Harness already receives through file/suite/test runner events.

Why

For file-level bridge timeouts, Jest currently reports only that the device did not respond. If the test file contains many native operations or hangs in beforeAll, CI cannot tell which part of the file was active when the device stopped responding.

Verification

  • PATH="$HOME/.nvm/versions/node/v20.19.4/bin:$PATH" corepack pnpm vitest --config vite.config.ts run src/__tests__/execute-run.test.ts

Note: the repo-wide pre-push hook currently fails locally while processing the Nx project graph, before running this patch-specific test. The focused Jest runner test passes.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

@mrousavy is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@mrousavy mrousavy force-pushed the fix/report-active-test-timeout branch from 08617c0 to 227fa59 Compare June 2, 2026 18:43
@mrousavy mrousavy changed the title fix: Report active test on device timeout fix: Report active context on device timeout Jun 2, 2026
@mrousavy
Copy link
Copy Markdown
Author

mrousavy commented Jun 2, 2026

sorry this is an AI generated fix, no idea if this is even good stuff or if this should be closed immediately

@V3RON
Copy link
Copy Markdown
Contributor

V3RON commented Jun 3, 2026

Closing as superseded by #138. The useful suite/file context gap from this PR is now covered there via runtime-owned suite hook timeouts, pending promise diagnostics, and app restart after timeout cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants