Repository navigation
fix(telegram): normalize announce group targets - #81229
giodl73-repo merged 1 commit into
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. source-reproducible: current main can derive Real behavior proof Next step before merge Security Review detailsBest possible solution: Land this Telegram-owned resolver after explicit maintainer review, then close #81086 as fixed by the merge. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main can derive Is this the best way to solve the issue? Yes. The PR uses the existing Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 16e5d6692dcc. |
|
/review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Applying the maintainer-proof pass from Galin's review style: this PR needs true after-fix Telegram delivery proof, not only resolver/unit output. I converted it back to draft until we can attach a redacted group-send proof or get explicit maintainer guidance that resolver-level proof is enough for this change. Re-review progress:
|
|
Thanks for moving this back to draft. The code direction looks right: Telegram owns the session-target normalization, and keeping core generic is the correct boundary for this fix. Before marking ready, please attach real after-fix Telegram delivery proof for the reported path, not only resolver/unit output. The proof should show Preferred proof path: Once Mantis posts evidence, mark ready for review and ask |
|
@openclaw-mantis telegram desktop proof Please capture before/after Telegram-visible proof for PR #81229. Prove sessions_send with delivery.mode: "announce" to a Telegram group session key. Baseline should show the current failure from group: / non-numeric recipient; candidate should show a delivered Telegram group message. Redact chat IDs, tokens, phone numbers, and private endpoints. |
52e70e7 to
6e28e92
Compare
|
Rebased on current origin/main, fixed the formatter drift from the rebase, and reran focused verification.\n\nChecks:\n- oxfmt --check changed files\n- node scripts/test-projects.mjs extensions/telegram/src/session-conversation.test.ts --reporter=verbose\n- node scripts/check-changed.mjs\n- git diff --check\n\nStill draft pending real behavior proof for the Telegram announce target flow.\n\n@clawsweeper re-review |
2cc024a to
e2db3d1
Compare
|
Updated the PR body with live ClawCode proof for the @clawsweeper re-review Re-review progress:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
25e5707 to
f6340c1
Compare
|
Rebased on current @clawsweeper re-review |
1035609 to
cc949e9
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
cc949e9 to
fd1b72c
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
messaging.resolveSessionTargetimplementation so session-derived group targets normalize before announce delivery.sessions_sendgeneric: Telegram handlesgroup:<chatId>in the Telegram plugin instead of teaching shared code channel-specific syntax.Fixes #81086.
Tests
pnpm test extensions/telegram/src/targets.test.ts extensions/telegram/src/send.test.ts extensions/telegram/src/session-conversation.test.ts src/agents/tools/sessions-send-helpers.test.ts -- --reporter=verbosepnpm check:changedgit diff --checkReal behavior proof
Behavior addressed: Telegram session-derived group targets normalize to a Telegram-sendable numeric chat id instead of the generic
group:<chatId>form that Telegram rejects.Real environment tested: ClawCode live Azure VM (
clawcode-vm) running the PR build from~/worktrees/openclaw-81229, captured on commite2db3d10785dbefore the latest rebase of the same patch. Telegram was enabled for theClawCodesupergroup. The gateway service was restarted from this PR worktree and confirmed active before the proof.Exact steps or command run after this patch: Restarted the gateway from the PR worktree, sent a direct Telegram group message with
node dist/index.js message send --channel telegram --target "telegram:group:<redacted-supergroup-id>" --json, then invoked thesessions_sendtool against the rawtelegram:group:<id>session key.Evidence after fix: Direct target proof returned a Telegram-sendable numeric chat id:
{ "action": "send", "channel": "telegram", "dryRun": false, "handledBy": "plugin", "payload": { "ok": true, "messageId": "15", "chatId": "<redacted-numeric-supergroup-id>" } }Gateway confirmation from the same direct-send run:
sessions_sendgroup-session proof returned announce delivery for the raw Telegram group session key:{ "runId": "c7e5db65-cb89-4b21-b113-2f2b79bfdc7e", "status": "ok", "sessionKey": "telegram:group:<redacted-supergroup-id>", "delivery": { "status": "pending", "mode": "announce" } }Target session message tool call, redacted:
{ "action": "send", "channel": "telegram", "target": "<redacted-numeric-supergroup-id>", "message": "Announcement: The proof for PR 81229 is now available. Check it out! marker: proof-81229-clean-announce-1778654546" }Telegram tool result:
{ "ok": true, "messageId": "21", "chatId": "<redacted-numeric-supergroup-id>" }Gateway confirmation from the same
sessions_sendrun:Observed result after fix: The direct Telegram send and the reported
sessions_sendentrypoint both delivered to the real Telegram supergroup. Telegram returnedok: trueand the expected numeric chat id, showing the session-derived group target was normalized before delivery.What was not tested: I did not test unrelated Telegram DM targets, non-Telegram channels, or the mobile UI. The proof is scoped to the failing Telegram group announce path.