Repository navigation
fix(telegram): clear stale localized command menus - #120885
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
August 9, 2026 04:35
Contributor
Author
|
ClawSweeper follow-up on exact head
No re-review is requested: the review is under 12 hours old, covers the current head, has no actionable finding, and there has been no post-review behavior change. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 10, 2026
* fix(telegram): clear stale localized command menus * test(telegram): satisfy command menu lint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
AI-assisted: yes. I understand the command-menu reconciliation, durable locale state, and failure behavior in this change.
What Problem This Solves
Fixes an issue where users whose configured Telegram command localization was removed could keep seeing that stale localized menu. Telegram's neutral command deletion is not a wildcard for dedicated language variants, and gateway reloads could also overlap independent command-menu generations.
Why This Change Was Made
Telegram command-menu mutation now has one bot-owned serialized reconciliation path. A durable locale-only SQLite ledger keyed by Telegram bot ID records which exact locale pairs require cleanup, while the process-local command hash remains a non-authoritative rate-limit optimization. Reconciliation clears every known scope/language pair before publication, records locale intent before localized writes, retries incomplete cleanup without caching success, and removes the duplicate explicit-disable writer.
User Impact
Removed locales are explicitly cleared on future synchronized generations and restarts once they are known to the ledger, and menu updates for one bot can no longer overlap. No operator action or configuration change is required.
Release-note context: Telegram no longer leaves ledger-known localized command menus stale after their localization is removed, and reload-driven menu updates are serialized per bot.
Evidence
mainand preserving its newly landed menu-pressure coverage: 3 files, 170 tests passed withnode scripts/run-vitest.mjs extensions/telegram/src/bot-native-command-menu.test.ts extensions/telegram/src/bot-native-command-menu-sync.test.ts extensions/telegram/src/bot.create-telegram-bot.test.ts. The same 170-test proof passed again after the lint-only follow-up.fr+kothen removingfr, queued generations, failed localized cleanup retry/no success hash, bot-ID ledger continuity across token rotation, and the empty-setMyCommandsdeletion fallback.tbx_01kzjaaea11kw1z1q5fa5qsnc4passed changed-surface checks for the original 10-file implementation, including extension/test typechecks, lint, plugin boundaries, dead exports, database-first storage, and import cycles.c815c6f5aa6dcd305c5254174df0f20f93c03b92: CI run 31295259045 and CodeQL Critical Quality run 31295259019. Targeted oxlint, formatting, andgit diff --checkpassed.deleteMyCommandscontract states that an empty or omittedlanguage_codeis the neutral fallback for users without dedicated commands, not a wildcard: https://core.telegram.org/bots/api#deletemycommandsKnown limitation: Telegram cannot enumerate locale variants published before this ledger existed. Unknown pre-ledger variants therefore cannot be discovered automatically; once a locale is ledger-known, later synchronized generations and restarts can clear it exactly.
Proof gap: no authenticated Telegram Desktop before/after recording was run. The exact Bot API contract, deterministic lifecycle regressions, Testbox checks, and exact-head hosted CI cover the repair; a redacted live recording would be stronger optional visible confirmation.