feat(android): run local server with microinit - #11
Merged
Conversation
Replace the supervisord integration with loco-server's microinit runtime and fetch its Android artifact from GHCR. Co-authored-by: Cursor <cursoragent@cursor.com>
Match bigfred's default $DATA_DIR/var/lib/redis layout when ensuring local server directories. Co-authored-by: Cursor <cursoragent@cursor.com>
When the foreground service stops, loco-server now gets a 10s graceful window (was 3s) so its own shutdown defer can forward a SIGTERM soft-kill to microinit via the SDK. As a fallback for the case where loco-server is hard-killed before that completes, cleanupChildren also sends SIGTERM directly to the microinit PID (10s grace then SIGKILL) so its managed services (redis/alloy/ dcc-bus) still get a chance to stop instead of being orphaned. ProcessOrphanReaper gains stopGracefully(pidFile, needle, graceMs); reap() now delegates to it with the original 3s grace. Co-authored-by: Cursor <cursoragent@cursor.com>
Validate pidfile identity with starttime to avoid PID reuse kills, align graceful shutdown with the 15s microinit budget, and extend tests. Co-authored-by: Cursor <cursoragent@cursor.com>
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
Test plan
make microinit-androidfetches and identifies the ARM64 microinit binarybash -n scripts/fetch-ghcr-oras.sh./gradlew :app:testDebugUnitTest(blocked by the local Room/KSP SQLite native-library environment issue)Made with Cursor