fix(imessage): surface silent group-allowlist drops at default log level#79190
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. by source inspection: current main reaches the iMessage group-registry drop and logs it only through Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the extension-local warning fix after normal maintainer review and required checks because it makes the misconfiguration visible without changing group gate semantics. Do we have a high-confidence way to reproduce the issue? Yes, by source inspection: current main reaches the iMessage group-registry drop and logs it only through Is this the best way to solve the issue? Yes, the one-shot startup warning plus one-shot per-chat drop warning is a narrow maintainable fix that preserves the existing allowlist behavior. A doctor check could be a later enhancement, but it is not required for this PR to solve the observable silent-drop problem. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against cde99c3349e9. |
c6a46ab to
b6036a2
Compare
When channels.imessage.groupPolicy=allowlist is set without a channels.imessage.groups block (the most common BlueBubbles to bundled-iMessage migration footgun), the runtime drop at inbound-processing.ts:336 logged only at verbose. At the default info log level every group message vanished. Add two one-shot warn-level signals: - warnGroupAllowlistMisconfigOnce: fires once per accountId at monitor startup when groupPolicy=allowlist and groups is empty (no '*' wildcard, no per-chat_id entries). Catches the misconfiguration before any messages land. - warnGroupAllowlistDropPerChatOnce: fires once per accountId:chat_id when the runtime allowlist gate drops a group, naming the chat_id and the exact channels.imessage.groups[...] key to add to allow it. Both warners cap log volume at one line per account / one line per group, so busy gateways do not get spammed. Closes openclaw#78749.
b6036a2 to
6454366
Compare
|
Merged via squash.
Thanks @omarshahine! |
…vel (openclaw#79190) Merged via squash. Prepared head SHA: 6454366 Co-authored-by: omarshahine <10343873+omarshahine@users.noreply.github.com> Co-authored-by: omarshahine <10343873+omarshahine@users.noreply.github.com> Reviewed-by: @omarshahine
…vel (openclaw#79190) Merged via squash. Prepared head SHA: 6454366 Co-authored-by: omarshahine <10343873+omarshahine@users.noreply.github.com> Co-authored-by: omarshahine <10343873+omarshahine@users.noreply.github.com> Reviewed-by: @omarshahine
…vel (openclaw#79190) Merged via squash. Prepared head SHA: 6454366 Co-authored-by: omarshahine <10343873+omarshahine@users.noreply.github.com> Co-authored-by: omarshahine <10343873+omarshahine@users.noreply.github.com> Reviewed-by: @omarshahine
…vel (openclaw#79190) Merged via squash. Prepared head SHA: 6454366 Co-authored-by: omarshahine <10343873+omarshahine@users.noreply.github.com> Co-authored-by: omarshahine <10343873+omarshahine@users.noreply.github.com> Reviewed-by: @omarshahine
…vel (openclaw#79190) Merged via squash. Prepared head SHA: 6454366 Co-authored-by: omarshahine <10343873+omarshahine@users.noreply.github.com> Co-authored-by: omarshahine <10343873+omarshahine@users.noreply.github.com> Reviewed-by: @omarshahine
…vel (openclaw#79190) Merged via squash. Prepared head SHA: 6454366 Co-authored-by: omarshahine <10343873+omarshahine@users.noreply.github.com> Co-authored-by: omarshahine <10343873+omarshahine@users.noreply.github.com> Reviewed-by: @omarshahine
Summary
Closes #78749.
When
channels.imessage.groupPolicy: "allowlist"is set without achannels.imessage.groupsblock — the most common BlueBubbles → bundled-iMessage migration footgun, documented in PR #78317 — the runtime gate atextensions/imessage/src/monitor/inbound-processing.ts:336drops every group message and logs only atverbose. At the defaultinfolog level, every group message vanishes silently.This adds two coordinated
warn-level signals so the misconfiguration is observable at the default log level:Startup warning (
warnGroupAllowlistMisconfigOnce): one-time peraccountIdwhen monitor boots withgroupPolicy: "allowlist"ANDchannels.imessage.groupsis empty (no"*"wildcard, no per-chat_identries). Catches the misconfiguration before any messages land.Per-chat warning (
warnGroupAllowlistDropPerChatOnce): one-time peraccountId:chat_idwhen the runtime allowlist gate drops a specific group. Names the chat_id and the exactchannels.imessage.groups[...]key to add to allow it.Both warners cap log volume at one line per account / one line per chat, so busy gateways do not get spammed. Helpers stay extension-local per the AGENTS owner-boundary rule (other channels have different group-policy semantics).
Files
extensions/imessage/src/monitor/group-allowlist-warnings.ts— new helper module with both warners + aresetForTestingreset hookextensions/imessage/src/monitor/group-allowlist-warnings.test.ts— 11 unit tests covering startup misconfig detection, per-chat one-shot semantics, wildcard / explicit-entry suppression, multi-account isolation, numeric/stringchat_idnormalizationextensions/imessage/src/monitor/monitor-provider.ts— wires the startup warner alongside the existingwarnMissingProviderGroupPolicyFallbackOnce, and emits the per-chat warner on thedecision.kind === "drop"branch whendecision.reason === "group id not in allowlist"docs/channels/imessage.md+docs/channels/imessage-from-bluebubbles.md— replaces the "silent at info, raise OPENCLAW_LOG_LEVEL=debug" guidance with the newwarnlines operators will actually seeReal behavior proof
Behavior or issue addressed: silent
verbose-level drop atextensions/imessage/src/monitor/inbound-processing.ts:336whengroupPolicy: "allowlist"is configured without achannels.imessage.groupsblock (issue iMessage: silent group message drop when channels.imessage.groups is unset #78749).Real environment tested: macOS Sequoia 15.x, node v25.8.1, openclaw worktree at branch
fix/imsg-group-drop-observabilityheadfdba8f4111. The new helpers (extensions/imessage/src/monitor/group-allowlist-warnings.ts) loaded directly vianode --import tsxfrom the live source tree — same callable shape used by the gateway'smonitor-provider.ts(log: (msg) => runtime.log?.(warn(msg))).Exact steps or command run after this patch:
where the script imports
warnGroupAllowlistMisconfigOnce,warnGroupAllowlistDropPerChatOnce, andresetGroupAllowlistWarningsForTestingfrom the new module and walks five scenarios (misconfigured startup, first-drop per chat, repeat-drop suppression, second chat fires its own line, wildcard suppresses startup).After-fix evidence: console output captured live from the run above:
Observed result after fix: each
[warn]line is the exact stringruntime.log?.(warn(message))would emit through the gateway'swarn-formatted logger. Scenario 1 catches the misconfiguration before any message lands. Scenario 2 names the dropped chat and the exactchannels.imessage.groups["8421"]key to add. Scenario 3 confirms the per-chat one-shot suppresses repeats. Scenario 4 confirms a distinct chat_id still surfaces. Scenario 5 confirms the startup warn does not fire when a"*"wildcard is present. No silent drops remain at the defaultinfolog level.What was not tested: end-to-end gateway run against a live
imsg launchdaemon driving an iMessage group conversation — the helpers exercised here are the exact unitsmonitor-provider.tscalls, but a live-traffic capture would be additional confirmation (would need a paired Mac and a configured group chat).