Skip to content

fix: preserve cron telegram topic delivery after timeout#72317

Merged
jalehman merged 2 commits intoopenclaw:mainfrom
jalehman:vincent-e7228b32-telegram-cron-topic-regression
Apr 26, 2026
Merged

fix: preserve cron telegram topic delivery after timeout#72317
jalehman merged 2 commits intoopenclaw:mainfrom
jalehman:vincent-e7228b32-telegram-cron-topic-regression

Conversation

@jalehman
Copy link
Copy Markdown
Contributor

What

Adds regression coverage for explicit Telegram forum topic cron announce delivery and forwards cron timeout abort signals into CLI-backed isolated cron agent runs so late CLI completions are discarded before announce dispatch.

Why

A cron configured to announce to telegram:-1003774691294:topic:47 must preserve messageThreadId: 47. A timed-out isolated cron run could continue producing a late final answer after the job was marked timed out, risking fallback to the active/default Telegram topic.

Changes

  • Cover explicit Telegram topic delivery
  • Forward abort signal to CLI cron runs
  • Drop late CLI timeout results before delivery

Testing

  • pnpm test src/cron/isolated-agent.direct-delivery-core-channels.test.ts
  • pnpm test src/cron/isolated-agent/run.skill-filter.test.ts
  • pnpm check:changed

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Apr 26, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 26, 2026

Greptile Summary

This PR adds abort-signal forwarding to CLI-backed cron agent runs and regression coverage for Telegram supergroup topic delivery. The one-line production change (abortSignal: params.abortSignal in run-executor.ts) closes a gap where the embedded-agent path already forwarded the signal but the CLI path did not, allowing a timed-out CLI run to return a late result and risk fallback delivery to the wrong topic. The isAborted() guard on line 984 of run.ts already short-circuits before finalizeCronRun/dispatchCronDelivery, so the fix correctly prevents late results from being dispatched.

Confidence Score: 5/5

Safe to merge — one-line targeted fix with two well-structured regression tests.

The production change is a single, clearly correct line (mirroring the already-present abortSignal in the embedded-agent path). Both new tests directly exercise the fixed path; the abort-signal test uses an in-process mock that resolves only after abort fires, confirming both signal forwarding and late-result suppression. No unrelated code is touched.

No files require special attention.

Reviews (1): Last reviewed commit: "fix: abort cli cron runs on timeout" | Re-trigger Greptile

@jalehman jalehman self-assigned this Apr 26, 2026
@jalehman jalehman merged commit 8ba8253 into openclaw:main Apr 26, 2026
67 of 68 checks passed
bminicore pushed a commit to bminicore/openclaw-fork that referenced this pull request Apr 27, 2026
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant