org_renamed_stytch_drift
This page is auto-generated from
src/auth/stytch-tenant-binding.ts. Do not edit by hand — seedocs/dev/docs-auto-sync.md.
Event string
Section titled “Event string”org_renamed_stytch_drift
Emitting helpers
Section titled “Emitting helpers”| Function | Source |
|---|---|
encodeOrgRenamedStytchDriftAuditReason | src/auth/stytch-tenant-binding.ts:398 |
Context fields
Section titled “Context fields”| Field | Type | Required | Notes |
|---|---|---|---|
tenant_slug | string | yes | — |
old_slug | string | yes | — |
new_slug | string | yes | — |
stytch_org_id | string | yes | — |
by_user_id | string | yes | — |
error_message | string | yes | — |
Documentation
Section titled “Documentation”#417 slice 4 — Stytch slug mirror drift.
Emitted when the local rename commits successfully but the client.organizations.update({organization_slug}) round-trip fails. Per the design doc Q3 amendment (“local-first, log on Stytch failure, no rollback”), the local UPDATE is NOT rolled back; the audit row is the record-of-drift SREs read to drive a follow-up Stytch re-sync. Carries both slugs + the Stytch error message so an operator has enough context to reproduce or patch the drift without re-issuing the rename.
256-char varchar bound enforced by the shared encodeStytchAuditReason helper above — the error_message tail truncates first since it’s the most variable-length field.
This envelope is stored in audit_log.decision_reason (varchar(256)) as a JSON object with the shape { event, ...ctx }. The audit_log row carries tenant_id, actor_user_id, and timestamp as columns alongside — those are not duplicated in the envelope.