From 34e026a8f261ec4c4ab62e877bee70444efa5102 Mon Sep 17 00:00:00 2001 From: lda Date: Wed, 9 Sep 2026 20:09:27 +0700 Subject: [PATCH] docs: align poller comments with freshness rules --- src/wf_scheduling/poll.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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: