Skip to content

fix(imessage): normalize leading NUL echo-cache prefixes#93511

Merged
vincentkoc merged 1 commit into
mainfrom
clownfish/ghcrawl-156742-autonomous-smoke
Jun 16, 2026
Merged

fix(imessage): normalize leading NUL echo-cache prefixes#93511
vincentkoc merged 1 commit into
mainfrom
clownfish/ghcrawl-156742-autonomous-smoke

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

  • Extend iMessage sent-message echo-cache text-key normalization to strip only leading NUL corruption markers before comparison.
  • Preserve interior NUL bytes and the existing leading attributedBody marker behavior from fix(imessage): normalize leading echoed text corruption #73942 so distinct message bodies do not collapse.
  • Add focused regression coverage for leading-NUL echo matches and interior-NUL non-matches.

Credit

Carries forward the narrow fix idea from #63581 by @drvoss. Thanks @drvoss for the original patch and repro framing.

Validation

  • pnpm check:changed
  • Focused local check for the executor: pnpm -s vitest run extensions/imessage/src/monitor/monitor-provider.echo-cache.test.ts

Clownfish 🐠 replacement reef notes:

fish notes: model gpt-5.5, reasoning medium; reviewed against c1cc8ee.

@vincentkoc vincentkoc added the clownfish Tracked by Clownfish automation label Jun 16, 2026
@openclaw-barnacle openclaw-barnacle Bot added the channel: imessage Channel integration: imessage label Jun 16, 2026
@vincentkoc
vincentkoc merged commit 4a0e376 into main Jun 16, 2026
17 of 21 checks passed
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Jun 16, 2026
@vincentkoc
vincentkoc deleted the clownfish/ghcrawl-156742-autonomous-smoke branch June 16, 2026 06:17
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 17, 2026
)

Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com>
Co-authored-by: jason <[email protected]>
crh-code pushed a commit to crh-code/openclaw that referenced this pull request Jun 18, 2026
)

Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com>
Co-authored-by: jason <[email protected]>
openclaw-clownfish Bot pushed a commit that referenced this pull request Jun 22, 2026
… echo cache (#94442)

The persisted iMessage echo-dedupe cache normalized text with CRLF->LF + trim only, not the leading attributedBody corruption-marker stripping the in-memory echo cache applies (#93511). The persisted 12h cache is the only matcher once the 4s in-memory text TTL expires, so a delayed reflected own-message echo whose text decoded with a leading NUL/replacement/BOM marker did not match the clean stored send -- the agent's own message was re-ingested as fresh inbound, causing a self-reply loop.

Extract the marker-stripping into a leaf module shared by both echo caches (the in-memory cache already imports the persisted one, so importing back would be a cycle) and apply it in the persisted normalizeText, so both caches strip identically.

Co-authored-by: ly-wang19 <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 23, 2026
… echo cache (openclaw#94442)

The persisted iMessage echo-dedupe cache normalized text with CRLF->LF + trim only, not the leading attributedBody corruption-marker stripping the in-memory echo cache applies (openclaw#93511). The persisted 12h cache is the only matcher once the 4s in-memory text TTL expires, so a delayed reflected own-message echo whose text decoded with a leading NUL/replacement/BOM marker did not match the clean stored send -- the agent's own message was re-ingested as fresh inbound, causing a self-reply loop.

Extract the marker-stripping into a leaf module shared by both echo caches (the in-memory cache already imports the persisted one, so importing back would be a cycle) and apply it in the persisted normalizeText, so both caches strip identically.

Co-authored-by: ly-wang19 <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: imessage Channel integration: imessage clownfish Tracked by Clownfish automation maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant