fix(imessage): apply canonical outbound sanitizer#101430
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 25, 2026, 6:35 PM ET / 22:35 UTC. ClawSweeper reviewWhat this changesThe branch replaces iMessage’s internal-scaffolding cleanup with the shared assistant-visible delivery sanitizer and adds a regression test showing downgraded tool-call blocks are removed while ordinary prose remains unchanged. Merge readinessKeep this PR open for maintainer review. It is a focused iMessage message-delivery fix that reuses the established assistant-visible sanitizer, has regression coverage and recorded real-delivery proof, but intentionally changes what existing iMessage recipients see; a maintainer should accept that channel-level delivery policy before merge. Priority: P1 Review scores
Verification
How this fits togetherOpenClaw’s shared outbound delivery flow calls each channel plugin’s text-sanitizing hook before the channel sends a message. The iMessage plugin’s hook removes internal assistant artifacts, then hands the cleaned text to iMessage-specific delivery code. flowchart LR
A[Assistant reply text] --> B[Shared outbound delivery]
B --> C[iMessage sanitizer hook]
C --> D[Assistant-visible sanitizer]
D --> E[iMessage-specific cleanup]
E --> F[iMessage recipient]
G[Regression test] --> C
Decision needed
Why: The patch is mechanically narrow and follows established sibling patterns, but the remaining decision is whether the channel should intentionally suppress this broader class of user-visible text. Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +23. Total +23 across 2 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase or refresh the exact merge result against current Do we have a high-confidence way to reproduce the issue? Yes from source and the supplied proof: the iMessage outbound hook currently uses the narrower internal-scaffolding profile, while the PR’s focused test demonstrates the preserved downgraded tool-call form and the proposed after-fix output. Is this the best way to solve the issue? Yes. Reusing the existing shared assistant-visible sanitizer at iMessage’s outbound hook is narrower and safer than adding channel-specific regexes or a new configuration surface; the remaining question is deliberate delivery-policy acceptance, not implementation shape. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 667abb18a140. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
85a9727 to
cdef8c6
Compare
|
@clawsweeper re-review Rebased onto current main (head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
175b832 to
2fd2b36
Compare
|
Updated proof for current head Evidence in the PR body now covers:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Still active and ready for maintainer review on exact head |
2fd2b36 to
164ab9e
Compare
|
Refreshed for maintainer review on exact head The prior headline example was not a discriminating regression: current iMessage cleanup already strips that compact warning-line form. This update fixes the proof and framing around the real delta:
This remains an XS, channel-local patch with no config or shared-contract change. The only remaining question is whether to land the focused iMessage alignment now or hold all remaining channel slices for a future shared-default design. @steipete could you make that maintainer call when convenient? @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
CI note for exact head |
164ab9e to
e03f4b6
Compare
What Problem This Solves
iMessage outbound cleanup used the
internal-scaffoldingsanitizer profile. That profile intentionally preserves some assistant-internal delivery artifacts, including downgraded tool-call text such as[Tool Call: …]blocks. Other messaging adapters already use the canonicaldeliveryprofile tracked by #90684.Refs #90684.
Why This Change Was Made
This starts iMessage outbound cleanup with
sanitizeAssistantVisibleText, then keeps the existing iMessage-specific separator and role-marker cleanup.The change is deliberately channel-local:
User Impact
iMessage recipients no longer receive downgraded tool-call scaffolding that the old iMessage profile intentionally preserved. Ordinary assistant prose and the existing iMessage-specific cleanup remain unchanged.
Evidence
e03f4b69fad3cf816947c457192e9126e6a45daa4d8e89fd5cc447da04ce5f0615a21cff7c491f51git range-diffreports the single PR commit as patch-equivalent across the rebase.internal-scaffoldingprofile preserves[Tool Call: …]downgraded text;sanitizeTexthook removes that block and preserves the visible answer.vitest run extensions/imessage/src/outbound-tool-trace-sanitize.test.ts --config test/vitest/vitest.extension-imessage.config.ts— passed 2 tests.git diff --check upstream/main...HEADpassed.main's workflow fixes for the prior branch-unrelated zizmor failure; hosted CI remains the canonical heavy validation lane.AI-assisted change, manually reviewed and validated.