@pond-ts/react 0.24.0 → 0.26.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 +70 -1
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -7,7 +7,9 @@ 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.26.0...HEAD
11
+ [0.26.0]: https://github.com/pjm17971/pond-ts/compare/v0.25.0...v0.26.0
12
+ [0.25.0]: https://github.com/pjm17971/pond-ts/compare/v0.24.0...v0.25.0
11
13
  [0.24.0]: https://github.com/pjm17971/pond-ts/compare/v0.23.0...v0.24.0
12
14
  [0.23.0]: https://github.com/pjm17971/pond-ts/compare/v0.22.0...v0.23.0
13
15
  [0.22.0]: https://github.com/pjm17971/pond-ts/compare/v0.21.0...v0.22.0
@@ -18,6 +20,73 @@ type-level changes; patch bumps are strictly additive.
18
20
 
19
21
  ## [Unreleased]
20
22
 
23
+ ## [0.26.0] — 2026-06-15
24
+
25
+ ### Changed
26
+
27
+ - **`rolling(...)` now builds its output columns directly instead of
28
+ materializing events.** The rolling family was the last batch operator still
29
+ assembling a row per event and re-validating/re-packing it through the
30
+ constructor; it now reads the key axis and source values straight off the
31
+ columnar store and writes the result columns via trusted construction. The
32
+ result is unchanged for the common (scalar) cases. Measured: `rolling` with
33
+ `avg`/`sum` ~2.2–2.7× faster; rolling `stdev` on 100k events ~3.3–7.3×
34
+ (a 1-event window 45.7 ms → 6.3 ms); partitioned rolling ~1.8×.
35
+ `baseline` / `outliers` (which delegate to `rolling`) inherit the speedup.
36
+ - **Behavior note — `array` columns:** an identity-comparing reducer (`keep`,
37
+ or a custom reducer using `===` on the cell) on an `array`-kind source
38
+ column now compares the value stored in the column, not the original object
39
+ reference passed at construction. Two rows given the *same* array object
40
+ therefore read as distinct. Scalar columns (number / string / boolean) are
41
+ unaffected. A non-finite or wrong-kind reducer result is still rejected with
42
+ a `ValidationError`, exactly as the constructor's intake did.
43
+
44
+ ## [0.25.0] — 2026-06-15
45
+
46
+ ### Changed
47
+
48
+ - **Reducers now treat non-finite numerics (`NaN` / `±Infinity`) as missing —
49
+ they are skipped — uniformly across every built-in reducer and all four
50
+ execution paths (`reduce`, the columnar fast path, `aggregate`/bucket, and
51
+ `rolling`/live).** Previously the paths disagreed on non-finite input: e.g.
52
+ `min`/`max` returned a position-dependent wrong extreme on the batch/columnar
53
+ paths but the true extreme on aggregate/rolling; `sum`/`avg` propagated
54
+ `NaN`. Non-finite can't enter via the row API (intake rejects it) — it only
55
+ arises inside computed columns (`cumulative` overflow, `diff`/`rate`
56
+ overflow, `collapse`, trusted construction) — so this only changes results
57
+ for those degenerate values, and makes every path agree. The three-layer
58
+ contract: **intake** stays strict (rejects non-finite), **computed writers**
59
+ stay permissive (pack honest non-finite), **reducers** are robust (skip it).
60
+ A standing parity-matrix test now pins all paths together. See
61
+ `docs/notes/reducer-nan-policy.md`. This also resolves the `aggregate('stdev')`
62
+ divergence class and the `min`/`max` NaN-laundering bug.
63
+ - Internal: `Float64Column` gained an `allFinite` fast-path flag (data-derived
64
+ at construction, conservative-by-default) so reducers skip the per-element
65
+ finite check on provably-finite columns — keeping the policy's cost off the
66
+ hot path (min/max/count stay at their pre-policy speed).
67
+
68
+ ### Fixed
69
+
70
+ - **`rolling(window, { x: 'stdev' })` is now numerically stable.** It was the
71
+ last batch stdev path still on the one-pass `Σx²/n − mean²`, which cancels
72
+ catastrophically on near-equal large values (`[1e10, 1e10+1, …]` → `0`
73
+ instead of ≈1.118, or a negative variance → `NaN`) and drifts on trending
74
+ data (cumulative distance, elevation). It now uses Welford's online variance
75
+ with an order-independent **delete** — deviation-space, so no cancellation,
76
+ and removal **by value**, which keeps it correct under the live layer's
77
+ `reorder`-mode eviction (a positional/FIFO remove would have broken it; the
78
+ documented "stdev is reorder-safe" contract is preserved). Rolling-stdev
79
+ values shift in the last ULPs (now correct); the path stays O(1) and within
80
+ run-noise of the old one-pass, and a single-element window now reports exactly
81
+ `0` at any magnitude. Like any subtractive sliding variance, evicting an
82
+ outlier far outside the residual spread loses precision — negligible until the
83
+ evicted point is ~1e7–1e8× the residual stdev, far beyond realistic data.
84
+ - A standing differential-fuzz parity suite now pins every built-in reducer's
85
+ execution paths (columnar fast path vs `bucket` vs `rolling`, and the FIFO
86
+ sliding window vs a from-scratch recompute) against silent drift across
87
+ randomized magnitudes and window sizes — the class of bug behind the stdev
88
+ and `min`/`max` divergences.
89
+
21
90
  ## [0.24.0] — 2026-06-14
22
91
 
23
92
  ### 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.26.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.26.0",
37
37
  "react": "^18.0.0 || ^19.0.0"
38
38
  },
39
39
  "devDependencies": {