Kernel Parity Gaps

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.

Gap #9 — Output node handling (consecutive deduplication)

Python’s process_output_node() consumes a stream item-by-item and emits one output_update per value, deduplicating consecutive identical values.

output_update message fields (node_id, node_name, output_name, value, output_type, metadata) are already populated — that part of gap #9 is fixed.

Gap #15 — Edge counter updates for input-originating edges

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.

Edges between non-input nodes already get both "active" and "completed".