A reconnected inbox does not establish that records from the disconnected interval have been recovered. Use the supported history or resume mechanism and distinguish confirmed records from an unresolved gap.
Establish the last confirmed position
Identify when the connection broke, the last record actually confirmed and whether events contain full records or just update hints. A browser’s last-refresh display may not be a reliable server-side recovery position. Use the identifiers and scope defined by the product rather than inventing a cursor from a convenient timestamp.
Implementations offer different guarantees. Socket.IO documents default event delivery separately from connection-state recovery and explains that recovery cannot always succeed. That is a reason to define an explicit recovery path, not evidence that a particular SMS inbox uses Socket.IO or automatically replays its history.

Reconcile against authorised records
Where supported, query history for the current account and receiving resource. Compare stable record identities with those already displayed. Recovery events and a history response can overlap, so their arrival should not create two business tasks for the same underlying message.
An event identifier and a message identifier may represent different objects. Follow the documented association when reconciling them. Do not delete one record merely because its wording resembles another, and do not use the transient connection identifier as an assumed permanent message identity.
| Recovery outcome | Required next step |
|---|---|
| Documented recovery succeeded | Confirm its stated coverage |
| Recovery failed, history available | Query and reconcile the missing interval |
| History coverage insufficient | Mark the unresolved scope for support |
| Account access changed | Re-establish current authorisation |
Backfilled history should retain its original event context. Displaying an old record again should not automatically trigger a fresh customer reply or restart an expired authentication task. Define which operations are display reconciliation and which are genuine new business actions, then check both paths during acceptance.
Use recovery fixtures, not repeated authentication requests
A user can reopen the normal inbox and inspect the relevant interval without repeatedly asking a website for new verification codes. If the interface does not say whether backfill completed, retain that uncertainty. A newly arriving message shows current activity, not completeness of the earlier history.

For development acceptance, use harmless records distinguishable as before, during and after a controlled disconnection. Compare the final record set and the number of business actions. Include an expired recovery window, a failed history query and a permission change. The interface should show what remains unconfirmed instead of quietly returning to a healthy-looking status.
Late records need their own reconciliation rule too. A record becoming available after the first recovery query should not vanish from consideration merely because its business time falls inside the earlier gap. Define a supported follow-up check and a stable identity rule rather than promising completeness from one connection event.
Retain the bounded outcome in the support record: resource, interval, last confirmed position and failed stage. There is usually no need to share actual codes or a full private message history to explain which part of recovery did not complete.
References: Socket.IO: delivery guarantees; Socket.IO: connection-state recovery and its limits.
