@zakkster/lite-signal 1.5.0-alpha.0 → 1.5.0-alpha.1

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.
package/CHANGELOG.md CHANGED
@@ -65,13 +65,17 @@ dependency and updates correctly; a `computedBox` that reads a callable
65
65
  the introspection surface all apply uniformly -- a box node is indistinguishable
66
66
  from a callable node to the graph, the owner tree, and devtools.
67
67
 
68
- ### Added -- `test/24-signalbox_test.mjs` activated (9 tests)
68
+ ### Added -- `test/24-signalbox_test.mjs` activated (12 tests)
69
69
 
70
70
  The suite that was committed-but-skipped since 1.3.0 now runs against the real
71
- implementation: box get/set/peek/update, computedBox derive + memoize,
72
- peek-does-not-track, subscribe fires-and-untracks, box<->callable interop both
73
- directions, batch coalescing across boxes, dispose stopping updates with
74
- ABA-safety, and the `equals` short-circuit. All 9 pass.
71
+ implementation. The 9 originally-staged tests cover box get/set/peek/update,
72
+ computedBox derive + memoize, peek-does-not-track, subscribe fires-and-untracks,
73
+ box<->callable interop both directions, batch coalescing across boxes, dispose
74
+ stopping updates with ABA-safety, and the `equals` short-circuit. The 3
75
+ box-coverage additions for 1.5.0 cover `computedBox.peek` (track-free read on
76
+ the derived shape), the set-then-revert net no-op in a batch (pre-batch revert
77
+ applies to box writes too), and the top-level `signalBox` / `computedBox`
78
+ helpers binding to the default registry with full callable interop. All 12 pass.
75
79
 
76
80
  ### Added -- `createRoot(fn)` (ownership escape hatch)
77
81
 
@@ -108,11 +112,13 @@ query-watcher being the first in the ecosystem. Those consumers wrap the spawn i
108
112
  `createRoot(() => effect(...))` and dispose it themselves; the watcher then
109
113
  survives consumer re-runs.
110
114
 
115
+ ### Verified
111
116
 
112
117
  - **Full suite green** against the 1.5.0 engine: 439 tests, 438 pass, 0 fail,
113
118
  1 skip (only the architecturally-N/A SSR case in `17-reactivity`; the 9
114
- `24-signalbox` tests are now active, +6 `createRoot` tests in
115
- `test/27-create-root_test.mjs`, +3 box-coverage tests). **Coverage** (c8@11,
119
+ `24-signalbox` tests are now active and the suite carries +3 box-coverage
120
+ additions for a 12-test file, +7 `createRoot` tests in
121
+ `test/27-create-root_test.mjs`). **Coverage** (c8@11,
116
122
  Node 22): `Signal.js` 100% statements / 97.35% branches / 100% functions / 100%
117
123
  lines; `Watch.js` 100% across all four.
118
124
  - **Box hot path is zero-GC**: 200,000 writes through a 256-wide box graph,
@@ -133,7 +139,7 @@ survives consumer re-runs.
133
139
  cleanly -- detachment costs no auto-cleanup but introduces no leak. Verified
134
140
  against the exact lazy-watcher pattern `lite-query` uses.
135
141
 
136
-
142
+ ## [1.4.0] -- 2026-06-XX
137
143
 
138
144
  The observability minor: `stats()` gains **three cumulative lifecycle counters**
139
145
  (`totalAllocations`, `totalDisposals`, `poolGrowths`) -- the surface reserved for
@@ -191,7 +197,7 @@ as before (the reset keeps the arena warm); only the cumulative counts reset.
191
197
 
192
198
  ### Verified
193
199
 
194
- - **Full suite green** against the 1.4.0 engine: 430 tests, 420 pass, 0 fail,
200
+ - **Full suite green** against the 1.4.0 engine: 429 tests, 419 pass, 0 fail,
195
201
  10 skip (9 signalBox-staged-for-1.5.0 plus 1 architecturally-N/A SSR skip). The eager-default and the counter additions
196
202
  changed no existing test outcome.
197
203
  - **Counter correctness** confirmed directly: after building a signal ->
@@ -202,12 +208,12 @@ as before (the reset keeps the arena warm); only the cumulative counts reset.
202
208
  - **Zero-GC steady state holds**: the counters bump only on acquire / dispose /
203
209
  grow, none of which occur on the steady-state write path after warm-up. Writing
204
210
  through a built graph allocates nothing and moves no counter.
205
- - **`stats()` shape** is now the authoritative 11-key 1.4.x shape; the
206
- introspection-contract test is updated to expect the three counters present
207
- (the 1.2.x/1.3.0 test pinned their *absence*; that pin is correctly inverted
208
- for 1.4.0).
209
-
211
+ - **`stats()` shape** is now the authoritative 11-key 1.4.x shape, pinned by a
212
+ new shape-and-initial-zeros test in `03-pool` -- the first explicit pin for
213
+ the `stats()` surface (the 1.2.x / 1.3.0 entries described the absence of the
214
+ counters in prose; 1.4.0 codifies the new shape as a test assertion).
210
215
 
216
+ ## [1.3.0] -- 2026-06-XX
211
217
 
212
218
  The pool minor: the node and link pools become **growable and incrementally
213
219
  populated**, the propagation mark phase moves to an **intrusive linked-list
@@ -285,10 +291,10 @@ in 1.3.0.
285
291
 
286
292
  ### Verified
287
293
 
288
- - **Full suite green** against the 1.3.0 engine: 424 tests, 414 pass, 0 fail,
289
- 1 architecturally-N/A SSR skip (the `24-signalbox` suite is `{skip:true}` on
290
- 1.3.x -- those primitives land in 1.5.0). The eager-default flip changed no
291
- test outcome.
294
+ - **Full suite green** against the 1.3.0 engine: 423 tests, 413 pass, 0 fail,
295
+ 10 skip (9 `24-signalbox` tests `{skip:true}` on 1.3.x -- those primitives
296
+ land in 1.5.0 -- plus 1 architecturally-N/A SSR skip). The eager-default flip
297
+ changed no test outcome.
292
298
  - **Behavior-preservation difftest**: 20,000 direct + 10,000 batched writes
293
299
  against the published 1.1.5 reference, 0 disagreements. Pool growth, chunked
294
300
  refill, and the intrusive mark stack do not alter observable propagation.
@@ -298,10 +304,9 @@ in 1.3.0.
298
304
  scenarios.
299
305
  - **`stats()` shape unchanged from 1.2.x** (8 keys). The cumulative allocation
300
306
  counters (`totalAllocations` / `totalDisposals` / `poolGrowths`) remain
301
- reserved for 1.4.0 and are still absent here -- the introspection-contract
302
- test continues to pin their absence.
303
-
307
+ reserved for 1.4.0 and are still absent here.
304
308
 
309
+ ## [1.2.2] -- 2026-06-14
305
310
 
306
311
  A code-deletion ship: a `createNode` audit removes ten redundant field-writes
307
312
  that defended against a state the engine cannot produce on a clean free-list.
package/README.md CHANGED
@@ -695,7 +695,7 @@ These are the questions you'd ask in a code review, with the answers:
695
695
 
696
696
  ## Benchmarks
697
697
 
698
- Honest numbers, against the same workload, with anti-DCE sinks and verified effect execution. All measurements: Node 22, **2016-era Intel MacBook Pro (4 cores, ~10 yr old hardware)**, **one engine per cold process**, median across reps. Newer/faster machines shift all libs up proportionally; the relative ordering between libs is what matters. Numbers below are lite-signal **@1.3.0** (default `prealloc: "eager"`) vs alien-signals on the same `benchmark.mjs` loop -- the harness now reports **median execution time + transient heap** rather than ops/s. 1.3.0's hot paths are byte-identical to 1.2.2, so these track the 1.2.2 measurement; the deltas are run-to-run noise on this old host, not engine changes. **1.4.0 carries these forward unchanged** -- its only addition is three `stats()` counters that bump on acquire/dispose/grow, never on the steady-state read path, so throughput is identical (a fresh 1.4.0 bench run will be published when available). Full per-engine tables: [`results.txt`](./results.txt) (this propagation suite) and [`resultsReactive.txt`](./resultsReactive.txt) (the cross-framework reactivity suite).
698
+ Honest numbers, against the same workload, with anti-DCE sinks and verified effect execution. All measurements: Node 22, **2016-era Intel MacBook Pro (4 cores, ~10 yr old hardware)**, **one engine per cold process**, median across reps. Newer/faster machines shift all libs up proportionally; the relative ordering between libs is what matters. Numbers below are lite-signal **@1.3.0** (default `prealloc: "eager"`) vs alien-signals on the same `benchmark.mjs` loop -- the harness now reports **median execution time + transient heap** rather than ops/s. 1.3.0's hot paths are byte-identical to 1.2.2, so these track the 1.2.2 measurement; the deltas are run-to-run noise on this old host, not engine changes. **1.4.0 and 1.5.0 carry these forward unchanged** -- 1.4.0 only added three `stats()` counters that bump on acquire/dispose/grow (never on the steady-state read path), and 1.5.0 adds the box handle shape (allocation-light construction; the read/write hot path is the same pooled-node engine), so throughput is identical (fresh 1.4.0 and 1.5.0 bench runs will be published when available). Full per-engine tables: [`results.txt`](./results.txt) (this propagation suite) and [`resultsReactive.txt`](./resultsReactive.txt) (the cross-framework reactivity suite).
699
699
 
700
700
  | Scenario | What it stresses | lite-signal | alien-signals | lite vs alien | transient heap (lite / alien) |
701
701
  | ---------- | -------------------------------- | ----------- | ------------- | ------------- | ----------------------------- |
@@ -871,7 +871,7 @@ The cross-framework reactivity suite agrees independently, re-run on **1.3.0** (
871
871
  - **1.1.5** -- additions in service of `lite-devtools` (node identity/traversability on the introspection walkers, for full auto-discovered graph rendering). *Shipped.*
872
872
  - **1.2.0** -- the **ownership hybrid**: an owner tree so nested effects/computeds auto-dispose with their parent (closes conformance #209 / #210, matching Solid's `createRoot` ergonomics). Plus three additive features built on the same internal split: pre-batch revert (`batch(() => { a.set(99); a.set(10); })` doesn't re-fire), multi-throw `AggregateError`, and scheduler-thunk caching with an ABA gen guard. *Shipped.*
873
873
  - **1.3.0** -- the **pool minor**: node and link pools become growable and incrementally populated. New `prealloc` config (`"eager"` default | `"lazy"`) chooses up-front vs on-demand construction; `onCapacityExceeded: "grow"` extends pools via chunked refill (runs of up to 1024 links / 256 nodes, ledger doubles) bounded by the 16x link ceiling; `maxFlushPasses` is now a public config. Internally the propagation mark phase moved to an intrusive linked-list stack (a `nextMark` field) -- the only node-shape change. The hot paths and public callable API are byte-identical to 1.2.2; steady-state zero-GC is unchanged. *Shipped.*
874
- - **1.4.0** -- the **observability minor**: `stats()` gains three cumulative lifecycle counters (`totalAllocations`, `totalDisposals`, `poolGrowths`), the surface reserved for it in the 1.2.x/1.3.0 notes. Monotonic over the registry's life, reset by `destroy()`, bumped on the existing acquire/dispose/grow edges -- no hot-path change, no public callable API change. This is what lite-devtools / lite-studio read to chart allocation rate, pool-reuse ratio, and graph churn. Drop-in over 1.3.0. *Shipped (beta).*
874
+ - **1.4.0** -- the **observability minor**: `stats()` gains three cumulative lifecycle counters (`totalAllocations`, `totalDisposals`, `poolGrowths`), the surface reserved for it in the 1.2.x/1.3.0 notes. Monotonic over the registry's life, reset by `destroy()`, bumped on the existing acquire/dispose/grow edges -- no hot-path change, no public callable API change. This is what lite-devtools / lite-studio read to chart allocation rate, pool-reuse ratio, and graph churn. Drop-in over 1.3.0. *Shipped.*
875
875
  - **1.5.0** -- the **API-surface minor**: two non-callable, allocation-light primitives `signalBox` / `computedBox` land alongside the callable `signal` / `computed` (same `ReactiveNode`, full interop, ~1.7x cheaper construction), and **`createRoot`** lands as the ownership escape hatch the owner tree was designed for (detached scope for lazily spawning long-lived nodes from inside a consumer effect -- the pattern `lite-query` needs). The callable API, hot paths, and `stats()` shape are unchanged; the `24-signalbox` suite (staged since 1.3.0) now runs and passes. *Shipped (alpha).*
876
876
  - **Next** -- `runWithOwner` (the re-attach companion to `createRoot`); the pull-mode recursion depth limit (~5,000 chained computeds) remains the main outstanding architectural item.
877
877
 
@@ -1027,7 +1027,7 @@ The one remaining open item is a deliberate design choice (#179, below).
1027
1027
  The exact post-1.2 pass count is being re-run against the upstream suite;
1028
1028
  per-test results and the runner adapter live in `/conformance/`.
1029
1029
 
1030
- **177 of 178 tests pass **, placing lite-signal **in the second place of sixteen**
1030
+ **177 of 178 tests pass**, placing lite-signal **in the second place of sixteen**
1031
1031
  evaluated libraries -- just behind alien-signals (177).
1032
1032
 
1033
1033
  We publish both passing and failing tests, because honesty about behavior is
package/llms.txt CHANGED
@@ -79,12 +79,13 @@ triggering write -- no `queueMicrotask`, no promises, no scheduler ticks.
79
79
  (`runWithOwner`, the re-attach half, is not yet shipped). The `24-signalbox`
80
80
  suite (staged `{skip:true}` since 1.3.0) now runs and passes. **Tests:** 439
81
81
  total, 438 pass, 0 fail, **1 skip** (only the architecturally-N/A SSR case in
82
- `17-reactivity`; the 9 signalBox tests are now active, +6 `createRoot` tests in
83
- `test/27-create-root_test.mjs`, +3 box-coverage tests). **Coverage:** `Signal.js`
82
+ `17-reactivity`; the 9 originally-staged signalBox tests are now active and
83
+ the suite carries +3 box-coverage additions for a 12-test file, +7 `createRoot`
84
+ tests in `test/27-create-root_test.mjs`). **Coverage:** `Signal.js`
84
85
  100% statements / 97.35% branches / 100% functions / 100% lines; `Watch.js` 100%.
85
86
  Drop-in over 1.4.0.
86
87
 
87
- - **1.4.0-beta** (drop-in over 1.3.0): the **observability minor**. `stats()` gains three
88
+ - **1.4.0** (drop-in over 1.3.0): the **observability minor**. `stats()` gains three
88
89
  cumulative lifecycle counters -- `totalAllocations`, `totalDisposals`,
89
90
  `poolGrowths` -- the surface reserved for 1.4.0 in the 1.2.x/1.3.0 notes, now
90
91
  delivered. **The hot paths and public callable API are byte-identical to 1.3.0**;
@@ -102,7 +103,7 @@ triggering write -- no `queueMicrotask`, no promises, no scheduler ticks.
102
103
  rate (delta totalAllocations / delta t), pool-reuse ratio
103
104
  (1 - poolGrowths*initialCap/totalAllocations), and churn without the engine
104
105
  computing rates -- the series lite-devtools 1.2 / lite-studio 1.2 plot. **Tests:**
105
- 430 total, 420 pass, 0 fail, 10 skip (6 new counter tests in `test/03-pool_test.mjs`
106
+ 429 total, 419 pass, 0 fail, 10 skip (6 new counter tests in `test/03-pool_test.mjs`
106
107
  cover the 11-key shape, the live invariant, poolGrowths firing on growth vs staying
107
108
  0 on a sized eager pool, and destroy() reset). **Coverage:** `Signal.js` 100%
108
109
  statements / 98.26% branches / 100% functions / 100% lines; `Watch.js` 100%.
@@ -139,7 +140,7 @@ triggering write -- no `queueMicrotask`, no promises, no scheduler ticks.
139
140
  `activeNodes`, `activeLinks`, `pooledLinks`, `nodePoolCapacity`,
140
141
  `linkPoolCapacity`); the capacity keys are ledgers under `"lazy"`. Cumulative
141
142
  allocation counters (`totalAllocations` / `totalDisposals` / `poolGrowths`) remain
142
- reserved for 1.4.0 and are still absent. **Tests:** 424 total, 414 pass, 0 fail,
143
+ reserved for 1.4.0 and are still absent. **Tests:** 423 total, 413 pass, 0 fail,
143
144
  10 skip (the 10 skips are 9 signalBox-staged-for-1.5.0 in
144
145
  `test/24-signalbox_test.mjs` plus 1 architecturally-N/A SSR case in
145
146
  `17-reactivity`); 4 new pool tests in `test/03-pool_test.mjs` cover the lazy
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zakkster/lite-signal",
3
- "version": "1.5.0-alpha.0",
3
+ "version": "1.5.0-alpha.1",
4
4
  "description": "Zero-GC reactive graph. Monomorphic object pool, versioned push-pull propagation, 32-bit modular versioning. Built for hot paths and long-running processes.",
5
5
  "author": "Zahary Shinikchiev <shinikchiev@yahoo.com>",
6
6
  "license": "MIT",