Skip to content

fix(doctor): stop false Telegram first-time setup warning - #176264

Closed
xiaopan-xydt wants to merge 321 commits into
openclaw:mainfrom
xiaopan-xydt:fix/doctor-telegram-multi-account-124705
Closed

xiaopan-xydt wants to merge 321 commits into
openclaw:mainfrom
xiaopan-xydt:fix/doctor-telegram-multi-account-124705

Conversation

@xiaopan-xydt

@xiaopan-xydt xiaopan-xydt commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Closes #124705

What Problem This Solves

Fixes: openclaw doctor reports channels.telegram as being in first-time setup mode when a multi-account Telegram setup already configures groups for 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

  • Focused Doctor and Telegram tests pass: 3 Vitest shards, 5 test files, including new coverage for config-driven account discovery and the parent/child warning cases.
  • pnpm tsgo:core, pnpm tsgo:extensions, and pnpm tsgo:extensions:test pass.
  • Changed-file oxlint --type-aware --deny-warnings and oxfmt --check pass.
  • git diff --check, pnpm check:assertion-safety, pnpm check:line-cap-ratchet, and pnpm check:test-mock-exports pass.
  • Shipped CLI proof: pnpm openclaw doctor --non-interactive was run from this head with isolated HOME/state/config/workspace and OPENCLAW_SKIP_CHANNELS=1. The issue's reported two-account config no longer prints Telegram is in first-time setup mode; four retained-guidance controls still do (missing child groups, single account with no accounts block, 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.
reported two-account config                  first-time warning: absent
child account missing groups                 first-time warning: retained
single account, no groups                    first-time warning: retained
top-level token, implicit default            first-time warning: retained
env token, implicit default                  first-time warning: retained
  • Latest-stable config upgrade: published [email protected] normalized the issue config, then the same isolated state was run through this head's shipped doctor --fix. Stable printed the reported false positive; head completed without it and wrote no config change.
stable 2026.10.5: channels.telegram: Telegram is in first-time setup mode. ...
head 8165969:     no first-time setup warning; Doctor complete
config SHA-256 (stable-after == head-after): 67870af688ef809509cc6c99e98ebf125f3b2c67baa88871b71c072ec32d67f3
Telegram subtree SHA-256 (stable-after == head-after): f6f69a5a2dbaa6334bde89d13a46d9da62640ecd9c7d4974f5195936729fe20b
preserved: defaultAccount=default, groupPolicy=allowlist, groupAllowFrom=["11111111"], accounts=default+second with groups

The branch identifies itself as 2026.10.4 (8165969), older than npm latest 2026.10.5; the run therefore demonstrates compatibility from a real latest-stable config/state into this candidate, not a version-number increase.

  • Base-fail/head-pass: the new test blocks were applied to a detached worktree at merge base 1507c89eaa51d713a97b4135d72afb976856a485 without 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 passed 46/46 Telegram tests and 15/15 channel-capability tests.

Not verified: full repository CI will run after the PR is updated. Local pnpm check:max-lines-ratchet is 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.

@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram commands Command implementations size: M labels Oct 18, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 18, 2026
@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Doctor 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"].

  • Before: Doctor reports channels.telegram as being in first-time setup mode despite both accounts having configured groups.
  • After: Doctor omits the false parent warning while retaining guidance for accounts that lack groups.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused bug repair with shipped-CLI controls, stable-state compatibility evidence, discriminating regressions, and passing exact-head CI.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The supplied terminal output exercises the reviewed head through pnpm openclaw doctor with isolated configuration and state: the reported warning disappears, four genuine-guidance controls remain, and doctor --fix preserves configuration normalized by published 2026.10.5. Synthetic configurations adequately exercise this diagnostic path; live Telegram messaging is outside the change.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Doctor declares working multi-account Telegram group routing unconfigured and recommends unnecessary setup changes.
Reason: Restores accurate diagnostics without adding configuration, changing routing, or expanding the plugin API.

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
Reviewed head: 8165969498bfca4d612ad8ef96f3376ef55afefb

Before merge

None.

Findings

None.

Agent review details

How this fits together

Doctor 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]
Loading

Technical review

Best 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

  • Registry-dependent Doctor account discovery keeps the original intent (d697ecf: Account identities were resolved through plugin semantics to avoid false parent allowlist warnings.)
  • Telegram first-time setup guidance changes intended behavior with a stated reason (a267c5d: Extracted existing warning behavior into a provider-owned module without intentionally changing semantics; this establishes the extraction, not the original invention of the warning.)
  • Doctor preview and repair orchestration keeps the original intent (80da616: Retain authoritative plugin metadata throughout Doctor's lifecycle and refresh it after inventory changes.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit a267c5d adds src/commands/doctor/providers/telegram.ts:6 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: a267c5d9aeef; files: src/commands/doctor/providers/telegram.ts)

PR surface

Source +91, Tests +163. Total +254 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 5 95 4 +91
Tests 2 163 0 +163
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 258 4 +254

Root-cause cluster

Relationship: same_root_cause
Canonical: #124705
Summary: The canonical issue owns the remaining diagnostic defect; this PR supplies its active repair.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The false diagnostic misleads operators about working Telegram group configuration, while message delivery continues.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-18T16:00:17.973Z sha 4889d3d :: needs real behavior proof before merge. :: [P2] Preserve guidance for an implicit default beside a named default
  • reviewed 2026-10-18T16:41:21.588Z sha f4cbda1 :: needs real behavior proof before merge. :: [P1] Handle an absent accounts block before dereferencing the default | [P2] Preserve guidance for environment-backed implicit defaults
  • reviewed 2026-10-18T17:22:42.492Z sha 8165969 :: needs real behavior proof before merge. :: none

Reviewed October 19, 2026, 10:30 AM ET / 14:30 UTC (Revision 4).

@xiaopan-xydt

Copy link
Copy Markdown
Contributor Author

Fixed the P2 finding in f4cbda1ab94.

hasGroupsForEveryExplicitChildAccount now suppresses the parent first-time warning only when a top-level Telegram credential does not leave an uncovered implicit default account. If botToken/tokenFile is configured at the parent, accounts.default must also exist, be enabled, and configure groups. Named defaultAccount selection no longer hides guidance for the implicit runtime default.

Added the regression case: top-level botToken, defaultAccount: "work", and accounts.work/accounts.second both configuring groups now keeps the parent warning.

Validation: doctor.test.ts 44/44 pass; oxfmt --check and oxlint pass.

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

@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 18, 2026
@xiaopan-xydt

Copy link
Copy Markdown
Contributor Author

Fixed both findings in 8165969498b.

  • P1: implicitDefault != null prevents dereferencing undefined when the accounts block is absent, so ordinary single-account configurations keep guidance instead of aborting Doctor.
  • P2: hasTopLevelCredential now includes process.env.TELEGRAM_BOT_TOKEN, preserving guidance for an environment-backed implicit default beside a named defaultAccount.
  • Added regressions for the no-accounts case and the environment-token implicit default.

Validation: extensions/telegram/src/doctor.test.ts 46/46 pass; oxfmt, oxlint, and git diff --check pass.

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

@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 18, 2026
steipete and others added 26 commits November 12, 2026 06:26
## 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.

![Before: progress draft at the merge base](https://github.com/user-attachments/assets/d055ad3f-5838-49cd-b8c5-9f3417625693)

**After:** one row per operation, `·` separators, and the child's short reference.

![After: progress draft on this branch](https://github.com/user-attachments/assets/350fd7b8-d2dd-433d-976d-c92c43983f98)

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]>
…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
…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]>
@xiaopan-xydt
xiaopan-xydt requested a review from a team as a code owner November 12, 2026 18:24
@xiaopan-xydt

Copy link
Copy Markdown
Contributor Author

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.

@xiaopan-xydt
xiaopan-xydt deleted the fix/doctor-telegram-multi-account-124705 branch November 14, 2026 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: telegram Channel integration: telegram commands Command implementations P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doctor: configured multi-account Telegram reported as first-time setup