Skip to content

ManagedFieldStrategy

ManagedFieldStrategy = "nowMicroseconds" | "authClaim"

Defined in: packages/contracts/src/config.ts:352

How the applier stamps a server-managed column (it overrides any client-sent value — the client write payload omits managed fields, and the apply function re-derives them under the verified request claims):

  • nowMicrosecondsclock_timestamp() microseconds, stamped via the canonical pgxsinkit_clock_us() DB function (installed by the utilities migration). The audit/version columns (created_at_us, updated_at_us); the updated_at_us-on-update field is the strictly-monotonic Server version (ADR-0010).
  • authClaim — a value read from the verified JWT claims at a JSON ManagedFieldSpec.claimPath (e.g. ["sub"] for the auth subject, or ["app_metadata","person_id"] for an app-minted identity). This is the single claim-stamping strategy: the old authUid is exactly { claimPath: ["sub"], cast: "uuid" }, so there is one mechanism, not a sub-only special case beside a general one.