Repository navigation
fix(android): preserve quiet Gateway turns and recover completion - #694
Open
Codename-11 wants to merge 5 commits into
Open
Codename-11 wants to merge 5 commits into
Codename-11 wants to merge 5 commits into
Conversation
Extend the preserved PR #675 commits with read-only quiet probes, exact unsolicited settlement, passive reconnect and shutdown, native ask replay, and missing-final history reconciliation. Cover owner and observer paths through real Gateway transport and rendered fixture tests. Update current-upstream conformance for extracted helpers and additive requests. Adapt cancellation-only diagnostics from PR #668. Supersede PR #662's eventual interrupt lease; quiet tools use server-owned liveness instead. Co-authored-by: ophirhan <ophirhan@users.noreply.github.com>
Contributor
|
Noting handoff from my open #668 ( I agree with the lineage note here: the cancellation-only interrupt diagnostics were the durable piece; the local idle-timeout failure is correctly superseded by this PR’s quiet I’ve closed #668 as superseded by this consolidation (thanks for preserving co-authorship on the adapted commit). No further action needed from me on that branch unless something from #668’s Diagnostics Stop entry ( |
This branch has not been deployed
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
Android treated a quiet Gateway turn as failed and sent
session.interrupt, including when another client submitted the turn. Quiet tools, provider waits, and compaction now keep their stream alive. Authoritative Gateway state recovers a missing completion frame and its saved answer without sending Stop.Addresses #676 and preserves the passive-observation guarantees discussed in #365.
Changes
session.active_listchecks during quiet periods. Fence settlement by turn, runtime/durable session, profile, socket, and progress generation.Verification
Candidate:
b8b742b785410f04f16e907691b823d845c0d33d, incorporatingdevat95b74c91e5503fdb607ab793d74c2d99fef96eccthrough a merge commit.749b6c02ddc99f396964dd4603ea5ef5ad9c7775: both owner and unsolicited regressions failed withGateway turn timed outthrough real MockWebServer WebSockets.23248ea75f5aa275386f479a792085dcb685bc45: both new recovery tests failed because authoritative completion was ignored after a lost start frame.0e0e26e0d2b8899c0cfedec33a5905ffac03b34b,scripts/android-lane.ps1 gradle :app:testSideloadDebugUnitTest --tests "*GatewayChatClientTest" --tests "*GatewayEventMapperTest" --tests "*ChatViewModelGatewayInboundTurnTest" --tests "*ChatViewModelRealtimeTurnTest" :app:testGooglePlayDebugUnitTest --tests "*GatewayChatClientTest" --console=plain: 439 sideload tests and 206 Google Play tests passed, with no failures, errors, or skips. The subsequent base merge does not change the Gateway client, chat ViewModel, or these test sources.:app:standardPhoneApi36SideloadDebugAndroidTestwithandroid.testInstrumentationRunnerArguments.class=com.hermesandroid.relay.viewmodel.GatewayExternalFixtureInstrumentedTest#quietTurns_surviveToolAndProviderSilenceAndRecoverUnsolicitedHistoryandgatewayFixtureBaseUrl=http://10.0.2.2:8767: 1 passed. The quiet fixture recorded one submit, zero activations, and zero interrupts, and displayed the full saved answer after the missing final frame.android.testInstrumentationRunnerArguments.class=com.hermesandroid.relay.viewmodel.GatewayForegroundRecoveryInstrumentedTest: 9 passed on0e0e26e0d, then 9 passed again on the exact refreshed candidateb8b742b78, with no failures, errors, or skips. This includes lost-start recovery. The quiet-fixture result above is from the earlier pre-follow-up app source. All emulator runs used the serialized Android lane; they are not physical-device certification.test-fixtures/vanilla-gateway,python -m unittest discover -s tests -v: 38 passed.python -m unittest discover -s scripts/tests -p check_gateway_scenario_conformance_test.py: 14 passed.python scripts/check-gateway-scenario-conformance.py <clean-upstream> --scenario-manifest <scenario.json>: 7 manifests passed at vanilla upstream08165d58931841cee713468ae89032af7c57060a:quiet_turn_recovery,terminal_gap_activate,terminal_gap_session_info,terminal_gap_active_list,cross_client_observation,clarify_batch, andqueued_stop_resume. These are source-conformance checks, not a live provider run.b8b742b785410f04f16e907691b823d845c0d33d: Android tests, build, lint, vanilla-upstream route contract, and the required-checks gate. Unaffected surfaces and release-only jobs were skipped by the path-aware workflow.Screenshots
No layout change. Rendered stream and transcript behavior passed on the Standard Phone API 36 emulator.
Compatibility / risk
Client-only, with no new host routes or migrations. Unknown, absent, unsupported, or failed active-state reads remain unknown; they cannot invent completion. A host that provides no terminal or authoritative state still requires transport recovery or explicit Stop. Rollback is a revert.
Native request replay uses the existing read-only
session.events.sincesurface. No interrupt-reason fields are added to the wire. The source checker still requires every existing request contract while allowing additional methods that Android can decline with JSON-RPC method-not-found.Lineage / contributor credit
Checklist
devCHANGELOG.mdupdated