Repository navigation
feat(android): opt-in bounded guest readiness before launch or install - #107
Merged
Merged
Conversation
3 tasks done
Wait until guest lowmemorykiller is quiet before android install-apk or launch-app when --wait-ready / waitReadySeconds is set. Default off. Fail with guest-not-ready without starting the action; do not retry.
Replace the 2000-line logcat tail with lowmemorykiller tag filtering. Honour MCP cancellation, return typed unreadable/aborted diagnostics, clamp each probe to the remaining wall-clock bound, treat 0 as no-wait on MCP, and validate --wait-ready before session lookup.
ElbertePlinio
force-pushed
the
fix/105-android-guest-readiness
branch
from
September 5, 2026 07:09
938dd72 to
8ec5cb9
Compare
This was referenced Sep 5, 2026
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
Opt-in bounded guest readiness for
android install-apk/android launch-appand the matching MCP tools. Default off. Uses lowmemorykiller quiet as the signal from #101, reports each probe as progress, and fails withguest-not-readywithout starting the action if the bound is hit. Pickforge still does not retry a launch the guest drops.Rebased onto
main3adf3a9(#108). Review fixes fromreview-pr107.mdare in8ec5cb9.What this does
--wait-ready <seconds>on the CLI;waitReadySecondson MCPandroid_install_apkandandroid_launch_app.0or omitted is no wait on both.lowmemorykiller: Killline for 30 s (logcat -d -v epoch -s lowmemorykiller:Iagainst the guest clock).lmkQuietSisnullwhen the buffer has no kill.guest-not-ready("guest clock or logcat unreadable"), not "still killing".aborted); install/launch never starts after a cancel.--wait-readyis validated before session lookup.What this does not do
Provisioning
pickforge-avdwith more RAM and a settled first snapshot is #106. It is not deterministic without a measured 3–4 GB trial, and it would not be non-destructive to existing AVDs.picklab-avdis untouched. Disabling Play Protect stays an operator choice.#105 body now strikes item 2 (pointer to #106) and checklists 1 and 3 as what this PR closes. Default callers still have no wait; the kill itself is not gone.
Tests
waitForGuestReady.picklab-avd(not the real AVD). Script:~/Projects/Boards/pickforge/0.4-release/android-readiness/run-isolated-pass.sh.First evidence run (failed, preserved)
~/Projects/Boards/pickforge/0.4-release/android-readiness/first-run-failed/. Inject used parentheses, so logcat had no kill;--wait-ready 1launched;--wait-ready 90returned in 65/86 ms withlmkQuietS: null;session destroy --project-dirfailed; isolated adb 5147 was left running; checksums predated the manual repair. Diagnosis:first-run-failed/DIAGNOSIS.md.Scripted rerun
Clone
/var/tmp/pf-android-lab/ready-QbX4e7, sessionandr-de2ae788. Inject verified with the product tag filter. Negative--wait-ready 1failed closed withguest-not-readyand did not start the action. Positive--wait-ready 90install waited 28156 ms (lmkQuietS: 31). Launch pid 11553, counter 0 → 1 → 2, independent vision PASS. Destroy viasession destroy <id> --json(no--project-dir). Isolated adb 5147 closed. Real~/.androidhashes identical. Report:~/Projects/Boards/pickforge/0.4-release/android-readiness/.Gates
bun run typecheck,bun run lint,complexity-gate checkon touched files,bun run test(112 files, 1420 passed, 4 skipped),bun run test:coverage(84.98 / 86.81 / 91.18 / 84.98, thresholds unchanged),bun run build.Closes #105
Refs #93
Refs #101
Refs #106