@zakkster/lite-signal 1.4.0-beta.0 → 1.4.0-next.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 (5) hide show
  1. package/CHANGELOG.md +100 -14
  2. package/README.md +147 -65
  3. package/Signal.js +29 -1
  4. package/llms.txt +106 -57
  5. package/package.json +24 -7
package/CHANGELOG.md CHANGED
@@ -60,16 +60,76 @@ with the rest of registry state, so a reused registry reports lifecycle numbers
60
60
  for its current epoch only. Grown pool *capacity* is retained across `destroy()`
61
61
  as before (the reset keeps the arena warm); only the cumulative counts reset.
62
62
 
63
+ ### Added -- dedicated test harness layout
64
+
65
+ The repo now ships **three opt-in test harnesses** alongside the in-tree engine
66
+ suite, each in its own subdirectory with its own `package.json` and setup story.
67
+ They do **not** run on `npm test`; they opt in through dedicated scripts (with
68
+ the exception of the VersionMatrix gate, which is wired into `prepublishOnly`
69
+ so it runs automatically on `npm publish`). The default `npm test` is now scoped
70
+ via a Node 22 native glob -- `'test/*.test.mjs'` -- so only the 26 root engine
71
+ test files are discovered. Subdirectory test files (e.g.
72
+ `test/ProfilerTests/test/*.test.mjs`) and out-of-tree test files
73
+ (`harness/ProfilerTools/harness.test.mjs`) are no longer accidentally swept into
74
+ the default run.
75
+
76
+ - **`test/ProfilerTests/`** -- a **version-portable hardening suite** for the
77
+ engine. Imports `@zakkster/lite-signal` as a bare specifier; self-references
78
+ through this repo's own package name when run from inside the tree, resolves
79
+ to the installed version when run standalone (`./run-matrix.sh`). Feature-
80
+ gated: older engines skip the cases for APIs they do not have yet, newer
81
+ cases light up automatically. Pins the diamond / dynamic-dep / cleanup-order /
82
+ cascade-dispose invariants that quietly break reactive engines under retune.
83
+ - **`harness/ProfilerTools/`** -- a **combined integration harness** that points
84
+ `@zakkster/lite-profiler-signal` and `@zakkster/lite-devtools` at the same
85
+ registry and verifies the cross-package zero-GC contract end-to-end (devtools
86
+ inspects a profiler-driven graph non-perturbingly and confirms via the same
87
+ `stats()` it monitors that the profiler allocates no new nodes in steady
88
+ state). Setup is one-time (`bash setup.sh`) and pins specific package
89
+ versions via tarball install so the harness re-runs reproducibly.
90
+ - **`harness/VersionMatrix/`** -- a **cold-process regression gate** wired into
91
+ `prepublishOnly`. Each version-x-workload is profiled in its own `node`
92
+ invocation (so V8 never carries inline caches or JIT state from one version
93
+ into another), fed an identical LCG write sequence (delta = engine change,
94
+ not input), and reduced to a per-metric median-of-N. Two baselines gate every
95
+ publish -- a **floor** (never moves; "we shall not regress below this line")
96
+ and a **rolling** baseline (previous published version); a candidate must
97
+ clear BOTH. Tolerances calibrated against measured self-noise (`npm run
98
+ calibrate`): `frame.avg` is the stable anchor at 5% rolling / 10% floor
99
+ (self-noise <=~3%); `frame.p99` and `phase.write.p99` sit at 18% / 30%
100
+ (self-noise up to ~14%, so a p99 fail should be re-run to confirm). Four
101
+ workloads map to the public bench claims: `reactive-graph-mix` (KAIROS / mol
102
+ pattern), `deep-chain` (the DEEP CHAIN weak spot), `broadcast-fanout` (the
103
+ BROADCAST fan-out), and `dynamic-dep-churn` (the DYNAMIC / SELECTIVE DAG
104
+ wins). Committed median baselines under `harness/VersionMatrix/baselines/`
105
+ are the public evidence surface (each carrying `env` metadata: CPU, node,
106
+ date); the gate itself always re-captures floor / rolling / candidate in the
107
+ same job so it never diffs across hosts. Manifest at `manifest.json` pins the
108
+ floor (`1.3.0`), the rolling reference, and the workload list; adding a new
109
+ version to the matrix is a documented 3-step recipe in
110
+ `harness/VersionMatrix/README.md`.
111
+
112
+ New root scripts: `test:hardening`, `test:hardening:gc`, `test:harness`,
113
+ `test:all`, `gate` (which is also the value of `prepublishOnly`). The README's
114
+ "Test harnesses" section documents all three subdirectories, the setup story,
115
+ and the expectation that more dedicated harnesses will land as future
116
+ publications need targeted defensive validation.
117
+
63
118
  ### Verified
64
119
 
65
- - **Full suite green** against the 1.4.0 engine: 430 tests, 420 pass, 0 fail,
66
- 10 skip. The 10 skips are the 9 `{skip:true}` `signalBox` tests in `24-signalbox`
120
+ - **Full suite green** against the 1.4.0 engine: 425 tests, 415 pass, 0 fail,
121
+ 10 skip (this counts the four branch-closure tests added to `12-coverage` for the
122
+ 1.4.0-rc coverage pass; re-verify against your own runner). The 10 skips are the 9 `{skip:true}` `signalBox` tests in `24-signalbox`
67
123
  (staged for 1.5.0) plus 1 architecturally-N/A SSR case in `17-reactivity`. The
68
124
  eager-default and the counter additions changed no existing test outcome; 6 new
69
125
  counter tests in `03-pool` cover the new surface.
70
- - **Coverage** (c8@11, Node 22): `Signal.js` 100% statements / 98.26% branches /
126
+ - **Coverage** (c8@11, Node 22): `Signal.js` 100% statements / 100% branches /
71
127
  100% functions / 100% lines; `Watch.js` 100% across all four. The three counter
72
- bumps sit on already-covered acquire / dispose / grow edges.
128
+ bumps sit on already-covered acquire / dispose / grow edges. The rc coverage pass
129
+ closed the last branch gap (98.26% -> 100%): three reachable branches gained tests,
130
+ two provably-unreachable clamps got `/* c8 ignore */` with proofs, and one branch
131
+ pair reachable only through a now-fixed dangling-cursor crash was removed with the
132
+ fix. See `COVERAGE-NOTES.md`; reconfirm under codify.
73
133
  - **Counter correctness** confirmed directly: after building a signal ->
74
134
  computed -> effect graph, `totalAllocations` equals the node count and
75
135
  `totalDisposals` tracks effect/computed teardown; forcing a pool past its
@@ -78,12 +138,39 @@ as before (the reset keeps the arena warm); only the cumulative counts reset.
78
138
  - **Zero-GC steady state holds**: the counters bump only on acquire / dispose /
79
139
  grow, none of which occur on the steady-state write path after warm-up. Writing
80
140
  through a built graph allocates nothing and moves no counter.
81
- - **`stats()` shape** is now the authoritative 11-key 1.4.x shape; the
82
- introspection-contract test is updated to expect the three counters present
83
- (the 1.2.x/1.3.0 test pinned their *absence*; that pin is correctly inverted
84
- for 1.4.0).
85
-
86
-
141
+ - **`stats()` shape** is now the authoritative 11-key 1.4.x shape, pinned by a
142
+ new shape-and-initial-zeros test in `03-pool` -- the first explicit pin for
143
+ the `stats()` surface (the 1.2.x / 1.3.0 entries described the absence of the
144
+ counters in prose; 1.4.0 codifies the new shape as a test assertion).
145
+ - **Fresh 1.4.0 bench sweep published** in `bench/results.txt` (isolated
146
+ propagation, 9 scenarios) and `bench/resultsReactive.txt` (cross-framework
147
+ reactivity, median-of-10, 34 tests) -- the 1.3.0 numbers were carried
148
+ forward provisionally in the 1.4.0-beta notes ("a fresh run will be
149
+ published when available"); those runs are now committed. The 10 raw
150
+ reactive-suite runs sit under `bench/bench-runs-reactive/run_1.txt` ...
151
+ `run_10.txt` so anyone can re-median them independently. On the propagation
152
+ bench, lite is still +48% / +44% / +35% / +30% on the four allocation-heavy
153
+ scenarios (SELECTIVE DAG / DYNAMIC DAG / MUX / SMALL SELECTIVE), parity on
154
+ the three stable app shapes (KAIROS / LARGE WEB APP / WIDE DENSE, within
155
+ 3-5%), and behind on BROADCAST (-11%) and DEEP CHAIN (-29%; the DEEP CHAIN
156
+ gap widened this cycle -- alien's 256-deep pipeline got faster, not because
157
+ lite regressed). On the reactive suite, lite is the fastest of five
158
+ frameworks on all five dyn rows (large web app +9%, wide dense +4%, simple
159
+ +18%, dynamic +16%, deep +20%) and trades within a few percent on
160
+ updateComputations (lite ahead on 4 of 7). The Andrii Volynets js-reactivity-
161
+ benchmark position holds at **4th of 15** with geomean **76.3ms** (raw log
162
+ `bench/AndriiVolynetsReactiveBench.log` -- all 15 x 47 rows checked in for
163
+ audit); lite is ahead of 5th-place Preact Signals (78.4) by ~3%. The
164
+ outright-fastest-of-15 shape count moved from three (`manyEffectsFromOneSource`,
165
+ `manySourcesIntoOneComputedEffect`, `manySourcesIntoOneComputedEffectWithDirect`)
166
+ in the 1.3.0 log to five in the 1.4.0 log (`manyEffectsFromOneSource`,
167
+ `manySourcesIntoOneComputedEffectWithDirect`, `molBench`,
168
+ `updateComputations2to1`, and the `32x8 - 4 sources - pull` DAG); top-3
169
+ count moved from 21/47 to 23/47. Both movements are within the run-to-run
170
+ band of the 10-year-old measurement host, not engine changes -- the hot
171
+ paths did not move.
172
+
173
+ ## [1.3.0] -- 2026-06-XX
87
174
 
88
175
  The pool minor: the node and link pools become **growable and incrementally
89
176
  populated**, the propagation mark phase moves to an **intrusive linked-list
@@ -161,7 +248,7 @@ in 1.3.0.
161
248
 
162
249
  ### Verified
163
250
 
164
- - **Full suite green** against the 1.3.0 engine: 424 tests, 414 pass, 0 fail,
251
+ - **Full suite green** against the 1.3.0 engine: 423 tests, 413 pass, 0 fail,
165
252
  10 skip (9 signalBox-staged-for-1.5.0 in `24-signalbox` plus 1 architecturally-N/A
166
253
  SSR case in `17-reactivity`). The eager-default flip changed no test outcome.
167
254
  - **Behavior-preservation difftest**: 20,000 direct + 10,000 batched writes
@@ -173,10 +260,9 @@ in 1.3.0.
173
260
  scenarios.
174
261
  - **`stats()` shape unchanged from 1.2.x** (8 keys). The cumulative allocation
175
262
  counters (`totalAllocations` / `totalDisposals` / `poolGrowths`) remain
176
- reserved for 1.4.0 and are still absent here -- the introspection-contract
177
- test continues to pin their absence.
178
-
263
+ reserved for 1.4.0 and are still absent here.
179
264
 
265
+ ## [1.2.2] -- 2026-06-14
180
266
 
181
267
  A code-deletion ship: a `createNode` audit removes ten redundant field-writes
182
268
  that defended against a state the engine cannot produce on a clean free-list.
package/README.md CHANGED
@@ -9,27 +9,28 @@
9
9
  [![npm bundle size](https://img.shields.io/bundlephobia/minzip/@zakkster/lite-signal?style=for-the-badge)](https://bundlephobia.com/result?p=@zakkster/lite-signal)
10
10
  [![npm downloads](https://img.shields.io/npm/dm/@zakkster/lite-signal?style=for-the-badge&color=blue)](https://www.npmjs.com/package/@zakkster/lite-signal)
11
11
  [![npm total downloads](https://img.shields.io/npm/dt/@zakkster/lite-signal?style=for-the-badge&color=blue)](https://www.npmjs.com/package/@zakkster/lite-signal)
12
+ ![Tree-Shakeable](https://img.shields.io/badge/tree--shakeable-yes-brightgreen)
12
13
  ![TypeScript](https://img.shields.io/badge/TypeScript-Types-informational)
13
14
  ![Dependencies](https://img.shields.io/badge/dependencies-0-brightgreen)
14
15
  [![license](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](./LICENSE)
15
16
 
16
17
  ## 4th of 15 on the community reactivity benchmark -- and the only zero-GC engine in the field
17
18
 
18
- On the independent [js-reactivity-benchmark](https://github.com/volynetstyle/js-reactivity-benchmark) (Andrii Volynets' fork; 15 reactive libraries, 47 tests), `lite-signal` places **4th overall by geomean (75.5)** -- now clearing 5th-place Preact Signals (79.2) by ~5%, a gap that widened on the 1.3.0 run, behind only three push-eager engines: alien-signals, reflex, and @reactively.
19
+ On the independent [js-reactivity-benchmark](https://github.com/volynetstyle/js-reactivity-benchmark) (Andrii Volynets' fork; 15 reactive libraries, 47 tests), `lite-signal` places **4th overall by geomean (76.3)** -- ahead of 5th-place Preact Signals (78.4) by ~3%, behind only three push-eager engines: alien-signals, reflex, and @reactively. Raw run: [`bench/AndriiVolynetsReactiveBench.log`](./bench/AndriiVolynetsReactiveBench.log) (all 15 x 47 rows, checked in for audit).
19
20
 
20
21
  It is the **only object-pooled, zero-GC engine in the entire field**, and it gets that result without giving up glitch-freedom or lazy evaluation. Against the mainstream reactivity libraries it leads decisively:
21
22
 
22
- | vs | lite-signal is |
23
+ | vs | lite-signal is |
23
24
  | ---------------------- | -------------- |
24
25
  | **@vue/reactivity** | **1.5x faster** |
25
26
  | **Signia** | **1.7x faster** |
26
- | **MobX** | **2.3x faster** |
27
+ | **MobX** | **2.2x faster** |
27
28
  | **@solidjs/signals** | **2.7x faster** |
28
- | **SolidJS** | **4.2x faster** |
29
- | Preact Signals | **1.05x faster** (~5% ahead) |
30
- | alien-signals | 0.56x (the field leader) |
29
+ | **SolidJS** | **4.1x faster** |
30
+ | Preact Signals | **1.03x faster** (~3% ahead) |
31
+ | alien-signals | 0.57x (the field leader) |
31
32
 
32
- `lite-signal` finishes **top-3 on 21 of the 47 tests** and is the **outright fastest of all 15** on three wide aggregation shapes -- `manyEffectsFromOneSource` (1 source -> many effects, fan-out), plus `manySourcesIntoOneComputedEffect` and `manySourcesIntoOneComputedEffectWithDirect` (many sources -> one computed, fan-in) -- the patterns that dominate live dashboards, scoreboards, and HUDs. It also edges the field leader alien-signals on a fourth (the 1-source linear-chain pull). The three engines ahead of it are all push-eager designs that allocate on the hot path; `lite-signal` is the only top-4 finisher that allocates **nothing** in steady state. (Note: this suite measures reactivity *libraries* -- Vue's reactivity core, MobX, Solid, Preact Signals, etc. -- not full UI frameworks like React or Angular.)
33
+ `lite-signal` finishes **top-3 on 23 of the 47 tests** and is the **outright fastest of all 15** on five shapes: `manyEffectsFromOneSource` (1 source -> many effects, fan-out) and `manySourcesIntoOneComputedEffectWithDirect` (many sources -> one computed, fan-in) -- the wide-aggregation patterns that dominate live dashboards, scoreboards, and HUDs -- plus `molBench` (the mixed-app graph the suite uses as its realistic-workload proxy), `updateComputations2to1` (a steady-state update micro), and the `32x8 - 4 sources - pull` rectangular DAG. It comes second on another six shapes -- broad/deep/diamond/mux/unstable propagation, `manySourcesIntoOneComputedEffect` (fan-in), `10x5 read 20%` (simple component), `1000x5 25 sources` (wide dense) -- for 11 top-2 finishes total. The three engines ahead of it are all push-eager designs that allocate on the hot path; `lite-signal` is the only top-4 finisher that allocates **nothing** in steady state. (Note: this suite measures reactivity *libraries* -- Vue's reactivity core, MobX, Solid, Preact Signals, etc. -- not full UI frameworks like React or Angular.)
33
34
 
34
35
  ```bash
35
36
  npm install @zakkster/lite-signal
@@ -65,6 +66,7 @@ Synchronous, glitch-free, push-pull. No microtask queue, no allocations after wa
65
66
  - [Edge cases pinned down](#edge-cases-pinned-down)
66
67
  - [Benchmarks](#benchmarks)
67
68
  - [Testing strategy](#testing-strategy)
69
+ - [Test harnesses](#test-harnesses)
68
70
  - [What this is not](#what-this-is-not)
69
71
  - [Ecosystem](#ecosystem)
70
72
  - [Browser and runtime support](#browser-and-runtime-support)
@@ -658,25 +660,25 @@ These are the questions you'd ask in a code review, with the answers:
658
660
 
659
661
  ## Benchmarks
660
662
 
661
- 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).
663
+ 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 the **fresh 1.4.0 bench sweep** (default `prealloc: "eager"`) vs alien-signals on the same `benchmark.mjs` loop -- the harness reports **median execution time + transient heap** rather than ops/s. 1.4.0's hot paths are byte-identical to 1.3.0 (the only 1.4.0 addition is three cumulative counters on `stats()` -- `totalAllocations` / `totalDisposals` / `poolGrowths` -- that bump on the existing acquire / dispose / pool-grow edges, never on the steady-state read path), so these track the 1.3.0 measurement within run-to-run noise on this old host. Full per-engine tables: [`results.txt`](./results.txt) (this propagation suite) and [`resultsReactive.txt`](./resultsReactive.txt) (the cross-framework reactivity suite). The 10 raw reactive-suite runs are checked into [`bench/bench-runs-reactive/`](./bench/bench-runs-reactive/) so anyone can re-median them independently.
662
664
 
663
665
  | Scenario | What it stresses | lite-signal | alien-signals | lite vs alien | transient heap (lite / alien) |
664
666
  | ---------- | -------------------------------- | ----------- | ------------- | ------------- | ----------------------------- |
665
- | **SELECTIVE DAG** | sqrt-layered, set churn, 2 read/iter | **4744 ms** | 9176 ms | **+48% faster** | **1.5 MB / 37 MB** (24x less) |
666
- | **DYNAMIC DAG** | sqrt-layered, FAN=6, read flips each iter | **9670 ms** | 16888 ms | **+43% faster** | **5.1 MB / 24 MB** (4.7x less) |
667
- | **MUX** | 256 signals -> 1 sum -> 1 effect (fan-in) | **67 ms** | 108 ms | **+38% faster** | **38 KB / 3.9 MB** (104x less) |
668
- | **SMALL SELECTIVE** | 6 layers × 64 wide, 6 cand / 3 read | **1937 ms** | 2744 ms | **+29% faster** | **0.3 KB / 23.9 MB** (>=23934x less) |
669
- | **KAIROS** | 1 signal -> 1000 computeds -> 1 effect | 1339 ms | 1325 ms | -1% (parity) | 178 KB / 1.1 MB (6.4x less) |
670
- | **LARGE WEB APP** | 12 layers × ~80 wide, conditional reads | 2801 ms | 2701 ms | -4% (parity) | **0.3 KB / 41 KB** (41x less) |
671
- | **WIDE DENSE** | 5 layers × ~200 wide, dense fan-in | 2850 ms | 2740 ms | -4% (parity) | **0.3 KB / 11.6 MB** (>=11605x less) |
672
- | **BROADCAST** | 1 signal -> 1000 effects (fan-out) | 1182 ms | 1074 ms | -10% | 72 KB / 21 KB |
673
- | **DEEP CHAIN** | 256-deep computed chain -> 1 effect | 401 ms | **339 ms** | -18% | 18 KB / 905 KB (49.7x less) |
667
+ | **SELECTIVE DAG** | sqrt-layered, set churn, 2 read/iter | **4726 ms** | 9089 ms | **+48% faster** | **1.7 MB / 28 MB** (17x less) |
668
+ | **DYNAMIC DAG** | sqrt-layered, FAN=6, read flips each iter | **9587 ms** | 17011 ms | **+44% faster** | **4.8 MB / 24 MB** (5.0x less) |
669
+ | **MUX** | 256 signals -> 1 sum -> 1 effect (fan-in) | **67 ms** | 103 ms | **+35% faster** | **38 KB / 3.9 MB** (104x less) |
670
+ | **SMALL SELECTIVE** | 6 layers × 64 wide, 6 cand / 3 read | **1939 ms** | 2758 ms | **+30% faster** | **0.3 KB / 24.5 MB** (>=24502x less) |
671
+ | **LARGE WEB APP** | 12 layers × ~80 wide, conditional reads | 2810 ms | 2727 ms | -3% (parity) | **0.3 KB / 41 KB** (41x less) |
672
+ | **KAIROS** | 1 signal -> 1000 computeds -> 1 effect | 1360 ms | 1296 ms | -5% (parity) | 178 KB / 1.0 MB (5.8x less) |
673
+ | **WIDE DENSE** | 5 layers × ~200 wide, dense fan-in | 2879 ms | 2751 ms | -5% (parity) | **0.3 KB / 11.6 MB** (>=11605x less) |
674
+ | **BROADCAST** | 1 signal -> 1000 effects (fan-out) | 1186 ms | 1068 ms | -11% | 72 KB / 21 KB |
675
+ | **DEEP CHAIN** | 256-deep computed chain -> 1 effect | 395 ms | **307 ms** | -29% | 18 KB / 903 KB (49.6x less) |
674
676
 
675
677
  *(lower time = faster; transient heap = average delta-heap per rep, lower = less GC pressure)*
676
678
 
677
- **Reading the table:** lite-signal's time wins cluster exactly where its zero-GC design pays off -- the **allocation-heavy dynamic shapes** (**SELECTIVE DAG +48%**, **DYNAMIC DAG +43%**, **SMALL SELECTIVE +29%**), where alien-signals churns the nursery and lite's object pool allocates near-nothing, plus **MUX +38%** (fan-in aggregation). These are the patterns that dominate live UI workloads under input churn: dashboards, scoreboards, HUDs, leaderboards. On the cheap, low-allocation **stable** shapes (KAIROS, large web app, wide dense) lite runs at **parity** with alien -- within a 1-4% band inside this old host's run-to-run noise. The two losses are **BROADCAST (-10%)** (pure fan-out, no retracking for the pool to amortize) and **DEEP CHAIN (-18%)**: on a 256-deep computed pipeline alien's flatter representation wins because the propagation path is long rather than wide.
679
+ **Reading the table:** lite-signal's time wins cluster exactly where its zero-GC design pays off -- the **allocation-heavy dynamic shapes** (**SELECTIVE DAG +48%**, **DYNAMIC DAG +44%**, **SMALL SELECTIVE +30%**), where alien-signals churns the nursery and lite's object pool allocates near-nothing, plus **MUX +35%** (fan-in aggregation). These are the patterns that dominate live UI workloads under input churn: dashboards, scoreboards, HUDs, leaderboards. On the cheap, low-allocation **stable** shapes (KAIROS, large web app, wide dense) lite runs at **parity** with alien -- within a 3-5% band inside this old host's run-to-run noise. The two losses are **BROADCAST (-11%)** (pure fan-out, no retracking for the pool to amortize) and **DEEP CHAIN (-29%)**: on a 256-deep computed pipeline alien's flatter representation wins because the propagation path is long rather than wide -- and the gap widened on this sweep because alien's 256-deep pipeline got faster (~339ms -> ~307ms) while lite held its ground (~401ms -> ~395ms), an alien improvement, not a lite regression.
678
680
 
679
- On allocation pressure, `lite-signal` wins **8 of 9 scenarios** and is alone in the zero-alloc band: **~0.3 KB** of transient garbage on the stable app shapes (large web app, wide dense, small selective) across the whole run. The contrast is starkest on the dynamic DAGs -- lite allocates 1.5-5 MB (genuine retracking re-links) where alien-signals allocates 24-37 MB on the same shapes, and that allocation gap is the mechanism behind lite's +43-48% wins there once each engine is measured in isolation. The one scenario where lite allocates more is **BROADCAST** (72 KB vs alien's 21 KB), a pure fan-out with no retracking. `prealloc: "lazy"` trades a little extra first-construction allocation on the dynamic shapes for a smaller resident heap and faster cold start; the steady state is identical. preact and solid trail both engines on the dynamic shapes by 1-2 orders of magnitude on transient heap.
681
+ On allocation pressure, `lite-signal` wins **8 of 9 scenarios** and is alone in the zero-alloc band: **~0.3 KB** of transient garbage on the stable app shapes (large web app, wide dense, small selective) across the whole run. The contrast is starkest on the dynamic DAGs -- lite allocates 1.7-4.8 MB (genuine retracking re-links) where alien-signals allocates 24-28 MB on the same shapes, and that allocation gap is the mechanism behind lite's +44-48% wins there once each engine is measured in isolation. The one scenario where lite allocates more is **BROADCAST** (72 KB vs alien's 21 KB), a pure fan-out with no retracking. `prealloc: "lazy"` trades a little extra first-construction allocation on the dynamic shapes for a smaller resident heap and faster cold start; the steady state is identical. preact and solid trail both engines on the dynamic shapes by 1-2 orders of magnitude on transient heap.
680
682
 
681
683
  > Note on the +70.8 KB retained that lite-signal shows on KAIROS specifically: that's the pre-allocated pool sitting in memory holding the live graph (1002 nodes + ~2000 links). The pool *is* the working memory -- see the [Case for object pooling](#case-for-object-pooling) section. On the other benches the graph is small enough that the same pool floats below baseline after GC.
682
684
 
@@ -703,31 +705,31 @@ Three tiers, all reproducible.
703
705
 
704
706
  `npm test` runs the suite in `test/`, covering:
705
707
 
706
- - **`01-core_test.mjs`** -- signal/computed/effect basics, equality semantics, NaN/+/-0, subscribe/peek/update, untrack, batch, cleanup ordering, first-run error recovery, nested object reference-identity gotchas.
707
- - **`02-topology_test.mjs`** -- diamond glitch-freedom, 256-deep and 1024-deep computed chains, wide fan-out (1000 effects from one signal), dynamic dependency switching, conditional fan-out, nested effects, cycle detection (`CycleError`).
708
- - **`03-pool_test.mjs`** -- `CapacityError` under both `"throw"` and `"grow"` policies, the 16× link ceiling, stable pool reuse across thousands of create/dispose cycles, registry isolation, (1.3.0) the lazy-prealloc paths: on-demand construction reaching the same steady state as eager, a never-allocated lazy registry surviving `destroy()`, and `"grow"` extending both pool ledgers past their initial capacity, and (1.4.0) the `stats()` lifecycle counters: the 11-key shape, `totalAllocations` / `totalDisposals` tracking the `activeNodes` live invariant, `poolGrowths` firing on growth and staying 0 on a correctly-sized eager pool, and `destroy()` resetting all three.
709
- - **`05-scheduler_test.mjs`** -- scheduler-deferred effects, dispose-during-schedule races, microtask integration, 32-bit version wrap (simulated), `setDefaultRegistry`, `onCleanup` inside computeds.
710
- - **`06-nested-objects_test.mjs`** -- array mutation patterns (push/splice/spread), deep nested paths, Map/Set/Date inside signals, custom structural equality, computed memoisation cutoffs over object slices, signal-of-signals composition, high-frequency object updates, batched immutable updates.
711
- - **`07-dispose_test.mjs`** -- unified `dispose(api)` across signals, computeds and effect handles, idempotency, cross-registry isolation (per-registry Symbol prevents pool corruption), foreign-value safety, top-level helper routing, 500-cycle balanced churn leaving pool and stats stable.
712
- - **`08-watch_test.mjs`** -- Validates the user-land observer utilities (watch, when, whenAsync). Covers lifecycle teardown, old/new value tracking, and Promise-based asynchronous state resolution.
713
- - **`09-conformance_test.mjs`** -- Industry-standard conformance tests. Validates the engine against extreme edge cases from the johnsoncodehk reactive test suite, ensuring strict zero-GC invariants, correct cleanup isolation, and re-entrant stability.
714
- - **`10-is-tracking_test.mjs`** -- The `isTracking()` observer-context predicate. 11 tests across 5 describe blocks: true inside effect/computed bodies; false inside `untrack`, `subscribe` callbacks, `onCleanup` bodies, and `watch` callbacks (the untracked-window cases that catch an observer-only misimplementation); false outside any observer including at the call site of an unobserved computed read; state-restoration after a thrown body; per-registry isolation; top-level binding.
715
- - **`11-adopted-reactive_test.mjs`** -- 24 engine-agnostic edge cases adopted from across the ecosystem: alien-signals' parent-child link-integrity regression (#226-228), equality-predicate corners (preact/solid/vue), `signal.update(fn)` functional setter (vue/solid), `peek()` non-subscription depth (preact/vue), and the `subscribe` behavioral contract (preact/mobx).
716
- - **`12-coverage_test.mjs`** -- 18 targeted exercises for public surface and hot-path branches the behavioral suites don't incidentally hit: top-level routing to the default registry, the computed clean-read short-circuit (`markEpoch` O(1) skip), dependency-set shrink severing the stale tail, error/structural edge paths, scheduler ABA across a recycled pool slot, and the v1.2 owner-tree paths (direct-child detach, cascade tolerates an already-freed child). Capability-gated via a runtime probe, so the same file runs unchanged across engines.
717
- - **`13-introspection_test.mjs`** -- The observer-lifecycle surface (1.1.4). 10 tests across 3 describe blocks: `hasObservers` (live observation reflects; a peek doesn't count), `observeObservers` auto-pause lifecycle (start-on-first / stop-on-last, no extra connect for a 2nd observer, re-observe fires again, no churn on re-track, conditional reads toggle honestly, transition-only registration, works for computeds), and `forEachObserver`/`forEachSource` enumeration (both directions; descriptor carries kind + value).
718
- - **`14-lifecycle-teardown_test.mjs`** -- Effect-teardown guards against the alien-signals@3.2.1 regressions (4 tests). A stopped effect must not re-subscribe to a signal read later in the same run; self-dispose must leave no orphaned link (clean `activeLinks`); a throwing setup must leave no live subscription; normal and dynamic re-tracking stay unaffected by the `allocateLink` eligibility gate.
719
- - **`15-owner-lazy-alloc_test.mjs`** -- Owner-adoption contract for the 1.2.0 owner tree (5 tests). A signal allocated lazily *inside* a computed/effect must **not** be owner-adopted (it survives the owner's re-run -- the lite-store/lite-form lazy-field shape) and sibling lazy signals must not cross-wire, while observers (nested effect/computed) *are* still auto-disposed on the owner's re-run.
720
- - **`16-alien-parity_test.mjs`** -- Differential regression guards (3 tests) reproducing the *properties* behind alien-signals@3.2.0 fixed bugs: reads inside a cleanup create no spurious dependencies (the dispose-cleanup fix); an inner-effect write does not block later propagation through a computed chain (#112); a dynamic dependency-set change stays correct under dirty-check (#109/#110).
721
- - **`17-reactivity_test.mjs`** -- Behavioral suite (~30 tests across 11 groups) mirroring universal signal-system bug classes: subscription lifecycle, cleanup ordering, stale-dependency tracking, batching/timing (incl. set-then-revert), equality cutoff (NaN/+/-0/custom), nested invalidation + glitch-free diamond, memory/retained nodes, the synchronous async-boundary, scheduler & loops (self-write termination, self-reading computed), and differential-review additions (cached computed errors, mid-batch pull, self-disposing getter, pooled-slot return). SSR hydration is a documented N/A -- lite has no DOM layer.
722
- - **`18-identity_test.mjs`** -- Node identity (1.1.5; 5 tests). Unique/stable ids; `nodeId`/`describe` return `undefined` for a non-handle; the descriptor's visible shape is `{ id, kind, value }`; `forEach*` descriptors carry `id` and are **re-walkable** (`nodeId`/`forEachSource` accept a descriptor); identity walks are non-perturbing (add no observers).
723
- - **`19-v12-additions_test.mjs`** -- v1.2.0 release-prep regressions (24 tests across 8 suites). Shared `peek` (one closure per registry, identical reference across primitives, no tracking, two registries hold independent peeks). Owner-adoption rule (signals not adopted, computeds/effects adopted, cascade drains correctly). Pre-batch revert (signal-level, propagates through computeds, respects custom `equals`, nested batches, final-different-value still fires). Multi-throw aggregation (`AggregateError` with both errors carried, single-throw unwrapped, engine survives). `CycleError` via `maxFlushPasses` (default + custom). `maxLinks` config branch under `throw` and `grow`. Documented disposed-signal semantics (read undefined, set silent no-op, dispose idempotent). Scheduler-thunk ABA guard across a recycled pool slot.
724
- - **`20-axis-stress_test.mjs`** -- engine-invariant regression guards along eight orthogonal "axes" (16 tests across 9 suites). Pins lite-signal's actual contract on: batch semantics under exception (writes commit; pre-batch revert holds; effects see the post-throw value), connect/disconnect lifecycle re-entrancy (`observeObservers` from inside an `onConnect`, transition-only registration), untrack does NOT suppress owner adoption (a nested effect created via `untrack` is still owner-cascaded), untrack inside a computed body (no hidden dep leaks; tracked source re-evaluates), queue safety under self-dispose mid-flush (no UAF), value-dependent cycle detection (computed graph closes a cycle, `CycleError` thrown), nested-effect creation order (effects run synchronously on creation; immediately-stopped one still ran), synchronous flush (no scheduler in the default path; batch coalesces). Plus a bonus suite: 1,000 effect-create-then-dispose cycles return pool to baseline; `dispose()` idempotent; `dispose()` on foreign values safe.
725
- - **`21-perf-pins_test.mjs`** -- v1.2.1 construction-shape pins (6 tests). Locks the canonical handle shapes (`signal` 6 own props: peek/set/update/subscribe + NODE_PTR/NODE_GEN; `computed` 4: peek/subscribe + NODE_PTR/NODE_GEN) so a future "let's unify them" change has to be explicit. Locks the 1.2.1 ABA guards: detached `const {set} = signal()` keeps working on a LIVE signal; `read()` returns `undefined` and skips dep-tracking on a stale handle (no phantom subscription to the recycled slot); `set()` on a stale handle is a no-op across three corruption tiers (disposed slot, recycled slot, downstream propagation); `peek()` returns `undefined` for stale signal and computed handles.
726
- - **`22-mutation-hook_test.mjs`** -- 1.2.1 `onGraphMutation` semantics (12 tests across 2 suites). Registration: unsubscribe returns a function; `null` argument clears and the unsub restores the prior listener; non-function/non-null throws `TypeError`; multiple registrations stack LIFO; registries are isolated (no cross-talk). Opcode emission: `1` node-create fires with `(id, flags)` for signal (32) / computed (1) / effect (2); `2` node-dispose fires for cascade-disposed owned children; `3` link-add fires with `(source.id, target.id)` on dependency record; `4` link-remove fires when a dep-set flip severs the tail; `5` recompute fires on initial eval AND re-eval; the hook fires synchronously inside the mutation (listener sees its own event before the caller returns); payload is always three plain numbers -- no objects, no closures.
727
- - **`23-owner-introspection_test.mjs`** -- 1.2.1 owner-tree introspection + effect-disposer regression (22 tests across 4 suites). `ownerOf`: undefined for top-level / garbage input / stale handle; returns the enclosing effect's descriptor for a child created inside an effect body. `forEachOwned`: no-op for handles with no owned children / garbage input / stale handle; iterates owned children as `{id, kind, value}` descriptors. Gen-guarded introspection (ABA fix): `nodeId` / `describe` / `hasObservers` return undefined / false for stale handles; `observeObservers` throws `TypeError`; `forEachObserver` / `forEachSource` are no-ops; descriptors returned by `describeNode` are themselves gen-stamped so a descriptor obtained pre-recycle correctly walks as a no-op post-recycle (the "descriptors are re-walkable handles" contract survives the guard). Plus the 1.2.1 effect-dispose-handle fix: passing the effect's disposer directly to `describe` / `nodeId` / `forEachSource` / `forEachOwned` / `ownerOf` / `hasObservers` works as a first-class introspection handle (pre-fix it was a bare closure and returned `undefined` for a *live* effect); after `fx()` dispose the same handle correctly goes stale on every entry point; the disposer's `NODE_GEN` mirrors the effect node's birthGen exactly.
728
- - **`24-signalbox_test.mjs`** -- staged for v1.5.0; all 9 tests `{skip: true}` on 1.3.x. The `signalBox` / `computedBox` allocation-light handle API lands in 1.5.0; the suite is committed early so the surface is pinned and the skips are visible in the test count (the 10 skips on 1.3.0 are these 9 plus 1 architecturally-N/A SSR case in `17-reactivity`).
729
- - **`25-devtools-real-boot_test.mjs`** -- Devtools/Studio contract (10 tests). Boots the actual `Devtools.js` against the 1.4.0 engine and exercises all 19 Devtools exports plus the 10 symbols Studio imports from Devtools. Pins the ghost contract: heavy introspection (graph walk, owner-tree, observer descriptors) adds **zero** nodes to the live graph. Catches the real-rig failure mode where importing the package by its own name from a repo whose `package.json` declares `name: "@zakkster/lite-signal"` resolves to the published build instead of the local engine.
730
- - **`26-free-list-invariant_test.mjs`** -- the 1.2.2 audit's cleanliness pins (3 invariant tests + 1 targeted coverage test). Asserts directly -- by inspecting freshly-allocated nodes through the documented `describe()` -> `NODE_PTR` introspection protocol -- that the `ReactiveNode` constructor and the fresh-pool-growth path initialize the ten fields the audit removed from `createNode` to identical values, so the deleted writes were defending against a state the engine cannot produce on a clean free list. The 4th test covers the swallow-on-self-dispose-then-throw branch in `pullComputed` (the path that lifted branch coverage from 98.07% to 98.43%).
708
+ - **`01-core.test.mjs`** -- signal/computed/effect basics, equality semantics, NaN/+/-0, subscribe/peek/update, untrack, batch, cleanup ordering, first-run error recovery, nested object reference-identity gotchas.
709
+ - **`02-topology.test.mjs`** -- diamond glitch-freedom, 256-deep and 1024-deep computed chains, wide fan-out (1000 effects from one signal), dynamic dependency switching, conditional fan-out, nested effects, cycle detection (`CycleError`).
710
+ - **`03-pool.test.mjs`** -- `CapacityError` under both `"throw"` and `"grow"` policies, the 16× link ceiling, stable pool reuse across thousands of create/dispose cycles, registry isolation, (1.3.0) the lazy-prealloc paths: on-demand construction reaching the same steady state as eager, a never-allocated lazy registry surviving `destroy()`, and `"grow"` extending both pool ledgers past their initial capacity, and (1.4.0) the `stats()` lifecycle counters: the 11-key shape, `totalAllocations` / `totalDisposals` tracking the `activeNodes` live invariant, `poolGrowths` firing on growth and staying 0 on a correctly-sized eager pool, and `destroy()` resetting all three.
711
+ - **`05-scheduler.test.mjs`** -- scheduler-deferred effects, dispose-during-schedule races, microtask integration, 32-bit version wrap (simulated), `setDefaultRegistry`, `onCleanup` inside computeds.
712
+ - **`06-nested-objects.test.mjs`** -- array mutation patterns (push/splice/spread), deep nested paths, Map/Set/Date inside signals, custom structural equality, computed memoisation cutoffs over object slices, signal-of-signals composition, high-frequency object updates, batched immutable updates.
713
+ - **`07-dispose.test.mjs`** -- unified `dispose(api)` across signals, computeds and effect handles, idempotency, cross-registry isolation (per-registry Symbol prevents pool corruption), foreign-value safety, top-level helper routing, 500-cycle balanced churn leaving pool and stats stable.
714
+ - **`08-watch.test.mjs`** -- Validates the user-land observer utilities (watch, when, whenAsync). Covers lifecycle teardown, old/new value tracking, and Promise-based asynchronous state resolution.
715
+ - **`09-conformance.test.mjs`** -- Industry-standard conformance tests. Validates the engine against extreme edge cases from the johnsoncodehk reactive test suite, ensuring strict zero-GC invariants, correct cleanup isolation, and re-entrant stability.
716
+ - **`10-is-tracking.test.mjs`** -- The `isTracking()` observer-context predicate. 11 tests across 5 describe blocks: true inside effect/computed bodies; false inside `untrack`, `subscribe` callbacks, `onCleanup` bodies, and `watch` callbacks (the untracked-window cases that catch an observer-only misimplementation); false outside any observer including at the call site of an unobserved computed read; state-restoration after a thrown body; per-registry isolation; top-level binding.
717
+ - **`11-adopted-reactive.test.mjs`** -- 24 engine-agnostic edge cases adopted from across the ecosystem: alien-signals' parent-child link-integrity regression (#226-228), equality-predicate corners (preact/solid/vue), `signal.update(fn)` functional setter (vue/solid), `peek()` non-subscription depth (preact/vue), and the `subscribe` behavioral contract (preact/mobx).
718
+ - **`12-coverage.test.mjs`** -- 30 targeted exercises for public surface and hot-path branches the behavioral suites don't incidentally hit: top-level routing to the default registry, the computed clean-read short-circuit (`markEpoch` O(1) skip), dependency-set shrink severing the stale tail, error/structural edge paths, scheduler ABA across a recycled pool slot, and the v1.2 owner-tree paths (direct-child detach, cascade tolerates an already-freed child). The final four close the 1.4.0-rc branch gap: the `allocateLink` dead-target gate, the `executeEffect` scheduler-reentrancy cycle throw, the stale computed-handle read, and the disposeNode cursor-repair regression. Capability-gated via a runtime probe, so the same file runs unchanged across engines.
719
+ - **`13-introspection.test.mjs`** -- The observer-lifecycle surface (1.1.4). 10 tests across 3 describe blocks: `hasObservers` (live observation reflects; a peek doesn't count), `observeObservers` auto-pause lifecycle (start-on-first / stop-on-last, no extra connect for a 2nd observer, re-observe fires again, no churn on re-track, conditional reads toggle honestly, transition-only registration, works for computeds), and `forEachObserver`/`forEachSource` enumeration (both directions; descriptor carries kind + value).
720
+ - **`14-lifecycle-teardown.test.mjs`** -- Effect-teardown guards against the alien-signals@3.2.1 regressions (4 tests). A stopped effect must not re-subscribe to a signal read later in the same run; self-dispose must leave no orphaned link (clean `activeLinks`); a throwing setup must leave no live subscription; normal and dynamic re-tracking stay unaffected by the `allocateLink` eligibility gate.
721
+ - **`15-owner-lazy-alloc.test.mjs`** -- Owner-adoption contract for the 1.2.0 owner tree (4 tests). A signal allocated lazily *inside* a computed/effect must **not** be owner-adopted (it survives the owner's re-run -- the lite-store/lite-form lazy-field shape) and sibling lazy signals must not cross-wire, while observers (nested effect/computed) *are* still auto-disposed on the owner's re-run.
722
+ - **`16-alien-parity.test.mjs`** -- Differential regression guards (3 tests) reproducing the *properties* behind alien-signals@3.2.0 fixed bugs: reads inside a cleanup create no spurious dependencies (the dispose-cleanup fix); an inner-effect write does not block later propagation through a computed chain (#112); a dynamic dependency-set change stays correct under dirty-check (#109/#110).
723
+ - **`17-reactivity.test.mjs`** -- Behavioral suite (~30 tests across 11 groups) mirroring universal signal-system bug classes: subscription lifecycle, cleanup ordering, stale-dependency tracking, batching/timing (incl. set-then-revert), equality cutoff (NaN/+/-0/custom), nested invalidation + glitch-free diamond, memory/retained nodes, the synchronous async-boundary, scheduler & loops (self-write termination, self-reading computed), and differential-review additions (cached computed errors, mid-batch pull, self-disposing getter, pooled-slot return). SSR hydration is a documented N/A -- lite has no DOM layer.
724
+ - **`18-identity.test.mjs`** -- Node identity (1.1.5; 5 tests). Unique/stable ids; `nodeId`/`describe` return `undefined` for a non-handle; the descriptor's visible shape is `{ id, kind, value }`; `forEach*` descriptors carry `id` and are **re-walkable** (`nodeId`/`forEachSource` accept a descriptor); identity walks are non-perturbing (add no observers).
725
+ - **`19-v12-additions.test.mjs`** -- v1.2.0 release-prep regressions (24 tests across 8 suites). Shared `peek` (one closure per registry, identical reference across primitives, no tracking, two registries hold independent peeks). Owner-adoption rule (signals not adopted, computeds/effects adopted, cascade drains correctly). Pre-batch revert (signal-level, propagates through computeds, respects custom `equals`, nested batches, final-different-value still fires). Multi-throw aggregation (`AggregateError` with both errors carried, single-throw unwrapped, engine survives). `CycleError` via `maxFlushPasses` (default + custom). `maxLinks` config branch under `throw` and `grow`. Documented disposed-signal semantics (read undefined, set silent no-op, dispose idempotent). Scheduler-thunk ABA guard across a recycled pool slot.
726
+ - **`20-axis-stress.test.mjs`** -- engine-invariant regression guards along eight orthogonal "axes" (23 tests across 11 suites). Pins lite-signal's actual contract on: batch semantics under exception (writes commit; pre-batch revert holds; effects see the post-throw value), connect/disconnect lifecycle re-entrancy (`observeObservers` from inside an `onConnect`, transition-only registration), untrack does NOT suppress owner adoption (a nested effect created via `untrack` is still owner-cascaded), untrack inside a computed body (no hidden dep leaks; tracked source re-evaluates), queue safety under self-dispose mid-flush (no UAF), value-dependent cycle detection (computed graph closes a cycle, `CycleError` thrown), nested-effect creation order (effects run synchronously on creation; immediately-stopped one still ran), synchronous flush (no scheduler in the default path; batch coalesces). Plus a bonus suite: 1,000 effect-create-then-dispose cycles return pool to baseline; `dispose()` idempotent; `dispose()` on foreign values safe.
727
+ - **`21-perf-pins.test.mjs`** -- v1.2.1 construction-shape pins (6 tests). Locks the canonical handle shapes (`signal` 6 own props: peek/set/update/subscribe + NODE_PTR/NODE_GEN; `computed` 4: peek/subscribe + NODE_PTR/NODE_GEN) so a future "let's unify them" change has to be explicit. Locks the 1.2.1 ABA guards: detached `const {set} = signal()` keeps working on a LIVE signal; `read()` returns `undefined` and skips dep-tracking on a stale handle (no phantom subscription to the recycled slot); `set()` on a stale handle is a no-op across three corruption tiers (disposed slot, recycled slot, downstream propagation); `peek()` returns `undefined` for stale signal and computed handles.
728
+ - **`22-mutation-hook.test.mjs`** -- 1.2.1 `onGraphMutation` semantics (12 tests across 2 suites). Registration: unsubscribe returns a function; `null` argument clears and the unsub restores the prior listener; non-function/non-null throws `TypeError`; multiple registrations stack LIFO; registries are isolated (no cross-talk). Opcode emission: `1` node-create fires with `(id, flags)` for signal (32) / computed (1) / effect (2); `2` node-dispose fires for cascade-disposed owned children; `3` link-add fires with `(source.id, target.id)` on dependency record; `4` link-remove fires when a dep-set flip severs the tail; `5` recompute fires on initial eval AND re-eval; the hook fires synchronously inside the mutation (listener sees its own event before the caller returns); payload is always three plain numbers -- no objects, no closures.
729
+ - **`23-owner-introspection.test.mjs`** -- 1.2.1 owner-tree introspection + effect-disposer regression (14 tests across 3 suites). `ownerOf`: undefined for top-level / garbage input / stale handle; returns the enclosing effect's descriptor for a child created inside an effect body. `forEachOwned`: no-op for handles with no owned children / garbage input / stale handle; iterates owned children as `{id, kind, value}` descriptors. Gen-guarded introspection (ABA fix): `nodeId` / `describe` / `hasObservers` return undefined / false for stale handles; `observeObservers` throws `TypeError`; `forEachObserver` / `forEachSource` are no-ops; descriptors returned by `describeNode` are themselves gen-stamped so a descriptor obtained pre-recycle correctly walks as a no-op post-recycle (the "descriptors are re-walkable handles" contract survives the guard). Plus the 1.2.1 effect-dispose-handle fix: passing the effect's disposer directly to `describe` / `nodeId` / `forEachSource` / `forEachOwned` / `ownerOf` / `hasObservers` works as a first-class introspection handle (pre-fix it was a bare closure and returned `undefined` for a *live* effect); after `fx()` dispose the same handle correctly goes stale on every entry point; the disposer's `NODE_GEN` mirrors the effect node's birthGen exactly.
730
+ - **`24-signalbox.test.mjs`** -- staged for v1.5.0; all 9 tests `{skip: true}` on 1.4.0. The `signalBox` / `computedBox` allocation-light handle API lands in 1.5.0; the suite is committed early so the surface is pinned and the skips are visible in the test count (the 10 skips on 1.4.0 are these 9 plus 1 architecturally-N/A SSR case in `17-reactivity`).
731
+ - **`25-devtools-real-boot.test.mjs`** -- Devtools/Studio contract (10 tests). Boots the actual `Devtools.js` against the 1.4.0 engine and exercises all 19 Devtools exports plus the 10 symbols Studio imports from Devtools. Pins the ghost contract: heavy introspection (graph walk, owner-tree, observer descriptors) adds **zero** nodes to the live graph. Catches the real-rig failure mode where importing the package by its own name from a repo whose `package.json` declares `name: "@zakkster/lite-signal"` resolves to the published build instead of the local engine.
732
+ - **`26-free-list-invariant.test.mjs`** -- the 1.2.2 audit's cleanliness pins (3 invariant tests + 1 targeted coverage test). Asserts directly -- by inspecting freshly-allocated nodes through the documented `describe()` -> `NODE_PTR` introspection protocol -- that the `ReactiveNode` constructor and the fresh-pool-growth path initialize the ten fields the audit removed from `createNode` to identical values, so the deleted writes were defending against a state the engine cannot produce on a clean free list. The 4th test covers the swallow-on-self-dispose-then-throw branch in `pullComputed` (the path that lifted branch coverage from 98.07% to 98.43%).
731
733
 
732
734
  ```bash
733
735
  npm test
@@ -735,7 +737,7 @@ npm test
735
737
 
736
738
  ### Tier 2 -- Memory (allocation-free verification)
737
739
 
738
- `npm run test:gc` runs `test/04-zero-gc_test.mjs` with `--expose-gc`:
740
+ `npm run test:gc` runs the whole suite with `--expose-gc` so the memory budgets in `test/04-zero-gc.test.mjs` are enforced (they no-op without an exposed GC):
739
741
 
740
742
  - 100,000 `set()` calls on a graph with effects retain **< 200 KB** of heap.
741
743
  - 1,000 create/dispose cycles retain **< 50 KB**.
@@ -778,15 +780,94 @@ Run any of them with `TORTURE_SECONDS=N` for a longer soak. Indicative numbers f
778
780
  | scheduler-bench | 10 s | 28.8 M | 0 | 1000 / 0 |
779
781
 
780
782
  ```bash
781
- npm run verify # test + test:gc + a sanity bench
783
+ npm run verify # test + a sanity bench
782
784
  ```
783
785
 
784
786
  ---
785
787
 
788
+ ## Test harnesses
789
+
790
+ Beyond the engine's own test tiers above, `@zakkster/lite-signal` ships **dedicated harnesses** that live in their own subdirectories with their own `package.json` and setup story. They are version-portable, integration-grade, or otherwise too specialised to belong in the in-tree engine suite -- and they are explicitly opt-in: a plain `npm test` does **not** run them. Each is a self-contained artifact you can run against any installed engine, or carry into a different repo to verify a claim independently.
791
+
792
+ This section will grow. As future versions ship publications that need specific defensive validation (e.g. a `flushStrategy` ship, a TC39-polyfill ship, a zero-GC public gate, a profiler/observability ship), the corresponding harness lands here.
793
+
794
+ ### `test/ProfilerTests/` -- version-portable hardening suite
795
+
796
+ An adversarial, **version-portable** conformance + hardening suite for `@zakkster/lite-signal`. `node:test` only, zero test deps. Each file imports the **bare** package (`@zakkster/lite-signal`), so it resolves to whatever version is installed when run standalone, and self-references through this repo's own package name when run inside the source tree. Advanced cases are **feature-gated**: an older engine skips the cases for APIs it does not have yet, and they light up automatically as the surface grows.
797
+
798
+ Pins the invariants that quietly break reactive engines: glitch-freedom on diamonds, dropping the untaken branch on dynamic dependencies, keeping unobserved computeds lazy, cleanup order, surviving a throwing effect, no leaks under churn, cascade-disposing an ownership scope. The same cases worth asking about in an interview, and the same ones that regress when an engine is re-tuned for speed.
799
+
800
+ ```bash
801
+ # Against the local engine (self-references through the root package name):
802
+ npm run test:hardening
803
+ npm run test:hardening:gc
804
+
805
+ # Standalone, against any published version (run from inside test/ProfilerTests):
806
+ cd test/ProfilerTests
807
+ ./run-matrix.sh # tests every published line
808
+ ./run-matrix.sh 1.3.0 1.4.0-beta.1 # pick versions explicitly
809
+ ```
810
+
811
+ The matrix is **ratcheted stricter every release**: a regression in a future version fails loudly, instead of shipping. The README inside the suite (`test/ProfilerTests/README.md`) records the current pass/skip table per published line.
812
+
813
+ ### `harness/VersionMatrix/` -- cold-process performance gate
814
+
815
+ A **same-host, cold-process regression gate** for the engine. Turns "did this release regress?" from a judgment call into a checkpoint: the driver swaps each engine version into `node_modules` in its own `node` invocation (so V8 never carries inline caches or JIT state from one version into another), feeds every version an identical LCG write sequence (so a delta is the engine changing, not the input), and reduces N cold samples per version-x-workload to a per-metric median. Staged this release and runnable via `npm run gate`; wiring it as `prepublishOnly` -- so a regression aborts `npm publish` before it starts -- lands in 1.5.x.
816
+
817
+ **Two baselines.** A candidate must clear BOTH a **floor** (never moves -- "we shall not regress below this line") AND a **rolling** baseline (the previous published version). Tolerances are calibrated against measured self-noise (`npm run calibrate`): `frame.avg` is the stable anchor (self-noise <=~3%, gated tight at 5% vs rolling / 10% vs floor); `frame.p99` and `phase.write.p99` are jitter-prone (self-noise up to ~14%), so their tolerances sit above that floor (18% rolling / 30% floor) and a p99 fail should be confirmed with a re-run. The two-baseline design catches the blind spot of a fixed floor -- an engine that improves 1.4 -> 1.6 then regresses back to 1.4 levels still clears a 1.3 floor, but fails the rolling gate.
818
+
819
+ **Four workloads**, each mapping to a public bench claim so a change that regresses one shape can't hide behind another:
820
+
821
+ - `reactive-graph-mix` -- general sources -> layer1 -> layer2 + effects (the KAIROS / mol pattern).
822
+ - `deep-chain` -- long linear computed chain (the DEEP CHAIN weak spot).
823
+ - `broadcast-fanout` -- one source -> many leaves (the BROADCAST pattern).
824
+ - `dynamic-dep-churn` -- branch-flipping bodies that retrack every cycle (the DYNAMIC / SELECTIVE DAG wins).
825
+
826
+ Graphs are sized under lite-signal's default 1024-node pool cap; frame cost is scaled by `ITER` (more update cycles), not more nodes.
827
+
828
+ ```bash
829
+ npm run calibrate # self-noise: same version twice, per metric
830
+ bash matrix.sh gate <candidate-version> # published candidate vs floor + rolling
831
+ bash matrix.sh gate-self <label> <path> # current-tree candidate (engine path) vs floor + rolling
832
+ node diff.mjs # diagnostic over committed baselines -> matrix-report.json
833
+ node gate.mjs <label> # gate over already-captured baselines (exit 1 on regression)
834
+ npm run gate # what prepublish runs -- gate-self against the current tree
835
+ ```
836
+
837
+ Committed median baselines live under `harness/VersionMatrix/baselines/<version>/*.json` (each carrying `env` metadata: CPU, node, date). These are the **public evidence surface** -- anyone can rerun and diff -- but the gate always re-captures floor / rolling / candidate in the same job so it never diffs across hosts. Details, including how to add a new version to the matrix, in [`harness/VersionMatrix/README.md`](./harness/VersionMatrix/README.md).
838
+
839
+ ### `harness/ProfilerTools/` -- combined profiler + devtools integration
840
+
841
+ A live cross-package harness that points `@zakkster/lite-profiler-signal` and `@zakkster/lite-devtools` at the **same** lite-signal registry and verifies the integration. `profiler-signal` writes coarse frame telemetry into signals (fps, frameP99, frameClass, per-phase p99); a small dashboard effect reads those signals; `devtools` then inspects that live graph **non-perturbingly** (peek + enumerator walks, never adding an observer) and confirms, via the same `stats()` it monitors, that the profiler allocates no new graph nodes in steady state. This is the externally-runnable proof of the zero-GC contract end-to-end: not just on a microbench, but across the actual published package chain consumers install.
842
+
843
+ ```bash
844
+ # One-time setup -- pulls peer deps + the engine version the harness targets:
845
+ cd harness/ProfilerTools
846
+ bash setup.sh
847
+
848
+ # Then:
849
+ npm test
850
+ npm run test:gc
851
+
852
+ # Or from the root:
853
+ npm run test:harness
854
+ ```
855
+
856
+ The setup script pins specific package versions via tarball install so the harness can be re-run reproducibly without depending on whatever happens to be in the public registry on the day. Treat the setup as a one-time per-checkout cost.
857
+
858
+ ### Notes
859
+
860
+ - The hardening suite and the profiler integration do **not** run on `npm test` from the root. They opt in through the `test:hardening` / `test:harness` scripts (and `test:all`, which chains everything).
861
+ - The **VersionMatrix gate** is staged but **not yet wired into publish** on this line -- the harness and its baselines are checked in, and you can run it manually via `npm run gate`, but the `prepublishOnly` hook that makes a regression on the four reference workloads block `npm publish` lands in a later minor (1.5.x). Diagnostic runs (`node diff.mjs`) are opt-in from the harness directory.
862
+ - All three subdirectories have their own `package.json` with local scripts, so you can also `cd` in and run `npm test` directly -- the root scripts are just shortcuts.
863
+ - The `npm --prefix <dir> test` form used in the root scripts is the cross-platform replacement for `cd && npm test` -- works identically on Linux, macOS, and Windows.
864
+
865
+ ---
866
+
786
867
  ## Performance Trade-offs & Topology Scaling
787
868
 
788
869
  <details>
789
- <summary>Stable vs dynamic topologies; Andrii Volynets' matrix, the 1.1.4 result, the 1.3.0 ranking, and the roadmap.</summary>
870
+ <summary>Stable vs dynamic topologies; Andrii Volynets' matrix, the 1.1.4 result, the 1.4.0 ranking, and the roadmap.</summary>
790
871
 
791
872
  `lite-signal` was built with a strict mandate: **absolute zero garbage collection**. By packing the dependency graph into a flat, pre-allocated memory arena, we eliminate the Scavenger GC pauses that plague 120fps Canvas/WebGL loops.
792
873
 
@@ -794,7 +875,7 @@ Through **v1.1.2**, that came with a mathematical trade-off: while memory alloca
794
875
 
795
876
  **Andrii Volynets** (author of the phenomenal [Alien Signals](https://github.com/stackblitz/alien-signals)) generously ran `lite-signal` through his advanced topology matrix on the **v1.1.2** engine. Those numbers -- the *pre-rewrite baseline* -- are below, followed by the 1.1.4 result.
796
877
 
797
- **1.3.0 on the official [js-reactivity-benchmark](https://github.com/volynetstyle/js-reactivity-benchmark) (15 libraries, 47 tests):** `lite-signal` holds **4th overall by geomean (75.5ms)**, behind only alien-signals (42.6, the field leader at 0.56x), reflex (48.9), and @reactively (59.3), and now **ahead of 5th-place Preact Signals (79.2, ~5%)** -- a gap that widened from 1.2.x. It finishes **top-3 on 21 of 47 tests** and is the **outright fastest of all 15 on three wide-aggregation shapes** -- `manyEffectsFromOneSource`, `manySourcesIntoOneComputedEffect`, and `manySourcesIntoOneComputedEffectWithDirect` -- even edging the leader alien-signals on those plus the 1-source linear-chain pull. It remains the only object-pooled, zero-GC engine in the field.
878
+ **1.4.0 on the official [js-reactivity-benchmark](https://github.com/volynetstyle/js-reactivity-benchmark) (15 libraries, 47 tests):** `lite-signal` holds **4th overall by geomean (76.3ms)**, behind only alien-signals (43.7, the field leader at 0.57x), reflex (47.5), and @reactively (56.0), and **ahead of 5th-place Preact Signals (78.4, ~3%)**. It finishes **top-3 on 23 of 47 tests** and is the **outright fastest of all 15** on five shapes -- the wide-aggregation pair (`manyEffectsFromOneSource`, `manySourcesIntoOneComputedEffectWithDirect`), `molBench` (mixed app graph), `updateComputations2to1` (steady-state update micro), and a `32x8` rectangular pull DAG. Raw log with all 15 x 47 rows: [`bench/AndriiVolynetsReactiveBench.log`](./bench/AndriiVolynetsReactiveBench.log). It remains the only object-pooled, zero-GC engine in the field.
798
879
 
799
880
  #### 1. Stable Topologies (Fan-in / Fan-out / Broadcast)
800
881
  In stable environments (game engines, particle systems, visualizers), `lite-signal` is blisteringly fast and maintains a near-zero allocation profile, keeping frame times perfectly flat -- unchanged through 1.1.4.
@@ -807,33 +888,34 @@ In stable environments (game engines, particle systems, visualizers), `lite-sign
807
888
  | **1000x5 (25 sources, wide/dense)** | 304ms | 303ms | 1746ms |
808
889
  | **64x6 (selective dynamic DAG)** | 181ms | 196ms | 559ms |
809
890
 
810
- *1.3.0 (default eager) on the local harness (slow 2016 MacBook, one engine per cold process -- compare within-column, lite vs alien; the approximating scenarios from `bench/benchmark.mjs`):*
811
- | Scenario | alien-signals | lite-signal (1.3.0) | result |
891
+ *1.4.0 (default eager) on the local harness (slow 2016 MacBook, one engine per cold process -- compare within-column, lite vs alien; the approximating scenarios from `bench/benchmark.mjs`):*
892
+ | Scenario | alien-signals | lite-signal (1.4.0) | result |
812
893
  | :--- | :--- | :--- | :--- |
813
- | **SELECTIVE DAG** (sqrt-layered, set churn) | 9176ms | 4744ms | **lite +48%** |
814
- | **DYNAMIC DAG** (sqrt-layered, FAN=6) | 16888ms | 9670ms | **lite +43%** |
815
- | **SMALL SELECTIVE** (~ 64x6) | 2744ms | 1937ms | **lite +29%** |
816
- | **LARGE WEB APP** (~ 1000x12) | 2701ms | 2801ms | alien +4% |
817
- | **WIDE DENSE** (~ 1000x5) | 2740ms | 2850ms | alien +4% |
894
+ | **SELECTIVE DAG** (sqrt-layered, set churn) | 9089ms | 4726ms | **lite +48%** |
895
+ | **DYNAMIC DAG** (sqrt-layered, FAN=6) | 17011ms | 9587ms | **lite +44%** |
896
+ | **SMALL SELECTIVE** (~ 64x6) | 2758ms | 1939ms | **lite +30%** |
897
+ | **LARGE WEB APP** (~ 1000x12) | 2727ms | 2810ms | alien +3% |
898
+ | **WIDE DENSE** (~ 1000x5) | 2751ms | 2879ms | alien +5% |
818
899
 
819
- > **Honest note (1.3.0 isolated run):** measured one-engine-per-process, lite-signal's
900
+ > **Honest note (1.4.0 isolated run):** measured one-engine-per-process, lite-signal's
820
901
  > wins are on the **allocation-heavy** dynamic shapes (SELECTIVE DAG +48%, DYNAMIC DAG
821
- > +43%, SMALL SELECTIVE +29%) -- exactly where alien churns the nursery and lite's pool
902
+ > +44%, SMALL SELECTIVE +30%) -- exactly where alien churns the nursery and lite's pool
822
903
  > allocates near-nothing. The cheaper wide-app/dense shapes land within a few percent
823
- > either way (host noise on this old machine). 1.3.0's hot paths are byte-identical to
824
- > 1.2.2, so these match the 1.2.2 isolated numbers -- the deltas are run-to-run noise,
825
- > not engine changes. lite remains the only zero-alloc library on every stable scenario
826
- > (see [`results.txt`](./results.txt)).
904
+ > either way (host noise on this old machine). 1.4.0's hot paths are byte-identical to
905
+ > 1.3.0 (the only 1.4.0 addition is three cumulative counters on `stats()` that bump on
906
+ > existing acquire/dispose/pool-grow edges), so these match the 1.3.0 isolated numbers
907
+ > within run-to-run noise -- not engine changes. lite remains the only zero-alloc
908
+ > library on every stable scenario (see [`results.txt`](./results.txt)).
827
909
 
828
- The cross-framework reactivity suite agrees independently, re-run on **1.3.0** (default eager, median-of-10, isolated): lite-signal is the **fastest of five frameworks on all five `dyn` rows** -- `dyn: large web app` **544ms** (+7% vs alien-signals' 586ms) and `dyn: wide dense` **902ms** (+3% vs 926ms), plus simple component (+17%), dynamic component (+15%), and deep (+14%) -- with preact 6-19× slower and vue 15-32× slower on the app-shaped graphs (see [`resultsReactive.txt`](./resultsReactive.txt)). On the tiny `S: updateComputations` micro-rows lite and alien trade the lead within a few percent (lite ahead on 3 of 7); these sub-60ms kernels are dominated by run-to-run noise on this old host. The retracking is verified correct by `retracking.difftest.mjs` -- 20,000 direct + 10,000 batched writes, 0 disagreements against the **published 1.1.5** reference (re-pinned for v1.2).
910
+ The cross-framework reactivity suite agrees independently, re-run on **1.4.0** (default eager, median-of-10, isolated): lite-signal is the **fastest of five frameworks on all five `dyn` rows** -- `dyn: large web app` **537ms** (+9% vs alien-signals' 591ms) and `dyn: wide dense` **890ms** (+4% vs 930ms), plus simple component (+18%), dynamic component (+16%), and deep (+20%) -- with preact 6-19x slower and vue 15-32x slower on the app-shaped graphs (see [`resultsReactive.txt`](./resultsReactive.txt); the 10 raw runs are checked into [`bench/bench-runs-reactive/`](./bench/bench-runs-reactive/)). On the tiny `S: updateComputations` micro-rows lite and alien trade the lead within a few percent (lite ahead on 4 of 7); these sub-60ms kernels are dominated by run-to-run noise on this old host. The retracking is verified correct by `retracking.difftest.mjs` -- 20,000 direct + 10,000 batched writes, 0 disagreements against the **published 1.1.5** reference (re-pinned for v1.2).
829
911
 
830
- **The Takeaway:** as of 1.1.4 you no longer have to choose, and 1.3.0 holds the line -- the engine still ranks **4th of 15** on the official js-reactivity-benchmark (the only zero-GC library in the field). `lite-signal` keeps the zero-GC, flat-arena profile for 120fps Canvas/WebGL **and** wins decisively on the high-churn dynamic and fan-in topologies that dominate live UI -- the shapes where zero allocation pays off most. It runs at parity with alien-signals on cheap stable shapes. The one shape where alien's flatter representation still leads is the 256-deep computed pipeline (DEEP CHAIN, -18% on the 1.3.0 isolated run).
912
+ **The Takeaway:** as of 1.1.4 you no longer have to choose, and 1.4.0 holds the line -- the engine still ranks **4th of 15** on the official js-reactivity-benchmark (the only zero-GC library in the field). `lite-signal` keeps the zero-GC, flat-arena profile for 120fps Canvas/WebGL **and** wins decisively on the high-churn dynamic and fan-in topologies that dominate live UI -- the shapes where zero allocation pays off most. It runs at parity with alien-signals on cheap stable shapes. The one shape where alien's flatter representation still leads is the 256-deep computed pipeline (DEEP CHAIN, -29% on the 1.4.0 isolated run -- the gap widened this cycle because alien's DEEP CHAIN got faster (~339ms -> ~307ms), not because lite regressed).
831
913
 
832
914
  ### Roadmap
833
915
  - **1.1.5** -- additions in service of `lite-devtools` (node identity/traversability on the introspection walkers, for full auto-discovered graph rendering). *Shipped.*
834
916
  - **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.*
835
917
  - **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.*
836
- - **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).*
918
+ - **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. Also **stages** the `harness/VersionMatrix/` regression gate (cold-process, same-host, two baselines) and its checked-in baselines; wiring it into `prepublishOnly` -- so a release that regresses `frame.avg` on the four reference workloads (reactive-graph-mix, deep-chain, broadcast-fanout, dynamic-dep-churn) fails the publish -- lands in a later minor (1.5.x). Drop-in over 1.3.0. *Shipped.*
837
919
  - **1.5** -- the `signalBox` / `computedBox` allocation-light handle API (staged in `test/24-signalbox`). The pull-mode recursion depth limit (~5,000 chained computeds) remains the main outstanding architectural item.
838
920
 
839
921
  > Note: the retracking rewrite that closes the dynamic-topology gap shipped in **1.1.4**, not a future release. The earlier roadmap that listed it under "v1.2" is superseded.
@@ -1086,7 +1168,7 @@ npm test # behavior suite, ~1.3s
1086
1168
  npm run test:gc # zero-gc suite, requires --expose-gc, ~3s
1087
1169
  npm run bench # comparative benchmark vs alien-signals (results.txt), ~5min
1088
1170
  npm run bench-reactive # 5-framework reactivity suite (resultsReactive.txt)
1089
- npm run verify # test + test:gc + sanity bench; gate for publish
1171
+ npm run verify # test + sanity bench; run before publishing
1090
1172
  ```
1091
1173
 
1092
1174
  ---
package/Signal.js CHANGED
@@ -380,6 +380,14 @@ export function createRegistry(config) {
380
380
  if (linkPool.length > currentLinkCapacity) {
381
381
  let doubled = currentLinkCapacity;
382
382
  while (doubled < linkPool.length) doubled *= 2;
383
+ // The `> maxLinkLimit` arm is provably unreachable, retained as a clamp.
384
+ // Proof: maxLinkLimit === initialLinkCapacity * 16, currentLinkCapacity is
385
+ // only ever assigned a power-of-2 multiple of that same initial capacity,
386
+ // so 16x is ON the doubling chain (m, 2m, 4m, 8m, 16m). The guard above
387
+ // (`linkPool.length >= maxLinkLimit -> CapacityError`) plus the chunk math
388
+ // (`chunk = limit - linkPool.length`) cap linkPool.length AT maxLinkLimit,
389
+ // so `doubled` terminates at exactly 16m and can never exceed it.
390
+ /* c8 ignore next -- unreachable clamp; see proof above + COVERAGE-NOTES.md */
383
391
  currentLinkCapacity = doubled > maxLinkLimit ? maxLinkLimit : doubled;
384
392
  statPoolGrowths++; // 1.4: link capacity ledger crossed
385
393
  }
@@ -412,7 +420,12 @@ export function createRegistry(config) {
412
420
 
413
421
  /** Return a link to the free pool and unlink it from the source's sub list. @private */
414
422
  function freeLink(link, target, source) {
415
- if (mutationHook !== null) mutationHook(4, link.source !== null ? link.source.id : -1, link.target !== null ? link.target.id : -1);
423
+ // Every caller (allocateLink sever, severTail, disposeNode dep-walk) passes a
424
+ // LIVE link: `source === link.source`, `target === link.target`. The 1.3.x
425
+ // `link.source !== null ? ... : -1` guards existed only to survive a cursor
426
+ // dangling at an already-freed link -- a state disposeNode's CURSOR REPAIR now
427
+ // makes unreachable. Reading the params directly is equivalent and branch-free.
428
+ if (mutationHook !== null) mutationHook(4, source.id, target.id);
416
429
  const pSub = link.prevSub;
417
430
  const nSub = link.nextSub;
418
431
  if (pSub !== null) pSub.nextSub = nSub; else source.headSub = nSub;
@@ -523,6 +536,17 @@ export function createRegistry(config) {
523
536
  if (pDep !== null) pDep.nextDep = nDep; else target.headDep = nDep;
524
537
  if (nDep !== null) nDep.prevDep = pDep; else target.tailDep = pDep;
525
538
 
539
+ // CURSOR REPAIR (1.4.0): `target` may be an observer that is MID-RUN with
540
+ // its re-tracking cursor parked on this very link -- it linked `source` on
541
+ // the previous run, has not reached that read yet on this one, and now
542
+ // disposes `source` from its own body. Splicing the link out and handing it
543
+ // to the free list would leave activeObserverCurrentDep dangling at a freed
544
+ // slot: severTail would then read a nulled prevDep, wipe target.headDep
545
+ // (orphaning every surviving dep), and double-free the link -- freeLink
546
+ // null-derefs on `source.headSub`. Advance the cursor to the next surviving
547
+ // dep instead. Disposal path only; no steady-state cost.
548
+ if (activeObserverCurrentDep === sLink) activeObserverCurrentDep = nDep;
549
+
526
550
  sLink.source = null;
527
551
  sLink.target = null;
528
552
  sLink.prevDep = null;
@@ -1238,6 +1262,10 @@ export function createRegistry(config) {
1238
1262
  function batch(fn) {
1239
1263
  if (batchDepth === 0) {
1240
1264
  batchEpoch = (batchEpoch + 1) | 0;
1265
+ // 2^32 wraparound sentinel: batchEpoch is bumped ONLY here (and reset to 1 by
1266
+ // destroy()), so reaching 0 costs 4,294,967,295 top-level batch() calls. Kept
1267
+ // because revertEpoch comparisons at 1071/1077 treat 0 as "no capture".
1268
+ /* c8 ignore next -- 2^32 wraparound; unreachable without ~4.3e9 batches */
1241
1269
  if (batchEpoch === 0) batchEpoch = 1;
1242
1270
  }
1243
1271
  batchDepth = (batchDepth + 1) | 0;
package/llms.txt CHANGED
@@ -68,11 +68,41 @@ triggering write -- no `queueMicrotask`, no promises, no scheduler ticks.
68
68
  rate (delta totalAllocations / delta t), pool-reuse ratio
69
69
  (1 - poolGrowths*initialCap/totalAllocations), and churn without the engine
70
70
  computing rates -- the series lite-devtools 1.2 / lite-studio 1.2 plot. **Tests:**
71
- 430 total, 420 pass, 0 fail, 10 skip (6 new counter tests in `test/03-pool_test.mjs`
71
+ 425 total, 415 pass, 0 fail, 10 skip (6 counter tests in `test/03-pool.test.mjs`
72
72
  cover the 11-key shape, the live invariant, poolGrowths firing on growth vs staying
73
- 0 on a sized eager pool, and destroy() reset). **Coverage:** `Signal.js` 100%
74
- statements / 98.26% branches / 100% functions / 100% lines; `Watch.js` 100%.
75
- Drop-in over 1.3.0.
73
+ 0 on a sized eager pool, and destroy() reset; the 1.4.0-rc coverage pass added four
74
+ branch-closure tests to `test/12-coverage.test.mjs`). **Coverage:** `Signal.js` 100%
75
+ statements / 100% branches / 100% functions / 100% lines; `Watch.js` 100%
76
+ (re-verify against your own runner).
77
+ **Test layout in 1.4.0:** the repo now ships three opt-in harness subdirectories
78
+ -- `test/ProfilerTests/` (version-portable engine hardening, feature-gated, runs
79
+ via `npm run test:hardening`), `harness/ProfilerTools/` (combined
80
+ profiler+devtools integration, one-time `bash setup.sh`, runs via `npm run
81
+ test:harness`), and `harness/VersionMatrix/` (see next paragraph). The default
82
+ `npm test` is scoped to `'test/*.test.mjs'` (Node 22 native glob) so subdirectory
83
+ and out-of-tree test files are no longer swept in. Drop-in over 1.3.0.
84
+ **VersionMatrix regression gate (`harness/VersionMatrix/`):** a same-host,
85
+ cold-process performance gate wired into `prepublishOnly` -- a candidate that
86
+ regresses beyond calibrated tolerances aborts `npm publish` before it starts.
87
+ Each version-x-workload is profiled in its own `node` invocation (V8 never
88
+ carries inline caches or JIT state across versions), fed an identical LCG write
89
+ sequence (delta = engine change, not input), and reduced to a per-metric
90
+ median-of-N (default 5). **Two baselines: a `floor` (never moves) and a
91
+ `rolling` (previous published version) baseline**; a candidate must clear BOTH.
92
+ Tolerances calibrated against measured self-noise (`npm run calibrate`):
93
+ `frame.avg` is the stable anchor at 5% vs rolling / 10% vs floor (self-noise
94
+ <=~3%); `frame.p99` and `phase.write.p99` sit at 18% / 30% (self-noise up to
95
+ ~14%, so a p99 fail should be re-run to confirm). Four workloads map to the
96
+ public bench claims: `reactive-graph-mix` (kairo/mol pattern), `deep-chain`
97
+ (the DEEP CHAIN weak spot), `broadcast-fanout` (the BROADCAST fan-out), and
98
+ `dynamic-dep-churn` (the DYNAMIC / SELECTIVE DAG wins). Committed median
99
+ baselines under `harness/VersionMatrix/baselines/<version>/*.json` carry `env`
100
+ metadata (CPU, node, date) as public evidence; the gate itself always
101
+ re-captures floor / rolling / candidate in the same job so it never diffs
102
+ across hosts. Commands: `npm run gate` (prepublish), `npm run calibrate`
103
+ (measure self-noise), `bash matrix.sh gate <version>` (published candidate),
104
+ `node diff.mjs` (diagnostic over committed baselines). Details in
105
+ `harness/VersionMatrix/README.md`.
76
106
 
77
107
  - **1.3.0** (drop-in over 1.2.2): the **pool minor**. Node and link pools become
78
108
  growable and incrementally populated; the propagation mark phase moves to an
@@ -105,16 +135,49 @@ triggering write -- no `queueMicrotask`, no promises, no scheduler ticks.
105
135
  `activeNodes`, `activeLinks`, `pooledLinks`, `nodePoolCapacity`,
106
136
  `linkPoolCapacity`); the capacity keys are ledgers under `"lazy"`. Cumulative
107
137
  allocation counters (`totalAllocations` / `totalDisposals` / `poolGrowths`) remain
108
- reserved for 1.4.0 and are still absent. **Tests:** 424 total, 414 pass, 0 fail,
138
+ reserved for 1.4.0 and are still absent. **Tests:** 423 total, 413 pass, 0 fail,
109
139
  10 skip (the 10 skips are 9 signalBox-staged-for-1.5.0 in
110
- `test/24-signalbox_test.mjs` plus 1 architecturally-N/A SSR case in
111
- `17-reactivity`); 4 new pool tests in `test/03-pool_test.mjs` cover the lazy
140
+ `test/24-signalbox.test.mjs` plus 1 architecturally-N/A SSR case in
141
+ `17-reactivity`); 4 new pool tests in `test/03-pool.test.mjs` cover the lazy
112
142
  on-demand / never-allocated-destroy / grow-extends-ledger / link-ceiling paths.
113
- **Coverage** (c8@11, Node 22): `Signal.js` 100% statements / 98.26% branches /
114
- 100% functions / 100% lines; `Watch.js` 100% across all four. Behavior-
143
+ **Coverage** (c8@11, Node 22): `Signal.js` 100% statements / 100% branches /
144
+ 100% functions / 100% lines; `Watch.js` 100% across all four (rc coverage pass;
145
+ reconfirm under codify). Behavior-
115
146
  preservation difftest: 20,000 direct + 10,000 batched writes vs the published
116
147
  1.1.5 reference, 0 disagreements -- pool growth, chunked refill, and the intrusive
117
148
  mark stack do not alter observable propagation. Drop-in over 1.2.2.
149
+ **Bench position** (third-party
150
+ [js-reactivity-benchmark](https://github.com/volynetstyle/js-reactivity-benchmark),
151
+ 15 frameworks, 47 tests; fresh 1.4.0 run, raw log
152
+ `bench/AndriiVolynetsReactiveBench.log`): #4 by geomean (76.3) at 1.75x behind
153
+ alien-signals (1.00x, 43.7), reflex (1.09x, 47.5), @reactively (1.28x, 56.0);
154
+ ahead of 5th-place Preact Signals (78.4, lite ~3% ahead). The only
155
+ object-pooled zero-GC engine in the field. Ahead of @vue/reactivity (1.5x),
156
+ Signia (1.7x), MobX (2.2x), @solidjs/signals (2.7x), SolidJS (4.1x). Top-3 on
157
+ 23/47 tests; outright winner (rank 1 of all 15) on FIVE shapes:
158
+ `manyEffectsFromOneSource` (1 source -> many effects, fan-out),
159
+ `manySourcesIntoOneComputedEffectWithDirect` (many sources -> one computed,
160
+ fan-in), `molBench` (mixed app graph -- the suite's realistic-workload proxy),
161
+ `updateComputations2to1` (steady-state update micro), and the `32x8 - 4
162
+ sources - pull` rectangular DAG. Rank 2 on another six shapes
163
+ (broadPropagation, deepPropagation, diamond, mux, unstable propagation, plus
164
+ `manySourcesIntoOneComputedEffect`, `10x5 read 20%` simple component, and
165
+ `1000x5 25 sources` wide dense). (The suite measures reactivity libraries --
166
+ Vue reactivity core, MobX, Solid, Preact Signals -- not full UI frameworks
167
+ like React/Angular.)
168
+ In the community reactive suite (median-of-10, raw runs in
169
+ `bench/bench-runs-reactive/run_1.txt` ... `run_10.txt`), fastest of 5
170
+ frameworks on the entire `dyn:*` family (the realistic large-DOM-framework
171
+ shapes): dyn: simple 428.89ms (+18% vs alien), dynamic 309.76ms (+16%), large
172
+ web app 536.93ms (+9%), wide dense 889.98ms (+4%), deep 312.08ms (+20%).
173
+ Trade the lead with alien on the `S: updateComputations*` family within a few
174
+ percent (lite ahead on 4/7 rows). Behind on the construction-cost path
175
+ (`S: createComputations*`, `cellx`, `createDataSignals`).
176
+ 1.3.0 -> 1.4.0 changed no hot-path bytes (only added the three `stats()`
177
+ counters, all on existing acquire/dispose/pool-grow edges); the deltas from
178
+ the 1.3.0 sweep are within run-to-run noise on the 10-year-old measurement
179
+ host. All five dyn rows moved slightly in lite's favor this cycle -- host
180
+ noise, not an engine speedup.
118
181
 
119
182
  - **1.2.2**: `createNode` clean-free-list invariant audit. Removes
120
183
  ten redundant field-writes that defended against a state the engine cannot
@@ -126,17 +189,17 @@ triggering write -- no `queueMicrotask`, no promises, no scheduler ticks.
126
189
  the `ReactiveNode` constructor initializes them to the same values on the
127
190
  fresh-pool-growth path -- so the redundant writes in `createNode` were
128
191
  defense against a state that cannot exist. **No public surface change, no
129
- semantic change.** New `test/26-free-list-invariant_test.mjs` (3 invariant
192
+ semantic change.** New `test/26-free-list-invariant.test.mjs` (3 invariant
130
193
  tests + 1 targeted coverage test for the swallow-on-self-dispose-then-throw
131
194
  branch in `pullComputed`) asserts the invariant directly by inspecting
132
195
  freshly-allocated nodes via the documented `describe()` -> `NODE_PTR`
133
- introspection protocol; new `test/25-devtools-real-boot_test.mjs` (10 tests)
196
+ introspection protocol; new `test/25-devtools-real-boot.test.mjs` (10 tests)
134
197
  boots the actual `Devtools.js` against the 1.2.2 engine and pins the 1.2.x
135
198
  introspection contract for downstream tooling, including the 8-key
136
199
  `stats()` shape (`signals`, `computeds`, `effects`, `activeNodes`,
137
200
  `activeLinks`, `pooledLinks`, `nodePoolCapacity`, `linkPoolCapacity`).
138
201
  408 tests total: 398 pass, 10 skip, 0 fail (the 10 skips are 9
139
- signalBox-staged-for-1.5.0 in `test/24-signalbox_test.mjs` plus 1
202
+ signalBox-staged-for-1.5.0 in `test/24-signalbox.test.mjs` plus 1
140
203
  architecturally-N/A SSR case in `17-reactivity`). Coverage on `Signal.js`:
141
204
  100% statements / 98.43% branches / 100% functions / 100% lines; `Watch.js`
142
205
  100% across all four (c8@11, Node 22) -- a branch-coverage gain over the
@@ -145,23 +208,7 @@ triggering write -- no `queueMicrotask`, no promises, no scheduler ticks.
145
208
  Version lineage:
146
209
  this is the engine previously labeled `1.2.3` in dev -- renumbered to
147
210
  `1.2.2` because the deletion is small, isolated, and intentionally
148
- non-behavioral. Drop-in over 1.2.1. **Bench position** (third-party
149
- [js-reactivity-benchmark](https://github.com/volynetstyle/js-reactivity-benchmark),
150
- 15 frameworks, 47 tests): #4 by geomean (75.5) at 1.77x behind alien-signals
151
- (1.00x), reflex (1.15x), @reactively (1.39x); now ahead of 5th-place Preact
152
- Signals (79.2, lite ~5% ahead -- the gap widened from 1.2.x). The only
153
- object-pooled zero-GC engine in the field. Ahead of @vue/reactivity (1.5x),
154
- Signia (1.7x), MobX (2.3x), @solidjs/signals (2.7x), SolidJS (4.2x). Top-3 on
155
- 21/47 tests; outright winner on `manyEffectsFromOneSource`,
156
- `manySourcesIntoOneComputedEffect`, and
157
- `manySourcesIntoOneComputedEffectWithDirect` (and edges the leader alien on a
158
- fourth, the 1-source linear-chain pull). (The suite measures reactivity
159
- libraries -- Vue reactivity core, MobX, Solid, Preact Signals -- not full UI
160
- frameworks like React/Angular.)
161
- In the community reactive suite (median-of-10), fastest of 5 frameworks
162
- on the entire `dyn:*` family (the realistic large-DOM-framework shapes)
163
- and the entire `S: updateComputations*` family. Behind on the
164
- construction-cost path (`S: createComputations*`, `cellx`, `createDataSignals`).
211
+ non-behavioral. Drop-in over 1.2.1.
165
212
 
166
213
  - **1.2.1**: correctness-and-introspection patch. Drop-in over 1.2.0;
167
214
  no public surface removed. **Stale-handle introspection (ABA fix):** the v1.2.0
@@ -238,7 +285,7 @@ triggering write -- no `queueMicrotask`, no promises, no scheduler ticks.
238
285
  own `{ id, kind, value }` descriptor, **re-walkable** (pass it back into
239
286
  `forEachObserver`/`forEachSource` to walk the full DAG); `forEach*` descriptors now carry
240
287
  `id`. One SMI write at allocation, node shape kept monomorphic -- **zero steady-state
241
- cost**. Drop-in over 1.1.4, no breaking changes. New `test/18-identity_test.mjs` (5 tests); plus `14-lifecycle-teardown`, `16-alien-parity`, and the `17-reactivity` behavioral suite.
288
+ cost**. Drop-in over 1.1.4, no breaking changes. New `test/18-identity.test.mjs` (5 tests); plus `14-lifecycle-teardown`, `16-alien-parity`, and the `17-reactivity` behavioral suite.
242
289
 
243
290
  - **1.1.4**: combined release -- a retracking rewrite plus an observer-lifecycle
244
291
  introspection surface. Drop-in over 1.1.3. **Retracking:** version-stamped O(1)
@@ -249,7 +296,7 @@ triggering write -- no `queueMicrotask`, no promises, no scheduler ticks.
249
296
  wide dense` 5115ms->912ms (verified by `retracking.difftest.mjs`: 20k direct + 10k batched, 0
250
297
  disagreements; no regressions elsewhere). **Introspection:** `hasObservers`,
251
298
  `observeObservers`, `forEachObserver`, `forEachSource` (top-level + per-registry), gated by
252
- an internal counter so zero steady-state cost when unused. New `test/13-introspection_test.mjs`
299
+ an internal counter so zero steady-state cost when unused. New `test/13-introspection.test.mjs`
253
300
  (10 tests). Internally staged as 1.1.4 + 1.1.5; ships as a single 1.1.4.
254
301
 
255
302
  - **1.1.3**: adds `isTracking()` (top-level + per-registry). Returns true iff a
@@ -524,32 +571,34 @@ function dumpOwnerTree(handle, depth = 0) {
524
571
 
525
572
  - `Signal.js` -- full implementation, single file.
526
573
  - `Signal.d.ts` -- TypeScript declarations for all public API.
527
- - `test/01-core_test.mjs` -- signal/computed/effect basics, equality, untrack.
528
- - `test/02-topology_test.mjs` -- diamonds, chains, fan-out/in, cycle detection.
529
- - `test/03-pool_test.mjs` -- capacity errors, grow policy, pool reuse.
530
- - `test/04-zero-gc_test.mjs` -- heap retention (run with --expose-gc).
531
- - `test/05-scheduler_test.mjs` -- scheduler races, dispose, gen counter, version wrap.
532
- - `test/06-nested-objects_test.mjs` -- nested-object & reference-identity behaviours.
533
- - `test/07-dispose_test.mjs` -- universal disposal: registry.dispose(api).
534
- - `test/08-watch_test.mjs` -- new watch reactivity tests.
535
- - `test/09-conformance_test.mjs` -- johnsoncodehk/reactive-framework-test-suite conformance fixes tests.
536
- - `test/10-is-tracking_test.mjs` -- `isTracking()` across observer bodies, untracked windows, and outside any observer.
537
- - `test/11-adopted-reactive_test.mjs` -- engine-agnostic edge cases adopted from the wider ecosystem (alien-signals link-integrity #226-228, equality-predicate corners, `update()`/`peek()`/`subscribe` contracts).
538
- - `test/12-coverage_test.mjs` -- targeted public-surface + hot-path branch coverage (top-level routing, clean-read short-circuit, tail severance, scheduler ABA); owner-tree block capability-gated.
539
- - `test/13-introspection_test.mjs` -- observer-lifecycle surface: `hasObservers`, `observeObservers` auto-pause, `forEach*` enumeration (10 tests).
540
- - `test/14-lifecycle-teardown_test.mjs` -- effect-teardown guards: stopped effect doesn't re-subscribe to a signal read later in the same run, self-dispose leaves no orphan link, throwing setup leaves no live subscription (4 tests).
541
- - `test/15-owner-lazy-alloc_test.mjs` -- owner-adoption contract for the 1.2.0 owner tree (lazy signals never adopted; observers still auto-disposed); capability-gated, skipped on 1.1.x (4 tests).
542
- - `test/16-alien-parity_test.mjs` -- differential guards vs alien-signals@3.2.0 fixed-bug classes: cleanup reads create no deps, inner write doesn't block computed-chain propagation, dynamic dep-set correct under dirty-check (3 tests).
543
- - `test/17-reactivity_test.mjs` -- behavioral suite over universal signal-system bug classes (subscription lifecycle, cleanup ordering, stale-dep tracking, batching, equality, nested invalidation, memory, sync async-boundary, scheduler/loops, + differential-review additions); SSR is N/A (~30 tests).
544
- - `test/18-identity_test.mjs` -- node identity (1.1.5): `nodeId`/`describe`, descriptor `id`, re-walkable descriptors, non-perturbing (5 tests).
545
- - `test/19-v12-additions_test.mjs` -- 1.2.0 surface coverage: shared-peek, owner-adoption rule, pre-batch revert (24 tests).
546
- - `test/20-axis-stress_test.mjs` -- eight orthogonal stress axes (batch-under-exception, connect/disconnect re-entrancy, untrack vs owner cascade, etc.) (23 tests).
547
- - `test/21-perf-pins_test.mjs` -- 1.2.1 construction-shape + ABA-guard pins (6 tests).
548
- - `test/22-mutation-hook_test.mjs` -- 1.2.1 `onGraphMutation` registration + opcode emission (12 tests).
549
- - `test/23-owner-introspection_test.mjs` -- `ownerOf`, `forEachOwned`, gen-guarded introspection (14 tests).
550
- - `test/24-signalbox_test.mjs` -- staged for 1.5.0; all tests `{skip: true}` on 1.2.x.
551
- - `test/25-devtools-real-boot_test.mjs` -- 1.2.2: real `Devtools.js` boot against the engine, ghost-contract pin, `stats()` shape pin (10 tests).
552
- - `test/26-free-list-invariant_test.mjs` -- 1.2.2: the audit's clean-free-list invariant, asserted by inspecting freshly-allocated nodes (4 tests).
574
+ - `test/01-core.test.mjs` -- signal/computed/effect basics, equality, untrack.
575
+ - `test/02-topology.test.mjs` -- diamonds, chains, fan-out/in, cycle detection.
576
+ - `test/03-pool.test.mjs` -- capacity errors, grow policy, pool reuse.
577
+ - `test/04-zero-gc.test.mjs` -- heap retention (run with --expose-gc).
578
+ - `test/05-scheduler.test.mjs` -- scheduler races, dispose, gen counter, version wrap.
579
+ - `test/06-nested-objects.test.mjs` -- nested-object & reference-identity behaviours.
580
+ - `test/07-dispose.test.mjs` -- universal disposal: registry.dispose(api).
581
+ - `test/08-watch.test.mjs` -- new watch reactivity tests.
582
+ - `test/09-conformance.test.mjs` -- johnsoncodehk/reactive-framework-test-suite conformance fixes tests.
583
+ - `test/10-is-tracking.test.mjs` -- `isTracking()` across observer bodies, untracked windows, and outside any observer.
584
+ - `test/11-adopted-reactive.test.mjs` -- engine-agnostic edge cases adopted from the wider ecosystem (alien-signals link-integrity #226-228, equality-predicate corners, `update()`/`peek()`/`subscribe` contracts).
585
+ - `test/12-coverage.test.mjs` -- targeted public-surface + hot-path branch coverage (top-level routing, clean-read short-circuit, tail severance, scheduler ABA); owner-tree block capability-gated.
586
+ - `test/13-introspection.test.mjs` -- observer-lifecycle surface: `hasObservers`, `observeObservers` auto-pause, `forEach*` enumeration (10 tests).
587
+ - `test/14-lifecycle-teardown.test.mjs` -- effect-teardown guards: stopped effect doesn't re-subscribe to a signal read later in the same run, self-dispose leaves no orphan link, throwing setup leaves no live subscription (4 tests).
588
+ - `test/15-owner-lazy-alloc.test.mjs` -- owner-adoption contract for the 1.2.0 owner tree (lazy signals never adopted; observers still auto-disposed); capability-gated, skipped on 1.1.x (4 tests).
589
+ - `test/16-alien-parity.test.mjs` -- differential guards vs alien-signals@3.2.0 fixed-bug classes: cleanup reads create no deps, inner write doesn't block computed-chain propagation, dynamic dep-set correct under dirty-check (3 tests).
590
+ - `test/17-reactivity.test.mjs` -- behavioral suite over universal signal-system bug classes (subscription lifecycle, cleanup ordering, stale-dep tracking, batching, equality, nested invalidation, memory, sync async-boundary, scheduler/loops, + differential-review additions); SSR is N/A (~30 tests).
591
+ - `test/18-identity.test.mjs` -- node identity (1.1.5): `nodeId`/`describe`, descriptor `id`, re-walkable descriptors, non-perturbing (5 tests).
592
+ - `test/19-v12-additions.test.mjs` -- 1.2.0 surface coverage: shared-peek, owner-adoption rule, pre-batch revert (24 tests).
593
+ - `test/20-axis-stress.test.mjs` -- eight orthogonal stress axes (batch-under-exception, connect/disconnect re-entrancy, untrack vs owner cascade, etc.) (23 tests).
594
+ - `test/21-perf-pins.test.mjs` -- 1.2.1 construction-shape + ABA-guard pins (6 tests).
595
+ - `test/22-mutation-hook.test.mjs` -- 1.2.1 `onGraphMutation` registration + opcode emission (12 tests).
596
+ - `test/23-owner-introspection.test.mjs` -- `ownerOf`, `forEachOwned`, gen-guarded introspection (14 tests).
597
+ - `test/24-signalbox.test.mjs` -- staged for 1.5.0; all tests `{skip: true}` on 1.2.x.
598
+ - `test/25-devtools-real-boot.test.mjs` -- 1.2.2: real `Devtools.js` boot against the engine, ghost-contract pin, `stats()` shape pin (10 tests).
599
+ - `test/26-free-list-invariant.test.mjs` -- 1.2.2: the audit's clean-free-list invariant, asserted by inspecting freshly-allocated nodes (4 tests).
600
+ - `test/ProfilerTests/` -- version-portable engine hardening suite. Own `package.json`, own `node:test`. Imports `@zakkster/lite-signal` as bare specifier; self-references in-tree, resolves to the installed version when run standalone. Feature-gated cases activate automatically as the engine gains APIs. Run via `npm run test:hardening` (in-tree) or `./run-matrix.sh` (standalone matrix vs published lines).
601
+ - `harness/ProfilerTools/` -- combined integration harness: `@zakkster/lite-profiler-signal` + `@zakkster/lite-devtools` pointed at the same lite-signal registry. Verifies the cross-package zero-GC contract end-to-end (devtools inspects a profiler-driven graph non-perturbingly; the profiler allocates no new nodes in steady state). Own `package.json`, one-time setup via `bash setup.sh` (pins peer deps via tarball). Run via `npm run test:harness`. Both harnesses are opt-in: `npm test` from root is scoped to `'test/*.test.mjs'` and does NOT sweep them.
553
602
  - `bench/benchmark.mjs` -- anti-DCE throughput harness (ops/s; results.txt).
554
603
  - `bench/benchmarkReactive.mjs` -- cross-framework reactivity suite vs alien-signals, preact, vue-reactivity, solid (resultsReactive.txt).
555
604
  - `bench/dispose-recycle.mjs` -- 1.2.2 targeted microbench: create/dispose/recreate cycle (the free-list invariant audit target).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zakkster/lite-signal",
3
- "version": "1.4.0-beta.0",
3
+ "version": "1.4.0-next.0",
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",
@@ -10,9 +10,9 @@
10
10
  "types": "./Signal.d.ts",
11
11
  "exports": {
12
12
  ".": {
13
+ "types": "./Signal.d.ts",
13
14
  "node": "./Signal.js",
14
15
  "import": "./Signal.js",
15
- "types": "./Signal.d.ts",
16
16
  "default": "./Signal.js"
17
17
  }
18
18
  },
@@ -26,12 +26,18 @@
26
26
  "CHANGELOG.md"
27
27
  ],
28
28
  "scripts": {
29
- "test": "node --test --test-reporter=spec",
30
- "test:gc": "node --expose-gc --test --test-reporter=spec",
31
- "test:coverage": "c8 node --test --test-reporter=spec",
29
+ "test": "node --test --test-reporter=spec 'test/*.test.mjs'",
30
+ "test:gc": "node --expose-gc --test --test-reporter=spec 'test/*.test.mjs'",
31
+ "test:coverage": "c8 node --test --test-reporter=spec 'test/*.test.mjs'",
32
+ "test:report": "c8 --reporter=lcov --reporter=text node --test --test-reporter=spec 'test/*.test.mjs'",
33
+ "test:hardening": "npm --prefix test/ProfilerTests test",
34
+ "test:hardening:gc": "npm --prefix test/ProfilerTests run test:gc",
35
+ "test:harness": "npm --prefix harness/ProfilerTools test",
36
+ "test:all": "npm test && npm run test:hardening && npm run test:harness",
32
37
  "bench": "node --expose-gc bench/benchmark.mjs",
33
38
  "bench-reactive": "node --expose-gc bench/benchmarkReactive.mjs",
34
- "verify": "npm test && npm run bench"
39
+ "verify": "npm test && npm run bench",
40
+ "gate": "node harness/VersionMatrix/pre-publish.mjs"
35
41
  },
36
42
  "keywords": [
37
43
  "signal",
@@ -69,6 +75,17 @@
69
75
  "sideEffects": false,
70
76
  "devDependencies": {
71
77
  "c8": "^11.0.0",
72
- "@zakkster/lite-devtools": "^1.1.0"
78
+ "@zakkster/lite-devtools": "^1.1.0",
79
+ "@zakkster/lite-signal": "^1.3.0 || >=1.4.0-beta.0 || >=1.6.0-preview.0",
80
+ "@zakkster/lite-profiler": "^1.1.0",
81
+ "@zakkster/lite-profiler-signal": "^1.2.0"
82
+ },
83
+ "overrides": {
84
+ "@zakkster/lite-time": {
85
+ "@zakkster/lite-signal": "$@zakkster/lite-signal"
86
+ },
87
+ "@zakkster/lite-devtools": {
88
+ "@zakkster/lite-signal": "$@zakkster/lite-signal"
89
+ }
73
90
  }
74
91
  }