Tearleads

document_inline_rekey_commits API Postgres table

Durable idempotency markers for document syncs that apply inline rekeys.

Declared in packages/api-shared/src/schema/documentInlineRekeyCommits.ts

Columns

  • iduuid
    • primary key
    • not null
    • default gen_random_uuid()

    Surrogate database primary key.

  • commit_idtext
    • not null

    Client-computed hex SHA-256 identifying a sync that carries container rekeys, over the document id, the id of the first pending update it sends, and the document key target hash the rekeys replace. The sync reserves it before applying the rekeys, so a replay is refused as an update id conflict instead of rekeying twice.

  • document_iduuid
    • not null

    Document the sync wrote; unique with commitId.

  • created_attimestamp
    • not null
    • default now()

    Server-side insertion timestamp.

Indexes

  • document_inline_rekey_commits_document_commit_idx(document_id, commit_id)
    • unique