openclaw/src/cron
wangchunyue(王春跃) 6c196c913f
fix(cron): prevent duplicate proactive delivery on transient retry (#40646)
* fix(cron): prevent duplicate proactive delivery on transient retry

* refactor: scope skipQueue to retryTransient path only

Non-retrying direct delivery (structured content / thread) keeps the
write-ahead queue so recoverPendingDeliveries can replay after a crash.

Addresses review feedback from codex-connector.

* fix: preserve write-ahead queue on initial delivery attempt

The first call through retryTransientDirectCronDelivery now keeps the
write-ahead queue entry so recoverPendingDeliveries can replay after a
crash.  Only subsequent retry attempts set skipQueue to prevent
duplicate sends.

Addresses second codex-connector review on ea5ae5c.

* ci: retrigger checks

* Cron: bypass write-ahead queue for direct isolated delivery

* Tests: assert isolated cron skipQueue invariants

* Changelog: add cron duplicate-delivery fix entry

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-03-12 03:01:19 -04:00
..
isolated-agent fix(cron): prevent duplicate proactive delivery on transient retry (#40646) 2026-03-12 03:01:19 -04:00
service cron: record lastErrorReason in job state (#14382) 2026-03-10 00:01:45 -05:00
cron-protocol-conformance.test.ts cron: record lastErrorReason in job state (#14382) 2026-03-10 00:01:45 -05:00
delivery.failure-notify.test.ts Cron: enforce cron-owned delivery contract (#40998) 2026-03-09 20:12:37 +01:00
delivery.test.ts Cron: enforce cron-owned delivery contract (#40998) 2026-03-09 20:12:37 +01:00
delivery.ts feat(cron): add failure destination support to failed cron jobs (#31059) 2026-03-02 09:27:41 -06:00
heartbeat-policy.test.ts refactor: modularize slack/config/cron/daemon internals 2026-03-02 22:30:21 +00:00
heartbeat-policy.ts refactor: modularize slack/config/cron/daemon internals 2026-03-02 22:30:21 +00:00
isolated-agent.auth-profile-propagation.test.ts perf(test): trim fixture and serialization overhead in integration suites 2026-03-03 01:09:07 +00:00
isolated-agent.delivers-response-has-heartbeat-ok-but-includes.test.ts Fix cron text announce delivery for Telegram targets (#40575) 2026-03-09 10:26:17 +05:30
isolated-agent.delivery-target-thread-session.test.ts feat(cron): add --account flag for multi-account delivery routing (#26284) 2026-02-28 10:57:49 -06:00
isolated-agent.delivery.test-helpers.ts Cron: enforce cron-owned delivery contract (#40998) 2026-03-09 20:12:37 +01:00
isolated-agent.direct-delivery-core-channels.test.ts Fix cron text announce delivery for Telegram targets (#40575) 2026-03-09 10:26:17 +05:30
isolated-agent.direct-delivery-forum-topics.test.ts Fix cron text announce delivery for Telegram targets (#40575) 2026-03-09 10:26:17 +05:30
isolated-agent.lane.test.ts test: cover cron nested lane selection 2026-03-11 00:02:00 +00:00
isolated-agent.mocks.ts Fix cron text announce delivery for Telegram targets (#40575) 2026-03-09 10:26:17 +05:30
isolated-agent.model-formatting.test.ts test: cover cron nested lane selection 2026-03-11 00:02:00 +00:00
isolated-agent.skips-delivery-without-whatsapp-recipient-besteffortdeliver-true.test.ts Cron: enforce cron-owned delivery contract (#40998) 2026-03-09 20:12:37 +01:00
isolated-agent.subagent-model.test.ts refactor: dedupe gateway config and infra flows 2026-03-03 00:15:14 +00:00
isolated-agent.test-harness.ts test: dedupe fixtures and test harness setup 2026-02-23 05:45:54 +00:00
isolated-agent.test-setup.ts Fix cron text announce delivery for Telegram targets (#40575) 2026-03-09 10:26:17 +05:30
isolated-agent.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
isolated-agent.uses-last-non-empty-agent-text-as.test.ts refactor(core): extract shared dedup helpers 2026-03-07 10:41:05 +00:00
legacy-delivery.ts refactor(cron): normalize legacy delivery at ingress 2026-03-08 00:48:57 +00:00
normalize.test.ts refactor: dedupe gateway config and infra flows 2026-03-03 00:15:14 +00:00
normalize.ts refactor(cron): normalize legacy delivery at ingress 2026-03-08 00:48:57 +00:00
parse.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
payload-migration.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
run-log.test.ts fix: enforce 600 perms for cron store and run logs (#36078) 2026-03-06 00:48:35 -05:00
run-log.ts fix: enforce 600 perms for cron store and run logs (#36078) 2026-03-06 00:48:35 -05:00
schedule.test.ts cron: unify stale-run recovery and preserve manual-run every anchors (#35363) 2026-03-04 22:12:32 -06:00
schedule.ts refactor(cron): share cron schedule resolver 2026-03-07 17:05:23 +00:00
service.armtimer-tight-loop.test.ts refactor: dedupe cli config cron and install flows 2026-03-02 19:57:33 +00:00
service.delivery-plan.test.ts Cron: enforce cron-owned delivery contract (#40998) 2026-03-09 20:12:37 +01:00
service.every-jobs-fire.test.ts test(cron): improve fire-and-forget harness coverage 2026-02-22 11:29:31 +00:00
service.failure-alert.test.ts refactor(core): dedupe command, hook, and cron fixtures 2026-03-02 21:31:36 +00:00
service.get-job.test.ts chore: Fix types in tests 40/N. 2026-02-17 15:50:07 +09:00
service.heartbeat-ok-summary-suppressed.test.ts Cron: enforce cron-owned delivery contract (#40998) 2026-03-09 20:12:37 +01:00
service.issue-13992-regression.test.ts refactor(cron): reuse cron job builder in issue-13992 tests 2026-03-07 17:58:31 +00:00
service.issue-16156-list-skips-cron.test.ts refactor(test): centralize trigger and cron test helpers 2026-02-22 20:04:51 +00:00
service.issue-17852-daily-skip.test.ts cron: unify stale-run recovery and preserve manual-run every anchors (#35363) 2026-03-04 22:12:32 -06:00
service.issue-19676-at-reschedule.test.ts fix(cron): re-arm one-shot at-jobs when rescheduled after completion (openclaw#28915) thanks @Glucksberg 2026-03-01 21:31:24 -06:00
service.issue-22895-every-next-run.test.ts fix(cron): restore interval cadence after restart 2026-02-22 20:19:23 +01:00
service.issue-35195-backup-timing.test.ts fix: cron backup should preserve pre-edit snapshot (#35195) (#35234) 2026-03-04 21:46:27 -06:00
service.issue-regressions.test-helpers.ts refactor(test): extract cron issue-regression harness and frozen-time helper 2026-03-03 01:44:21 +00:00
service.issue-regressions.test.ts fix(cron): consolidate announce delivery, fire-and-forget trigger, and minimal prompt mode (#40204) 2026-03-08 14:46:33 -07:00
service.jobs.test.ts refactor(cron): normalize legacy delivery at ingress 2026-03-08 00:48:57 +00:00
service.jobs.top-of-hour-stagger.test.ts perf(cron): cache schedule evaluators and stagger offsets 2026-03-02 20:19:10 +00:00
service.list-page-sort-guards.test.ts fix(cron): guard list sorting against malformed legacy jobs (#28896) 2026-03-01 07:01:36 -06:00
service.main-job-passes-heartbeat-target-last.test.ts refactor: dedupe cli config cron and install flows 2026-03-02 19:57:33 +00:00
service.persists-delivered-status.test.ts fix(test): resolve upstream typing drift in feishu and cron suites 2026-03-03 01:44:21 +00:00
service.prevents-duplicate-timers.test.ts chore: Fix types in tests 40/N. 2026-02-17 15:50:07 +09:00
service.read-ops-nonblocking.test.ts fix(cron): keep manual runs non-blocking 2026-02-22 20:19:22 +01:00
service.rearm-timer-when-running.test.ts fix(cron): keep watchdog timer armed during ticks 2026-02-22 20:19:23 +01:00
service.restart-catchup.test.ts fix: stagger missed cron jobs on restart (#18925) (thanks @rexlunae) 2026-03-09 06:07:43 +00:00
service.runs-one-shot-main-job-disables-it.test.ts Cron: enforce cron-owned delivery contract (#40998) 2026-03-09 20:12:37 +01:00
service.session-reaper-in-finally.test.ts fix(cron): move session reaper to finally block so it runs reliably (#31996) 2026-03-02 18:38:59 +00:00
service.skips-main-jobs-empty-systemevent-text.test.ts test: dedupe fixtures and test harness setup 2026-02-23 05:45:54 +00:00
service.store-migration.test.ts refactor: dedupe gateway config and infra flows 2026-03-03 00:15:14 +00:00
service.store.migration.test.ts refactor(tests): dedupe cron store migration setup 2026-03-03 01:54:27 +00:00
service.test-harness.ts test: dedupe fixtures and test harness setup 2026-02-23 05:45:54 +00:00
service.ts fix(cron): consolidate announce delivery, fire-and-forget trigger, and minimal prompt mode (#40204) 2026-03-08 14:46:33 -07:00
session-reaper.test.ts Session/Cron maintenance hardening and cleanup UX (#24753) 2026-02-23 22:39:48 +00:00
session-reaper.ts refactor(core): extract shared dedup helpers 2026-03-07 10:41:05 +00:00
stagger.test.ts Cron: guard missing expr in schedule parsing 2026-02-21 20:18:11 -08:00
stagger.ts Cron: guard missing expr in schedule parsing 2026-02-21 20:18:11 -08:00
store-migration.test.ts Cron: enforce cron-owned delivery contract (#40998) 2026-03-09 20:12:37 +01:00
store-migration.ts Cron: enforce cron-owned delivery contract (#40998) 2026-03-09 20:12:37 +01:00
store.test.ts fix: enforce 600 perms for cron store and run logs (#36078) 2026-03-06 00:48:35 -05:00
store.ts fix: enforce 600 perms for cron store and run logs (#36078) 2026-03-06 00:48:35 -05:00
types-shared.ts refactor: dedupe cli config cron and install flows 2026-03-02 19:57:33 +00:00
types.ts cron: record lastErrorReason in job state (#14382) 2026-03-10 00:01:45 -05:00
validate-timestamp.ts style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
webhook-url.ts cron: separate webhook POST delivery from announce (#17901) 2026-02-16 02:36:00 -08:00