Skip to content

fix(doctor): skip top-level allowlist scan when active per-account scopes exist - #93246

Closed
1052326311 wants to merge 1 commit into
openclaw:mainfrom
1052326311:fix/empty-allowlist-top-level-scan
Closed

1052326311 wants to merge 1 commit into
openclaw:mainfrom
1052326311:fix/empty-allowlist-top-level-scan

Conversation

@1052326311

Copy link
Copy Markdown
Contributor

Summary

The empty-allowlist doctor scanner treated the top-level channel config as its own standalone account, producing false 'empty allowlist' warnings when every active account under that channel supplied its own populated groupAllowFrom or allowFrom.

Behavior addressed

When a channel has groupPolicy: "allowlist" with an empty top-level groupAllowFrom, but every active account carries its own populated list, openclaw doctor incorrectly warns that inbound group messages will be dropped. Runtime resolves per-account (account ?? parent), and since every account has its own list, the top-level scope is never read — inbound routing works correctly.

Closes #92684

Fix

  • Only run the top-level channel config check when there are no active (non-disabled) account entries, matching runtime resolution semantics.
  • When accounts exist, the top-level config acts only as a parent fallback for allowlist resolution.

Change Type

  • Bug fix

Scope

  • Doctor / diagnostics

Evidence

Source-level reproduction path (from ClawSweeper review, issue #92684):

  • Current scanner calls checkAccount(channelConfig, ...) before iterating accounts (src/commands/doctor/shared/empty-allowlist-scan.ts:91)
  • Warning builder treats empty top-level groupAllowFrom as drop risk (src/commands/doctor/shared/empty-allowlist-policy.ts:61)
  • Runtime account config overrides parent allowlists (e.g. extensions/telegram/src/account-config.ts:94)

Test coverage:

  • Added: does not warn top-level empty groupAllowFrom when active accounts have their own lists — verifies the core fix scenario
  • Updated: existing test adjusted to reflect that top-level with active accounts no longer produces standalone warnings
Test Files  1 passed (1)
      Tests  4 passed (4)

@clawsweeper review

…opes exist

The empty-allowlist doctor scanner treated the top-level channel config as
its own standalone account, producing false 'empty allowlist' warnings when
every active account under that channel supplied its own populated
groupAllowFrom / allowFrom.

Fix: only run the top-level check when there are no active (non-disabled)
account entries. When accounts exist, the top-level config acts only as a
parent fallback — matching runtime resolution semantics.

Closes openclaw#92684
@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 15, 2026
@clawsweeper

clawsweeper Bot commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 15, 2026, 6:23 AM ET / 10:23 UTC.

Summary
The PR changes the shared doctor empty-allowlist scanner to skip the top-level channel record when active account entries exist and updates scanner unit-test expectations.

PR surface: Source +8, Tests +26. Total +34 across 2 files.

Reproducibility: yes. source-level. Current main scans the top-level channel record before accounts, so the reported false warning follows from the described config; no live doctor command was run because this review kept the checkout read-only.

Review metrics: 1 noteworthy metric.

  • Shared diagnostic scope: 1 scanner-level parent check now gated by active accounts. The change affects every channel using the shared empty-allowlist doctor scanner, so root/default-account semantics matter before merge.

Stored data model
Persistent data-model change detected: migration/backfill/repair: src/commands/doctor/shared/empty-allowlist-scan.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🦪 silver shellfish
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Preserve top-level default-account diagnostics while suppressing only the intended parent group-allowlist false positive.
  • [P1] Add focused regression coverage for an implicit root/default account plus at least one named account.
  • [P1] Add redacted real openclaw doctor after-fix proof to the PR body.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body includes unit-test output only; it needs redacted after-fix real behavior proof such as terminal output or a screenshot showing openclaw doctor on the affected config, with private IDs and secrets removed. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] Merging this patch as written can hide empty-allowlist warnings for real implicit/default root accounts whenever a channel also has an active named account.
  • [P1] The external PR has only unit-test output; reviewers still need redacted real openclaw doctor before/after output or equivalent terminal/live proof.

Maintainer options:

  1. Narrow the scanner suppression (recommended)
    Keep top-level DM/default-account checks and suppress only the parent group-allowlist warning when all active account scopes have effective group sender allowlists.
  2. Choose a canonical duplicate first
    If maintainers prefer another open attempt in the linked issue cluster, pause or close this PR only after selecting a proof-positive landing path.

Next step before merge

  • [P1] Needs contributor or maintainer follow-up because the patch has a scanner-scope defect and the external real-behavior proof gate is still mock-only.

Security
Cleared: The diff only changes doctor warning logic and tests; I found no concrete security or supply-chain regression in dependencies, CI, secrets, or executable artifact handling.

Review findings

  • [P2] Preserve implicit default-account scans — src/commands/doctor/shared/empty-allowlist-scan.ts:116-117
Review details

Best possible solution:

Preserve root/default account diagnostics and only suppress the parent group-allowlist false positive when every active account has an effective group sender allowlist, with redacted real openclaw doctor proof.

Do we have a high-confidence way to reproduce the issue?

Yes, source-level. Current main scans the top-level channel record before accounts, so the reported false warning follows from the described config; no live doctor command was run because this review kept the checkout read-only.

Is this the best way to solve the issue?

No. The fix direction is right, but gating the entire top-level scan on active accounts is too broad; the safer fix is a narrower group-warning suppression that preserves root/default-account diagnostics.

Full review comments:

  • [P2] Preserve implicit default-account scans — src/commands/doctor/shared/empty-allowlist-scan.ts:116-117
    This gate stops scanning the top-level record whenever any active accounts entry exists. That record is still a real implicit/default account for channels such as Signal, where a root account creates default even with named accounts, so doctor would stop warning when that default account's allowlist policy is empty. Please suppress only the parent group-allowlist false positive, or otherwise keep root/default account warnings intact.
    Confidence: 0.88

Overall correctness: patch is incorrect
Overall confidence: 0.87

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 0314819f918a.

Label changes

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.

Label justifications:

  • P3: The PR targets a misleading doctor advisory with working runtime routing and limited user impact.
  • merge-risk: 🚨 compatibility: The diff changes shared config diagnostics and can hide warnings for existing implicit/default account configurations.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body includes unit-test output only; it needs redacted after-fix real behavior proof such as terminal output or a screenshot showing openclaw doctor on the affected config, with private IDs and secrets removed. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +8, Tests +26. Total +34 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 10 2 +8
Tests 1 27 1 +26
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 37 3 +34

What I checked:

  • Repository policy read and applied: Root AGENTS.md was read fully; its PR-review guidance drove the caller/callee, sibling account semantics, proof, and compatibility checks. No scoped AGENTS.md was present for src/commands/doctor/shared. (AGENTS.md:1, 0314819f918a)
  • Current main reproduces the reported false positive in source: Current main scans the top-level channel record before iterating accounts, so an empty parent group allowlist can emit its own warning even when account entries are configured. (src/commands/doctor/shared/empty-allowlist-scan.ts:91, 0314819f918a)
  • PR suppresses the whole top-level scan: The PR moves the top-level check behind a no-active-account gate, which suppresses DM and root/default-account allowlist diagnostics as well as the intended parent group warning. (src/commands/doctor/shared/empty-allowlist-scan.ts:116, e68998e49d38)
  • Implicit default accounts are real account scopes: The shared account helper treats legacy single-account config and env-only setup as an implicit default account, and Signal opts into root channel account keys for that behavior. (src/channels/plugins/account-helpers.ts:35, 0314819f918a)
  • Sibling test preserves root default account with named accounts: Signal's account tests explicitly preserve a top-level default account even when a named account exists, so skipping the root scan on any active account can hide a real default-account warning. (extensions/signal/src/accounts.test.ts:10, 0314819f918a)
  • Runtime/account inheritance supports a narrower fix: Telegram account merging keeps top-level policy and allowlist values as parent fallbacks for account scopes, which supports suppressing only the parent false positive while preserving account/default diagnostics. (extensions/telegram/src/account-config.ts:89, 0314819f918a)

Likely related people:

  • kevinslin: Current-main blame and git show identify recent work touching the shared doctor scanner plus account-helper/default-account surfaces relevant to this regression risk. (role: recent area contributor; confidence: medium; commits: e82d19fb06b5; files: src/commands/doctor/shared/empty-allowlist-scan.ts, src/channels/plugins/account-helpers.ts, extensions/signal/src/accounts.ts)
  • vincentkoc: History search for the scanner and empty-group-warning text points to earlier doctor shared extraction work that introduced these helper boundaries. (role: doctor shared extraction contributor; confidence: medium; commits: 5b31b3400ee1, 4e979ea6ca0d; files: src/commands/doctor/shared/empty-allowlist-scan.ts, src/commands/doctor/shared/empty-allowlist-policy.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jun 15, 2026
@1052326311

Copy link
Copy Markdown
Contributor Author

Superseded by upstream fix #93434 (d697ecf) which handles this more precisely — checks for implicit active accounts and only suppresses group allowlist warnings when all active accounts have proper allowFrom config.

@1052326311 1052326311 closed this Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. 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)

1 participant