Files
aiturk-mobil/app/src/main/java/com
M57andM57 c50a178845 fix(chat): skip live-registry context RPCs until resume confirms runtime session id (#768)
Opening a session from history fired session.context_breakdown/session.usage
with the storage session id before session.resume had registered it on the
gateway. Those RPCs resolve against the LIVE runtime registry (_sess_nowait)
and returned 4001 "session not found", which the reducer surfaced as a
spurious snackbar even though the session loaded fine.

- fetchContextUsage() now skips the two live-registry RPCs while
  runtimeSessionId is null (pre-resume window); the REST-based context
  fallbacks stay live.
- runtimeSessionId is cleared on socket drop so a stale runtime id can't be
  reused after a gateway restart/reconnect (same 4001 family).
- regression test: no context/usage RPC fires with the storage id during the
  pre-resume window; after the resume result the RPCs fire with the runtime id.

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
2026-08-02 00:45:16 +03:00
..