[codex] Dedupe messaging tool replies by route#75579
Conversation
|
Codex review: needs changes before merge. What this changes: The PR adds a shared route-aware messaging-tool payload dedupe decision and uses it from normal reply payload building and follow-up delivery, with tests for same-route suppression and cross-target text/media preservation. Required change before merge: A repair worker can safely add the missing one-line changelog entry without changing the TypeScript logic; maintainer review and required checks still gate merge afterward. Security review: Security review cleared: Security review cleared: the diff is limited to TypeScript reply-dedupe logic and colocated tests, with no CI, dependency, credential, install, permission, or package-publishing changes. Review findings:
Review detailsBest possible solution: Land the route-aware dedupe helper after adding a single active changelog entry and waiting for required checks, keeping normal replies and follow-up/media wake delivery aligned on the same same-route suppression rule. Do we have a high-confidence way to reproduce the issue? Yes. On current main, call Is this the best way to solve the issue? Yes, with the changelog follow-up. Centralizing the decision into Full review comments:
Overall correctness: patch is correct Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 7b3dfbf21407. |
577c687 to
97dae1f
Compare
|
Landed via rebase onto main.
|
Summary
Why
The old fix treated any successful messaging-tool send as enough to suppress the final payload. That prevents duplicate sends for same-route deliveries, but it is too broad for proactive or cross-target sends: posting media somewhere else should not erase the reply back to the requester.
Validation
pnpm install --frozen-lockfilepnpm test src/auto-reply/reply/reply-payloads.test.ts src/auto-reply/reply/agent-runner-payloads.test.ts src/auto-reply/reply/followup-delivery.test.tspnpm exec oxfmt --check --threads=1 src/auto-reply/reply/reply-payloads-dedupe.ts src/auto-reply/reply/reply-payloads.ts src/auto-reply/reply/reply-payloads-dedupe.runtime.ts src/auto-reply/reply/agent-runner-payloads.ts src/auto-reply/reply/followup-delivery.ts src/auto-reply/reply/reply-payloads.test.ts src/auto-reply/reply/followup-delivery.test.tsgit diff --check