diff --git a/src/wf_scheduling/poll.py b/src/wf_scheduling/poll.py index 67caa8c6..d7100069 100644 --- a/src/wf_scheduling/poll.py +++ b/src/wf_scheduling/poll.py @@ -717,13 +717,10 @@ class Scheduler: # Fresh read per schedule: the tick lists schedules up front while # same-process administration may commit an edit, pause, resume, or # delete mid-tick. All admission decisions below (policies, - # revision, flags) use this fresh copy, never the listing - # snapshot. Two narrow residuals remain: calendar iteration uses - # the tick-start occurrence source (a trigger edit takes effect - # on the next tick), and an admission decision already in flight - # cannot observe a concurrent edit — admission stays idempotent - # per (schedule, instant), so the worst case is one run admitted - # under just-superseded terms, never a duplicate or replay. + # revision, flags, and managed trigger source) use this fresh copy, + # never the listing snapshot. A definition edit that races the + # final admission recheck is rejected as schedule-changed, so stale + # terms cannot create a duplicate or replay. try: sched = self.schedule_store.get_schedule(sched.id) except KeyError: