5e8d2f8e58
Introduce `reconcile_with_server_snapshot` to the `CaseStore`. This function removes local markers that are synced to the server and within the server's reported window but are no longer present in the server's snapshot. This ensures that cases deleted server-side are also removed locally, fixing an issue where deleted cases would still appear on the client. This change also modifies the `poll_once` function in `server_sync` to call both `merge_server_snapshot` and the new `reconcile_with_server_snapshot` after a successful poll. Additionally, a test case `poll_once_reconciles_missing_synced_marker` has been added to verify the correct behavior of the reconciliation process. The server-side upload handler is updated to automatically reopen soft-deleted cases if a new upload is received for them. This ensures that soft-deleted cases reappear in the API and UI without manual intervention. Two new tests, `upload_reopens_soft_deleted_case` and `upload_resurrects_hard_deleted_case`, are added to cover the soft-delete reopening and hard-delete resurrection scenarios, respectively.