Tearleads

verified_session_roots Client SQLite table

Durable verified creator roles for the session user's personal roots and direct system children. Written exclusively after full cryptographic destination verification or local provisioning acknowledgement (never backfilled from unverified local rows). Loaded into the durable session lookup cache on cold start and consulted by local destination lookups and post-merge same-org system folds until live verification runs (pre-auth merges and stale-root recovery still require a live in-memory verified role). An upgraded database whose table is still empty fails closed offline until the first online root/child-lane verification populates it.

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

Columns

  • organization_idtext
    • not null

    Organization of the verified container.

  • container_idtext
    • not null

    Verified container: a root (no parent, no system slot) or a system folder directly under its root.

  • create_signer_user_idtext
    • not null

    User who signed the container's epoch-1 container.create.

  • root_container_idtext
    • not null

    Root of the container's path; the container itself for a root.

  • root_create_signer_user_idtext
    • not null

    User who signed the root's epoch-1 container.create.

  • parent_idtext
    • nullable

    Null for a root; the root container id for a system folder.

  • system_slottext
    • nullable

    System slot of a system folder; null for a root.

Keys and constraints

  • Primary key(organization_id, container_id)

DDL

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

CREATE TABLE IF NOT EXISTS "verified_session_roots" (
  "organization_id" TEXT NOT NULL,
  "container_id" TEXT NOT NULL,
  "create_signer_user_id" TEXT NOT NULL,
  "root_container_id" TEXT NOT NULL,
  "root_create_signer_user_id" TEXT NOT NULL,
  "parent_id" TEXT,
  "system_slot" TEXT,
  PRIMARY KEY ("organization_id", "container_id")
);