fix(active-memory): skip scoped topic channelId for embedded recall run in Telegram forum topics (#76704)#76719
Conversation
|
Codex review: needs changes before merge. Summary Reproducibility: yes. Source inspection gives a high-confidence path: Telegram topic sessions produce a colon-containing conversation id, current Active Memory can pass that id as messageChannel, and bundled plugin dir-name validation rejects ':'. Next step before merge Security Review findings
Review detailsBest possible solution: Keep the resolver fix and regression test, add the missing changelog credit, then merge once normal maintainer checks pass. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection gives a high-confidence path: Telegram topic sessions produce a colon-containing conversation id, current Active Memory can pass that id as messageChannel, and bundled plugin dir-name validation rejects ':'. Is this the best way to solve the issue? Yes. Resolving this inside Active Memory by ignoring scoped conversation ids for runnable channel selection and falling back to messageProvider is the narrow maintainable fix; the remaining cleanup is changelog credit only. Full review comments:
Overall correctness: patch is correct Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against d0497d13d18e. |
|
Fixup pushed (SHA `38fcf6fa10`): P3 — changelog entry: added single-line fix entry under |
…nel in Telegram forum topics (openclaw#76704) Telegram forum-topic sessions use a scoped conversation id (e.g. "-100123:topic:77") as the channelId. Passing that value directly to `runEmbeddedPiAgent` as `messageChannel` causes `normalizeBundledPluginDirName` to throw because ":" is not allowed in plugin directory names. Introduce `runnableExplicitChannel` in `resolveRecallRunChannelContext`: any channelId containing ":" is treated as a scoped conversation id, not a runnable channel name. The embedded recall run falls back to `messageProvider` ("telegram") as its channel instead, which is the correct plugin directory name. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…annel fix (openclaw#76704) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
38fcf6f to
7d3e1cc
Compare
|
Closing this PR because the author has more than 20 active PRs in this repo. Please reduce the active PR queue and reopen or resubmit once it is back under the limit. You can close your own PRs to get back under the limit. |
|
Merged in 081f873 after representative verification with I rebased the PR onto latest |
…un in Telegram forum topics (openclaw#76704) (openclaw#76719) Verified: - pnpm install --frozen-lockfile - pnpm test extensions/active-memory/index.test.ts - pnpm exec oxfmt --check --threads=1 extensions/active-memory/index.ts extensions/active-memory/index.test.ts CHANGELOG.md - git diff --check origin/main..HEAD Co-authored-by: hclsys <7755017+hclsys@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
…un in Telegram forum topics (openclaw#76704) (openclaw#76719) Verified: - pnpm install --frozen-lockfile - pnpm test extensions/active-memory/index.test.ts - pnpm exec oxfmt --check --threads=1 extensions/active-memory/index.ts extensions/active-memory/index.test.ts CHANGELOG.md - git diff --check origin/main..HEAD Co-authored-by: hclsys <7755017+hclsys@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
…un in Telegram forum topics (openclaw#76704) (openclaw#76719) Verified: - pnpm install --frozen-lockfile - pnpm test extensions/active-memory/index.test.ts - pnpm exec oxfmt --check --threads=1 extensions/active-memory/index.ts extensions/active-memory/index.test.ts CHANGELOG.md - git diff --check origin/main..HEAD Co-authored-by: hclsys <7755017+hclsys@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
Fixes #76704.
Problem
Telegram forum-topic sessions encode the conversation identity as a scoped id in the
channelIdfield:resolveRecallRunChannelContextpassed this value directly torunEmbeddedPiAgentasmessageChannel. That value then reachesnormalizeBundledPluginDirName, which throws:because
:is not allowed in plugin directory names.Fix
Introduce
runnableExplicitChannelinresolveRecallRunChannelContext: anychannelIdcontaining:is a scoped conversation id, not a runnable channel name. The resolution chain falls back tomessageProvider("telegram") asmessageChannelinstead — the correct plugin directory name.Test
Added a regression test in
extensions/active-memory/index.test.ts:Simulates a
before_prompt_buildhook call withchannelId: "-100123:topic:77"and assertsrunEmbeddedPiAgentreceivesmessageChannel: "telegram".All 102 tests pass.