Closing a product leaves its SSO request live on the paired host
Follow-up to #263.
Problem
ProductRuntime::dispose() (truapi-server/src/host_core.rs:1551) aborts in-flight calls instead of cancelling them. The token never fires, so withdraw_request (pairing_host/sso_channel.rs:314) never runs and no SSO Cancel is sent. The phone keeps the prompt, and approving it still allocates or signs.
Reproduction
- A pairing host stays up; a product connected to it calls
resourceAllocation.request. The phone shows the sheet.
- Kill the product process.
- The phone receives nothing; the sheet stays up.
An explicit abort() on the same setup closes the sheet within about 1 s.
Fix
- The dispatcher fires every in-flight token with
CancellationReason::Cancelled.
dispose() calls that first, then aborts after AUTHORITY_CANCEL_UNWIND_GRACE.
- Test: dispose mid-SSO-call and assert a
Cancel statement is submitted.
Related: #926, #933.
Closing a product leaves its SSO request live on the paired host
Follow-up to #263.
Problem
ProductRuntime::dispose()(truapi-server/src/host_core.rs:1551) aborts in-flight calls instead of cancelling them. The token never fires, sowithdraw_request(pairing_host/sso_channel.rs:314) never runs and no SSOCancelis sent. The phone keeps the prompt, and approving it still allocates or signs.Reproduction
resourceAllocation.request. The phone shows the sheet.An explicit
abort()on the same setup closes the sheet within about 1 s.Fix
CancellationReason::Cancelled.dispose()calls that first, then aborts afterAUTHORITY_CANCEL_UNWIND_GRACE.Cancelstatement is submitted.Related: #926, #933.