Tearleads

container_hydration_tombstones Client SQLite table

Latest removal observed for each container. Hydration must observe the same generation before fetching verified restoration evidence; unsigned clocks never establish a terminal deletion or bypass a concurrent removal. Cleared observations retain their generation so remove/restore/remove cannot reuse it.

Declared in packages/client-sdk/src/data/sqlite/schema/containerSchema.ts

Columns

  • container_idtext
    • primary key
    • not null

    Removed container; one row per container.

  • generationinteger
    • not null
    • default 1

    Removal count for the container: 1 at first, raised by each removal.

  • clearedinteger
    • not null
    • default 0

    Whether a verified hydration that observed this removal has restored the container. Only uncleared rows fence hydration; the next removal resets it to false.

  • reasontext
    • not null

    deleted or access_revoked. Once deleted, a later access_revoked removal keeps deleted.

  • updated_attext
    • not null

    ISO-8601 time of the latest recorded removal; a new removal keeps the later of the stored and new times.

DDL

The statements the client runs to create this table and its indexes.

CREATE TABLE IF NOT EXISTS "container_hydration_tombstones" (
  "container_id" TEXT NOT NULL PRIMARY KEY,
  "generation" INTEGER NOT NULL DEFAULT 1,
  "cleared" INTEGER NOT NULL DEFAULT 0,
  "reason" TEXT NOT NULL,
  "updated_at" TEXT NOT NULL
);