QwkSync

QWKSync.NET Error Model

Goals


Public reporting surface

The primary output of a sync is a QwkSyncResult which includes:

Progress and logging are informational only and do not affect behaviour. 

This model allows callers to:


Exceptions vs result issues

QWKSync.NET uses both. It uses exceptions for unrecoverable failures and cancellation, and it uses issues for structured reporting when a coherent result can be returned.

Where a transport extension throws, QWKSync.NET should capture and translate into issues only when doing so does not hide cancellation, concurrency conflicts, or unrecoverable I/O errors that prevent a coherent result.

Cancellation

Timeouts

TransferPolicy.Timeout exists and should be enforced deterministically per transport call, aligned to TransferPolicy.Timeout semantics in the public API doc. It should not introduce heuristic behaviour. 

Retry failures

Retry behaviour is core-orchestrated, bounded, deterministic, and configured via policy:

When retries are enabled:

Resume behaviour

Resume is transport-owned and disabled by default. QWKSync.NET never assumes resume exists. If a transport extension cannot resume, it must fall back to a full transfer or fail clearly. 

QWKSync.NET error handling does not depend on resume being available.

Atomicity and partial transfers

Atomicity is mandatory:

Any failure during download finalisation:

Concurrency violations

QWKSync.NET enforces the single-flight guarantee:

This failure should be easy for the caller to detect and handle. It does not look like a transient transport error.

Credential and diagnostics safety