From aa35c319ba6d2bed2188ea92cfa95fccdc210745 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Tue, 28 Jul 2026 18:46:43 -0700 Subject: [PATCH 1/2] fix(photon): remove early U+FFFC drop that shadowed the deferred-wait handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The #73560 cherry-pick of #54514 (drop placeholder text at the boundary, fd4f756492) landed after the deferred-wait implementation (6b91b50c6e) and its early return made the _pending_fffc wait/timeout branch unreachable — breaking 4 tests on main (CI slice 2/8 red for every PR). The deferred-wait branch subsumes the drop's intent: the placeholder is still never dispatched as a text turn, and we additionally hold a timeout so the real attachment can cancel it. The drop-commit's regression test still passes unchanged. Credit: placeholder-drop originally by @kelsia14 (#54514); deferred-wait by the #71673 salvage. --- plugins/platforms/photon/adapter.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/plugins/platforms/photon/adapter.py b/plugins/platforms/photon/adapter.py index 60d74de41e2a..b73bff8d5fc7 100644 --- a/plugins/platforms/photon/adapter.py +++ b/plugins/platforms/photon/adapter.py @@ -875,19 +875,6 @@ def _normalize_binary_payload( ) ctype = content.get("type") - if ctype == "text": - raw_text = content.get("text") or "" - # iMessage emits U+FFFC OBJECT REPLACEMENT CHARACTER as a transient - # placeholder for some media bubbles (notably voice notes). Photon - # can then deliver the real attachment/voice event immediately - # afterwards with a different message id. If we dispatch the - # placeholder as a standalone text turn, the subsequent media event - # arrives while that turn is active and the gateway sends a bogus - # "Interrupting current task" busy ack. Drop placeholder-only text - # at the platform boundary; the real media event carries the bytes. - if raw_text.strip() == "\ufffc": - logger.debug("[photon] ignoring iMessage object-placeholder text event") - return if ctype == "reaction": # Route only tapbacks on messages WE sent — those are implicitly # addressed to the bot (feishu precedent: synthetic text event). From f01c9385b0d3ff9fa071d867752a795443ed2e75 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Tue, 28 Jul 2026 18:55:17 -0700 Subject: [PATCH 2/2] test(photon): materialize spectrum-ts dir in runtime-record spawn fixture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Second cross-PR collision from the same wave: 9cf2046081 hardened sidecar_deps_installed() to probe node_modules/spectrum-ts (not bare node_modules/), and the later-merged runtime-record tests (e79d316a04) still created only node_modules/ — so _start_sidecar raised the deps-not-installed error before the code under test ran (CI slice 7/8 red on main). Fixture now creates the dir the probe checks. --- tests/plugins/platforms/photon/test_runtime_record.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/plugins/platforms/photon/test_runtime_record.py b/tests/plugins/platforms/photon/test_runtime_record.py index 1b1e650cfc5e..d284ac633734 100644 --- a/tests/plugins/platforms/photon/test_runtime_record.py +++ b/tests/plugins/platforms/photon/test_runtime_record.py @@ -120,7 +120,10 @@ def _patch_spawn( ) -> None: """Stub everything _start_sidecar touches before the healthz loop.""" sidecar_dir = tmp_path / "sidecar" - (sidecar_dir / "node_modules").mkdir(parents=True) + # sidecar_deps_installed() checks the spectrum-ts package dir, not bare + # node_modules/ (9cf2046081 hardened it against partial npm installs) — + # the fixture must materialize the dependency dir the probe looks for. + (sidecar_dir / "node_modules" / "spectrum-ts").mkdir(parents=True) monkeypatch.setattr(photon_adapter, "_SIDECAR_DIR", sidecar_dir) monkeypatch.setattr(photon_adapter, "_sidecar_deps_stale", lambda: False)