{
  "schema": "xlink.app.internal_test_client_session_cache.v1",
  "production_go": false,
  "phase": "internal_team_sandbox_p209",
  "report_date": "2026-07-06",
  "owner": "XLink Ops",
  "public_note": "P209 adds a client-side session/cache boundary so restarted phones, network changes, and account switches cannot reuse stale identity, avatar, conversation, or unread state as the visible source of truth.",
  "scope": [
    "confirmed identity changes clear React Query cache",
    "foreground resume refreshes contacts, direct conversations, group conversations, and current profile",
    "native auth still requires a session token before cached user info can render",
    "conversation delete clears per-user local outbox and message snapshots",
    "chat details local snapshots are scoped by current user and target conversation"
  ],
  "proof_signals": [
    "AuthRouteGate derives currentOpenId from canonicalSocialOpenId(user)",
    "queryClient.clear runs when confirmed identity changes",
    "AppState active refresh invalidates social and XMQ conversation queries",
    "login confirms server identity before saving local user info",
    "P208 restart process smoke remains Go on both device families",
    "production_go=false"
  ],
  "manual_observations_required": [
    {
      "case_id": "post_restart_identity_cache_consistency",
      "title": "重启/切网后身份和消息列表确认",
      "status": "Needs user visual confirmation",
      "required_checks": [
        "current account remains correct after kill/reopen",
        "no stale or wrong account state appears",
        "message list rows match bottom unread badge",
        "self avatar and peer avatar refresh to current profile",
        "deleted conversation does not replay old messages"
      ]
    }
  ],
  "go_hold_summary": {
    "client_identity_cache_boundary": "Go",
    "foreground_social_refresh": "Go",
    "native_session_token_gate": "Go",
    "post_restart_visual_identity": "Hold until user confirms",
    "next_build_decision": "Hold",
    "hold_reasons": [
      "post-restart visual identity still needs real-device observation",
      "managed SQL remains Hold until staging database is ready",
      "Production Go remains Hold"
    ]
  },
  "release_gates": {
    "client_identity_cache_boundary": "Go",
    "foreground_social_refresh": "Go",
    "native_session_token_gate": "Go",
    "post_restart_visual_identity": "Hold",
    "managed_sql": "Hold",
    "productionGo": false,
    "paynex_mutation": "Hold",
    "wallet_signing": "Hold",
    "mainnet_write": "Hold",
    "auto_cashflow": "Hold"
  }
}
