Reduce owned Android AVD storage - #93
Merged
Merged
Conversation
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.
Description
Owned Android AVDs can consume several GB, but stim-cli currently lets the emulator persist Quick Boot snapshots and
gclists reclaimable AVDs without showing their footprint. This addresses the parts of #83 that do not require choosing an unmeasured data-partition size.Solution
Owned AVD launches now pass
-no-snapshot-saveand-no-snapshot-load, so they neither persist nor restore Quick Boot state. Restarts are deterministic cold boots using the existing cold-boot timeout.gcresolves only strictly namedstim-cli-*AVDs through Android's selected root INI and itspath/path.relcontent location. The resolver follows the installed emulator'sANDROID_AVD_HOME,ANDROID_SDK_HOME/avd, then$HOME/.android/avdorder, canonicalizes moved or symlinked content directories, and fails closed on malformed or unreadable entries. Measurable on-disk sizes appear for classified orphaned and stale owned Android rows. Each optional size probe is bounded and contained; unavailable sizes do not change cleanup decisions or block later rows.Data-partition sizing remains intentionally unresolved: there is no representative owned AVD/app measurement supporting a safe default, so this change does not guess a size or add a setting. Part of #83; the issue remains open for that measured follow-up.
Test plan
Unknown AVD name.gcsizes only classified orphaned/stale owned Android AVDs, bounds and contains each size probe, continues after failures/timeouts, omits unavailable sizes, and never includes a user-created AVD.pnpm run format:check,pnpm run lint,pnpm run build,pnpm run typecheck,pnpm run knip, andpnpm test(2,263 passing).pnpm run test:e2e(12 passing).