test(apple-runner): pin exchange session view and accounting - #3006
Conversation
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 10 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
2be6259 to
7a113cc
Compare
|
Reviewed at 7a113cc. The fatal-invalidation test at Not blocking: CI: the non-passing checks were cancelled by a newer push or are still queued. Nothing has failed yet. |
|
Addressed at a7a7301. The fatal-answer and thrown-fatal tests now hold owner invalidation behind a controlled promise and assert the exchange remains pending. I replaced the production |
|
Reviewed at a7a7301. This follows up on the earlier review at 7a113cc (#3006 (comment)); the tests and code layout look cleaner now, but the behavior-change question from that round is still open. Main skips the preflight for exempt commands in every session state (runner-session.ts:1353 on main). This delta adds a startup uptime preflight, bounded by min(startupTimeout, command deadline), before a first Not blocking, and can be taken or left: the mirror-present runnerMainThreadBusy stamp block is now duplicated at runner-exchange.ts:161-164 and :331-334 and could go through one mirrorRunnerMainThreadBusy(session, data) helper or a single post-parse step; the thrown-fatal test at runner-exchange.test.ts:186 ends on a bare I didn't run the new tests or the await-removal mutation myself; the regression read comes from reading the code. I also didn't check whether main's cold xctest-backend Both Smoke Tests jobs are still queued or in progress and neither has failed yet. The iOS smoke job goes through executeRunnerExchange and the readiness preflight, which is exactly the code this delta touches, so a later failure there would not be clear of this diff. Next step: run a live cold-runner first |
a7a7301 to
57678db
Compare
57678db to
7b2b1c5
Compare
|
Reviewed at 7b2b1c5. The evidence gap from the earlier review (57678db) is still open.
CI is still waiting on one Smoke Tests run; the cancelled jobs are from before the restack. Smoke Tests uses simulators only, so a green run does not cover the physical-device path above. |
|
Addressed at I cannot claim the requested live physical XCTest run. The connected iPhone is CoreDevice ( |
|
Summary
Closes #2967. Final layer, based on #3012: narrow the exchange input to a named session view and pin command settlement plus awaited fatal invalidation with the real HTTP fake. The session owner keeps registration, leases, disposal, and fatal invalidation;
runner-session.tsis 956 lines (1,533 before the stack). This 3-file layer has production +41/−15 (net +26), tests +186, and 242 rename-aware gross diff lines.At
5894447ee, restore the original readiness-preflight exemption foractivate,terminate, andtargetReseteven while the session isstarting. The preceding version added a startup wait on physical XCTest open/close that #2967 did not authorize. A real HTTP fake now asserts each exempt command is sent once without anuptimeprobe. Earlier busy-stamp and fatal-invalidation review fixes remain.Validation
pnpm format, focused exchange/readiness/retry tests (60/60), and exact-headpnpm check:affected --runat5894447eepassed (format, lint, typecheck, layering, fallow, build, 380 related files / 2,580 tests). The fatal-answer and thrown-fatal tests previously failed when their production await was removed. Current-head CI is pending.A live cold
open --debugon a physical XCTest backend remains unverified: the connected iPhone is CoreDevice (devicectlsees it;xctracelists it offline), and the available AWS Device Farm iOS path is WebDriver. The new behavior on exempt commands now matchesmain; the previous head's simulatorprepare ios-runnerpassed but did not exercise physical XCTest open.