refactor: remove Telegram session deps adapter#96524
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 24, 2026, 2:14 PM ET / 18:14 UTC. Summary PR surface: Source -1, Other +1. Total 0 across 3 files. Reproducibility: not applicable. this is a refactor PR, not a bug report. The prior source-reproducible ratchet-test issue is addressed by the final head's matching test expectation update. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the cleanup if exact-head CI stays green and maintainers accept removing the private test-harness compatibility adapter in favor of the canonical session accessor contract. Do we have a high-confidence way to reproduce the issue? Not applicable; this is a refactor PR, not a bug report. The prior source-reproducible ratchet-test issue is addressed by the final head's matching test expectation update. Is this the best way to solve the issue? Yes; the private Telegram entry now uses the same accessor-backed dependency contract already used by default deps and handlers, while tests inject those canonical accessors directly. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d01c2906015d. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -1, Other +1. Total 0 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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
|
* refactor: remove telegram session deps adapter * test: update telegram session ratchet expectation
* refactor: remove telegram session deps adapter * test: update telegram session ratchet expectation
What Problem This Solves
This removes the remaining Telegram-only compatibility adapter that translated injected
loadSessionStoredependencies into the current session accessor contract. Telegram production code now consumesgetSessionEntryandlistSessionEntriesdirectly, matching the Path 3 accessor boundary used by the rest of the bundled plugin migration.Why This Change Was Made
The adapter was only supporting the local test harness/custom injected-deps shape. Keeping it in
extensions/telegram/src/bot.tsleft a steady-state runtime fallback for a retired internal dependency shape, so the test harness now supplies the canonical accessors directly and the production file is covered by the session accessor ratchet.User Impact
No user-visible Telegram behavior is intended to change. Telegram still starts in polling mode, resolves the same stored Telegram session, sends outbound messages through the gateway, and supports message deletion. External runtime callers are expected to use the current injected dependency contract.
Evidence
node scripts/check-session-accessor-boundary.mjsextensions/telegram/src/bot.tsto the migrated bundled plugin ratchet.node scripts/run-vitest.mjs extensions/telegram/src/bot.create-telegram-bot.test.ts extensions/telegram/src/bot.test.ts extensions/telegram/src/bot.command-menu.test.ts extensions/telegram/src/bot.fetch-abort.test.ts.agents/skills/autoreview/scripts/autoreview --mode localchecks-node-compact-large-whole-1failed becausetest/scripts/check-session-accessor-boundary.test.tsstill expected the old migrated bundled-plugin file set.extensions/telegram/src/bot.tsto that test expectation.node scripts/check-session-accessor-boundary.mjspassed.node scripts/run-vitest.mjs test/scripts/check-session-accessor-boundary.test.tspassed: 1 file, 28 tests.checks-node-compact-small-whole-2failure was unrelated benchmark timing noise in untouchedtest/scripts/bench-gateway-restart.test.ts; failed job rerun passed.72d3ebf0c1d: green.6aeefb8938ded8f91543f16b53d00c97ef7867f2:352c4a40d838d7deb0bfdf38fa33665aef00be72, clean,OpenClaw 2026.6.10 (352c4a4)./Users/phaedrus/Projects/clawdbot, ranpnpm build, restarted the local gateway, and verifiedOpenClaw 2026.6.10 (6aeefb8).pnpm openclaw gateway call channels.status --json --timeout 20000showedtelegramconfigured/running with event loop not degraded.pnpm openclaw gateway call send --json --timeout 30000 --params '{"channel":"telegram","to":"telegram:-1003774691294","sessionKey":"agent:main:main","message":"Path 3 Telegram injected-deps cleanup live proof: gateway send from 6aeefb8.","idempotencyKey":"path3-telegram-injected-deps-6aeefb8-20260624T1058"}'returnedmessageId: "28761".sessions.previewforagent:main:mainshowedPath 3 Telegram injected-deps cleanup live proof: gateway send from 6aeefb8.message.actiondelete for TelegrammessageId: "28761"returned{ "ok": true, "deleted": true }.352c4a40d838d7deb0bfdf38fa33665aef00be72, rebuilt, restarted gateway, and verifiedOpenClaw 2026.6.10 (352c4a4)plushealthzlive.Refs #88838