fix(photon): preserve native replies - #64711
Conversation
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Overview
Fixes photon channel to preserve native replies instead of converting them to quotedForward-style messages.
Assessment
- Correctness: Preserving native reply structure is the right behavior for photon.
- Security: No security-sensitive changes.
- Debug artifacts: None.
Summary
Clean fix. LGTM.
Reviewed by Hermes Agent
|
Thanks for fixing the verified text-reply path. Current main drops the gateway anchor in Problems
Suggested changes
Automated hermes-sweeper review. |
GottZ
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Summary
Three PRs are associated with this cluster, but they address two distinct Photon failure modes: #64711 preserves native reply anchors for outbound text, while #53831 and #65203 harden standalone text delivery against transient failures and add markdown fallback. #65203 is the review-corrected successor to #53831; neither retry PR addresses the reply-threading cause fixed by #64711.
Related pull requests
- #53831 [closed]
related— (+204/-30) — superseded by #65203: This closed PR introduced bounded standalone-send retries and plain-text fallback, but its diff missed safe connection-error retries, omitted configuration documentation, and included an unrelated inbound-dedup change; it remains relevant as the original implementation superseded by #65203. - #64711
related— (+30/-5) — keep open pending scope completion: The diff forwardsreply_tothrough the Photon text-send path and replies via a cached inbound message, directly fixing dropped native reply anchors for text. The contributor keep_open review on #64711 remains blocking because media methods and/send-attachmentstill discard the same anchor; either explicitly limit the PR to text replies or extend and test native media replies before merge. - #65203 [closed]
related— (+302/-29) — corrected successor to #53831: This closed PR retains the standalone retry and markdown-fallback fix while adding safeConnectError/ConnectTimeouthandling, preserving no-retry behavior for ambiguous read/write timeouts, documenting both controls, and removing the unrelated dedup change; it remains relevant as the review-complete reference implementation for that separate retry issue.
Duplicates
#53831 and #65203 implement substantially the same standalone-send retry change; #65203 supersedes and corrects #53831. #64711 is not a duplicate because it addresses native reply threading.
Suggested consolidation
Merge #64711 only after explicitly addressing its contributor keep_open review by either scoping the change and claim to text replies or propagating and testing reply_to for attachments. Treat #65203 as the corrected reference for the separate retry fix and #53831 as its superseded duplicate; no retry PR should be consolidated into or closed as a duplicate of #64711.
Cross-PR triage: Reviewed 3 pull requests and 0 issues in this complex. Each diff was read against this issue; Assessment working set: 33 kB of PR diffs, 4 kB of issue/PR text, 5 kB of discussion (8 comments), 1 verify verdict. verdicts reflect diff content, not PR titles. Part of an automated triage batch.
|
Addressed the automated review and rebased the implementation onto current
Validation: |
Summary
reply_toanchor through Photon text and media sendsspace.sendbehavior for proactive sends and missing/expired targetsProblem
The gateway already passes the triggering message ID to platform adapters, but Photon accepted
reply_toand then discarded it. Every generated response therefore became a newspace.sendinstead of a native iMessage reply. This is particularly brittle for Photon shared-line conversations, where replying to the known inbound message is the authorized and correctly threaded path.This is complementary to #59867: that PR preserves reply context on inbound user messages; this PR preserves reply context on outbound Hermes responses.
Validation
scripts/run_tests.sh tests/plugins/platforms/photon -q(136 passed)python -m py_compile plugins/platforms/photon/adapter.pynode --check plugins/platforms/photon/sidecar/index.mjsnode --check plugins/platforms/photon/sidecar/reply-target.mjsgit diff upstream/main...HEAD --check