Skip to content

fix: avoid parent group allowlist false positive - #93434

Merged
vincentkoc merged 5 commits into
openclaw:mainfrom
nnqbao:fix/doctor-account-allowlist-scan
Jun 16, 2026
Merged

vincentkoc merged 5 commits into
openclaw:mainfrom
nnqbao:fix/doctor-account-allowlist-scan

Conversation

@nnqbao

@nnqbao nnqbao commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • avoid reporting the parent channel scope as an empty group allowlist when active accounts all have effective group allowlists
  • keep the parent warning when any active account would still inherit an empty group allowlist
  • add regression coverage for both the false-positive and mixed-account cases

Fixes #92684

Tests

  • CI=1 NO_COLOR=1 pnpm vitest run --config test/vitest/vitest.commands.config.ts src/commands/doctor/shared/empty-allowlist-scan.test.ts
  • CI=1 NO_COLOR=1 pnpm vitest run --config test/vitest/vitest.commands.config.ts src/commands/doctor/shared/channel-doctor.test.ts
  • CI=1 NO_COLOR=1 pnpm vitest run --config test/vitest/vitest.extension-telegram.config.ts telegram/src/doctor.test.ts
  • pnpm check:test-types
  • git diff --check

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. size: S labels Jun 15, 2026
@vincentkoc vincentkoc self-assigned this Jun 16, 2026
@vincentkoc
vincentkoc force-pushed the fix/doctor-account-allowlist-scan branch from 628db97 to da2ce68 Compare June 16, 2026 08:49
@vincentkoc

Copy link
Copy Markdown
Member

Land-ready after maintainer repair.

  • fixed implicit/default account handling by resolving configured and runtime identities through each channel plugin's own resolveAccount semantics; this covers normalized Matrix/Signal keys without conflating case-sensitive QQBot accounts
  • made plugin lookup failures conservative so doctor still runs on damaged installs
  • focused proof: node scripts/run-vitest.mjs src/commands/doctor/shared/empty-allowlist-scan.test.ts src/commands/doctor/channel-capabilities.test.ts — 16 passed
  • pnpm build passed
  • fresh structured autoreview: clean, no accepted/actionable findings
  • exact pushed head verified: da2ce686af1124ea992860c0cc320bd859bb4fa1

Known proof gap: wrapper pnpm check hit the reproducible unrelated baseline OOM in database-first legacy-store guard; no related doctor/type/test failure was observed.

@vincentkoc
vincentkoc merged commit d697ecf into openclaw:main Jun 16, 2026
164 of 173 checks passed
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash.

Thanks @kingrubic!

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 17, 2026
Merged via squash.

Prepared head SHA: da2ce68
Co-authored-by: kingrubic <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Reviewed-by: @vincentkoc
ggeutzzang added a commit to ggeutzzang/openclaw that referenced this pull request Aug 16, 2026
…t-time setup

Operators running Telegram with multiple accounts saw doctor report the
channel as unconfigured -- "Telegram is in first-time setup mode ... Group
messages stay blocked" -- while those bots replied in those groups normally.

Two layers caused it.

resolveDoctorChannelAccountIds resolved channels through the plugin
registry, which is empty during a doctor run because doctor inspects config
without starting channels. It therefore returned undefined for every
channel, pinning hasImplicitActiveAccount to true and leaving
suppressParentGroupAllowlistWarning (added in openclaw#93434 for this same class of
parent-scope false positive) permanently dead in production. Doctor was
already inconsistent with itself here: channel-doctor.ts finds adapters
through the config-driven read-only path, so the warning was produced, while
channel-capabilities.ts needed the registry, so the data that suppresses it
was missing. Account resolution now falls back the same way doctor already
does elsewhere: the bundled catalog for bundled channels, and the read-only
configured-plugin loader for external ones, so configured third-party
channels resolve too.

The parent container scope is also checked as if it were an account, and the
scanner's suppression signal never reached the channel-supplied
extraWarningsForAccount hook. The scope now carries its active child
accounts as an optional childAccounts field, and Telegram skips first-time
guidance only when every active account defines groups. childAccounts is
withheld when an implicit runtime account inherits the container scope, and
when no active accounts exist, so it is always non-empty when present.

The field is additive: existing channel plugins that ignore it keep their
current behavior, and the hook keeps being called on every scope it is
called on today.

Verified on the real CLI, not only tests: with neither layer the warning
appears, with layer 1 alone it still appears, with both it is gone.

Note the reach: because account resolution previously failed for every
channel, this makes parent-scope suppression live across all channels, not
just Telegram.

Prepared with AI assistance (Claude Code).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations size: M triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doctor over-warns on an empty top-level groupAllowFrom despite populated per-account allowlists (2026.6.5)

2 participants