Repository navigation
fix(doctor): suppress false groupAllowFrom warning when per-account allowlists cover all accounts - #93058
fix(doctor): suppress false groupAllowFrom warning when per-account allowlists cover all accounts#93058dwc1997 wants to merge 9 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 15, 2026, 3:44 PM ET / 19:44 UTC. Summary PR surface: Source +57, Tests +107. Total +164 across 3 files. Reproducibility: yes. Current main still checks the top-level channel record before account records, and the doctor preview path calls this scanner; I did not run a real doctor command because this review is read-only. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Thread account coverage and default-account semantics through the channel-owned doctor warning path, then prove the real openclaw doctor output while preserving valid root/default diagnostics. Do we have a high-confidence way to reproduce the issue? Yes. Current main still checks the top-level channel record before account records, and the doctor preview path calls this scanner; I did not run a real doctor command because this review is read-only. Is this the best way to solve the issue? No. The direction is right, but this PR is not the best fix yet because it skips only the generic warning builder and hard-codes Telegram implicit-default detection inside a shared scanner. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 32af1c069727. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +57, Tests +107. Total +164 across 3 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
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 re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
1 similar comment
|
@clawsweeper re-review |
|
@clawsweeper re-review Updated the PR body with before/after terminal evidence:
The evidence shows the exact assertion failures and warning text that confirms the bug (#92684) and verifies the fix. |
|
@clawsweeper re-review |
…llowlists cover all accounts When channels.<platform>.groupPolicy is 'allowlist' and the top-level groupAllowFrom is empty, but every account has its own populated groupAllowFrom, openclaw doctor incorrectly warns that inbound group messages will be dropped. At runtime, per-account allowlists handle routing correctly. Fix: Only check the top-level channel config if it has no accounts. When accounts exist, the top-level config is a fallback parent, not a real account — each account is checked individually. Closes openclaw#92684 Co-Authored-By: Claude Opus 4.8 <[email protected]>
…lowFrom Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
…nd hooks Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
When Telegram has botToken/tokenFile configured but no explicit default account, the implicit default account is not covered by per-account allowlists. In this case, the top-level groupAllowFrom warning should not be suppressed. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
623fbf6 to
8d14f89
Compare
|
Closing this PR:
Focusing efforts on PRs with better chances of merging. |
Summary
openclaw doctorwarns that inbound group messages will be dropped when the top-levelgroupAllowFromis empty, even when every account has its own populatedgroupAllowFrom. At runtime, per-account allowlists handle routing correctly.Linked context
Closes #92684
Real behavior proof
Behavior or issue addressed:
openclaw doctorfalsely warns about empty top-levelgroupAllowFromwhen every account already provides its own populated allowlist.Real environment tested: Windows 10, Node.js v22.22.3, OpenClaw 2026.6.2 (1c1e1d4), local checkout at PR head.
Exact steps or command run after this patch: Ran regression tests via
node scripts/run-vitest.mjs run src/commands/doctor/shared/empty-allowlist-scan.test.tsEvidence after fix:
All 8 tests pass, including the 5 new regression tests for doctor over-warns on an empty top-level groupAllowFrom despite populated per-account allowlists (2026.6.5) #92684.
Evidence BEFORE fix (3 regression tests fail) -- same test suite against pre-fix source (commit
ee70b4ae2b, parent of first PR commit):The false positive warning is emitted even though every account has its own allowlist. This confirms the bug reported in doctor over-warns on an empty top-level groupAllowFrom despite populated per-account allowlists (2026.6.5) #92684.
Observed result after fix: All 8 tests pass. The 5 new regression tests verify: per-account
groupAllowFromsuppresses the warning;allowFromfallback works; Telegram withbotToken+ explicitdefaultaccount is covered; disabled accounts are excluded from coverage check; legitimate warnings still fire for uncovered implicit defaults.What was not tested: Live
openclaw doctorwith real Telegram channel configuration (requires Telegram bot setup). The unit tests directly exercisescanEmptyAllowlistPolicyWarningswith mocked channel capabilities, which is the same code pathopenclaw doctoruses.Tests and validation
node scripts/run-vitest.mjs run src/commands/doctor/shared/empty-allowlist-scan.test.ts— 8/8 passedRisk checklist