Tracked differences between the TypeScript kernel (packages/kernel) and the
reference Python runtime. Each gap has regression tests that assert the
current TypeScript behavior so a future fix is an explicit, reviewed change
rather than a silent one. The desired end-state is recorded here instead of as
bare // TODO comments scattered through the tests.
Tests: packages/kernel/tests/parity-output-edge-gaps.test.ts.
Python’s process_output_node() consumes a stream item-by-item and emits one
output_update per value, deduplicating consecutive identical values.
same, same, different produce a single
output_update carrying different.same, same, different to two
output_update messages (same once, then different).should ... deduplicate consecutive test (current
behavior: outputMsgs.length === 1).output_update message fields (node_id, node_name, output_name, value,
output_type, metadata) are already populated — that part of gap #9 is fixed.
Python emits edge_update at several lifecycle points, including "drained"
during drain_active_edges() and "completed" during _send_EOS().
_drainActiveEdges() now exists in TS and emits "drained" for edges whose
target handle is still open at completion.
_sendEOS is never
called for edges that originate at an input node. Those edges receive an
"active" update from _dispatchInputs() but no terminal "completed" /
"drained"."completed" (or "drained") update at the end of the run.completedMsgs.length === 0 for input edges).Edges between non-input nodes already get both "active" and "completed".