You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stream bounded replay-suite progress for agent-device test --maestro: suite start, per-file start/pass/fail/skip, attempts/retries, session names, and artifact paths now appear while the suite is still running. Ctrl-C/client disconnect now cancels parent replay work and best-effort aborts active iOS runner sessions so simulator-driving work does not continue detached.
Also fixes two iOS Maestro runtime issues found while validating the React Navigation suite: custom-scheme simulator deep links no longer pre-launch stale app state before simctl openurl, and horizontal percentage swipes avoid the iOS interactive-back edge. Scope: 17 files. Closes#794.
Validation
Focused tests passed: progress/client/session-test/cancellation/Maestro runtime/iOS open tests, 9 files and 230 tests. pnpm format, pnpm check:quick, pnpm build, and node --test test/integration/smoke-*.test.ts passed.
Live iOS simulator validation on iPhone 17 Pro C25DBB5B-9254-4293-A8D5-2785C78DE03A: full React Navigation Maestro suite passed 38 passed, 0 failed in 532.0s with streaming progress and artifact/session paths. Ctrl-C verification exited immediately with code 130, and a follow-up one-file Maestro run on the same simulator passed in 14.9s, showing no active simulator-driving work was left blocking the device.
Local pnpm check:unit wrapper could not run because pnpm 11.1.2 signature verification/fetch is blocked in this environment; the direct underlying unit command also has sandbox/environment failures unrelated to this change (localhost listen EPERM, Swift typecheck, Android helper/upload/materialization suites).
CI update: all checks passed except Fallow Code Quality. Please address before merge readiness.\n\nFallow findings:\n- src/daemon/handlers/session-test.ts: runReplayTestSuite at line 31 is now 94 LOC, cyclomatic 24, cognitive 9.\n- src/cli-test-progress.ts: formatReplayTestCaseProgressEvent at line 23 is cyclomatic 10, cognitive 13, CRAP 31.6.\n\nKeep the live iOS/Android validation evidence in the PR. Fix should be targeted: extract focused helpers where it improves locality, keep progress output bounded/agent-friendly, preserve JSON behavior, and rerun pnpm check:fallow --base origin/main plus the focused tests already used. Also make sure the cancellation path remains covered and does not regress the Ctrl-C live behavior.
Fallow findings fixed by splitting runReplayTestSuite setup into focused helpers and reducing formatReplayTestCaseProgressEvent branching.
HTTP disconnect cancellation now arms only after auth succeeds.
The iOS runner abort loop now follows request cancellation state, not res.writableFinished, so streaming disconnects stop aborting as soon as handler cleanup clears the request.
Disconnect-triggered iOS runner abort is scoped to explicit iOS requests or replay/test requests, so Android-only RPC disconnects do not trigger global iOS abort.
Unknown future progress event types are ignored again instead of failing older clients.
Replay test retry loop now stops when the parent request is canceled.
Removed the no-op announceReplayTestRun path and renamed the misleading HTTP NDJSON progress test.
Regression timing/root cause:
The streaming-progress silence/cancel behavior regressed when replay suites moved to long-running daemon-side Maestro execution without per-test progress and without complete parent-request cancellation propagation. This PR fixes that path.
The Android helper slowdown observed while validating was separate: persistent Android snapshot-helper sessions were introduced in d087a62d1 / PR fix: improve Maestro Android reliability and snapshot speed #612 on 2026-05-29 with a session socket budget of timeoutMs + 2s. Busy RN accessibility captures could exceed that, causing a premature session timeout and slow one-shot fallback. That is handled separately in PR fix: relax Android snapshot helper session timeout #796.
Validation:
pnpm exec vitest run src/__tests__/cli-test-progress.test.ts src/daemon/handlers/__tests__/session-test-suite.test.ts src/utils/__tests__/daemon-client.test.ts passed: 43 tests.
pnpm exec vitest run test/integration/provider-scenarios/daemon-http-server.test.ts passed: 7 tests.
Note: direct ./node_modules/.bin/vitest run --project unit is not a clean signal in this sandbox; unrelated tests fail on loopback bind EPERM / Swift typecheck / daemon entrypoint environment. The impacted focused tests above pass.
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
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.
Summary
Stream bounded replay-suite progress for
agent-device test --maestro: suite start, per-file start/pass/fail/skip, attempts/retries, session names, and artifact paths now appear while the suite is still running. Ctrl-C/client disconnect now cancels parent replay work and best-effort aborts active iOS runner sessions so simulator-driving work does not continue detached.Also fixes two iOS Maestro runtime issues found while validating the React Navigation suite: custom-scheme simulator deep links no longer pre-launch stale app state before
simctl openurl, and horizontal percentage swipes avoid the iOS interactive-back edge. Scope: 17 files. Closes #794.Validation
Focused tests passed: progress/client/session-test/cancellation/Maestro runtime/iOS open tests, 9 files and 230 tests.
pnpm format,pnpm check:quick,pnpm build, andnode --test test/integration/smoke-*.test.tspassed.Live iOS simulator validation on iPhone 17 Pro
C25DBB5B-9254-4293-A8D5-2785C78DE03A: full React Navigation Maestro suite passed38 passed, 0 failed in 532.0swith streaming progress and artifact/session paths. Ctrl-C verification exited immediately with code 130, and a follow-up one-file Maestro run on the same simulator passed in 14.9s, showing no active simulator-driving work was left blocking the device.Local
pnpm check:unitwrapper could not run because pnpm 11.1.2 signature verification/fetch is blocked in this environment; the direct underlying unit command also has sandbox/environment failures unrelated to this change (localhost listen EPERM, Swift typecheck, Android helper/upload/materialization suites).