go-oversync

Client

oversqlite is the SQLite client SDK for the current bundle-based contract.

NewClient(...) installs the runtime and metadata tables, but it does not attach a user. The startup flow is:

  1. Open(ctx)
  2. Attach(ctx, userID) after sign-in
  3. normal sync operations

oversqlite manages source identity internally. Host application code does not provide source ids to Open(), does not rotate them manually, and does not provide replacement source ids to Rebuild().

Authenticated sync requests still carry the runtime’s current source through Oversync-Source-ID. Auth remains separately host-owned.

SQLite State

Public Operations

Preconditions

Require no prior lifecycle step:

Require successful Open(ctx):

Require successful Open(ctx) plus durable attached local state:

Require successful Open(ctx) plus successful Attach(ctx, userID):

Recovery

Diagnostic Surface

SourceInfo(ctx) is debug-only. It exposes:

CurrentSourceID is opaque. Callers must not persist it externally or treat its format as part of the host API contract.

Typed Preconditions And Results

Normal lifecycle and sync branches such as retry-later attach, blocked detach, paused push/pull, and already-at-target pull are reported as structured result values with error == nil.