@zakkster/lite-signal 1.4.2 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,149 @@ All notable changes to `@zakkster/lite-signal` are documented here.
4
4
  Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
  This project follows [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [1.4.4] -- 2026-08-03
8
+
9
+ The verification-surface patch, round four. **The engine is unchanged**: as in
10
+ 1.4.1/1.4.2/1.4.3, the only edit to `Signal.js` is the version string in its header
11
+ banner, and `Signal.d.ts` is untouched. Everything here lives in `bench/torture/`
12
+ and `test/`, neither of which ships the engine -- `files[]` excludes `bench/`. If
13
+ you consume the package, 1.4.4 is byte-for-byte 1.4.3 plus a version number.
14
+
15
+ 1.4.3 gated the zero-GC claim. This round closes the remaining gaps at the ERROR
16
+ edges -- the paths that only run when user code throws or a graph is pushed past a
17
+ structural limit -- and turns the three soaks from liveness-only into
18
+ value-correctness gates.
19
+
20
+ ### Added -- two semantic scenarios (suite now 22)
21
+
22
+ - `bench/torture/error-torture.mjs` -- throwing effect BODIES under flush.
23
+ `flushEffects` buffers each per-effect throw into a pre-allocated buffer, keeps
24
+ the remaining queued effects running, and only then surfaces what it caught:
25
+ a single throw is re-thrown UNWRAPPED (the original error), two-or-more become a
26
+ single `AggregateError` carrying EXACTLY those errors in order. This is a stress
27
+ scenario, not a unit duplicate of `test/09-conformance`: it asserts what the unit
28
+ tests do not -- that survivors in the same pass still run, and that the buffer
29
+ returns to baseline under 4096 throw/clean cycles so nothing bleeds between
30
+ flushes (a clean flush after a throwing one throws nothing, `stats()` never
31
+ drifts).
32
+ - `bench/torture/deep-chain-torture.mjs` -- `pullComputed` recursion, fail-closed.
33
+ `pullComputed` is call-stack recursive, so a deep computed chain read fails
34
+ CLOSED with a `RangeError` beyond the host stack rather than corrupting anything.
35
+ Depth is RAMPED, never pinned (the exact throwing depth is host-dependent): it
36
+ asserts only that some depth <= 100k throws a `RangeError`, then that the registry
37
+ that threw is STILL usable (a fresh small graph builds and evaluates correctly,
38
+ effects included) and that the iterative PUSH path -- an equally deep effect
39
+ cascade, flush-pass budget raised to match -- propagates end to end without
40
+ throwing, contrasting the heap-iterative scheduler against the stack-recursive
41
+ pull.
42
+
43
+ ### Added -- `test/27-throwing-equals.test.mjs`, a throwing user `equals`
44
+
45
+ `equals` is user code the engine calls on the hot write/recompute path and does
46
+ not sandbox. This file pins its behaviour at all three call sites: (a) the signal
47
+ `set` pre-check -- the original error propagates and the signal is left unmutated,
48
+ no downstream fires; (b) the batch revert check -- PINNED, not asserted-as-atomic:
49
+ the throw at that site happens after `node.value` was written but before the
50
+ version bump, so the net value is correct yet downstream FIRES (the throw stranded
51
+ the version bump, defeating the revert), documented exactly so a future move to an
52
+ atomic revert trips the pin; (c) computed re-eval -- caught, cached as
53
+ `FLAG_HAS_ERROR`, re-thrown on every read until a dep change re-evaluates cleanly
54
+ and clears it.
55
+
56
+ ### Changed -- capacity ceiling + soak value oracles
57
+
58
+ - `bench/torture/capacity-torture.mjs` gains the 16x link grow ceiling: under
59
+ `grow`, link growth is capped at `maxLinks * 16` and throws `CapacityError`
60
+ with `kind: "links"` and `capacity` equal to the ceiling AT the ceiling --
61
+ growth terminates exactly at `16x` (`linkPoolCapacity === 128` for `maxLinks: 8`,
62
+ not one chunk over) -- and the overflowed computed still re-throws on read
63
+ rather than leaking a partial sum. Every pre-existing case is intact.
64
+ - `graph-fuzzer.mjs`, `torture-soak.mjs`, `scheduler-bench.mjs` each gain a
65
+ value-correctness ORACLE. Each shadows its signals in a single `Int32Array`
66
+ allocated ONCE outside the churn loop, updated in lockstep with every write, and
67
+ asserts the engine's value equals the model on a rotating window each tick plus a
68
+ full sweep at teardown -- zero per-tick allocation, so the implicit pool-to-floor
69
+ gate is not regressed. All prior liveness assertions (0 errors, pool-to-floor,
70
+ JIT sink advanced) are preserved; the soaks now assert value-correctness, not
71
+ just liveness. Mutation-verified: corrupting one shadow write makes the soak exit
72
+ non-zero.
73
+
74
+ ### Verified -- full suite green on the 1.4.4 engine (Node 22, `--expose-gc`)
75
+
76
+ - **Torture:** 22/22 -- `error-torture` and `deep-chain-torture` PASS; the three
77
+ soaks report `value mismatches: 0`.
78
+ - The engine is byte-for-byte 1.4.3; the unit suite grows only by `test/27`
79
+ (7 new tests) and no prior test regressed.
80
+
81
+ ## [1.4.3] -- 2026-08-02
82
+
83
+ The verification-surface patch, round three. **The engine is unchanged**: as in
84
+ 1.4.1 and 1.4.2, the only edit to `Signal.js` is the version string in its header
85
+ banner, and `Signal.d.ts` is untouched. Everything here lives in `bench/torture/`,
86
+ which does not ship -- `files[]` excludes it. If you consume the package, 1.4.3 is
87
+ byte-for-byte 1.4.2 plus a version number.
88
+
89
+ 1.4.2 completed the forward-compatible torture superset. This release adds the one
90
+ scenario that was still missing: the zero-GC claim, gated. The headline promise --
91
+ writing through an already-built reactive graph allocates nothing -- was, until
92
+ now, asserted only by a hand-rolled `perf_hooks` scavenge counter that lived in a
93
+ `futureVersions/` sketch and never ran in CI. That meter is deleted and replaced by
94
+ a real gate driven by `@zakkster/lite-gc-profiler@^1.15.0`.
95
+
96
+ ### Added -- `zerogc-torture.mjs`, the zero-GC gate (suite now 20 scenarios)
97
+
98
+ `bench/torture/zerogc-torture.mjs` turns "zero-GC" from a slogan into a
99
+ re-runnable gate. It measures the steady-state hot path against three independent
100
+ witnesses, gated separately because no single one sees everything:
101
+
102
+ - **per-call RETAINED bytes** -- `measureAllocs` / `checkAllocs` at
103
+ `maxBytesPerCall: 0`, the literal zero-retention assertion. Because it measures
104
+ allocation surviving a forced collection (min across batches), it also proves
105
+ the create+dispose CHURN case: a callable handle allocates transiently, is
106
+ reclaimed, and retains 0 -- the pool absorbing the node.
107
+ - **major GC count and longest pause** -- `measureOps` (`stabilize: 'deep'`) /
108
+ `checkNoGc` at `maxMajor: 0` / `maxPauseMs: 2`. A zero-alloc window forces no
109
+ major collection regardless of length; a nonzero count is transient garbage the
110
+ retained-bytes settling would hide.
111
+ - **the engine's own `stats()` counters** -- steady scenarios: `poolGrowths` and
112
+ `totalAllocations` do not move across the window (no node pulled, pool never
113
+ grew); churn scenarios: `poolGrowths` stays 0 and `activeNodes` returns to its
114
+ baseline (every acquired node recycled, none leaked).
115
+
116
+ The scenario states its non-goal as loudly as its goal: node CREATION is **not**
117
+ zero-alloc (the callable API allocates two closures per `signal`, a `signalBox`
118
+ allocates its wrapper); the pool removes the internal NODE allocation, never the
119
+ public HANDLE. Five deterministic graph shapes are gated -- deep chain x16, wide
120
+ fan-out x32, batched 8-signal writes, and create+dispose churn on both the
121
+ callable and (self-skipping below 1.5.0) the box form. `ZEROGC_BREAK=1` arms an
122
+ effect that pushes a fresh object into a module-level sink on every write:
123
+ mutation-verification that `checkAllocs` rejects a planted allocation, and that
124
+ reaching the PASS line with the break armed is itself a failure (a gate blind to a
125
+ planted leak is blind to a real one). Registered in `run.mjs` as a `semantic`
126
+ scenario; the suite is now **20 scenarios (17 semantic + 3 soak)**.
127
+
128
+ ### Removed -- the orphaned hand-rolled meter
129
+
130
+ `futureVersions/zgc/` (the `perf_hooks` scavenge-counting gate, its `Watch.stub.mjs`,
131
+ core, scenarios, and node:test wrapper) is deleted. Its scenario shapes are ported
132
+ into `zerogc-torture.mjs`; its bespoke measurement is superseded by the profiler.
133
+ Also removed: `bench/torture/index.mjs`, a stale non-ASCII duplicate of
134
+ `bench/torture/helpers/index.mjs` that no scenario imported. Neither path ships
135
+ (`files[]` excludes `bench/`).
136
+
137
+ ### Changed -- one devDependency
138
+
139
+ `@zakkster/lite-gc-profiler@^1.15.0` added to `devDependencies` (dev-only; the
140
+ package still has zero runtime dependencies and `files[]` ships no test code).
141
+
142
+ ### Verified -- full suite green on the 1.4.3 engine (Node 22, `--expose-gc`)
143
+
144
+ - **Torture:** 20/20 -- `zerogc-torture` PASS (three witnesses green across all
145
+ five graph shapes; `churn-box` a clean skip on 1.4.x). `ZEROGC_BREAK=1` exits
146
+ non-zero and names `injected` (retained 32 B/call).
147
+ - The engine is byte-for-byte 1.4.2; the unit suite is unaffected (425 total,
148
+ 415 pass, 0 fail, 10 skip).
149
+
7
150
  ## [1.4.2] -- 2026-07-28
8
151
 
9
152
  The verification-surface patch, round two. **The engine is unchanged**: as in
package/README.md CHANGED
@@ -761,13 +761,13 @@ npm run bench
761
761
 
762
762
  ### Tier 4 -- Torture (correctness and resources under chaos)
763
763
 
764
- `bench/torture/` holds **19 scenarios (16 semantic + 3 soak)** in two groups,
764
+ `bench/torture/` holds **22 scenarios (19 semantic + 3 soak)** in two groups,
765
765
  behind one runner. They are not perf benchmarks: the ops/sec figures reflect
766
766
  random workload composition, not engine throughput -- `bench/benchmark.mjs`
767
767
  remains the canonical perf harness. Every scenario feature-detects and **skips
768
768
  cleanly** below the engine version that introduces its feature (`SKIP: <feature>
769
769
  requires <version>+`, exit 0), so the whole directory rides this 1.4.x base
770
- forward through 1.9. On the 1.4.x engine, **10 semantic scenarios execute and 6
770
+ forward through 1.9. On the 1.4.x engine, **13 semantic scenarios execute and 6
771
771
  self-skip**.
772
772
 
773
773
  ```bash
@@ -804,7 +804,10 @@ Run these on every commit. They pin values, wakeups, work and ordering.
804
804
  | `introspect-torture` | the read-only introspection surface (`describe`/`nodeId`/`forEach*`/`hasObservers`/`isTracking`/`ownerOf`/`observeObservers`): walk agreement vs the real edge set incl. dynamic rewiring, `hasObservers` transitions, and the ABA gen-stamp guard (a stale descriptor resolves to nothing, never a recycled resident) |
805
805
  | `lifecycle-torture` | `destroy` (1.4.0+) registry reset: handles staled via gen-bump, stale writes no-op, pool reusable, idempotent. Its `createRoot` half is 1.5.0+ and self-skips on this base |
806
806
  | `async-torture` | `watch`/`when`/`whenAsync` contracts + a 300-seed projection-guard storm |
807
- | `capacity-torture` | the fail-closed pool boundary: exact node/link ceilings, `CapacityError`, `grow` mode crossing the boundary, no partial value escapes |
807
+ | `capacity-torture` | the fail-closed pool boundary: exact node/link ceilings, `CapacityError`, `grow` mode crossing the boundary AND its 16x link ceiling (`grow` throws at `maxLinks*16`, growth terminating exactly at the ceiling), no partial value escapes |
808
+ | `error-torture` | throwing effect BODIES under flush: a single throw re-thrown unwrapped, two-or-more into an `AggregateError` carrying exactly those errors, survivors in the same pass still run, and the error buffer drains to baseline over 4096 throw/clean cycles |
809
+ | `deep-chain-torture` | `pullComputed` recursion fails CLOSED with a `RangeError` at ramped depth (never pinned); the registry that threw stays usable, and the iterative effect-cascade PUSH path over an equally deep chain does not throw |
810
+ | `zerogc-torture` | the zero-GC claim, gated by `@zakkster/lite-gc-profiler`: per-call **retained bytes** (`measureAllocs` at `maxBytesPerCall: 0`), **major-GC count + longest pause** (`measureOps`/`checkNoGc`, `stabilize: 'deep'`), and the engine's own `stats()` counters (`poolGrowths`/`totalAllocations` steady, `activeNodes` restored under churn) across five graph shapes. `ZEROGC_BREAK=1` plants a leak the gate must reject; `churn-box` self-skips below 1.5.0 |
808
811
  | `box-torture` (1.5.0+) | `signalBox`/`computedBox` interop + surface -- SKIP on 1.4.x |
809
812
  | `scope-torture` (1.6.0+) | `createScope` adoption + the disposal-crash fuzz -- SKIP on 1.4.x |
810
813
  | `owner-torture` (1.6.0+) | `getOwner`/`runWithOwner` capture-restore + ABA degradation -- SKIP on 1.4.x |
@@ -812,12 +815,15 @@ Run these on every commit. They pin values, wakeups, work and ordering.
812
815
  | `cleanup-return-torture` (1.8.0+) | an effect's returned cleanup: timing, compose order, self-dispose guard, computed exclusion -- SKIP on 1.4.x |
813
816
  | `dispose-torture` (1.9.0+) | `Symbol.dispose` / `using` on lifecycle objects (five stamp sites) -- SKIP on 1.4.x |
814
817
 
815
- Why this group exists: the resource soaks below pass green on an engine whose
816
- computeds return stale values. Flipping the clean short-circuit in `pullComputed`
817
- from `<= 0` to `<= 1` keeps the pool perfectly balanced and throws nothing --
818
- `oracle-fuzzer` catches it on 400/400 seeds, and all three soaks report PASS.
819
- Separately, removing the `node.gen === gen` guard from the cached scheduler thunk
820
- is caught by `scheduler-storm` and **missed by all 405 unit tests**.
818
+ Why this group exists: the resource soaks below once passed green on an engine
819
+ whose computeds return stale values. Flipping the clean short-circuit in
820
+ `pullComputed` from `<= 0` to `<= 1` keeps the pool perfectly balanced and throws
821
+ nothing -- `oracle-fuzzer` catches it on 400/400 seeds, and the soaks' *liveness*
822
+ assertions all still reported PASS. As of 1.4.4 each soak also carries a
823
+ value-correctness oracle (below), so a stale-value engine is now caught in the
824
+ soak group too. Separately, removing the `node.gen === gen` guard from the cached
825
+ scheduler thunk is caught by `scheduler-storm` and **missed by all 405 unit
826
+ tests**.
821
827
 
822
828
  Where no contract is documented, these files pin the *observed* behaviour and say
823
829
  so at the scenario, rather than asserting an invented one.
@@ -831,8 +837,13 @@ exits non-zero unless:
831
837
 
832
838
  - zero exceptions were thrown during the run,
833
839
  - after teardown `activeNodes` is at or below its leaf-only floor and
834
- `activeLinks` is exactly `0`, and
835
- - the JIT sink advanced -- proving the accumulator loops were not optimised away.
840
+ `activeLinks` is exactly `0`,
841
+ - the JIT sink advanced -- proving the accumulator loops were not optimised away, and
842
+ - (1.4.4+) the value oracle agrees: a once-allocated `Int32Array` shadow model,
843
+ updated in lockstep with every write and sampled on a rotating window each tick
844
+ plus a full sweep at teardown, matches every signal's value. It adds no per-tick
845
+ allocation, so the implicit pool-to-floor gate is untouched. The soaks now assert
846
+ value-correctness, not just liveness.
836
847
 
837
848
  ```bash
838
849
  node --expose-gc bench/torture/graph-fuzzer.mjs # 10s random-DAG fuzz, 1500 nodes
@@ -864,7 +875,7 @@ npm run verify # test + a sanity bench
864
875
 
865
876
  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.
866
877
 
867
- 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.
878
+ This section will grow. As future versions ship publications that need specific defensive validation (e.g. a `flushStrategy` ship, a TC39-polyfill ship, a profiler/observability ship), the corresponding harness lands here. (The zero-GC public gate shipped in 1.4.3 as the `zerogc-torture` scenario in Tier 4 above, not as a separate harness.)
868
879
 
869
880
  ### `test/ProfilerTests/` -- version-portable hardening suite
870
881
 
@@ -1251,7 +1262,7 @@ npm test # behavior suite, ~1.3s
1251
1262
  npm run test:gc # zero-gc suite, requires --expose-gc, ~3s
1252
1263
  npm run bench # comparative benchmark vs alien-signals (results.txt), ~5min
1253
1264
  npm run bench-reactive # 5-framework reactivity suite (resultsReactive.txt)
1254
- npm run torture # full torture suite, all 19 scenarios
1265
+ npm run torture # full torture suite, all 22 scenarios
1255
1266
  npm run torture:semantic # correctness scenarios only, ~10s
1256
1267
  npm run torture:soak # resource soaks only, wall-clock bound
1257
1268
  npm run verify # test + sanity bench; run before publishing
package/Signal.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @zakkster/lite-signal v1.4.2
2
+ * @zakkster/lite-signal v1.4.4
3
3
  * --------------------
4
4
  * Hybrid Doubly-Linked-List Reactive Graph Engine -- decoupled (Signal1_3) base
5
5
  * with the two 1.1.3 performance fixes ported in:
package/llms.txt CHANGED
@@ -50,7 +50,55 @@ triggering write -- no `queueMicrotask`, no promises, no scheduler ticks.
50
50
 
51
51
  ## Version notes
52
52
 
53
- - **1.4.2** (current): the **verification-surface patch, round two**. No engine
53
+ - **1.4.4** (current): the **verification-surface patch, round four**. No engine
54
+ change -- as in 1.4.1/1.4.2/1.4.3, the only edit to `Signal.js` is the banner
55
+ version string, `Signal.d.ts` is untouched, and `bench/torture/` stays out of
56
+ `files[]`; for consumers 1.4.4 is byte-for-byte 1.4.3 plus a version number. It
57
+ adds **two** semantic torture scenarios -- `error-torture.mjs` (throwing effect
58
+ BODIES under flush: `flushEffects` buffers each per-effect throw, re-throws a
59
+ single one unwrapped, aggregates two-or-more into an `AggregateError` carrying
60
+ exactly those errors, keeps surviving effects running, and drains the buffer to
61
+ a clean baseline over many cycles) and `deep-chain-torture.mjs` (`pullComputed`
62
+ is call-stack recursive, so a deep computed chain fails CLOSED with a RangeError
63
+ beyond the host stack, ramped never pinned; the registry stays usable afterwards
64
+ and the iterative PUSH path -- an equally deep effect cascade -- does not throw)
65
+ -- taking the suite to **22 scenarios (19 semantic + 3 soak); 13 execute on the
66
+ 1.4.x engine**. It also extends `capacity-torture` with the 16x link grow ceiling
67
+ (`grow` throws `CapacityError("links", maxLinks*16)` AT the ceiling, terminating
68
+ the pool exactly at 16x, read edge still fail-closed) and adds a value-correctness
69
+ ORACLE to all three soaks: each now shadows its signals in a once-allocated
70
+ `Int32Array` and asserts the engine's values equal the model on a sampled window
71
+ each tick plus a full final sweep -- so the soaks assert value-correctness, not
72
+ just liveness, with zero per-tick allocation. A new unit file `test/27-throwing-equals`
73
+ pins a throwing user `equals` at its three call sites (signal set pre-check,
74
+ batch revert check, computed re-eval). Verified green: torture 22/22, engine
75
+ byte-identical to 1.4.3, so the unit suite is unaffected (only its count grows).
76
+
77
+ - **1.4.3**: the **verification-surface patch, round three**. No engine
78
+ change -- as in 1.4.1 and 1.4.2, the only edit to `Signal.js` is the banner
79
+ version string, `Signal.d.ts` is untouched, and `bench/torture/` stays out of
80
+ `files[]`; for consumers 1.4.3 is byte-for-byte 1.4.2 plus a version number. It
81
+ adds **one** semantic torture scenario -- `zerogc-torture.mjs` -- taking the
82
+ suite to **20 scenarios (17 semantic + 3 soak)**, and deletes the orphaned
83
+ hand-rolled scavenge meter that predated it. The new scenario is what finally
84
+ turns the headline zero-GC claim into a re-runnable GATE, driven by the real
85
+ `@zakkster/lite-gc-profiler@^1.15.0` (added as a devDependency) rather than a
86
+ bespoke `perf_hooks` counter. It gates the steady-state hot path on three
87
+ independent witnesses: per-call RETAINED bytes via `measureAllocs`/`checkAllocs`
88
+ at `maxBytesPerCall: 0` (the literal zero-retention assertion, which also proves
89
+ create+dispose churn leaks nothing even though a handle allocates transiently),
90
+ major-GC count and longest pause via `measureOps`/`checkNoGc` at `maxMajor: 0` /
91
+ `maxPauseMs: 2`, and the engine's exact `stats()` counters (steady:
92
+ `poolGrowths` and `totalAllocations` flat; churn: `poolGrowths` 0 and
93
+ `activeNodes` restored). The non-goal is stated as loudly as the goal: node
94
+ CREATION is not zero-alloc; the pool removes the internal node allocation, never
95
+ the public handle. `ZEROGC_BREAK=1` arms an effect that pushes to a module-level
96
+ sink, mutation-verifying that the gate rejects a planted allocation (and that
97
+ reaching the PASS line with the break armed is itself a failure). `churn-box`
98
+ self-skips below 1.5.0. Verified green: torture 20/20, `zerogc-torture` PASS;
99
+ engine byte-identical to 1.4.2, so the unit suite (425/415/0/10) is unaffected.
100
+
101
+ - **1.4.2**: the **verification-surface patch, round two**. No engine
54
102
  change -- as in 1.4.1, the only edit to `Signal.js` is the banner version string,
55
103
  `Signal.d.ts` untouched, `bench/torture/` excluded from `files[]`; for consumers
56
104
  1.4.2 is byte-for-byte 1.4.1 plus a version number. It completes the torture
@@ -633,7 +681,7 @@ function dumpOwnerTree(handle, depth = 0) {
633
681
  - `bench/benchmark.mjs` -- anti-DCE throughput harness (ops/s; results.txt).
634
682
  - `bench/benchmarkReactive.mjs` -- cross-framework reactivity suite vs alien-signals, preact, vue-reactivity, solid (resultsReactive.txt).
635
683
  - `bench/dispose-recycle.mjs` -- 1.2.2 targeted microbench: create/dispose/recreate cycle (the free-list invariant audit target).
636
- - `bench/torture/` -- **19 scenarios (16 semantic + 3 soak)** behind one runner (`run.mjs`), two groups, forward-compatible through 1.9. Every scenario feature-detects and SKIPS cleanly below the engine version that introduces its feature (`SKIP: <feature> requires <version>+`, exit 0), so the whole directory rides this 1.4.x base forward. `semantic` (deterministic, fast, asserts on MEANING; run in CI) -- the **10 that execute on the 1.4.x engine**: `oracle-fuzzer` (every computed vs an independent uncached reference evaluator, 400 seeds x 120 ops), `glitch-hunter` (glitch freedom + exact wakeup counts), `work-accounting` (minimum body-execution counts over 10 topologies), `op-accounting` (structural work via the `onGraphMutation` opcode lane -- op5 identity, equality cutoff, link/node balance, 400-seed differential), `introspect-torture` (the read-only `describe`/`nodeId`/`forEach*`/`hasObservers`/`isTracking`/`ownerOf`/`observeObservers` surface: walk agreement vs the real edge set incl. dynamic rewiring, and the ABA gen-stamp guard), `lifecycle-torture` (`destroy` 1.4.0+ registry reset -- gen-bump staling, no-op stale writes, pool reuse, idempotence; its `createRoot` half is 1.5.0+ and self-skips), `concurrent-storm` (8 reentrancy / flush-ordering contracts, `CycleError` via `maxFlushPasses`), `scheduler-storm` (gen-bound thunk ABA guard, FLAG_QUEUED coalescing, throwing scheduler containment), `async-torture` (`watch`/`when`/`whenAsync` + a 300-seed storm), `capacity-torture` (the fail-closed pool boundary, `CapacityError`, `grow` crossing it, no partial value escapes); plus **6 that self-skip** until their feature exists: `box-torture` (1.5.0), `scope-torture` (1.6.0), `owner-torture` (1.6.0), `flush-torture` (1.7.0), `cleanup-return-torture` (1.8.0), `dispose-torture` (1.9.0). `soak` (wall-clock bound, asserts on RESOURCES; run nightly): `graph-fuzzer`, `scheduler-bench`, `torture-soak` -- exit 0 iff zero errors AND post-teardown pool at or below its leaf-only floor AND the JIT sink advanced. The runner spawns each scenario as a child process because several assert on global pool accounting, and passes `--expose-gc` unconditionally. Scripts: `npm run torture`, `torture:semantic`, `torture:soak`.
684
+ - `bench/torture/` -- **22 scenarios (19 semantic + 3 soak)** behind one runner (`run.mjs`), two groups, forward-compatible through 1.9. Every scenario feature-detects and SKIPS cleanly below the engine version that introduces its feature (`SKIP: <feature> requires <version>+`, exit 0), so the whole directory rides this 1.4.x base forward. `semantic` (deterministic, fast, asserts on MEANING; run in CI) -- the **13 that execute on the 1.4.x engine**: `oracle-fuzzer` (every computed vs an independent uncached reference evaluator, 400 seeds x 120 ops), `glitch-hunter` (glitch freedom + exact wakeup counts), `work-accounting` (minimum body-execution counts over 10 topologies), `op-accounting` (structural work via the `onGraphMutation` opcode lane -- op5 identity, equality cutoff, link/node balance, 400-seed differential), `introspect-torture` (the read-only `describe`/`nodeId`/`forEach*`/`hasObservers`/`isTracking`/`ownerOf`/`observeObservers` surface: walk agreement vs the real edge set incl. dynamic rewiring, and the ABA gen-stamp guard), `lifecycle-torture` (`destroy` 1.4.0+ registry reset -- gen-bump staling, no-op stale writes, pool reuse, idempotence; its `createRoot` half is 1.5.0+ and self-skips), `concurrent-storm` (8 reentrancy / flush-ordering contracts, `CycleError` via `maxFlushPasses`), `scheduler-storm` (gen-bound thunk ABA guard, FLAG_QUEUED coalescing, throwing scheduler containment), `async-torture` (`watch`/`when`/`whenAsync` + a 300-seed storm), `capacity-torture` (the fail-closed pool boundary, `CapacityError`, `grow` crossing it AND its 16x link ceiling terminating exactly at `maxLinks*16`, no partial value escapes), `error-torture` (throwing effect bodies under flush: single-throw re-thrown unwrapped, two-or-more into an `AggregateError` carrying exactly those errors, survivors still run, buffer drains to baseline over 4096 cycles), `deep-chain-torture` (`pullComputed` recursion fails closed with a RangeError at ramped depth, registry stays usable, the iterative effect-cascade push path over an equally deep chain does not throw), `zerogc-torture` (the zero-GC gate -- steady-state writes retain 0 bytes and force 0 major GCs, node churn leaks nothing, via `@zakkster/lite-gc-profiler`'s `measureAllocs`/`checkAllocs` at `maxBytesPerCall: 0` + `measureOps`/`checkNoGc` at `maxMajor: 0`/`maxPauseMs: 2` + exact `stats()` deltas, mutation-verified by `ZEROGC_BREAK=1`; its `churn-box` witness self-skips below 1.5.0); plus **6 that self-skip** until their feature exists: `box-torture` (1.5.0), `scope-torture` (1.6.0), `owner-torture` (1.6.0), `flush-torture` (1.7.0), `cleanup-return-torture` (1.8.0), `dispose-torture` (1.9.0). `soak` (wall-clock bound, asserts on RESOURCES and now on VALUE-CORRECTNESS; run nightly): `graph-fuzzer`, `scheduler-bench`, `torture-soak` -- exit 0 iff zero errors AND post-teardown pool at or below its leaf-only floor AND the JIT sink advanced AND a once-allocated `Int32Array` shadow model (sampled on a rotating window each tick, full sweep at teardown, zero per-tick allocation) agrees with every signal value. The runner spawns each scenario as a child process because several assert on global pool accounting, and passes `--expose-gc` unconditionally. `zerogc-torture` and the soaks require `--expose-gc` (the runner supplies it). Scripts: `npm run torture`, `torture:semantic`, `torture:soak`.
637
685
  - `bench/torture/helpers/index.mjs` -- shared torture infrastructure: seeded `mulberry32` (failures replay from their seed), `soakRegistry` / `fixedRegistry`, `createReport` (collects failures rather than throwing on the first), and `VALUE_POOL`, the adversarial value domain containing the pairs where candidate equality definitions disagree (`Object.is` vs `===` on NaN and -0/0; `===` vs `==` on 0/""/false/"0" and null/undefined). Dependency-free and side-effect-free by contract: importing it must not touch the default registry.
638
686
  - `bench/run-all.sh` + `bench/aggregate.mjs` -- cold-process-per-engine protocol + per-scenario aggregation.
639
687
  - `demo/index.html` -- interactive visualization of the reactive graph.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zakkster/lite-signal",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
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",
@@ -78,6 +78,7 @@
78
78
  "sideEffects": false,
79
79
  "devDependencies": {
80
80
  "@zakkster/lite-devtools": "^1.2.0",
81
+ "@zakkster/lite-gc-profiler": "^1.15.0",
81
82
  "@zakkster/lite-profiler": "^1.1.0",
82
83
  "@zakkster/lite-profiler-signal": "^1.2.0",
83
84
  "@zakkster/lite-signal": "^1.3.0 || >=1.4.0-beta.0 || >=1.6.0-preview.0",