Skip to content

Recover device_boot when WebKit registration is late#757

Open
shaun0927 wants to merge 1 commit into
developfrom
fix/756-device-boot-webkit-retry
Open

Recover device_boot when WebKit registration is late#757
shaun0927 wants to merge 1 commit into
developfrom
fix/756-device-boot-webkit-retry

Conversation

@shaun0927
Copy link
Copy Markdown
Owner

Summary

  • Registers a successfully booted simulator in SessionManager before WebKit target discovery, so diagnostics/native tools still see the device when Safari is late or unavailable.
  • Retries WebKit setup once by stopping the per-device proxy and creating a fresh proxy after an initial connect failure.
  • Adds unit coverage for the live-validation failure mode observed while validating Scope network interception state to MCP sessions #752.

Fixes #756.

Validation

  • npm test -- --runInBand tests/unit/device-boot-webkit-retry.test.ts
  • npm run lint -- --quiet
  • npm run build:src

Live validation context

OpenSafari live validation on iPhone 16 (3BEF4E9A-069A-4419-AC62-AB889348EF12) found device_boot returning a proxy, followed by qa_session_create -> NO_WEBKIT_CLIENT and diagnose.device=null. This PR keeps the booted device diagnosable and retries a stale/late WebKit proxy once.

Constraint: Live OpenSafari validation for #752 showed device_boot could return success while qa_session_create failed with NO_WEBKIT_CLIENT and diagnose reported device=null.\nRejected: Making WebKit mandatory for device_boot | native simulator tools should remain usable when Safari target discovery is temporarily unavailable.\nConfidence: high\nScope-risk: narrow\nDirective: Preserve best-effort boot semantics; surface WebKit unavailability through diagnostics instead of hiding a booted device.\nTested: npm test -- --runInBand tests/unit/device-boot-webkit-retry.test.ts; npm run lint -- --quiet; npm run build:src\nNot-tested: Full iOS WebKit live retry after installing this branch into the active MCP runtime.
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

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.

1 participant