Schema fingerprint
Before each batch, the edge agent builds canonical JSON fromPRAGMA table_info:
- Columns sorted by name (not table ordinal).
- Types mapped to SQLite affinity classes (
INTEGER,TEXT,REAL,BLOB,NUMERIC). pk_ordinal: 0 for non-PK columns; 1..N for composite PK members.- Indexes, triggers, FKs, defaults — excluded from fingerprint.
schema_hash.
Column reorder does not change the hash. Adding/removing columns, changing types, or PK membership does.
→ Integrator detail: Payload formats — schema observation
Classification
When a batch arrives with a hash the cloud has not accepted for this lineage:
Production default:
allow_additive_continue=false → first insert to a new table always hits ambiguous.
Schema observation (advisory)
Devices may publishsync/schema/observe when hash changes:
Schema review states
Permission for claim/approve/reject:
PROJECT_CAN_MANAGE_DEVICES.
Column actions (approve)
When approving, specify one action per source column:
Example approve body:
Idempotency-Key.
→ Step-by-step: Schema review workflow
What the device does during review
The edge agent does not wait for review completion:- Keeps publishing batches with the new
schema_hash. - Cloud stages rows while lineage is paused for review.
- After approve, cloud replays staged rows into mirror.
pause_lineage (backpressure, not review alone), the device must ACK and buffer locally.
→ Downlink control
Schema drift on device
When application migrations alter SQLite DDL:- Edge recomputes fingerprint on next flush.
- Optional
sync/schema/observepublish. - Next batch includes new hash → cloud re-classifies.
Events (audit / automation)
Governance emits integration events (for SSE, workflows):integration.edge_schema_review.queued|approved|rejected|abandoned.v1integration.edge_table_lineage.ingestion_paused|ingestion_resumed.v1integration.edge_export_segment.materialized|materialization_failed.v1
platform-tui events watch.
Related
- Registry coalescing — share schema decisions across devices
- HTTP API — schema reviews