Skip to content

Fix channel-scoped OpenClaw contact tracking#43

Merged
BahaAbuNojaim merged 1 commit into
DeepMyst:mainfrom
3em0:fix/channelbridge-channel-scoped-tracking
Jun 12, 2026
Merged

Fix channel-scoped OpenClaw contact tracking#43
BahaAbuNojaim merged 1 commit into
DeepMyst:mainfrom
3em0:fix/channelbridge-channel-scoped-tracking

Conversation

@3em0

@3em0 3em0 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Fix channel-scoped OpenClaw contact tracking

Closes #42

Summary

  • Bind tracked OpenClaw contacts to channel-scoped identities instead of sender text alone.
  • Require concrete inbound channel IDs to match the outbound channel ID, with a channel-type fallback for session polling events that do not expose a concrete channel ID.
  • Tighten pending ask matching so replies from a different concrete channel do not satisfy an ask from another channel.
  • Add ChannelBridge tests covering cross-channel rejection, same-channel acceptance, and session-polling fallback behavior.

Testing

  • node node_modules/typescript/bin/tsc --noEmit --pretty false
  • node node_modules/eslint/bin/eslint.js src/managers/ChannelBridge.ts tests/managers/channelBridge.test.ts --ext ts
  • Manual in-memory verification of the actual ChannelBridge class:
    • cross-channel sender: "Bob" rejected after WhatsApp tracking
    • same-channel sender: "Bob" accepted
    • pending ask cross-channel reply rejected

Notes

  • node node_modules/vitest/vitest.mjs run tests/managers/channelBridge.test.ts could not run in this environment because the installed Vite/Vitest versions require Node 20+, while this host has Node 18.19.1. TypeScript compilation and ESLint pass, and the actual class behavior was verified with a direct Node harness.
@BahaAbuNojaim BahaAbuNojaim merged commit 9b4aff0 into DeepMyst:main Jun 12, 2026
BahaAbuNojaim added a commit that referenced this pull request Jun 12, 2026
…#48)

Replies are now bound to a pending ask only when exactly one ask matches
the inbound channel and sender; ambiguous replies are logged and dropped
instead of being bound to the oldest ask across panels. Rebased onto the
channel-scoped tracking from #43 (uses _matchesInboundChannel) and merged
both test suites.

Fixes #44

Co-authored-by: Codex <codex@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants