The tables purgeExpiredWorkflowRuns deletes from under the run TTL — the
production anchor the schema guard cross-checks every run-ttl retention
declaration against, the retention counterpart of
TENANT_RANGE_PURGE_TABLES for the offboarding leg. One table, because the run
TTL rides a run_id range paired with artifact deletion and an app-owned
index (its own block below), not the tenant-range map. The guard reads THIS,
not a literal copied into the test, so a purge that changes what it targets
and a guard that still blesses the old set cannot drift apart silently.
The tables
purgeExpiredWorkflowRunsdeletes from under the run TTL — the production anchor the schema guard cross-checks everyrun-ttlretention declaration against, the retention counterpart of TENANT_RANGE_PURGE_TABLES for the offboarding leg. One table, because the run TTL rides arun_idrange paired with artifact deletion and an app-owned index (its own block below), not the tenant-range map. The guard reads THIS, not a literal copied into the test, so a purge that changes what it targets and a guard that still blesses the old set cannot drift apart silently.