You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(engine): preserve the remote off reason during teardown #1920
The device can receive session_closed with reason owner_exited after an explicit /remote off, where the end-to-end contract expects sharing_disabled. Sharing does stop, but the client loses the reason the user requested.
remote_gateway::e2e_tests::a_paired_device_drives_a_shared_session_end_to_end failed at rustcode/engine/src/remote_gateway/e2e_tests.rs:700: actual "owner_exited", expected "sharing_disabled".
The full macOS workspace suite passed on the PR branch with four test threads. The failing case passed in isolation on unchanged main (84f3d99b) on 2026-10-09. This points to intermittent behavior; a concrete root cause is not confirmed.
The test terminal's off sends OwnerMessage::Unregister { reason: SharingDisabled } and exits its task. The owner client writes that frame and returns; the gateway uses owner_exited when the connection ends without processing a close reason. An ordering issue during teardown is a hypothesis, not a verified diagnosis.
Acceptance criteria
Explicit /remote off preserves sharing_disabled through terminal → owner connection → gateway → device while clearing the session listing.
Abrupt owner loss continues to report owner_exited.
A deterministic regression covers the confirmed cause; repeated share/off cycles pass under concurrent gateway activity and on Linux CI.
Do not weaken the assertion to accept both reasons without making that an explicit protocol decision.
Activity