Repository navigation
fix(imessage): recognize bare hex group chat identifiers as chat targets - #99525
Conversation
A 32-char hex iMessage group chat identifier (as returned by `imsg` for group chats) with no explicit `chat_identifier:` prefix fell through to E.164 phone-number normalization. normalizeE164 strips non-digit characters and prepends `+`, turning `7d5297154d5f436d83dbbdf03fcc8fdd` into `+75297154543683038` -- a bogus phone number. Cron/announce delivery then reported `delivered: true` while silently sending to a nonexistent recipient. Detect bare 32-char hex strings in both the send-path target parser (extensions/imessage/src/targets.ts) and the outbound delivery-target normalizer (extensions/imessage/src/normalize.ts) and route them as chat_identifier targets, consistent with how an explicit `chat_identifier:<id>` prefix already resolves. Fixes openclaw#89235.
|
Codex review: needs real behavior proof before merge. Reviewed July 3, 2026, 11:17 AM ET / 15:17 UTC. Summary PR surface: Source +53, Tests +39. Total +92 across 5 files. Reproducibility: yes. at source level: current main routes an unprefixed bare hex iMessage target through phone normalization in cron delivery and the send parser does not treat it as a chat target. I did not run a live macOS iMessage cron job in this read-only review. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 detailsBest possible solution: Land the focused plugin-owned normalizer after redacted live OpenClaw iMessage cron or send proof demonstrates the bare hex value is sent as chat_identifier, then let the linked issue close on merge. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main routes an unprefixed bare hex iMessage target through phone normalization in cron delivery and the send parser does not treat it as a chat target. I did not run a live macOS iMessage cron job in this read-only review. Is this the best way to solve the issue? Yes, the code change is at the right boundary: both direct send parsing and cron delivery normalization need the same iMessage target semantics. The remaining blocker is proof from a real runtime path, not a different implementation layer. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5342effebcf7. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +53, Tests +39. Total +92 across 5 files. View PR surface stats
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
|
|
Merged via squash.
|
…ets (openclaw#99525) * fix(imessage): recognize bare hex group chat identifiers as chat targets A 32-char hex iMessage group chat identifier (as returned by `imsg` for group chats) with no explicit `chat_identifier:` prefix fell through to E.164 phone-number normalization. normalizeE164 strips non-digit characters and prepends `+`, turning `7d5297154d5f436d83dbbdf03fcc8fdd` into `+75297154543683038` -- a bogus phone number. Cron/announce delivery then reported `delivered: true` while silently sending to a nonexistent recipient. Detect bare 32-char hex strings in both the send-path target parser (extensions/imessage/src/targets.ts) and the outbound delivery-target normalizer (extensions/imessage/src/normalize.ts) and route them as chat_identifier targets, consistent with how an explicit `chat_identifier:<id>` prefix already resolves. Fixes openclaw#89235. * refactor(imessage): centralize bare chat identifiers * refactor(imessage): centralize bare chat identifiers --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes #89235.
Bare 32-character hexadecimal iMessage group identifiers were falling through to phone-number normalization in both direct-send parsing and cron/announce delivery. A real group identifier could therefore become a bogus E.164 target instead of using the existing
imsg send --chat-identifierpath.Why This Change Was Made
The identifier shape is produced by
imsgfor group chats, but it has no explicitchat_identifier:prefix. The final implementation gives that exact bounded shape one plugin-owned normalizer shared by delivery normalization, target parsing, explicit-target detection, and peer-kind inference. Service-prefixed identifiers use the same canonical path; invalid length or non-hex values retain existing handle behavior.User Impact
iMessage group sends addressed by a bare database identifier now reach the intended conversation instead of being normalized into a nonexistent phone number. Existing explicit chat identifiers, phone handles, and email handles are unchanged.
Evidence
d26dfb57e53e08bb0efd8c74e0191122abb857e7.imsg0.12.1 database shape audit: 500 chats inspected; 31 group chats; 20 bare 32-hex group identifiers; zero bare 32-hex direct chats. Only aggregate counts were recorded, and no external message was sent to a private conversation.CI is running on the exact head above and will be required green before merge.