Skip to content

1.0.8 - #18

Merged
koss-null merged 6 commits into
masterfrom
1.0.8
Oct 12, 2026
Merged

koss-null merged 6 commits into
masterfrom
1.0.8

Conversation

@koss-null

Copy link
Copy Markdown
Owner

Mostly bug fixes that was found during extensive usage of the library and adding AI tools to the development pipeline.
The full list:
Correctness
Sum works with any associative operator (internal/internalpipe/sum.go)
Each parallel chunk now seeds its accumulator from real data instead of the type's zero value, so Sum is correct for +, *, min, max, … — not just addition.
Range reports an exact length for floats (internal/internalpipe/constructor.go)
Len is now derived consistently with the value predicate, removing a float-rounding off-by-one at range boundaries (integers unchanged).
ff.Reduce forwards its optional seed (pkg/ff/reduce.go)
The initVal argument is now passed through to the underlying reducer, so seeded folds behave as documented.
genTickets is robust for non-positive input (internal/internalpipe/pipe.go)
Reordered the clamp so the token helper can't block on a zero/negative count.
Concurrency & robustness
Any() terminates promptly and respects known bounds (internal/internalpipe/any.go)
The parallel scan is now bounded and cancellable, so background workers stop as soon as a result is found, and Take-limited pipes are treated as bounded rather than "unknown length".
First() finishes deterministically for every pipe length (internal/internalpipe/first.go)
Chunk bookkeeping is now exact and the read window is clamped to the pipe length, so parallel First() completes for any length/worker combination and never reads past the end.
Yeti.Handle() is reentrancy-safe (internal/internalpipe/yeet.go)
Handlers now run outside the internal locks, so a handler can safely interact with the same Yeti (Yeet/Snag/Handle) without contention.
Documentation accuracy
Code doc comments match shipped API (pkg/pipe/constructors.go, pkg/pipies/filters.go)
Removed references to a helper that isn't shipped yet (Until) and a non-existent method (Pipe.Distinct()), and fixed a Fn typo — comments now describe the actual surface.
README examples compile and match behavior (README.md)
Corrected signatures and snippets (pointer returns for Any/First, uint16 parallelism, Take vs Gen results, reduce examples) so copy-paste examples work as written.
Tests
Added regression coverage for each area:

Sum with non-+ operators (*, min)
Any() goroutine-leak guard
First() with uneven chunking
Yeti handler reentrancy + concurrent Yeet/Snag/Handle
Range float length boundaries
genTickets with non-positive counts

@koss-null
koss-null merged commit 6e3e69e into master Oct 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant