@pond-ts/react 0.24.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +48 -1
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -7,7 +7,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
7
7
  file covers both packages. Pre-1.0: minor bumps may include new features and
8
8
  type-level changes; patch bumps are strictly additive.
9
9
 
10
- [Unreleased]: https://github.com/pjm17971/pond-ts/compare/v0.24.0...HEAD
10
+ [Unreleased]: https://github.com/pjm17971/pond-ts/compare/v0.25.0...HEAD
11
+ [0.25.0]: https://github.com/pjm17971/pond-ts/compare/v0.24.0...v0.25.0
11
12
  [0.24.0]: https://github.com/pjm17971/pond-ts/compare/v0.23.0...v0.24.0
12
13
  [0.23.0]: https://github.com/pjm17971/pond-ts/compare/v0.22.0...v0.23.0
13
14
  [0.22.0]: https://github.com/pjm17971/pond-ts/compare/v0.21.0...v0.22.0
@@ -18,6 +19,52 @@ type-level changes; patch bumps are strictly additive.
18
19
 
19
20
  ## [Unreleased]
20
21
 
22
+ ## [0.25.0] — 2026-06-15
23
+
24
+ ### Changed
25
+
26
+ - **Reducers now treat non-finite numerics (`NaN` / `±Infinity`) as missing —
27
+ they are skipped — uniformly across every built-in reducer and all four
28
+ execution paths (`reduce`, the columnar fast path, `aggregate`/bucket, and
29
+ `rolling`/live).** Previously the paths disagreed on non-finite input: e.g.
30
+ `min`/`max` returned a position-dependent wrong extreme on the batch/columnar
31
+ paths but the true extreme on aggregate/rolling; `sum`/`avg` propagated
32
+ `NaN`. Non-finite can't enter via the row API (intake rejects it) — it only
33
+ arises inside computed columns (`cumulative` overflow, `diff`/`rate`
34
+ overflow, `collapse`, trusted construction) — so this only changes results
35
+ for those degenerate values, and makes every path agree. The three-layer
36
+ contract: **intake** stays strict (rejects non-finite), **computed writers**
37
+ stay permissive (pack honest non-finite), **reducers** are robust (skip it).
38
+ A standing parity-matrix test now pins all paths together. See
39
+ `docs/notes/reducer-nan-policy.md`. This also resolves the `aggregate('stdev')`
40
+ divergence class and the `min`/`max` NaN-laundering bug.
41
+ - Internal: `Float64Column` gained an `allFinite` fast-path flag (data-derived
42
+ at construction, conservative-by-default) so reducers skip the per-element
43
+ finite check on provably-finite columns — keeping the policy's cost off the
44
+ hot path (min/max/count stay at their pre-policy speed).
45
+
46
+ ### Fixed
47
+
48
+ - **`rolling(window, { x: 'stdev' })` is now numerically stable.** It was the
49
+ last batch stdev path still on the one-pass `Σx²/n − mean²`, which cancels
50
+ catastrophically on near-equal large values (`[1e10, 1e10+1, …]` → `0`
51
+ instead of ≈1.118, or a negative variance → `NaN`) and drifts on trending
52
+ data (cumulative distance, elevation). It now uses Welford's online variance
53
+ with an order-independent **delete** — deviation-space, so no cancellation,
54
+ and removal **by value**, which keeps it correct under the live layer's
55
+ `reorder`-mode eviction (a positional/FIFO remove would have broken it; the
56
+ documented "stdev is reorder-safe" contract is preserved). Rolling-stdev
57
+ values shift in the last ULPs (now correct); the path stays O(1) and within
58
+ run-noise of the old one-pass, and a single-element window now reports exactly
59
+ `0` at any magnitude. Like any subtractive sliding variance, evicting an
60
+ outlier far outside the residual spread loses precision — negligible until the
61
+ evicted point is ~1e7–1e8× the residual stdev, far beyond realistic data.
62
+ - A standing differential-fuzz parity suite now pins every built-in reducer's
63
+ execution paths (columnar fast path vs `bucket` vs `rolling`, and the FIFO
64
+ sliding window vs a from-scratch recompute) against silent drift across
65
+ randomized magnitudes and window sizes — the class of bug behind the stdev
66
+ and `min`/`max` divergences.
67
+
21
68
  ## [0.24.0] — 2026-06-14
22
69
 
23
70
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pond-ts/react",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "React hooks for pond-ts live time series",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -33,7 +33,7 @@
33
33
  "test:runtime": "vitest run"
34
34
  },
35
35
  "peerDependencies": {
36
- "pond-ts": "^0.24.0",
36
+ "pond-ts": "^0.25.0",
37
37
  "react": "^18.0.0 || ^19.0.0"
38
38
  },
39
39
  "devDependencies": {