Skip to content

fix(cron): avoid marking queued announce paths as delivered#29716

Merged
Takhoffman merged 1 commit intoopenclaw:mainfrom
Sid-Qin:fix/29660-cron-announce-delivery-truthfulness
Feb 28, 2026
Merged

fix(cron): avoid marking queued announce paths as delivered#29716
Takhoffman merged 1 commit intoopenclaw:mainfrom
Sid-Qin:fix/29660-cron-announce-delivery-truthfulness

Conversation

@Sid-Qin
Copy link
Contributor

@Sid-Qin Sid-Qin commented Feb 28, 2026

Summary

  • Problem: Cron announce delivery could be recorded as delivered=true when subagent announce only queued/steered work and no direct outbound send was confirmed.
  • Why it matters: Users see false-positive delivery status (delivered) even when destination channels never received the message.
  • What changed: In subagent announce flow, cron announce now treats queued / steered paths as not-delivered for delivery-state reporting; only direct path counts as delivered.
  • What did NOT change: Non-cron subagent announce behavior and queue mechanics are unchanged.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

User-visible / Behavior Changes

  • Cron run delivery status no longer reports delivered when announce output was merely queued/steered and not yet directly sent.

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment

  • OS: macOS
  • Runtime: Node + pnpm
  • Integration/channel: cron isolated announce flow

Steps

  1. Run cron announce path where requester session is active and announcement is queued/steered.
  2. Observe the boolean returned to cron delivery tracking.

Expected

  • Delivery state should remain false unless direct path succeeds.

Actual

  • Before fix: queued/steered outcomes could mark delivered=true.
  • After fix: queued/steered outcomes do not mark delivered=true for cron reporting.

Evidence

  • pnpm test -- --run src/agents/subagent-announce.format.test.ts

Human Verification (required)

  • Verified scenarios: cron announce queued path now returns false; direct-path behavior remains unchanged.
  • Edge cases checked: queue-mode collect with cron announce type.
  • What I did not verify: full end-to-end live Telegram cron announce in production runtime.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Failure Recovery (if this breaks)

  • How to disable/revert: Revert this commit.
  • Files/config to restore: src/agents/subagent-announce.ts.
  • Known bad symptoms: cron delivery state may again over-report delivered in queued paths.

Risks and Mitigations

  • Risk: stricter delivered semantics may expose previously hidden delivery gaps.
  • Mitigation: behavior is now truthful to actual direct-send confirmation; regression test added.

Made with Cursor

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 28, 2026

Greptile Summary

Fixed false-positive delivery status for cron announces by preventing queued/steered paths from being marked as delivered.

Key Changes:

  • Modified runSubagentAnnounceFlow to check if announceType === "cron job" and delivery path is queued or steered, setting didAnnounce = false in these cases
  • Root cause: mapQueueOutcomeToDeliveryResult sets delivered: true for queued/steered outcomes, which is acceptable for regular subagent announces but misleading for cron job delivery tracking
  • Added regression test validating cron announces with queued paths return false

Impact:

  • Cron job delivery tracking now accurately reflects actual message delivery (direct path only)
  • Non-cron subagent announce behavior unchanged
  • Existing test suite confirms backward compatibility

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk
  • The fix is targeted, well-tested, and preserves backward compatibility. The logic correctly addresses the false-positive delivery status issue for cron jobs while leaving non-cron behavior unchanged. Existing test suite validates that regular subagent announces still work correctly with queued paths. Minor room for additional test coverage (cron + direct/steered paths), but current tests adequately validate the fix.
  • No files require special attention

Last reviewed commit: 3a5879d

@Takhoffman Takhoffman merged commit daa4188 into openclaw:main Feb 28, 2026
29 of 30 checks passed
vincentkoc pushed a commit to Sid-Qin/openclaw that referenced this pull request Feb 28, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
vincentkoc pushed a commit to rylena/rylen-openclaw that referenced this pull request Feb 28, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
mrosmarin added a commit to mrosmarin/openclaw that referenced this pull request Feb 28, 2026
* main: (31 commits)
  fix(browser): resolve correct targetId in navigate response after renderer swap (openclaw#25326)
  fix: sed escaping and UID mismatch in Podman Quadlet setup (openclaw#26414)
  fix(cron): pass heartbeat target=last for main-session cron jobs (openclaw#28508) (openclaw#28583)
  fix(cron): disable messaging tool when delivery.mode is none (openclaw#21808) (openclaw#21896)
  fix: clear delivery routing state when creating isolated cron sessions (openclaw#27778)
  fix(cron): avoid marking queued announce paths as delivered (openclaw#29716)
  fix(cron): enable completion direct send for text-only announce delivery (openclaw#29151)
  fix(cron): force main-target system events onto main session (openclaw#28898)
  fix(cron): condition requireExplicitMessageTarget on resolved delivery (openclaw#28017)
  feat(cron): add --account flag for multi-account delivery routing (openclaw#26284)
  fix: schedule nextWakeAtMs for isolated sessionTarget cron jobs (openclaw#19541)
  fix: sandbox browser docker no-sandbox rollout (openclaw#29879) (thanks @Lukavyi)
  GitHub: add regression bug issue template and routing (openclaw#29864) thanks @Takhoffman
  feat(feishu): add chat info/member tool (openclaw#14674)
  feat(feishu): add markdown tables, positional insert, color_text, and table ops (openclaw#29411)
  feat(feishu): add parent/root inbound context for quote support (openclaw#18529)
  fix: land android onboarding and voice reliability updates (openclaw#29796)
  fix(android-voice): rotate playback token per assistant reply
  fix(android-voice): retry talk config after transient failures
  fix(android-voice): cancel in-flight speech when speaker muted
  ...
newtontech pushed a commit to newtontech/openclaw-fork that referenced this pull request Feb 28, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
nsd97 pushed a commit to nsd97/openclaw that referenced this pull request Feb 28, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
Drickon added a commit to Drickon/openclaw that referenced this pull request Mar 1, 2026
Preserves the queued/steered delivery path check that prevents
false-positive delivery state for cron job announcements.
The previous commit inadvertently dropped this guard when
refactoring buildCompletionDeliveryMessage().

Fixes regression of openclaw#29660
zooqueen added a commit to hanzoai/bot that referenced this pull request Mar 1, 2026
…#29716)

Cherry-pick from upstream openclaw/openclaw daa4188.
When announce delivery path is "queued" or "steered", mark
didAnnounce=false to prevent false positive delivery status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ansh pushed a commit to vibecode/openclaw that referenced this pull request Mar 2, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
steipete pushed a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
safzanpirani pushed a commit to safzanpirani/clawdbot that referenced this pull request Mar 2, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
steipete pushed a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
robertchang-ga pushed a commit to robertchang-ga/openclaw that referenced this pull request Mar 2, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
execute008 pushed a commit to execute008/openclaw that referenced this pull request Mar 2, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
dorgonman pushed a commit to kanohorizonia/openclaw that referenced this pull request Mar 3, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
Drickon added a commit to Drickon/openclaw that referenced this pull request Mar 4, 2026
Preserves the queued/steered delivery path check that prevents
false-positive delivery state for cron job announcements.
The previous commit inadvertently dropped this guard when
refactoring buildCompletionDeliveryMessage().

Fixes regression of openclaw#29660
sachinkundu pushed a commit to sachinkundu/openclaw that referenced this pull request Mar 6, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
Drickon added a commit to Drickon/openclaw that referenced this pull request Mar 6, 2026
Preserves the queued/steered delivery path check that prevents
false-positive delivery state for cron job announcements.
The previous commit inadvertently dropped this guard when
refactoring buildCompletionDeliveryMessage().

Fixes regression of openclaw#29660
zooqueen added a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…#29716)

Cherry-pick from upstream openclaw/openclaw daa4188.
When announce delivery path is "queued" or "steered", mark
didAnnounce=false to prevent false positive delivery status.
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
Mateljan1 pushed a commit to Mateljan1/openclaw that referenced this pull request Mar 7, 2026
…#29716)

Cron announce flow treated queued/steered outcomes as delivered even when no direct outbound send was confirmed, which could report false-positive delivery state. This change keeps cron delivery strict: only direct-path announce results count as delivered.

Closes openclaw#29660
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Isolated cron + announce delivery marks as "delivered" but never calls Telegram sendMessage (2026.2.26)

2 participants