A custom `Collector.of(MinMax::new, MinMax::accept, (left, right) -> left)` finds min/max in one pass. It passes every test written with `.stream()`. Switched to `.parallelStream()` on a million elements, it returns the wrong maximum. What's the mechanism, and why did every sequential test pass?
A Collector is four functions — a supplier that makes an empty container, an accumulator that adds one element, a combiner that merges two containers, and an optional finisher — and the combiner is the one function that a sequential stream never calls, not once, under any circumstances, because a sequential stream uses exactly one container for the whole traversal, so there's nothing to merge. This particular combiner, (left, right) -> left, keeps the left side of every merge and silently discards the right — a bug, but one that's completely invisible sequentially, since the code path that would expose it literally never runs. A parallel stream splits the source into chunks, gives each chunk its own container, and merges the partial results with the combiner; discard the right side of every merge and you're left with only the very first chunk's result, which is why the maximum comes back wrong — not corrupted, just quietly truncated to whatever the first chunk alone contained.