go-oversync

Advanced Concepts

This page describes the supported bundle-based sync model.

Authoritative state

Registered business tables are the source of truth. Sync metadata is derived from committed business-table effects rather than projected afterward from a separate authoritative log.

Bundles

A bundle is the smallest durable sync unit.

Structured keys

Rows are identified by structured sync keys, not by an implicit single pk field on the wire. In the current supported envelope, each registered table still exposes exactly one visible sync key column, but that column may be uuid or text. Visible sync key values are strings on the wire, and UUID-valued keys must use canonical dashed lowercase UUID text.

Row state

sync.row_state stores the authoritative per-row replicated state for conflict detection, idempotent replay, and snapshot rebuilds.

Timestamp encoding

For syncable business rows, timestamp columns should be stored as SQLite TEXT using UTC RFC3339 or RFC3339Nano values. This keeps payloads portable across SQLite, JSON transport, and Go resolver code.

Push

Push is all-or-nothing at bundle level.

Structured conflict recovery

The supported client/runtime contract includes structured push_conflict recovery.

Pull

Pull is frozen to a stable ceiling.

Snapshot rebuilds

Chunked snapshot sessions return the full current after-image at one exact frozen bundle sequence.

Use it for:

When rebuild requires source rotation:

Fail-closed contract

The supported envelope is intentionally strict.

Supported envelope

The current contract is designed to be reliable for:

Unsupported shapes must fail at bootstrap rather than degrade into partial runtime behavior.