Skip to content

refactor(imessage): share handle classification - #148229

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/imessage-handle-classification
Sep 15, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/imessage-handle-classification

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The iMessage plugin repeats the same handle-classification decisions in messaging-target normalization and target parsing.

User Impact

No user-visible behavior change is intended. Existing service aliases, chat identifiers, phone handling, contact-name differences between callers, and approval matching stay unchanged.

Why This Change Was Made

This maintainer-requested internal refactor shares only the ordered email, bare 32-hex identifier, and phone-like classification block in the existing normalization owner. Each caller retains its original prefix handling, recursion, and fallback behavior. No public API, SDK, configuration, or authorization policy changes.

Evidence

  • The same 53 cases passed before and after extraction across the full normalization, target, and unchanged approval-auth suites, with identical test bytes and no failures or skips.
  • Existing caller tables cover email and phone boundaries, all-digit 32-hex precedence, and independently expected contact-name and nested-alias differences.
  • All 25 selected changed-file check stages passed, including formatting, production/test typechecking, lint, dead exports, and import-cycle checks. The unrelated release-test temporary-directory warning is retained.
  • Fresh scoped review and independent review found no actionable P0-P2 issues.
  • Hosted CI completed successfully on exact head 3efda5ef5882f6841ecf324faba1dffeda37788f, attempt 1. The earlier observer timeout was not a CI failure, and the run was not restarted.
  • The separate Security Sensitive Guard passed on attempt 2 after an investigated targeted retry; its original server failure remains recorded.
  • Local proof covers string/caller and approval-auth boundaries, not live Messages, credentials, delivery, or a full current-main build. No required gate was disabled or bypassed.

@vincentkoc vincentkoc self-assigned this Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review September 14, 2026 11:57
@openclaw-barnacle openclaw-barnacle Bot added channel: imessage Channel integration: imessage size: S maintainer Maintainer-authored PR labels Sep 14, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 11:31 PM ET / September 15, 2026, 03:31 UTC (Revision 3).

ClawSweeper review

What this changes

The iMessage plugin shares email, group-identifier, and phone classification while retaining each caller’s existing service-prefix and contact-name handling.

Merge readiness

✅ Ready for maintainer review

Keep open: this remains a useful, behavior-preserving cleanup absent from current main. No actionable correctness or security findings remain, and the prior review contains no outstanding findings.

Priority: P3
Reviewed head: 3efda5ef5882f6841ecf324faba1dffeda37788f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused extraction with useful caller-boundary coverage and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored internal refactor is exempt from contributor live-proof requirements and does not materially change authority; supplied validation covers normalization and approval boundaries without claiming live Messages delivery.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored internal refactor is exempt from contributor live-proof requirements and does not materially change authority; supplied validation covers normalization and approval boundaries without claiming live Messages delivery.
Evidence reviewed 8 items Behavior-preserving extraction: The introduced production diff moves the same ordered email, bare-hex, and phone classification into one local helper. Both callers preserve prefix processing and their original fallback expressions.
Current-main necessity: The two production files are unchanged between the pinned merge base and fetched main, so main still contains the duplicated classification blocks.
Latest-release comparison: The latest supplied release also retains inline handle classification; this extraction is not already shipped there.
Findings None None.
Security None None.

How this fits together

The iMessage plugin normalizes recipient and sender strings before message routing and allowlist matching. Its messaging and target-parsing callers share classification rules but retain different contact-name and prefix policies.

flowchart TD
  A[Recipient or sender text] --> B[Messaging target normalization]
  A --> C[Target and sender normalization]
  B --> D[Shared email, group ID, and phone classification]
  C --> D
  D --> E[Caller-specific fallback]
  E --> F[Message routing]
  E --> G[Sender and approval matching]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -8, Tests +18. Total +10 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 21 29 -8
Tests 2 32 14 +18
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 53 43 +10

Review metrics

None.

Technical review

Best possible solution:

Keep one plugin-local classification owner while preserving the existing caller-specific routing and contact policies.

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

Not applicable: this PR reports duplicated implementation rather than a user-facing defect; source inspection confirms the duplication on main.

Is this the best way to solve the issue?

Yes: extracting only the identical classification block removes duplication without merging the callers’ intentionally different policies.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 34a7948a870c.

Labels

Label justifications:

  • P3: This is an internal duplication cleanup with no intended user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored internal refactor is exempt from contributor live-proof requirements and does not materially change authority; supplied validation covers normalization and approval boundaries without claiming live Messages delivery.

Evidence

What I checked:

Likely related people:

  • MatthewDelprado: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • pgondhi987: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-14T12:14:37.132Z sha 3efda5e :: needs maintainer review before merge. :: none
  • reviewed 2026-09-15T03:25:56.830Z sha 3efda5e :: needs maintainer review before merge. :: none

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc
vincentkoc merged commit 1528bc1 into main Sep 15, 2026
172 of 173 checks passed
@vincentkoc
vincentkoc deleted the refactor/imessage-handle-classification branch September 15, 2026 03:33
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
vincentkoc added a commit that referenced this pull request Sep 15, 2026
* commit 'd8e50a38fd1c4df6dd69bcbc155697c464e1be45': (23 commits)
  fix(cron): release queued reservations when activation fails (#141008)
  fix(gateway): reduce CPU work in session lists and searches (#148713)
  feat(gateway): add admin CPU profile diagnostics (#148004)
  fix(gateway): cap device-required probe cache to prevent unbounded growth (#147708)
  fix(ci): align Gateway E2E expectations (#148653)
  refactor(ai): remove unused overflow wrapper (#148719)
  feat: stage selected chat text as editable comments (#148649)
  fix(ci): admit reachable release refs with large histories (#148161)
  fix(agents): allow authorized email CLI actions (#148521)
  improve(agents): trim large tool results with less CPU (#148718)
  refactor(docker): share image version parsing (#148243)
  fix(ci): retain passing hosted checks after skipped duplicates (#148722)
  fix(update): report configuration failures during repair (#144819)
  refactor(imessage): share handle classification (#148229)
  fix(ui): keep the selected agent across Settings pages (#148667)
  test(telegram): reuse deferred fixture helper (#148501)
  fix(media): resize images before understanding (#122431)
  fix: preserve unfinished work during completed PR cleanup (#148704)
  refactor(migrate-hermes): reuse canonical config record coercion (#148645)
  perf(channels): reduce history worker metadata footprint (#148711)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: imessage Channel integration: imessage maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant