Fix Control UI duplicate iMessage replies for internal webchat turns#36151
Fix Control UI duplicate iMessage replies for internal webchat turns#36151vincentkoc merged 9 commits intomainfrom
Conversation
Greptile SummaryThis PR fixes a regression introduced in 2026.3.2 where Control UI webchat replies were being erroneously duplicated into iMessage. The root cause was that Key changes:
Confidence Score: 4/5
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 07498a78e0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…penclaw#36151) * Auto-reply: avoid routing external replies from internal webchat turns * Auto-reply tests: cover internal webchat non-routing with external origin metadata * Changelog: add Control UI iMessage duplicate-reply fix note * Auto-reply context: track explicit deliver routes * Gateway chat: mark explicit external deliver routes in context * Auto-reply: preserve explicit deliver routes for internal webchat turns * Auto-reply tests: cover explicit deliver routes from internal webchat turns * Gateway chat tests: assert explicit deliver route context tagging
…penclaw#36151) * Auto-reply: avoid routing external replies from internal webchat turns * Auto-reply tests: cover internal webchat non-routing with external origin metadata * Changelog: add Control UI iMessage duplicate-reply fix note * Auto-reply context: track explicit deliver routes * Gateway chat: mark explicit external deliver routes in context * Auto-reply: preserve explicit deliver routes for internal webchat turns * Auto-reply tests: cover explicit deliver routes from internal webchat turns * Gateway chat tests: assert explicit deliver route context tagging
…penclaw#36151) * Auto-reply: avoid routing external replies from internal webchat turns * Auto-reply tests: cover internal webchat non-routing with external origin metadata * Changelog: add Control UI iMessage duplicate-reply fix note * Auto-reply context: track explicit deliver routes * Gateway chat: mark explicit external deliver routes in context * Auto-reply: preserve explicit deliver routes for internal webchat turns * Auto-reply tests: cover explicit deliver routes from internal webchat turns * Gateway chat tests: assert explicit deliver route context tagging
Summary
OriginatingChanneland duplicating messages into iMessage.dispatchReplyFromConfigto keep true internal webchat turns on dispatcher delivery.Surfacecarries a non-webchat external channel.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
provider=webchat,surface=webchat).Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
provider=webchat,surface=webchat,originatingChannel=imessageSteps
Expected
Actual
Evidence
pnpm test src/auto-reply/reply/dispatch-from-config.test.tsHuman Verification (required)
What you personally verified (not just CI), and how:
Surface=telegram|feishustill routes; provider=webchat withSurface=webchatdoes not reroute externally.Compatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
src/auto-reply/reply/dispatch-from-config.tsRisks and Mitigations