fix: reduce iOS runner invalidation after status recovery#666
Conversation
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
ReviewSolid refactor. The main win is A few notes:
Otherwise LGTM pending CI. Generated by Claude Code |
thymikee
left a comment
There was a problem hiding this comment.
Reviewed current head 6d0e46c77. No blocking code findings.
Coordination note: this PR overlaps with #662 in runner-client.ts/status-recovery helper code. If #662 merges first, please rebase this branch and preserve the adaptive-uptime fields (runnerReadinessPreflightSkipped, skip reason, age/freshness) inside the new invalidation-decision diagnostics and user-facing hints. I’d prefer #662 -> #666 merge order so this PR’s explicit decision union can absorb the readiness metadata cleanly.
6d0e46c to
58ce1da
Compare
|
Summary
Reduce iOS runner session invalidation after status recovery proves a post-send command reached an observable lifecycle state.
This slice originally built on #661, which is now merged into
mainas57cd3f3a07c9e174e87aea0c441613157506902a. The branch has been rebased onto currentorigin/main, so this PR diff contains only the invalidation-reduction changes.Acceptance coverage:
notAcceptedlifecycle states retain invalidation and now surface lifecycle-aware errors.ios_runner_command_invalidation_decisionwith skip/retain reason and lifecycle state.Touched files: 2 (
src/platforms/ios/runner-client.ts,src/platforms/ios/__tests__/runner-command-retry.test.ts).Validation
After rebasing onto current
origin/main:pnpm exec vitest run src/platforms/ios/__tests__/runner-client.test.ts src/platforms/ios/__tests__/runner-session.test.ts src/platforms/ios/__tests__/runner-command-retry.test.ts src/platforms/ios/__tests__/runner-provider.test.tspassed: 4 files, 75 tests.pnpm check:quickpassed.pnpm formatpassed.pnpm buildpassed.pnpm clean:daemonpassed.Earlier simulator validation for this slice used isolated state dir
/private/tmp/agent-device-invalidation-reduction.Ecer7r, sessioncodex-invalidation-reduction, platformios, UDIDD74E0B66-57EB-4EC1-92DC-DA0A30581FE7.open settingsandsnapshot -isucceeded; runner xcodebuild PID was64659. A follow-up same-sessionpress @e24succeeded andpsstill showed PID64659, so the next command used the existing runner rather than relaunching xcodebuild. The session was closed with matching flags; stale validation runner PID64659and isolated daemon PID59686were cleaned up after close reported no sessions.Lost-response-after-completion behavior is simulated in the focused unit tests through the runner command seam because there is no production CLI hook for dropping a completed runner response.