---
id: OV-C2-POS-009
title: "Connection returns with Auto-Sync ON: queue drains automatically"
product: mobile
module: offline-visitation
type: integration
priority: P0
risk: critical
status: draft
automationStatus: planned
sourceRefs:
  tsd: PK144
  tsdSection: C2
  tsdScenario: C2.8
  prd: PK144
  jira: null
automationRef: null
lifecycleStatus: active
lifecycleReason: "AI-generated draft from PK144 TSD C2.8 (Auto-Sync ON); pending QA review."
lastReviewedAt: null
reviewedBy: null
supersededBy: null
duplicateOf: null
blockedBy: null
preconditionRefs:
  - PRE-OV-gagal-kirim-has-items
tags:
  - mobile
  - offline-visitation
  - sync
  - perlu-dikirim
  - pk144
  - staging
---
## Objective
Verify the queue drains automatically when the connection returns and Auto-Sync is ON.

## Preconditions
- See [[PRE-OV-gagal-kirim-has-items]]
- And Auto-Sync is ON
- And the employee returns to a GOOD connection

## Steps
1. When the connection becomes GOOD and stable for ~5 minutes

## Expected Result
- Then the queue drains automatically
- And successfully synced visits move to Riwayat with Selesai
- And all local draft copies are flushed

## Source Traceability
- TSD: PK144
- Section: C2 - Visitation Flow
- Scenario: C2.8 - Fully Offline: Connection returns, sync drains queue
- Acceptance Criteria: M.14 AC5

## Evidence Required
- Screen recording of automatic drain; Riwayat entries captured.

## Notes / Gaps
- Testing Concern #17 (Medium): the ~5 min stable-connection threshold is tuning-dependent.
- Auto-Sync OFF counterpart is OV-C2-POS-010.
