Repository navigation
fix(doctor): suppress false group-allowlist warning when all accounts override groupAllowFrom (fixes #92684) - #92889
Conversation
… override groupAllowFrom (fixes openclaw#92684) When every active sub-account supplies its own groupAllowFrom, the top-level empty groupAllowFrom is never consulted at runtime (account.groupAllowFrom ?? parent.groupAllowFrom). Suppress the default group-allowlist warning for the top-level record so doctor does not over-warn about a fallback that no account ever reads.
|
Codex review: needs changes before merge. Reviewed June 15, 2026, 2:50 PM ET / 18:50 UTC. Summary PR surface: Source +30, Tests +87. Total +117 across 2 files. Reproducibility: yes. Current main checks the top-level channel record before account records, and current policy/runtime show that account Review metrics: none identified. 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:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land one canonical scanner fix that suppresses parent warnings only when every active account has an effective group allowlist, including Do we have a high-confidence way to reproduce the issue? Yes. Current main checks the top-level channel record before account records, and current policy/runtime show that account Is this the best way to solve the issue? No. The scanner is the right layer and the extra-warning hook is now covered, but the account coverage predicate still ignores the supported Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c40db057da33. Label changesLabel justifications:
Evidence reviewedPR surface: Source +30, Tests +87. Total +117 across 2 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
|
…tor-group-allowlist-false-warning
- Remove unnecessary type assertion (oxlint no-unnecessary-type-assertion) - Fix groupAllowFrom entries to use string type (DoctorAllowFromEntry = string | number)
…tor-group-allowlist-false-warning
… override groupAllowFrom (fixes openclaw#92684) ClawSweeper review finding [P2]: the Telegram extra-warning path was not gated, so the channel plugin could still emit false positives even after the shared default warning was suppressed. Wrap both hooks together so the top-level scan is fully silent when every active sub-account supplies its own groupAllowFrom.
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
Summary
openclaw doctorover-warns about an empty top-levelgroupAllowFromwhen every sub-account defines its own populatedgroupAllowFrom. The warning claims group messages will be silently dropped, but at runtimeaccount.groupAllowFrom ?? parent.groupAllowFrommeans the empty top-level fallback is never consulted.scanEmptyAllowlistPolicyWarningsinempty-allowlist-scan.tsunconditionally scans the top-level channel config as if it were an account, without checking whether sub-accounts already overridegroupAllowFrom. Both the shared default group-allowlist warning path and the channel pluginextraWarningsForAccountpath were un-gated.groupAllowFrom. If all accounts override it, suppress both the default group-allowlist warning hook and theextraWarningsForAccountplugin hook for the top-level call (the skip is applied only whenparentis undefined, so account-level checks are unaffected). The existing per-account scan with parent-fallback resolution still catches accounts that genuinely lack a populated allowlist.src/commands/doctor/shared/empty-allowlist-scan.ts— added pre-scan of sub-accountgroupAllowFrom, wrapped bothshouldSkipDefaultEmptyGroupAllowlistWarningandextraWarningsForAccounthooks when all accounts overridedmPolicy: "allowlist") handling — the top-level DM warning is still emitted; only the group-allowlist false positive is addressedallowFrom-as-group-coverage accounting — the channel'sgroupAllowFromFallbackToAllowFromheuristic is left to future work; the current fix is conservative and only suppresses when every account has an explicitgroupAllowFromlistReproduction
groupPolicy: "allowlist", empty top-levelgroupAllowFrom, and two or more accounts each with a populatedgroupAllowFrom.openclaw doctor.groupAllowFrom; warnings still fire when no accounts exist or when some accounts lackgroupAllowFrom(requiring fallback to the empty top-level).Real behavior proof
Behavior or issue addressed (92684): doctor
EmptyAllowlistCheckwarns the top-level record as if it were an account whengroupPolicy: "allowlist"andgroupAllowFromis empty, even though every sub-account defines its owngroupAllowFrom. The fix suppresses that false positive on both the shared default warning path and the channel plugin extra-warning path, while preserving the warning when accounts genuinely lack a populated allowlist.Real environment tested: Linux, Node 22 — direct scanner invocation loaded through the real
createChannelDoctorEmptyAllowlistPolicyHooksframework (no mocks, not a Vitest test)Exact steps or command run after this patch:
node --import tsx scripts/direct-scanner-proof-92684.mjsEvidence after fix:
Observed result after fix: direct scanner invocation with the real doctor hooks framework confirms zero top-level group-allowlist false positives when both accounts supply their own
groupAllowFrom. The two remaining warnings are account-level Telegram first-time-setup advisories (not false positives), and the regression check confirms the top-level warning still fires when no accounts exist to override it.What was not tested: live
openclaw doctorCLI invocation against a fully provisioned OpenClaw installation was not driven — the scanner is exercised directly through the real channel-doctor hooks framework rather than through the full CLI pipeline.Repro confirmation: the direct scanner script fails on origin/main (emits 1 top-level group-allowlist false positive through the Telegram extra-warning path) and succeeds after the third patch commit (emits 0 top-level group false positives, gating both the shared and extra-warning paths).
Risk / Mitigation
shouldSkipDefaultEmptyGroupAllowlistWarningandextraWarningsForAccounthooks are restored immediately after the top-levelcheckAccountcall, but the function mutatesparamsdirectly.Mitigation: original function references are saved before the wrap and unconditionally restored on the next line, so account-level checks always receive the original hooks.
groupAllowFromand others do not could lose the top-level warning.Mitigation: the suppress condition requires every active sub-account to have a populated
groupAllowFrom— a single account without it keeps both hook paths intact.groupAllowFromFallbackToAllowFrommight have accounts whoseallowFromprovides effective group coverage without an explicitgroupAllowFrom.Mitigation: this is deferred to future work; the current fix is conservative — it only suppresses when every account has an explicit
groupAllowFromlist, so no valid warning is lost.Change Type (select all)
Scope (select all touched areas)
Regression Test Plan
node scripts/run-vitest.mjs src/commands/doctor/shared/empty-allowlist-scan.test.tsnode scripts/run-vitest.mjs src/commands/doctor/shared/empty-allowlist-policy.test.tsnode scripts/run-vitest.mjs src/commands/doctor/shared/empty-allowlist-scan-92684.test.tsnode scripts/run-vitest.mjs src/commands/doctor/shared/preview-warnings.test.tsnode scripts/run-vitest.mjs src/commands/doctor/repair-sequencing.test.tsReview Findings Addressed
extraWarningsForAccountis now wrapped alongsideshouldSkipDefaultEmptyGroupAllowlistWarning, suppressing the top-level call when all accounts override. Confirmed by direct scanner proof (0 false positives vs 1 on main).groupAllowFromon every account). Extending toallowFrom-as-group-coverage requires channel-specificgroupAllowFromFallbackToAllowFromawareness and is left to future work.Linked Issue/PR
Fixes #92684