Repository navigation
fix(android): wake gateway on cold foreground - #571
Merged
Merged
Conversation
This was referenced Sep 10, 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
Refs #495 and #528.
Authenticated Gateway-only connections could remain on
waking gatewayduring the first foreground launch because Chat requiredchatReadybefore admitting the visible owner that opens/api/ws;chatReadyitself requires the resultinggateway.ready. Admit the foreground Gateway owner while availability is still unresolved, and make client binding order-independent so the read-only observation socket opens whether visibility or the client arrives first.Changes
GatewayAvailability.Unknown; confirmed sign-in and unsupported-protocol failures remain terminal.session.resume,session.activate,prompt.submit, orsession.interrupt.Verification
Exact PR head:
44bbb16cd30bd0bf189f7f20b0f84f1061e128eb. The locally tested Android, fixture, and conformance source tree is identical to fix commit273e3f5affe3a5a6274d2b340f55f84d7fbcc049; the merge commits only incorporate currentdevplugin/docs and Dashboard Basic Auth work plus all Unreleased changelog entries. The focused Sideload JVM slice was rerun after the finaldevmerge and passed.scripts/android-lane.ps1 gradle :app:testSideloadDebugUnitTest --tests 'com.hermesandroid.relay.ui.RelayAppStatusTest' --tests 'com.hermesandroid.relay.viewmodel.ChatViewModelGatewayInboundTurnTest' --console=plain— 154 tests passed; zero failures/errors/skips.scripts/android-lane.ps1 gradle :app:testGooglePlayDebugUnitTest --tests 'com.hermesandroid.relay.ui.RelayAppStatusTest' --tests 'com.hermesandroid.relay.viewmodel.ChatViewModelGatewayInboundTurnTest' --console=plain— 154 tests passed; zero failures/errors/skips.scripts/android-lane.ps1 gradle :app:compileSideloadDebugAndroidTestKotlin --console=plain— passed.scripts/android-lane.ps1 gradle :app:standardPhoneApi36SideloadDebugAndroidTest '-Pandroid.testInstrumentationRunnerArguments.class=com.hermesandroid.relay.viewmodel.GatewayForegroundRecoveryInstrumentedTest#authenticatedUnknownColdLaunch_opensObservationSocketWithoutLifecycleBounce' --console=plain— one API 36 managed-device test passed; Sideload debug app and test APKs assembled.python -m unittest discover -s test-fixtures/vanilla-gateway/tests -p 'test_*.py'— 28 tests passed.python -m unittest scripts.tests.check_gateway_scenario_conformance_test— 8 tests passed.python scripts/check-gateway-scenario-conformance.py <clean-current-upstream> --scenario-manifest test-fixtures/vanilla-gateway/vanilla_gateway/scenarios/cold_start_observation.json— passed against cleanNousResearch/hermes-agentcommit145c713f1691b44bc485ce0ce4818cdb0e9c396b; no Gateway runtime or provider calls were started.python scripts/check-android-locales.py— 12 catalogs passed.python scripts/check-user-docs-locales.py— five locales and five core pages passed.python scripts/check-android-collection-apis.py— passed.python scripts/check-android-release-notes.py— passed.python scripts/check-version-tracks.py— passed.git diff --check— passed.The broader no-manifest conformance diagnostic still reports pre-existing checker drift in five unrelated upstream contracts; the selected
gateway.session_active_listcontract used by this change passes. Required PR CI owns full Android lint, the focused CI shard, both-flavor debug assembly, native compatibility, and the remaining path-aware checks on this exact head.Screenshots
No visual change. The API 36 managed-device test exercises the lifecycle/Compose admission path without changing layout.
Compatibility / risk
Standard Hermes remains on the upstream Dashboard/Gateway path and requires no Hermes-Relay Plugin or server change. Cold foreground work opens only the shared observation socket; passive startup still cannot attach, resume, submit to, activate, or interrupt a session. Existing reconnect cooldowns, bounded retry episodes, route generations, and terminal auth/unsupported dispositions remain intact.
Physical Android 16 cold-start certification over LAN and Tailscale remains a release gate; no phone install or physical-device claim is included in this PR.
Open #559 touches nearby Chat/Gateway files but is held separately and is not required for this fix. This branch starts from
origin/devafter #566 and includes merged #567.Lineage / contributor credit
Checklist
dev, unless this is adev→mainrelease PR or a focused production-tag hotfix PR tomainCHANGELOG.mdis updated for user-visible changes