The FLOWSAFE-owned tables this purge also deletes from when the caller wires
them, and the reason they are not in the list above.
RUN_TTL_PURGE_TABLES is cross-checked against the mastra_% inventory in
mastra-schema-guard.test.ts — its job is to catch a @mastra/core bump that
changes what run retention targets. These two are ours, they are optional
(a lower-level caller without the registries omits both), and they are
deleted on a DIFFERENT predicate: flowsafe_resource_owners when its run's
last snapshot is gone, flowsafe_start_idempotency when its reservation is
settled AND past the key-validity horizon. Folding them into the Mastra
anchor would make that guard assert an equality it cannot mean.
The FLOWSAFE-owned tables this purge also deletes from when the caller wires them, and the reason they are not in the list above.
RUN_TTL_PURGE_TABLESis cross-checked against themastra_%inventory in mastra-schema-guard.test.ts — its job is to catch a @mastra/core bump that changes what run retention targets. These two are ours, they are optional (a lower-level caller without the registries omits both), and they are deleted on a DIFFERENT predicate:flowsafe_resource_ownerswhen its run's last snapshot is gone,flowsafe_start_idempotencywhen its reservation is settled AND past the key-validity horizon. Folding them into the Mastra anchor would make that guard assert an equality it cannot mean.