Repository navigation
fix: keep Telegram topic messages out of Home’s chat history - #208778
Conversation
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 8992fac2-78de-4411-8655-b83ba8e98c73
|
🦞👀 |
Main vs fix: Telegram General send and Home’s next turnI reproduced the send against a loopback Telegram Bot API on CrabBox AWS. The same Control UI and Gateway reader opened the main and fixed transcripts. Main showed the group reply in Home and included it in Home’s next model request. The fix did neither; the topic kept its own record. The four frames below show the same Home conversation, first annotated, then clean. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: passed. What this changesThe PR requires stronger destination evidence before recording confirmed Telegram topic sends in Home, while preserving genuine shared-main IRC DMs. Example: A confirmed send targets telegram:-100123:topic:1 while Home retains an unobserved participant link for that address.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review Keep this PR open: it addresses a current wrong-session history bug, introduces no definite correctness finding, and remains an explicitly paused draft. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherConfirmed outbound sends and queue recovery enter the shared history writer, which combines recorded conversation bindings with channel-owned routes and appends the payload to the destination session. flowchart TD
A[Confirmed outbound send] --> C[Confirmed history writer]
B[Queue recovery] --> C
C --> D[Conversation registry]
C --> E[Channel route resolver]
D --> F[Destination session]
E --> F
F --> G[Model visible transcript]
Technical reviewBest possible solution: Keep destination selection in the shared confirmed-history owner and track malformed-link creation and historical cleanup in the linked issue. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the stale-participant selection path, and supplied Gateway evidence demonstrates its visible result; this read-only review ran no target code and does not establish the original association-creation sequence. Is this the best way to solve the issue? The fix appropriately distinguishes observed participants from reply hints at the shared destination owner, reuses the established alias contract, and preserves genuine ambiguity, but addresses only part of the linked report. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0da25da061dc. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +73, Tests +277, Docs +6. Total +356 across 7 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 29, 2026, 11:50 PM ET / November 30, 2026, 04:50 UTC (Revision 2). |
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 457c3fc4-149c-4ce3-85de-cc0e253ca74b
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
* commit 'b21f557c8fa038ebc1842e204e356eb063aea4c6': (46 commits) test(ui): keep real exports in the channel settings distribution mock (#208855) test(normalization): preserve inline code in quoted previews (#208857) fix(ci): restore adaptive priors across large repository trees (#208838) test(agents): cover typography preservation in patch updates (#208851) fix(ci): wait for selected agent during model setup proof (#208847) fix: keep Telegram topic messages out of Home’s chat history (#208778) fix(worktrees): name the session to restore and say agents can't (#208828) fix: tell an idle parent when a child result couldn't reach its chat (#208772) fix: keep the provider search focused when accounts load (#208780) fix(clawrouter): respect permitted speeds on model fallback (#208830) fix(ui): show provider rejection details without Markdown escapes (#208829) fix: make the cloud worker deletion test reliable across reconnects (#208812) fix(update): preserve preparation lock ownership (#207139) chore(release): update appcast for 2026.11.12 (#208820) fix(android): Talk does nothing when mic access is permanently denied (#206609) test(config): preserve media model primaries across repeated edits (#208837) fix(browser): use the mock keychain for new headed macOS profiles (#208814) fix: start source workers without synchronous filesystem reads in the caller (#208789) refactor(ios): stop loading retired Overview data (#208795) perf(knowledge): stop repeating write-input schemas in batch and correct tools (#208617) ...




Related: #208750
What Problem This Solves
A Telegram message can reach the right forum topic but also appear in Home as a background result. When Home has a stale participant link for that topic, the group message can become part of Home’s next model request.
User Impact
New sends and queue recovery no longer copy that topic’s message into Home just because Home once had its address. Two distinct recoveries both reach the topic’s history. Genuine IRC DMs still enter Home’s history when the channel is configured to share it. This does not delete old transcript entries or repair stored links. There is no migration, config change, or schema, version, or SDK change.
Why This Change Was Made
A saved reply address is not proof that Home owns the chat. I preserve observed participants and matching caller pins. If a single group primary competes only with unobserved DM hints, I use it only when the channel confirms both its exact session key and its chat type. Two plausible owners still cause the history write to be skipped.
For a direct alias such as an IRC nick, the history writer now uses the same bounded rule as explicit delivery (#101507): the route and stored participant must agree on the configured Home key, DM scope must be shared-main, and no binding on that channel can isolate peers. An unresolved Telegram alias is not treated as a confirmed destination. This preserves the ownership decisions in #208049, #208130, and #208169. If a first inbound message races initial session creation, the stored reply address can still be refreshed; the destination transcript remains the topic.
Evidence
I compared main
0dd4e0a2a83with5b9d4cfe20afon CrabBox AWS. Both new regression tests also failed at the reported points on the previous PR head,90347c97. I recreated the old Home association with the supported session writer and inspected SQLite histories rather than inferring ownership from a successful send.Each original Telegram case emitted exactly one send to General. The ordinary inbound-address control stayed out of Home, and ordinary recovery kept its single topic row. The new tests verify that an isolating IRC binding blocks the alias and that two genuine Telegram primaries do not acquire a third recovery row. Format, lint, production and test typechecks, and the focused consumer suites passed.
The Telegram proof uses OpenClaw’s message tool, Gateway handler and plugin with a loopback Bot API. The IRC test uses the monitor’s post-admission DM shape, real session initialization, bundled nick resolver and confirmed-recovery writer. Annotated and clean before/after Home screenshots.
I did not reproduce the original creation of the stale association or exercise a live IRC network. Live Telegram Test Server proof is also missing: the QA broker rejected credential acquisition before it leased a credential, created a forum or sent a message. This is a draft, not a release or merge recommendation.
Reported by @alexph-dev. Co-authored-by: @daniel-lxs.
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by
🦞 Made with OpenClaw