sort-external-merge

Status: IN

`Sort` stage spills sorted chunks to temp JSONL files when the in-memory buffer exceeds `memory_limit`, then uses `heapq.merge` with a `KeyedRecord` wrapper (seq tiebreaker) for stable k-way merge

Source: entries/2026/05/29/batch-word-count-pipeline.md

JSON