Repository navigation
fix(doctor): stop false Telegram first-time setup warning - #176264
xiaopan-xydt wants to merge 321 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesDoctor discovers channel accounts without a live registry and suppresses false Telegram parent-scope first-time setup warnings. Example: Telegram accounts default and second configure groups -1001111111111 and -1002222222222, with groupAllowFrom=["11111111"].
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current Doctor diagnostic bug, preserves genuine setup guidance, and now supplies the previously requested CLI and upgrade evidence; no actionable defects remain. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherDoctor reads channel configuration, resolves account identities through channel plugins, and combines shared allowlist diagnostics with Telegram-owned setup guidance. flowchart TD
A[Doctor CLI] --> B[Configuration and environment]
B --> C[Read-only channel plugin discovery]
C --> D[Configured and runtime account identities]
D --> E[Shared allowlist scanner]
B --> E
E --> F[Telegram Doctor adapter]
F --> G[Diagnostic output]
Technical reviewBest possible solution: Use the existing config-driven discovery owner and Telegram adapter to remove false parent diagnostics while preserving genuine account-level guidance. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically emits the reported parent warning, and contributor CLI output reproduces it on published 2026.10.5; no target code was executed during this read-only review. Is this the best way to solve the issue? The patch addresses both reported layers using existing owners, preserves plugin callback contracts, and includes distinct regressions for registry-empty discovery and genuine setup guidance. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c192d50700df. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +91, Tests +163. Total +254 across 7 files. Added test files: 0. View PR surface stats
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 follows the weaker of proof and patch quality; ✨ 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 (3 earlier review cycles)
Reviewed October 19, 2026, 10:30 AM ET / 14:30 UTC (Revision 4). |
|
Fixed the P2 finding in
Added the regression case: top-level Validation: The live shipped-CLI proof remains blocked because this environment has no Telegram bot credentials/account; I did not fabricate a run. The existing-config upgrade output still needs an authenticated environment. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Fixed both findings in
Validation: Live shipped-CLI/upgrade proof remains blocked because this environment has no Telegram credentials or representative existing account data; I did not fabricate that evidence. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
## What Problem This Solves Fixes: Telegram's progress draft shows one operation twice when the agent calls a tool through the catalog dispatcher (`dispatch_action`). The dispatcher row stays visible next to the real operation until the turn ends. Tool rows also run the action label into its context, and parallel subagents with the same label cannot be told apart. ## User Impact - A successful dispatcher call collapses into its real operation as soon as the nested result is accepted. Failed or blocked dispatchers stay visible as before. - Tool rows read `🛠️ **Exec** · command…`: the icon stays outside the bold label, and ` · ` separates the action from its context. Running and failed status words stay italic. Completed rows drop the redundant word. - Subagent rows, and progress rows for `sessions_send`, `sessions_history` and `subagents steer|kill`, add a four-character UUID suffix such as `…2633`. An unlabeled child shows `Subagent …a4f0`, not `Delegated work`. The suffix is display only: routing, lifecycle keys and diagnostics keep the full identity. No new configuration, schema or permissions. ## Why This Change Was Made - The existing wrapper-retirement owner (`finalizeToolActivity`) now runs when a nested call's result is accepted, not only at `agent_end`. It records each retirement, so later events cannot retract the same row again. - The Telegram renderer formats the icon, bold label, separator and context. The separator counts toward the row width budget. - One display-only helper, `formatSubagentProgressReference`, makes the short reference. Codex native worker threads pass their own thread IDs; nothing infers a session ID from a task path. - The shared client tool catalog no longer ships Gateway-only `progress` metadata. No web, iOS, macOS or Android client reads it. ## Evidence Live Telegram Test Server run through the real QA user (TDLib recorder) and the official Telegram Web K client. The same scenario ran on the merge base `db964b78` (before) and on this branch (after): exec, read, `sessions_spawn` and `sessions_history` through the catalog dispatcher (`dispatch_action`, because both tools are catalog-only in this config), then a held command. The model is a scripted Responses provider; the Gateway, tools, catalog dispatcher, subagent spawn and Telegram delivery are real. Config: `streaming.mode: progress` with `progress.toolProgress: true`. **Before:** each dispatched operation shows twice until the turn ends.  **After:** one row per operation, `·` separators, and the child's short reference.  A second recorded run shows the same thing in the TDLib edit history (HTML rebuilt from Telegram entities; the child reference changes per run): | | Before (`db964b78`) | After (this branch) | |---|---|---| | Read row | `<b>📖 Read</b> lines 1-20 from feed-proof.txt` | `📖 <b>Read</b> · lines 1-20 from feed-proof.txt` | | Spawn row | `<b>🤖 Start subagent</b> Check marker` ×2 | `🤖 <b>Start subagent</b> · Check marker …707e` ×1 | | History row | `<b>📖 Read session history</b>` ×2 | `📖 <b>Read session history</b> · …707e` ×1 | | Duplicates | visible in every edit from the dispatch until the edit just before the final reply (~11 s here) | none in any edit | Both turns delivered `FEED_FINAL_OK` and retired the draft. The Telegram Web session was terminated by its exact ID, and the lease was released. Focused tests on this head: `progress-draft-preview`, `embedded-agent-subscribe.tool-result-ordering`, `tool-display`, `channels/streaming`, `subagent-control.worker`: **148 passed**. `bot-message-dispatch.preview.telegram-http`: **41 passed** (this head updates its stale `🛠️ Exec` expectation to `🛠️ <b>Exec</b>`). Limits: the model is scripted, so this does not show model commentary. The candidate Gateway ran a `dist` built from `5ed94ec`; this head (`79f4ffb`) differs from it only in that one test file. ## Compatibility and merge risk - **Public SDK:** one additive export, `formatSubagentProgressReference`, in `openclaw/plugin-sdk/agent-harness-runtime`. No existing export changes or is removed. - **Two-way door:** no stored state, config or protocol changes. A revert fully undoes it. - **Blast radius:** progress rows on Telegram and the other consumers of the shared display registry (Slack, ClickClack, Codex projection), and when a dispatcher row is retired in the progress feed. Contributor credit: @vincentkoc. Co-authored-by: vincentkoc <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
…enclaw#184512) Commit selected invitation effects and involvement watermarks atomically with fresh original transcript messages; preserve replay denial, private pending-input custody and public SDK authority boundaries. Keep the existing submitted-input source-read owner and settlement semantics. Qualified on the exact published source: 44 Node and 16 Bun cases, scoped types/lint/ratchets and canonical generators; clean HEAD/base full builds and all three disclosed test-only enum-overlaid internal-policy Gateway scenarios per root. Public invitation/config activation remains in openclaw#184515. Co-authored-by: vincentkoc <[email protected]> Co-authored-by: jalehman <[email protected]>
…es (openclaw#197742) * fix(logging): keep catalog refresh working after logging starts * fix(logging): qualify default log targets in filesystem worker
The host-side prepare-prepublish-plugin-registry phase can fail before any Docker scenario starts. npm currently prints only an exit code and a debug-log path, and the existing survivor artifact does not include that log. Give host npm children a job-local log directory and upload it on failure. Keep container diagnostics and packaging behavior unchanged. Validated with scripts/check-workflows.mts, git diff --check, and a failing npm command on Node 24.22.1/npm 11.19.1 that writes its debug log to the configured directory. Local ClawSweeper completed; its container-log finding does not apply to this host-side prepublish failure.
fix(codex): stop the session catalog request when codex sessions is interrupted Interrupting openclaw codex sessions left its Gateway catalog request running, so a reply that arrived during interrupt cleanup still printed the catalog after the interrupt notice and the process lingered until the reply or a kill. The catalog call now takes the command's abort signal and stops on interrupt, matching openclaw#197322. Uninterrupted listings, continue and archive are unchanged. No new text. Evidence: a real Gateway behind a stand-in front that answers the catalog 3 s late, with the CLI in a real PTY, main twice and candidate twice. On main, codex sessions --json printed the full catalog about 2 s after Ctrl-C or SIGTERM. With this change it exits 130 or 143 in about 0.05 s and prints nothing. Uninterrupted sessions (plain and --json) and interrupted continue --json and archive --json behave the same on both. The regression fails on main, at net 0 test lines. Details: openclaw#197750 (comment). Thanks @wangmiao0668000666. Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: ashmoonori-afk <[email protected]>
…7747) fix(cli): stop id status Gateway requests when interrupted openclaw id status noticed Ctrl-C or SIGTERM but kept its Gateway status and people-link requests open. Under the normal launcher the command never stopped on its own and was killed with exit 137; without respawn it waited for the reply and could print the full report after the interrupt. Both requests now take the command's abort signal, and an abort after interrupt ends quietly with the existing interrupt exit code. Uninterrupted status, Gateway errors and rebind are unchanged. No new text. Evidence: the built CLI in a secretless node:24.22.1 container against a stand-in Gateway that holds the status reply for 30 s, plain and --json, SIGINT and SIGTERM, main twice and candidate twice. On main the launcher killed the command after 2-4 s with exit 137, and with OPENCLAW_NO_RESPAWN=1 it waited about 30 s and printed the report late in three of four runs. With this change every run exits within 1 s with 130 or 143 and prints only the existing interrupt line. Uninterrupted status in text and JSON, a key rotation through id rebind and a Gateway error are identical on both. Net test lines 0. Details: openclaw#197747 (comment). Thanks @Alix-007. Co-authored-by: Ayaan Zaidi <[email protected]>
* docs(test): record tool-result fidelity audit * fix(test): assert tool-result fidelity at each output
* perf(ci): trim plugin reload fixture compilation * fix(test): align runtime fixtures with their owners
…penclaw#197788) * fix(chat): unwrap continue-imported catalog frames in Control UI Continue imports stored wrapExternalContent output untrimmed, so each frame began with an LF the anchored display unwrap rejected, leaving raw EXTERNAL_UNTRUSTED_CONTENT markers in Beam histories. Accept exactly that one LF for already-stored transcripts and trim new continue imports like preservation imports do. * chore: drop release-owned changelog entry (note lives in PR body)
…7758) fix(sessions): stop the Gateway catalog read when sessions list is interrupted openclaw sessions list noticed Ctrl-C or SIGTERM while waiting on the active Gateway model catalog but kept the request open. Under the normal launcher it was force-killed with exit 137; without respawn it waited for the reply and then printed the catalog warning and the full table or JSON after the interrupt. The catalog request now takes the command's abort signal, and an interrupt skips the fallback warning and output. Uninterrupted listings, an unreachable Gateway and --store reads are unchanged. No new text. Evidence: the built CLI in a secretless node:24.22.1 container with one saved session and a stand-in Gateway that holds models.list for 30 s. On main the launcher killed the command with exit 137, and with OPENCLAW_NO_RESPAWN=1 it printed the warning and the full table or JSON after the interrupt. With this change every run exits 130 or 143 within 1-2 s and prints only the existing interrupt line. An uninterrupted list, a refused Gateway connection and --store behave the same on both. The folded regression fails on main, at -1 net test lines. Details: openclaw#197758 (comment). Thanks @Alix-007. Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Bound long session menus and keep group search usable across desktop, compact and phone surfaces. Reopening resets the query, phone keeps its single search field, and focused rows scroll beneath the sticky desktop search. Co-authored-by: vyctorbrzezowski <[email protected]>
…quisition * fix(browser): exclude partitioned cookies from explicit standalone acquisition * fix(browser): exclude partitioned cookies from explicit standalone acquisition OpenClaw-Publication: 7422d3d4-9ceb-4fde-8e6d-8f096c66683c * test(browser): preserve session exports in cookie acquisition mock * Publish openclaw/partition-safe-cookie-acquisition OpenClaw-Publication: 8bb8c6fa-136f-4565-80a9-004e6aef035c
…unknown write outcome (openclaw#197790) * fix(plugin-state): restore authority after unknown outcomes without a Gateway restart An indeterminate plugin-state publication latched its database identity as unavailable for the life of the process, so guarded calls failed with "Plugin state authority is unavailable" until the Gateway restarted. Reconcile the latch from committed truth instead: a guarded check on a latched identity queues one committed read on the canonical state worker, which runs after the uncertain job (or on a replacement worker after loss). Only a successful confirmation with no newer unknown outcome clears the latch; failures, terminal database state, and racing unknown outcomes keep denial. Pending-write fences are unchanged. * chore(plugin-state): leave release-owned changelog to the release process * test(plugin-state): cover re-validated authority after unknown publications
…w#192615) Signed-off-by: Vincent Koc <[email protected]>
…r an ended sign-in (openclaw#197784) * fix(models): keep discovered models across restarts and ended sign-ins Gateway discovery ran in a worker that cannot write, so accepted provider listings were never saved. After a restart or plugin reload, or once an OAuth sign-in ended, a discovered model had no row and failed as "Unknown model" before the provider could report why. The main thread now saves each accepted listing to the existing plugin-model-catalog-v1 agent cache, and an ended (failed-fence) OAuth sign-in keeps its account's saved rows. Its models stay listed as unavailable, and turns ask to sign in again instead of for an API key. Co-authored-by: obviyus <[email protected]> * fix(models): withdraw saved rows on an accepted empty listing Saved catalogs seed the template registry, and published live rows only replace a provider's template rows when the worker publishes that provider. Publish every provider the plan saves, so an accepted empty listing withdraws its saved model instead of leaving it resolvable. Co-authored-by: obviyus <[email protected]> * fix(models): forget a signed-out provider's saved rows Saved listings belong to the account that made them. A provider-wide sign-out now drops that provider's saved rows before the credential is removed, so the next sign-in (another account or an API key) starts from its own listing. Also mark the worker's catalog parse with its SAFETY invariant. Co-authored-by: obviyus <[email protected]> * fix(models): save discovered catalogs outside startup preparation Discovery started during a read-only agent database preparation inherits that scope, so its later save was refused once preparation ended (seen after upgrading existing state). Write the save as an ordinary caller: still refused while admission is pending, admitted once the database is. Co-authored-by: obviyus <[email protected]> --------- Co-authored-by: obviyus <[email protected]>
…97791) fix(cron): show the full one-shot time in cron and automations details openclaw cron show and automations show formatted a one-shot job's at time to the minute, so jobs at different seconds in the same minute looked identical. The detail view now shows the configured time with seconds and milliseconds. The compact cron list row, --json output, stored schedules, and cron-expression and repeating schedules are unchanged. No new text. Evidence: the built CLI against an isolated Gateway with cron disabled, two disabled one-shot jobs at 12:34:12.321Z and 12:34:45.678Z, main twice and candidate twice. On main both details show 12:34Z; with this change they show 12:34:12.321Z and 12:34:45.678Z. The list row, --json, stored schedules and repeating jobs are the same on both; a whole-minute job shows 12:34:00.000Z. Net test lines 0. Details: openclaw#197791 (comment). Closes openclaw#197789. Thanks @Malpin07. Co-authored-by: Ayaan Zaidi <[email protected]>
…ulti-account-124705
|
Closing: the underlying issue #124705 was administratively closed as not planned by Barnacle on Nov 5, and this PR has had no review response since the conflicts were cleared on Nov 11. If the first-time-setup warning for configured multi-account Telegram is still worth tracking, please reopen the issue with current reproduction details and I will resubmit the fix on a fresh branch. |
Closes #124705
What Problem This Solves
Fixes:
openclaw doctorreportschannels.telegramas being in first-time setup mode when a multi-account Telegram setup already configuresgroupsfor every active account.User Impact
Configured multi-account Telegram users no longer receive this parent-scope false positive. Accounts that actually lack group configuration still warn at their own scope, and configurations that rely on an implicit default account keep the first-time guidance.
Why This Change Was Made
Doctor inspects configuration without starting channels, so the live channel registry can be empty. Account-id resolution now falls back to Doctor's config-driven read-only plugin loader for bundled and configured external channels, and forwards the active Doctor environment.
The Telegram parent container is not itself an account. Telegram's extra warning hook now suppresses first-time guidance only when an explicit default account exists, at least one child account is active, and every active child configures
groups. With an implicit default account, the container remains the only scope that can carry the guidance, so the warning is preserved.Evidence
pnpm tsgo:core,pnpm tsgo:extensions, andpnpm tsgo:extensions:testpass.oxlint --type-aware --deny-warningsandoxfmt --checkpass.git diff --check,pnpm check:assertion-safety,pnpm check:line-cap-ratchet, andpnpm check:test-mock-exportspass.pnpm openclaw doctor --non-interactivewas run from this head with isolatedHOME/state/config/workspace andOPENCLAW_SKIP_CHANNELS=1. The issue's reported two-account config no longer printsTelegram is in first-time setup mode; four retained-guidance controls still do (missing child groups, single account with noaccountsblock, top-level-token implicit default, and environment-token implicit default). These are synthetic diagnostic configs only; no live Telegram credential or message delivery is claimed.[email protected]normalized the issue config, then the same isolated state was run through this head's shippeddoctor --fix. Stable printed the reported false positive; head completed without it and wrote no config change.The branch identifies itself as
2026.10.4 (8165969), older than npmlatest2026.10.5; the run therefore demonstrates compatibility from a real latest-stable config/state into this candidate, not a version-number increase.1507c89eaa51d713a97b4135d72afb976856a485without changing production source. Base failed the reported-config suppression test (1 failed | 45 passed) and read-only account-discovery test (1 failed | 14 passed); this head passed46/46Telegram tests and15/15channel-capability tests.Not verified: full repository CI will run after the PR is updated. Local
pnpm check:max-lines-ratchetis blocked by unrelated existing UI baseline failures. No live Telegram Test Server userbot run is claimed because this environment has no Telegram credentials; Doctor does not send messages in the evidence above.AI assistance: implementation and validation were completed with Codex; the submitter reviewed the final diff and results.