From f2364f1f8129a4cd78555fbc537f62c9ee9e2251 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Tue, 28 Jul 2026 21:53:33 -0700 Subject: [PATCH] test(photon): copy sidecar helper modules into the spectrum-patch fixture index.mjs now imports sibling .mjs helpers (send-format, stream-staleness); the fixture copied only index.mjs so the sidecar died on module resolution before reaching the health endpoint. --- tests/plugins/platforms/photon/test_spectrum_patch.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/plugins/platforms/photon/test_spectrum_patch.py b/tests/plugins/platforms/photon/test_spectrum_patch.py index fcf63fc637a..fd45f706b7f 100644 --- a/tests/plugins/platforms/photon/test_spectrum_patch.py +++ b/tests/plugins/platforms/photon/test_spectrum_patch.py @@ -36,6 +36,12 @@ def _write_sidecar_fixture(tmp_path: Path, *, sdk_available: bool) -> Path: sidecar = tmp_path / "sidecar" sidecar.mkdir() shutil.copyfile("plugins/platforms/photon/sidecar/index.mjs", sidecar / "index.mjs") + # index.mjs imports sibling helper modules — copy every non-patch .mjs so + # the fixture keeps working as helpers are extracted from index.mjs. + for helper in Path("plugins/platforms/photon/sidecar").glob("*.mjs"): + if helper.name in ("index.mjs", "patch-spectrum-mixed-attachments.mjs"): + continue + shutil.copyfile(helper, sidecar / helper.name) (sidecar / "patch-spectrum-mixed-attachments.mjs").write_text( "export function patchSpectrumTs() { throw new Error('forced patch failure'); }\n", encoding="utf-8",