The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(cron): stale-facade probe strips both fire-claim constants and reaches the TTL path
kshitijk4poor909deaa8a30e
diff --git a/tests/cron/test_upgrade_module_skew.py b/tests/cron/test_upgrade_module_skew.pyindex a8511660af8..842d33537fa 100644--- a/tests/cron/test_upgrade_module_skew.py+++ b/tests/cron/test_upgrade_module_skew.py@@ -28,15 +28,24 @@ import cron.{store}"""_OCCURRENCES_SKEW_SCRIPT = """+from datetime import datetime, timedelta, timezoneimport cron.jobs as jobs-# Model a daemon that loaded cron.jobs before this constant existed, then+# Model a daemon that loaded cron.jobs before these constants existed, then# lazy-loads the newer occurrences module from disk during a due scan.jobs.__dict__.pop("FIRE_CLAIM_SKEW_SECONDS", None)+jobs.__dict__.pop("FIRE_CLAIM_TTL_SECONDS", None)-from cron.occurrences import completed_occurrence+from cron.occurrences import completed_occurrence, unclaimed_pending_slotassert not completed_occurrence({"id": "job"}, "2026-01-01T00:00:00+00:00")++# A slot stamped by another owner whose lease has lapsed is restored: the TTL comparison runs.+now = datetime.now(timezone.utc)+stale = (now - timedelta(hours=1)).isoformat()+job = {"id": "job", "schedule": {"kind": "interval"},+ "pending_slot": {"scheduled_at": stale, "at": stale, "by": "other-machine"}}+assert unclaimed_pending_slot(job, now) == stale"""