feat(telegram-e2e): add repo-local telegram user CLI#111
Merged
Conversation
- what: replace leftover shell/Python userbot wrapper flow with repo-local `telegram-user` CLI calls, remove `userbot-common.sh`, and document Python as an internal transport - why: keep one operator surface for Telegram user E2E so humans and agents stop drifting into brittle legacy entrypoints - risk: older local workflows that depended on direct helper internals now need the repo CLI available, though the compatibility wrapper name still works
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
telegram-userCLI, routed legacy wrappers through it, and kept Python as an internal Telethon transport instead of a first-class UX.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
openclaw telegram-user precheck|send|read|waitscripts/telegram-e2e/userbot-send-live.shis now a compatibility shim over the CLI instead of a separate Python pathscripts/telegram-e2e/run-consumer-first-reply-smoke.shandrun-model-inheritance-e2e.shuse the CLI surfaceSecurity Impact (required)
No)Yes)No)Yes)No)Yes, explain risk + mitigation:.env.localclaim duringscripts/telegram-live-runtime.sh ensure, which avoids false pool-exhaustion failures. The script still reportstoken_claim_countand fails loudly when the same token appears claimed by more than one worktree.Repro + Verification
Environment
.env.local,scripts/telegram-e2e/.env.local, existing user session fileSteps
bash scripts/telegram-live-runtime.sh ensurepnpm test -- src/telegram-user/match.test.ts src/commands/telegram-user.test.ts src/cli/program/register.subclis.test.tsscripts/telegram-e2e/userbot-send-live.sh --chat @jarvis_tester_1_bot --text "main branch wrapper smoke $(date +%s)"pnpm openclaw:local telegram-user wait --chat @jarvis_tester_1_bot --after-id 41087 --sender-id 8475294213 --timeout-ms 60000 --jsonExpected
ensurekeeps the current worktree token claim instead of failing when the pool is fullActual
ensurereportedruntime_ownership=ok,runtime_health=ok,token_claim_count=1message_id=41087message_id=41088withmatched_by=no_thread_filterEvidence
Human Verification (required)
What you personally verified (not just CI), and how:
telegram-userprecheck/send/read/wait flow works against@jarvis_tester_1_botuserbot-send-live.shnow routes through the repo-local CLI and still sends successfullyscripts/telegram-live-runtime.sh ensureon this branch reuses the current worktree token claim without duplicating claimstoken_claim_count > 1pnpm build && pnpm check && pnpm testReview Conversations
Compatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
6ed0152f7dandafe65fa2f1scripts/telegram-e2e/userbot-send-live.sh,scripts/telegram-e2e/run-model-inheritance-e2e.sh,scripts/telegram-e2e/userbot-common.sh, Telegram E2E docsrun-model-inheritance-e2e.shfails before polling because CLI precheck/send/wait wiring is brokenRisks and Mitigations
AI Assistance