Expand description
Postgres execution_deadline reconciler (RFC-020 Wave 9 minimal).
Mirrors the ExecutionDeadline phase of
[ff_engine::scanner::execution_deadline] — terminates executions
whose whole-execution wall-clock deadline has elapsed. Shares a
trait entry point (expire_execution) with attempt_timeout;
discriminated by ff_core::engine_backend::ExpirePhase.
Candidate selection: (lifecycle_phase = 'active', deadline_at_ms IS NOT NULL, deadline_at_ms < now) on ff_exec_core. The
deadline_at_ms column is overloaded (it also carries
delay_until for rows parked by attempt::delay()); the
lifecycle_phase = 'active' predicate discriminates.
Action: terminal-fail with last_failure_message = 'execution_deadline', clear the active attempt’s lease, emit
ff_completion_event { outcome = 'expired' }.
Functions§
- expire_
for_ execution - Per-execution expire action for the execution-deadline scanner.
Exposed so the
EngineBackend::expire_executiontrait dispatch (ExpirePhase::ExecutionDeadline) can invoke the same per-row tx logic the batch scanner would. Silently no-ops when the exec is no longeractiveor its deadline has not yet elapsed (re-checked underFOR UPDATE).