b0af119963
Fixes #85834 (Electron REST intercept fall-through). The /api/sessions/{id}[/messages] intercept in electron/main.ts required an explicit ?profile= (or request.profile) to route a read to its remote owner; callers without a hint fell straight through to the LOCAL backend and 404'd on its state.db even though the session lives on a configured remote — while the list endpoints happily showed the row (remoteSessionList tags s.profile). When no explicit profile resolves, consult the same remote session lists the list endpoints use to find the owning profile (matching id or lineage root id), memoized for 30s so a transcript+messages burst costs one sweep. Only when the id is genuinely unknown remotely does the request fall through to local, exactly as before. Pure lookup lives in profile-session-routing.ts with unit tests (owner hit, lineage-root match, null on miss/dead remotes/no remotes). Maintainer commit (cluster salvage).