Skip to content

fix(telegram): preserve forum topic routing#76920

Open
kesslerio wants to merge 10 commits into
openclaw:mainfrom
kesslerio:fix/telegram-topic-thread-fallback
Open

fix(telegram): preserve forum topic routing#76920
kesslerio wants to merge 10 commits into
openclaw:mainfrom
kesslerio:fix/telegram-topic-thread-fallback

Conversation

@kesslerio

@kesslerio kesslerio commented May 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keep Telegram thread-not-found fallback for General topic (message_thread_id=1), while failing closed for explicit non-General forum topic sends and direct/private topic sends.
  • Preserve Telegram topic routing for automatic async/heartbeat follow-ups by reusing stored topic thread IDs for plugin-owned group routes.
  • Seed explicit cron announce targets into isolated-session delivery context so completion and heartbeat notices stay on the configured topic instead of falling back to an agent default group.
  • Keep the effective diff focused on Telegram topic routing, cron delivery context, outbound target reconstruction, and the temporary current-main memory-core test-contract shim needed for CI.

Change Type

  • Bug fix
  • Refactor required for the fix
  • Feature
  • Documentation
  • Tests only

Scope

Telegram extension outbound delivery, shared heartbeat target resolution, isolated cron session delivery metadata, and one test-only memory-core mock compatibility update for the current subagent runtime contract.

Linked Issue / PR

Root Cause

The Telegram sender retried 400: message thread not found by removing message_thread_id too broadly. That is safe only for General-topic recovery, but unsafe for explicit non-General forum topics and direct/private topic sends because Telegram can then deliver into the wrong root context.

A separate async path could reconstruct heartbeat/completion delivery from incomplete session metadata. Topic-scoped Telegram sessions and explicit cron announce jobs could lose the thread id before later automatic notices were sent.

Regression Test Plan

  • Explicit forum topic text/media/sticker/poll sends reject after the first thread-not-found error and do not retry threadless.
  • Topic-qualified recipient strings such as telegram:group:<id>:topic:<thread> fail closed.
  • Direct/private and resolved username DM sends with explicit thread ids reject after the first thread-not-found error and do not retry threadless.
  • Draft stream preview/materialize sends fail closed for non-General forum topics and keep the existing stricter DM-preview behavior.
  • Heartbeat target resolution preserves stored thread IDs for plugin-owned group routes when only deliveryContext or origin.chatType carries the topic context.
  • Explicit Telegram cron announce targets persist session delivery context with the resolved chat id and topic thread id.

Real behavior proof

  • Behavior or issue addressed: Telegram topic sends must not silently retry without message_thread_id after Telegram reports message thread not found; async heartbeat/completion delivery must preserve the intended topic route instead of falling back to a group/default route.

  • Real environment tested: Disposable OpenClaw staging gateway on NixOS Linux, PR worktree /tmp/openclaw-pr76920-merge, head f515e5d36ac1166b955838c21489390dbfd9dbe2, using @kesslerClawBot in a real Telegram forum group (-1003908474243). The staging gateway was started from this PR head, and the proof script used the PR's built Telegram runtime, sendMessageTelegram from dist/extensions/telegram/runtime-api.js.

  • Exact steps or command run after this patch: Started the disposable gateway with OPENCLAW_CONFIG_PATH=/home/art/.local/state/openclaw-staging/disposable/openclaw.json and OPENCLAW_STATE_DIR=/home/art/.local/state/openclaw-staging/disposable/state, then ran a redacted proof script from /tmp/openclaw-pr76920-merge that exercised: root chat-scoped send to -1003908474243, explicit General topic -1003908474243:topic:1, invalid explicit non-General topic -1003908474243:topic:999999, and valid explicit non-General topic -1003908474243:topic:16.

  • Evidence after fix (screenshot, recording, terminal capture, console output, redacted runtime log, linked artifact, or copied live output): Copied live output from the staging gateway/proof run. Full PR comment: fix(telegram): preserve forum topic routing #76920 (comment)

    Key copied output:

    head=f515e5d36ac1166b955838c21489390dbfd9dbe2
    chat=-1003908474243
    generalTopic=1
    [telegram] outbound send ok accountId=default chatId=-1003908474243 messageId=14 operation=sendMessage deliveryKind=text chunkCount=1
    rootSend=ok messageId=14 chatId=-1003908474243
    [telegram] outbound send ok accountId=default chatId=-1003908474243 messageId=15 operation=sendMessage deliveryKind=text chunkCount=1
    generalTopicSend=ok messageId=15 chatId=-1003908474243 topic=1
    [telegram] message failed: Call to 'sendMessage' failed! (400: Bad Request: message thread not found)
    invalidTopicSend=failed_closed topic=999999
    invalidTopicCheck=no_threadless_retry_observed
    
    nonGeneralTopicProof=head=f515e5d36ac1166b955838c21489390dbfd9dbe2
    nonGeneralTopic=16
    [telegram] outbound send ok accountId=default chatId=-1003908474243 messageId=17 operation=sendMessage deliveryKind=text threadId=16 chunkCount=1
    nonGeneralTopicSend=ok messageId=17 chatId=-1003908474243 topic=16
    
  • Observed result after fix: Root chat-scoped send succeeded without a topic/thread id; General topic delivery succeeded and remained chat-scoped; an invalid explicit non-General forum topic failed closed and did not retry threadless; a valid explicit non-General forum topic sent with threadId=16, proving delivery stayed in the requested forum topic.

  • What was not tested: I did not run a full live cron or heartbeat follow-up through the gateway in this proof pass. Existing focused tests still cover cron session delivery context and heartbeat topic-route reconstruction.

  • Proof limitations or environment constraints: The live proof covers the real Telegram transport and topic send path. Cron/heartbeat route reconstruction remains covered by focused regression tests rather than a scheduled end-to-end cron/heartbeat run.

  • Before evidence (optional but encouraged): ClawSweeper's current-main/source review for this PR identifies the pre-patch failure mode: explicit Telegram topic sends could retry threadless after message thread not found, and async follow-up routing could lose topic context. The after-fix proof above shows the explicit send path no longer retries threadless for an invalid non-General topic.

Verification

Current head 75acdc52684b07c8355966394f5ad5347a713e0a was refreshed against latest origin/main, trimmed back to the intended nine-file effective diff, and pushed after the commands above passed locally.

Security Impact

Reduces cross-topic message leakage in Telegram forum groups and private/direct topic contexts by failing closed when an explicit thread is stale or invalid, and by preserving topic context for automatic follow-up notices.

Compatibility / Migration

No config migration. Non-General forum topic and direct/private topic sends now surface the Telegram error instead of silently retrying threadless. Explicit cron announce routes now persist the intended delivery context for later automatic notices.

Risks

If an operator intentionally relied on stale explicit topic sends falling back to a root chat, those sends now fail. That behavior was the leakage bug this PR is meant to prevent.

The cron/session change is intentionally limited to resolved explicit delivery targets; bare delivery.mode: none jobs still avoid implicit last-target resolution.

AI Assistance

AI-assisted refresh, simplification, validation, and PR-body update.

@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram size: M labels May 3, 2026
@clawsweeper

clawsweeper Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 3, 2026, 5:02 PM ET / 21:02 UTC.

Summary
The branch narrows Telegram thread-not-found fallback behavior, preserves topic/thread IDs through Telegram send and draft paths, stores explicit cron delivery context, and extends heartbeat route reconstruction with focused tests.

PR surface: Source +274, Tests +412. Total +686 across 12 files.

Reproducibility: yes. Source inspection and PR tests show current main can lose topic context in the cron/heartbeat metadata path, and the Telegram fail-closed behavior is covered by focused branch tests plus older live Telegram output.

Review metrics: none identified.

Stored data model
Persistent data-model change detected: serialized state: src/cron/isolated-agent.direct-delivery-core-channels.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦐 gold shrimp
Patch quality: 🐚 platinum hermit
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add live or Mantis Telegram proof on head 16fe70e for valid topic sends, invalid-topic fail-closed behavior, and topic-scoped media caption fallback.
  • [P1] Get maintainer acceptance of the fail-closed compatibility change and cron session deliveryContext persistence before merge.
  • Trim the remaining unrelated formatting-only drift if maintainers want the branch to stay strictly Telegram/cron scoped.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The PR includes useful live Telegram output, but it was captured on an older head and does not prove the current-head media-caption fallback or cron/heartbeat route behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Mantis proof suggestion
A current-head Telegram Desktop proof would directly show whether topic-scoped messages stay in the requested topic and invalid explicit topics do not create root-chat messages. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis telegram desktop proof: verify current PR head keeps valid Telegram forum text/media sends in the requested topic and invalid explicit topics fail without a root-chat fallback.

Risk before merge

  • [P2] Current-head real behavior proof is incomplete: the live Telegram output predates the latest media-caption fallback change and does not exercise current head 16fe70e.
  • [P1] The fail-closed behavior intentionally makes stale explicit non-General topic or DM-topic sends error instead of falling back to a root chat, which is safer for routing but can break any setup relying on that fallback.
  • [P1] Persisting explicit cron delivery context changes later heartbeat/completion routing for cron sessions, so maintainers should accept the session-state behavior before merge.

Maintainer options:

  1. Prove Current Head Before Merge (recommended)
    Get live or Mantis Telegram proof from head 16fe70e that covers valid topic sends, invalid explicit topic fail-closed behavior, and topic-scoped media caption fallback.
  2. Accept The Fail-Closed Tradeoff
    A maintainer can explicitly accept that stale explicit topic sends now error instead of silently falling back to a root chat or DM surface.
  3. Pause Until Route Semantics Are Settled
    If maintainers are not ready to change cron heartbeat/completion session routing, pause the PR and split the Telegram send fail-closed fix from the session-state change.

Next step before merge

  • [P1] The remaining blockers are current-head Telegram proof and maintainer acceptance of compatibility/session-state behavior, not a narrow code repair ClawSweeper should attempt automatically.

Security
Cleared: No concrete security or supply-chain regression was found; the diff does not add dependencies, scripts, secrets access, or permissions and reduces cross-topic message leakage risk.

Review details

Best possible solution:

Land a narrow refreshed PR after current-head Telegram proof covers text/media topic delivery and invalid-topic fail-closed behavior, with maintainer sign-off on the fail-closed and cron session-routing semantics.

Do we have a high-confidence way to reproduce the issue?

Yes. Source inspection and PR tests show current main can lose topic context in the cron/heartbeat metadata path, and the Telegram fail-closed behavior is covered by focused branch tests plus older live Telegram output.

Is this the best way to solve the issue?

Mostly yes. The code puts Telegram-specific fallback policy in the Telegram plugin and keeps core changes generic to delivery context, but the latest head still needs live proof and maintainer acceptance of the upgrade behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 010b61746379.

Label changes

Label justifications:

  • P2: The PR addresses real Telegram forum-topic message routing problems with limited channel-specific blast radius, but it is not an emergency core outage.
  • merge-risk: 🚨 compatibility: The patch intentionally turns some stale explicit topic sends that previously could fall back into visible Telegram errors.
  • merge-risk: 🚨 session-state: The patch persists explicit cron delivery context and changes how later heartbeat/completion routes reuse stored session thread IDs.
  • merge-risk: 🚨 message-delivery: The changed Telegram fallback and heartbeat routing rules directly decide whether messages stay in the requested topic, fail closed, or route elsewhere.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR includes useful live Telegram output, but it was captured on an older head and does not prove the current-head media-caption fallback or cron/heartbeat route behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The PR changes visible Telegram forum-topic delivery and can be demonstrated in a short Telegram proof run.
Evidence reviewed

PR surface:

Source +274, Tests +412. Total +686 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 6 356 82 +274
Tests 6 428 16 +412
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 784 98 +686

What I checked:

  • Repository policy applied: Root and scoped Telegram/outbound/agents/test AGENTS.md files were read; Telegram topic/transport changes require real Telegram proof and fail-closed review because wrong-surface delivery is worse than a loud error. (extensions/telegram/AGENTS.md:1, 010b61746379)
  • Current main comparison: Current main is 010b617 and does not have the PR's explicit thread-not-found fallback owner or explicit cron route persistence helper. (src/cron/isolated-agent/run.ts:843, 010b61746379)
  • PR head Telegram fallback policy: PR head adds shouldAllowTelegramThreadlessFallback and withTelegramThreadFallback, allowing threadless retry only when policy permits it and otherwise preserving fail-closed behavior. (extensions/telegram/src/send.ts:783, 16fe70e4f405)
  • PR head media caption safety: The latest head keeps message_thread_id on plain-caption fallback for topic-scoped media and only strips it when the thread-not-found fallback path has already removed it. (extensions/telegram/src/send.ts:1509, 16fe70e4f405)
  • PR head cron/session route persistence: PR head writes resolved explicit cron delivery context and inferred chatType into the cron session before the pre-run session entry is persisted. (src/cron/isolated-agent/run.ts:330, 16fe70e4f405)
  • PR head heartbeat topic reuse: PR head lets heartbeat target=last reuse the stored threadId when group chat type is carried by origin or plugin inference, not only entry.chatType. (src/infra/outbound/targets.ts:248, 16fe70e4f405)

Likely related people:

  • obviyus: Recent current-main commits touch Telegram send fallbacks, rich send behavior, draft/rich message handling, and outbound send retry behavior near this PR's code paths. (role: recent Telegram send/draft contributor; confidence: high; commits: a53833e842fd, 6ef0abbaae49, f8769559aecc; files: extensions/telegram/src/send.ts, extensions/telegram/src/draft-stream.ts, extensions/telegram/src/bot/helpers.ts)
  • VACInc: Merged current-main forum-topic session routing and buffering work in the Telegram plugin, which overlaps this PR's topic identity and delivery routing invariants. (role: adjacent forum-topic routing contributor; confidence: medium; commits: f526d96c98ab; files: extensions/telegram/src/bot/helpers.ts, extensions/telegram/src/send.ts)
  • steipete: Recent commits touched cron persistent session targets, outbound channel resolution, Telegram forum flag behavior, and documentation around the relevant delivery surfaces. (role: recent cron/outbound/Telegram adjacent contributor; confidence: medium; commits: be5906e19dd7, c4f0da00a9fe, 06b2bf1c0a38; files: src/cron/isolated-agent/run.ts, src/infra/outbound/targets.ts, extensions/telegram/src/bot/helpers.ts)
  • ZengWen-DT: Recent current-main work bootstrapped plugin session targets and preserved plugin route policy in heartbeat/outbound routing, close to the PR's heartbeat target resolution changes. (role: recent heartbeat/outbound route contributor; confidence: medium; commits: 6470bb76253b; files: src/infra/outbound/targets.ts)
  • scotthuang: Recent current-main work preserved cron delivery awareness for target sessions, which overlaps the PR's explicit cron delivery context persistence. (role: recent cron delivery awareness contributor; confidence: medium; commits: 81abc2b21b03; files: src/cron/isolated-agent/run.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. label May 5, 2026
@kesslerio kesslerio changed the title fix(telegram): fail closed on stale forum threads fix(telegram): preserve forum topic routing May 5, 2026
@kesslerio

Copy link
Copy Markdown
Contributor Author

Follow-up pushed in d40225f83e.

Addressed the prior review items:

  • Added cfg: TELEGRAM_TEST_CFG to the new Telegram send/sticker/poll tests and removed stale previewTransport test options that no longer exist in the draft stream API.
  • Added a CHANGELOG.md entry.
  • Extended the fix beyond thread-not-found retry: explicit cron announce topic routes are now persisted into isolated-session delivery context, and heartbeat target reconstruction preserves stored topic thread IDs for plugin-owned group routes when the session only has deliveryContext or origin.chatType.

Verification run locally:

  • pnpm test src/infra/outbound/targets.test.ts src/cron/isolated-agent.direct-delivery-core-channels.test.ts extensions/telegram/src/send.test.ts extensions/telegram/src/draft-stream.test.ts
  • pnpm test src/infra/heartbeat-runner.ghost-reminder.test.ts src/cron/isolated-agent/session.test.ts src/cron/isolated-agent.delivery-awareness.test.ts src/cron/isolated-agent/delivery-target.test.ts
  • pnpm test extensions/telegram/src/send.test.ts extensions/telegram/src/draft-stream.test.ts
  • pnpm exec oxfmt --check --threads=1 CHANGELOG.md extensions/telegram/src/send.test.ts extensions/telegram/src/draft-stream.test.ts src/cron/isolated-agent.direct-delivery-core-channels.test.ts src/cron/isolated-agent.test-setup.ts src/cron/isolated-agent/run.ts src/infra/outbound/targets.test.ts src/infra/outbound/targets.ts
  • git diff --check
  • pnpm check:changed

@hclsys

This comment was marked as low quality.

@kesslerio

Copy link
Copy Markdown
Contributor Author

Rebased and refreshed this PR on current main.

Current head: 54b7b0d1f842
Base tested: origin/main 3f590b48280e
OpenClaw package version tested: 2026.5.12-beta.1
Node/pnpm: v22.21.1 / 11.1.0

Updates in this refresh:

  • Resolved the rebase conflicts against current main.
  • Kept the original fail-closed behavior for explicit non-General Telegram forum topics.
  • Preserved the cron/heartbeat topic-route work from d40225f83e.
  • Ran a simplification pass and collapsed the threadless fallback policy into the shared Telegram helper, while keeping normal send and draft-preview DM behavior distinct.
  • Updated the PR body with tested versions, base/head SHAs, and the remaining live-proof residual.

Local verification:

  • pnpm test extensions/telegram/src/send.test.ts extensions/telegram/src/draft-stream.test.ts
  • pnpm test src/infra/outbound/targets.test.ts src/cron/isolated-agent.direct-delivery-core-channels.test.ts
  • pnpm test src/infra/heartbeat-runner.ghost-reminder.test.ts src/cron/isolated-agent/session.test.ts src/cron/isolated-agent.delivery-awareness.test.ts src/cron/isolated-agent/delivery-target.test.ts
  • pnpm check:changed
  • git diff --check
  • codex review --base origin/main

GitHub check status after push: mergeable, 88 checks passing, 20 skipped, 0 pending. The only failed check is still Real behavior proof, which is expected from the existing label/gate because I cannot provide after-fix live Telegram forum proof from this checkout. This needs maintainer override or a live Telegram bot/forum verification run.

@kesslerio

Copy link
Copy Markdown
Contributor Author

Test-based reproduction proof

This is automated reproduction evidence for the threadless-fallback boundary in this PR. It is not a live Telegram forum smoke, so it should not be treated as replacing the remaining Real behavior proof gate unless maintainers accept test proof for that gate.

Base reproduces the bug boundary

Base: origin/main at 3f590b48280e

I added a temporary failing regression test to a clean base worktree:

pnpm test extensions/telegram/src/draft-stream.test.ts -- -t "reproduction: does not retry forum message preview sends without thread when thread is not found"

Result: failed as expected. Base retries a forum/topic preview send without message_thread_id after Telegram returns 400: Bad Request: message thread not found.

Key failure:

AssertionError: expected "vi.fn()" to be called 1 times, but got 2 times
extensions/telegram/src/draft-stream.test.ts:199:29

That proves the pre-fix behavior still has a threadless retry path for explicit forum sends.

PR head passes the fixed behavior

Head: 54b7b0d1f842

The same behavior is covered by the committed PR test:

pnpm test extensions/telegram/src/draft-stream.test.ts -- -t "does not retry forum message preview sends without thread when thread is not found"

Result:

Test Files  1 passed (1)
Tests  1 passed | 32 skipped (33)
[test] passed 1 Vitest shard

So the current PR head proves base-fails/head-passes for the explicit forum send retry case: when a forum/topic send has a message_thread_id, this PR now fails closed instead of retrying into the group root.

Residual: I still have not run a live Telegram forum bot smoke against this PR head. The local tests prove the fallback bug boundary; they do not prove end-to-end production Telegram delivery into a real forum topic.

@clawsweeper clawsweeper Bot added the mantis: telegram-visible-proof Mantis should capture Telegram visible proof. label May 13, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: L proof: supplied External PR includes structured after-fix real behavior proof. and removed size: M triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 13, 2026
@kesslerio
kesslerio force-pushed the fix/telegram-topic-thread-fallback branch from 7fe0c05 to bee6adf Compare May 13, 2026 17:55
@openclaw-barnacle openclaw-barnacle Bot added channel: matrix Channel integration: matrix gateway Gateway runtime labels May 13, 2026
@kesslerio

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Rebased this branch onto current upstream/main and addressed the P2 finding plus current-main CI guardrail failures:

  • Direct/private Telegram topic sends now fail closed on message thread not found; no threadless retry for DM/direct sends.
  • PR body has the required Real Behavior Proof fields and current tested versions/head SHA.
  • Patched the inherited lint/type/contract/OpenGrep failures that showed up after rebase (src/media/fetch.ts, plugin runtime config scope, Matrix test runtime boundary, and the sessions-patch lint cleanup).

Local checks run after the update:

pnpm check:test-types
pnpm lint --threads=8
pnpm test extensions/telegram/src/send.test.ts extensions/telegram/src/draft-stream.test.ts src/infra/outbound/targets.test.ts src/cron/isolated-agent.direct-delivery-core-channels.test.ts src/infra/heartbeat-runner.ghost-reminder.test.ts src/cron/isolated-agent/session.test.ts src/cron/isolated-agent.delivery-awareness.test.ts src/cron/isolated-agent/delivery-target.test.ts
pnpm test src/plugins/contracts/deprecated-internal-config-api.test.ts src/plugins/contracts/plugin-sdk-package-contract-guardrails.test.ts
pnpm test src/plugins/registry.runtime-config.test.ts src/media/fetch.test.ts extensions/matrix/src/matrix/subagent-hooks.test.ts

I could not run local OpenGrep because opengrep is not installed in this environment, but the reported direct Response.arrayBuffer() finding in src/media/fetch.ts is removed.

@clawsweeper

clawsweeper Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@kesslerio
kesslerio force-pushed the fix/telegram-topic-thread-fallback branch from 244d1d0 to d7045b1 Compare May 13, 2026 18:51
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label May 13, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. mantis: telegram-visible-proof Mantis should capture Telegram visible proof. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. mantis: telegram-visible-proof Mantis should capture Telegram visible proof. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels May 27, 2026
@RomneyDa

Copy link
Copy Markdown
Member

Heads up: this PR needs to be updated against current main before the new required Dependency Guard check can pass.

@kesslerio

Copy link
Copy Markdown
Contributor Author

@clawsweeper re_review

kesslerio added 10 commits July 3, 2026 10:58
…back

ClawSweeper P1: the media wrapper passed removeMessageThreadIdParam(
plainMediaParams) even for the first attempt, so an HTML caption parse
error for a topic-scoped media send retried without message_thread_id and
could deliver topic media to the group root. Keep the thread for caption
parse fallback; only strip it for the allowed thread-not-found retry.
@kesslerio

Copy link
Copy Markdown
Contributor Author

@clawsweeper re_review

@kesslerio

Copy link
Copy Markdown
Contributor Author

@openclaw-mantis telegram desktop proof: verify current PR head keeps valid Telegram forum text/media sends in the requested topic and invalid explicit topics fail without a root-chat fallback.

@clawsweeper

clawsweeper Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@kesslerio thanks for the PR. ClawSweeper is still waiting on real behavior proof before this can move forward.

Useful proof can be a screenshot, short video, terminal output, copied live output, linked artifact, or redacted logs that show the changed behavior after the fix. Please redact private tokens, phone numbers, private endpoints, customer data, and anything else sensitive.

Once proof is added to the PR body or a comment, ClawSweeper or a maintainer can re-check it.

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

Labels

agents Agent runtime and tooling channel: telegram Channel integration: telegram mantis: telegram-visible-proof Mantis should capture Telegram visible proof. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants