From 5c20b9bb327eb026ce1d3c027ff28702e2036b68 Mon Sep 17 00:00:00 2001 From: w4ffl35 <25737761+w4ffl35@users.noreply.github.com> Date: Wed, 16 Sep 2026 05:17:54 -0600 Subject: [PATCH] Correct the frame-list type on the pipeline runner's node input _node_input is annotated Tuple[List[float], bool], but it returns a list of frames, not a list of floats: the no-incoming-edge branch returns frames_from(), which is List[Any], and the other branch wraps a single extracted vector as [frame]. mypy caught the mismatch and the lint job has been failing on main since 60763a2. Only the annotation was wrong. The runtime shape is correct and unchanged -- ServingService.predict consumes a list of frames, and a single-node graph run returns a prediction end to end. Verified: mypy clean across all 413 source files, ruff clean, and the four pipeline test files pass (33 passed). --- spikeforge_serve/pipeline_runner.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spikeforge_serve/pipeline_runner.py b/spikeforge_serve/pipeline_runner.py index 77fd74f..0348c7f 100644 --- a/spikeforge_serve/pipeline_runner.py +++ b/spikeforge_serve/pipeline_runner.py @@ -112,8 +112,14 @@ def _node_input( incoming: List[PipelineEdge], results: Dict[str, Dict[str, Any]], service: ServingService, -) -> Tuple[List[float], bool]: - """Return the ``(frames, encoded)`` input for one node.""" +) -> Tuple[List[Any], bool]: + """Return the ``(frames, encoded)`` input for one node. + + The first element is a list of *frames*, matching what ``frames_from`` + yields and what ``ServingService.predict`` consumes. An upstream node + contributes exactly one frame, so its vector is wrapped rather than + spread. + """ if not incoming: return frames_from(ctx.request), encoded_flag(ctx.request) edge = incoming[0]