feat: on --no-reboot slims the current boot session without a reboot - #42
Merged
Conversation
Add a `--this-boot` flag to `simslim on` that stops the profile's daemons in the running boot session: each label is `launchctl disable`d and then `launchctl bootout`ed, so the job leaves the launchd domain now and the disable override keeps it from being bootstrapped again. No shutdown/boot cycle. This is the only slimming possible on runtimes that cannot persist launchd overrides (iOS 17.x, 18.3; see #34), and a faster no-reboot path on the ones that can. The persistent-path rejection now points at the flag. - Every profiled managed label is booted out on every run, not just the ones lacking an override, so a run that wrote the override but failed to boot the job out is repaired by re-running. A bootout of an already-missing job (exit 3) counts as done. - Live slimming only moves toward more-disabled; `off` keeps its reboot flow. `--preserve-boot-state` is rejected with `--this-boot`. - `status` warns when a runtime cannot persist the state, and `status --json` gains an additive `persistent` field. Validated on disposable simulators with the full 170-label profile: iOS 18.3 (3.92 GB -> 1.46 GB, 254 -> 101 processes) and iOS 26.5 (2.43 GB -> 1.0 GB, 182 -> 78 processes). SpringBoard, Settings and Safari stayed responsive; booted-out daemons stayed gone; on 26.5 the state also survived a reboot. Closes #38
The flag names what it skips rather than a scope. Library entry point and test follow: EnableSlimNoReboot, slim_no_reboot_test.go.
enumcase
added a commit
to enumcase/simslim
that referenced
this pull request
Sep 8, 2026
xcodebuild parallel testing creates a stock clone per worker in its own device set and deletes them per run; disable overrides do not survive simctl clone, so there is no device to pre-slim. watch polls the device sets and applies a no-reboot slim to each simulator once it boots, then leaves it alone, reusing EnableSlimNoReboot from MobAI-App#42. Answers the ephemeral-clone case raised in MobAI-App#41.
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
Implements #38:
simslim on <udid> --no-reboot [--profile | --except | --keep]slims a simulator for the current boot session without a reboot. For each label it runslaunchctl disable system/<label>thenlaunchctl bootout system/<label>, so the daemon stops now and cannot respawn (disablealone only blocks the next bootstrap; a killed job would just be restarted).statuswarns when the runtime cannot persist the state, andstatus --jsongains an additivepersistentfield (extra key, so the GUI decoder is unaffected).Design decisions from the issue
off: live slimming only moves toward more-disabled. Managed labels disabled beyond the profile are reported and left alone;offkeeps its reboot flow.--no-rebootis rejected together with--preserve-boot-statesince a shutdown would discard the result.persistentonStatus, plus a text warning.Robustness
Every profiled managed label is booted out on every run, not only those lacking an override. An override says nothing about whether the job is still loaded, so an earlier run that disabled a label and then failed to boot it out is repaired by re-running. Bootout of an already-missing job exits 3 (
No such process) and counts as done; a re-run on an already-slim simulator takes about half the time of the first run.Validation on real simulators (disposable, deleted afterwards)
--no-reboot(full profile)On both: SpringBoard stayed running, Settings and Safari launched,
simctlstayed responsive,statusreported 170/170 andverifypassed, booted-out daemons were still absent from the launchd domain after 60 s and a UI screenshot showed the live Settings screen. On 18.3simslim offrestored stock through its reboot flow. On 26.5 the simulator came up 170/170 slim after a reboot, and a second--no-rebootrun reported already slim and stayed responsive.Tests
xcruntest: iOS 18.3 device, every profiled label getsdisable+bootout(including one whose override already existed), bootout exit 3 is accepted, and no shutdown or second boot happens.--no-reboot+--preserve-boot-state.make checkgreen.Reviewed with Codex (gpt-6-astra, high reasoning): the first pass found the retry gap above, which is fixed; the second pass reported no findings.
Closes #38