GitHub user Ashfaqbs added a comment to the discussion: Human-in-the-loop approval: pluggable approver (decision model first, human fallback) - design discussion for #1067
Right, and I'd go a step further on the mechanism: the deadline shouldn't be something the timer schedule implicitly encodes at all. Persist the absolute deadline (wall-clock/event-time, not a timer-relative offset) as part of the pending-approval state alongside the verdict/outcome fields from the discussion above. The timer is then only a trigger, not the source of truth — on fire, including the immediate overdue-fire-on-restore case you're describing, the handler compares current time against the persisted deadline rather than trusting "the timer fired" to mean "still within window." That gives you the separation you're after for free: a response arriving after the persisted deadline — whether it's a late timer fire post-recovery, or a human/decision-model answer that shows up during the downtime itself and is only processed once the job comes back — gets recorded for audit (who/what decided, when, and what the answer was) but is marked against an already-expired window, so it carries no execution authority. The downstream effect only fires from a response that lands before the persisted deadline is crossed; everything else becomes an audited record of a decision that came too late to act on. Concretely this means the pending-approval state needs a third terminal status beyond approved/rejected — expired — set either by the overdue timer firing on recovery or by a live late response matching an already-past deadline, and a late response's own audit entry should record which one happened. That's consistent with @renezander030's succeeded/failed/unknown split on the effect side: same idea, one layer up, applied to the approval decision itself rather than its downstream dispatch. I think this belongs under open question 3 rather than as a separate concern — it's exactly the kind of case that doesn't go away just because the escalation branch is a smaller share of records. Good concrete scenario to carry forward as an explicit acceptance case: checkpoint → downtime past the deadline → late approval arrives → recorded as audited, not re-executed. GitHub link: https://github.com/apache/flink-agents/discussions/1304#discussioncomment-19533328 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
