Skip to content

fix(telegram): prevent non-abort slash commands from racing chat replies#17899

Merged
obviyus merged 3 commits intomainfrom
fix/telegram-nonabort-sequentialize
Feb 16, 2026
Merged

fix(telegram): prevent non-abort slash commands from racing chat replies#17899
obviyus merged 3 commits intomainfrom
fix/telegram-nonabort-sequentialize

Conversation

@obviyus
Copy link
Contributor

@obviyus obviyus commented Feb 16, 2026

Summary

  • narrow Telegram control-lane sequentialization to abort-style commands only
  • keep non-abort slash commands (/status, /model, /queue, etc.) on the normal chat/topic lane
  • update sequential key test expectation for /status

Root cause

getTelegramSequentialKey routed all control commands to telegram:<chat>:control, which let non-abort slash commands execute concurrently with in-flight normal message handling. That race could preempt/lose queued follow-up processing from the first run.

Validation

  • pnpm test src/telegram/bot.create-telegram-bot.test.ts
  • pnpm test src/telegram/bot.test.ts

Greptile Summary

Narrowed Telegram control-lane sequentialization to abort-style commands only (stop, abort, exit, wait, interrupt, esc), while non-abort slash commands like /status, /model, /queue now execute on the normal chat/topic lane. This prevents non-abort commands from executing concurrently with in-flight message handling, which could cause race conditions and preempt queued follow-up processing.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is well-focused and addresses a specific race condition. The implementation correctly identifies abort commands using the existing isAbortTrigger function and properly normalizes command bodies. Tests are updated to match the new behavior. The logic is straightforward and the changes are minimal.
  • No files require special attention

Last reviewed commit: e629902

@github-actions
Copy link
Contributor

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

@openclaw-barnacle openclaw-barnacle bot added channel: telegram Channel integration: telegram size: XS maintainer Maintainer-authored PR labels Feb 16, 2026
@obviyus obviyus self-assigned this Feb 16, 2026
@github-actions
Copy link
Contributor

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

@obviyus obviyus force-pushed the fix/telegram-nonabort-sequentialize branch from f8b9020 to 5c2f6f2 Compare February 16, 2026 10:48
@github-actions
Copy link
Contributor

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

@obviyus obviyus merged commit b2aa6e0 into main Feb 16, 2026
24 checks passed
@obviyus obviyus deleted the fix/telegram-nonabort-sequentialize branch February 16, 2026 10:51
@obviyus
Copy link
Contributor Author

obviyus commented Feb 16, 2026

Merged via squash.

Thanks @obviyus!

Archeb pushed a commit to Archeb/openclaw that referenced this pull request Feb 16, 2026
…ies (openclaw#17899)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 5c2f6f2
Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
Reviewed-by: @obviyus
thinstripe pushed a commit to thinstripe/openclaw that referenced this pull request Feb 16, 2026
…ies (openclaw#17899)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 5c2f6f2
Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
Reviewed-by: @obviyus
archerhpagent pushed a commit to howardpark/openclaw that referenced this pull request Feb 18, 2026
…ies (openclaw#17899)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 5c2f6f2
Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
Reviewed-by: @obviyus
jun-planfit pushed a commit to planfit/openclaw that referenced this pull request Feb 19, 2026
…ies (openclaw#17899)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 5c2f6f2
Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
Reviewed-by: @obviyus
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…ies (openclaw#17899)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 5c2f6f2
Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
Reviewed-by: @obviyus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: telegram Channel integration: telegram maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant