Repository navigation
fix(android): avoid duplicate Gateway history and pause OOM restore - #720
Merged
Merged
Conversation
Codename-11
marked this pull request as ready for review
October 15, 2026 19:46
# Conflicts: # CHANGELOG.md
This was referenced Oct 19, 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
Sending into or recovering a stored conversation requested a second display transcript over Gateway before the prompt could be submitted, even though Android reads visible history over HTTP. Request upstream history omission on those binding paths and pause automatic conversation reopening after a recorded out-of-memory crash so users can choose a conversation without racing another restart. Refs #700.
The exact Play 1.18.1 mapping identifies the Gateway JSON decoder. The reporter's frame and total heap state are unavailable, so this addresses a verified allocation gap and recovery problem without claiming the exact reported crash is reproduced.
Changes
omit_messagesfor cold send, checkpoint resume/activation and mid-turn activation. Keep live output, queued work and open requests; preserve child-watch history and existing HTTP history behavior.Verification
scripts/android-lane.ps1 gradle :app:testSideloadDebugUnitTest --tests '*GatewayChatClientTest' --tests '*GatewayPayloadMemoryTest' --tests '*ChatMemoryRecoveryTest' --tests '*ReliabilityReportTest'passed 221 tests. This includes 209 Gateway tests, one isolated heap test, seven reliability tests and four recovery-state tests.python -W error::ResourceWarning -m unittest discover -s test-fixtures/vanilla-gateway/tests -q: 39 passed.python -m unittest discover -s scripts/tests -p check_gateway_scenario_conformance_test.py -q: 16 passed.python -m unittest scripts.tests.android_prepush_test -q: four passed.initial_history_bindresume/activation source conformance passed against clean upstreamf9bdaa303e1614245cf1104db52ed0efd90b6f13. This is source conformance, not live upstream execution.2a02abce9cf42ff11da8ac9237da2cb73fcb27c1: required CI passed, including lint, build, Android tests and the upstream route contract. The expanded sideload and Google Play shards also passed.scripts/android-lane.ps1 gradle :app:testGooglePlayDebugUnitTest --tests '*GatewayChatClientTest' --tests '*GatewayPayloadMemoryTest' --tests '*ChatMemoryRecoveryTest' --tests '*ReliabilityReportTest' --tests '*NativeDashboardAuthTest'passed 255 tests locally.FOCUSED_TESTSfilter fromscripts/android-prepush.pyalso passed locally on the final head: 883 tests across 63 classes, zero failures/errors/skips.scripts/android-lane.ps1 gradle :app:standardPhoneApi36SideloadDebugAndroidTest --rerun -Pandroid.testInstrumentationRunnerArguments.class=com.hermesandroid.relay.viewmodel.ChatMemoryRecoveryInstrumentedTest: one passed, zero failures/skips on the final head. Verified report dismissal, lifecycle return and explicit history loading. A prior emulator startup failure was not counted as a test pass. No physical-device test or installation was performed.08ba9077candidate. That run's broad Play step hit its 20-minute limit; the successful final-head run above supersedes it.Screenshots
Standard Phone API 36 (Pixel 6 profile, x86_64), default dark app theme. Production recovery dialog in the instrumentation harness; text and controls are readable without clipping.
Compatibility / risk
The omission parameter is supported by current vanilla upstream. Older Gateways may ignore it and still return large payloads. This does not cap or delete HTTP history, and PR #709's compacted-history expansion is not included. In-flight output and arbitrary incoming frames can still be large. Startup recovery requires a readable local crash report and does not certify the reporter's Pixel 8 Pro / Android 17 behavior. #465 and #531 remain separate reports. No versions, dependencies, credentials or server state change.
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, or N/A is listed above