test(apple-runner): pin the close release truth table at the lifecycle seam - #2623
Merged
thymikee merged 1 commit intoSep 15, 2026
Conversation
Size Report
Startup median (7 runs, lower is better):
|
Member
Author
thymikee
added this pull request to stack #2628
September 15, 2026 09:45
thymikee
force-pushed
the
apex/2615-close-release-truth-table
branch
from
September 15, 2026 11:11
455f9ec to
0217d96
Compare
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Follow-up to #2605 for #2615. The seam the issue asks for already landed in this stack at
029c9e97:finalizeApplicationCloseissues one awaitedreleaseRunnerOnClose(deviceId, { retain }),runner-session.tsdecides with its ownrunnerMainThreadBusy, and the busy-only operation plus its forwarding exports are gone. The issue still owed the proof, so this PR adds it: one test file, plus four daemon mock entries for the removedscheduleIosRunnerIdleStopexport.runner-close-finalization.test.tsdrives the realfinalizeApplicationCloseover the real runner module, composed as the root's lazy tools compose it, one case per truth-table row: idle-retain warm reuse (no relaunch), busy-retain disposal plus a fresh boot on reopen, non-retain stop with idle-stop cancellation, owned-lease release with no runner in memory, retain-with-no-runner starting and claiming nothing, daemon-shutdown deferral, disposal rejection before alert dismissal, and a drain that lands after close is issued (runner exit held open; no microtask counting). Occupancy is produced by a realRUNNER_BUSYrefusal and cleared by a real stamped reply, never by a mocked method call.Validation
Tested
455f9ec5c3.pnpm check:affected --rungreen: format, lint, typecheck, layering, di-seams, fallow, build, package, integration-node (95), macos-coverage (6), andvitest related(2920 tests, 421 files). Its first pass timed out 8 unrelated daemon-spawning cases at host load 60+ with sibling worktrees' gates running; re-run alone passed.Mutation probes kill the exact case: busy check removed (3), release no longer awaited (6), lease cleanup removed, idle cancel removed. Temporary
ready-based reuse condition: 2 files touched, no contract method, adapter or replay-fixture edit; removed.No live run: no production line changed. The wedge scenario and device lanes belong to #2605.