@zakkster/lite-signal 1.9.0-preview.6 → 1.11.0-preview
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 +191 -334
- package/README.md +99 -22
- package/Signal.d.ts +112 -0
- package/Signal.js +168 -4
- package/llms.txt +25 -9
- package/package.json +14 -9
package/CHANGELOG.md
CHANGED
|
@@ -4,247 +4,178 @@ 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.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
the
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
`createRegistry: "
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
the
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
`
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
`
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
- **
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
-
|
|
178
|
-
|
|
179
|
-
`runWithOwner`, and cascade-dispose when the captured owner is torn down.
|
|
180
|
-
- **`lifecycle-torture`** (createRoot 1.5.0+, destroy 1.4.0+) -- `createRoot`
|
|
181
|
-
detachment (an owned subtree that survives its enclosing scope) and the direct
|
|
182
|
-
`destroy` reset contract; `createRoot` had never been called by any scenario,
|
|
183
|
-
and `destroy` was only reached indirectly through a registry `Symbol.dispose`.
|
|
184
|
-
|
|
185
|
-
The suite is now **19 scenarios (16 semantic + 3 soak)**. On the 1.9.0 engine
|
|
186
|
-
**every semantic scenario executes -- zero feature-skips** -- the first engine
|
|
187
|
-
version to run the complete superset, since `dispose` was the last remaining
|
|
188
|
-
feature gate (box 1.5.0, scope/owner/introspect 1.6.0, flush 1.7.0,
|
|
189
|
-
cleanup-return 1.8.0, dispose 1.9.0 are all satisfied).
|
|
190
|
-
|
|
191
|
-
### Verified -- full suite green on the 1.9.0 engine (Node 22, `--expose-gc`)
|
|
192
|
-
|
|
193
|
-
- **Torture:** 19/19 -- `torture:semantic` 16/16 (all executed, zero skips),
|
|
194
|
-
`torture:soak` 3/3 (zero errors, every pool back to its leaf-only floor).
|
|
195
|
-
- **Unit (plain run):** 499 tests, 479 pass, 0 fail, 1 skip (the architectural
|
|
196
|
-
SSR N/A in `17-reactivity`). The only non-passes are the 19 in
|
|
197
|
-
`test/25-devtools-real-boot`, the real-rig that requires the sibling
|
|
198
|
-
`@zakkster/lite-devtools`; with that sibling resolvable the suite is 498 pass +
|
|
199
|
-
1 skip. Engine-only, excluding `test/25`: 480 tests, 479 pass, 1 skip. (The c8
|
|
200
|
-
coverage run below reports a different count -- perf-smoke budgets skip under
|
|
201
|
-
instrumentation.)
|
|
202
|
-
|
|
203
|
-
### Changed -- bench protocol v3 (carried forward)
|
|
204
|
-
|
|
205
|
-
The `bench/` harness is bench protocol v3: three instruments (microscope / mirror /
|
|
206
|
-
version-economics), each with a fixed config and a machine-generated `#STAMP`
|
|
207
|
-
(engine + harness sha256, live registry config, host, node). The pre-v3
|
|
208
|
-
five-framework reactivity suite was removed after 1.5.1. See `bench/README.md`.
|
|
209
|
-
|
|
210
|
-
### Added -- Coveralls coverage badge
|
|
211
|
-
|
|
212
|
-
README carries a Coveralls badge; lcov is produced by `npm run test:report`
|
|
213
|
-
(`coveralls-next` in devDependencies).
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
### Fixed -- dangling re-tracking cursor on source disposal (crash)
|
|
217
|
-
|
|
218
|
-
Disposing a signal/computed from inside an observer that had linked it on the
|
|
219
|
-
previous run, but had not yet re-read it on the current run, crashed with
|
|
220
|
-
`TypeError: Cannot set properties of null (setting 'headSub')`. `disposeNode`'s
|
|
221
|
-
sub-list teardown freed the link while the observer's re-tracking cursor
|
|
222
|
-
(`activeObserverCurrentDep`) was still parked on it; `severTail` then walked from
|
|
223
|
-
a freed link, wiped the observer's `headDep`, and double-freed the link. Reachable
|
|
224
|
-
from the plain public API, inherited from the 1.8.0 base. Fixed with a one-line
|
|
225
|
-
cursor repair in `disposeNode`; the two dead `freeLink` `-1` ternaries were removed
|
|
226
|
-
with it. Pinned by a regression test in `test/12-coverage.test.mjs`.
|
|
227
|
-
|
|
228
|
-
### Changed -- coverage closed to 100% and test-suite hygiene
|
|
229
|
-
|
|
230
|
-
`Signal.js` reaches **100% statements / branches / functions / lines** (491 tests,
|
|
231
|
-
490 pass, 1 skip). Beyond the crash fix and its ported box/owner/opcode closure
|
|
232
|
-
suite, this pass added: a test for the new **`using` / `Symbol.dispose`** methods on
|
|
233
|
-
both box prototypes (`box[Symbol.dispose]()` disposes and is idempotent); and the
|
|
234
|
-
cleanup-return array-append arm (carried in via `33-cleanup-return`). Three provably
|
|
235
|
-
-unreachable arms carry `/* c8 ignore */` with proofs: the link-ledger clamp, the
|
|
236
|
-
`batchEpoch` 2^32 wraparound, and the `Symbol.dispose` pre-Node-20 polyfill fallback.
|
|
237
|
-
|
|
238
|
-
Test-suite hygiene: `33-computed-selfdirty-prev-owner.test.mjs` renamed to `34-`
|
|
239
|
-
(the `33-` slot belongs to `33-cleanup-return`, which carries forward from 1.8.0
|
|
240
|
-
because this line inherits effect cleanup-return) -- the rename had left a
|
|
241
|
-
byte-identical `33-` copy behind, so the scope suite's `28-`/`29-` pattern
|
|
242
|
-
repeated here; the stray `33-computed-selfdirty-prev-owner.test.mjs` is deleted,
|
|
243
|
-
leaving one `34-`. The duplicate `28-scope.test.mjs` was likewise dropped in
|
|
244
|
-
favour of `29-scope.test.mjs` (both were byte-identical).
|
|
245
|
-
|
|
246
|
-
**Hot-path parity note:** the fix touches `disposeNode` and `freeLink`; re-baseline
|
|
247
|
-
the VersionMatrix engine sha256 on the next publish.
|
|
7
|
+
## [1.11.0-preview] -- 2026-09-06
|
|
8
|
+
|
|
9
|
+
**Feature of the cut: `onSettled`, rebuilt as a creation-time capability.** The
|
|
10
|
+
redemption of the feature whose naive always-checked drain hook was the +27-31%
|
|
11
|
+
1to1batch regression (ledger #17). It returns with the cost model inverted.
|
|
12
|
+
This preview also carries the full verification-infrastructure parity of the
|
|
13
|
+
rebuilt line (assembled from the finalized 1.10.0-preview tree) and a one-time,
|
|
14
|
+
user-authorized engine port of the same two cold-path fixes 1.10.0 needed.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- `createRegistry({ settled: true })` -- selects, ONCE at build time, a `flushEffects`
|
|
18
|
+
variant with a drain-complete tail, using the same const-selection discipline as the
|
|
19
|
+
1.7.0 `flushStrategy` closures.
|
|
20
|
+
- `onSettled(fn)` (registry method + top-level) -- fires once per top-level, non-empty,
|
|
21
|
+
clean drain; returns an idempotent unsubscribe. Throws `onSettled requires
|
|
22
|
+
createRegistry({ settled: true })` on a registry built without the capability. Does
|
|
23
|
+
not fire on re-entrant flushes, empty flushes, or a flush that threw. Coalesces under
|
|
24
|
+
batch and multi-effect drains; callbacks fire in subscription order and a throwing
|
|
25
|
+
callback is swallowed (observer, not control path). Module surface: 34 exports /
|
|
26
|
+
registry 28 fns.
|
|
27
|
+
- `settled` joins the validated config family (7 keys) as a **strict boolean**: a
|
|
28
|
+
truthy non-boolean (`{settled: "yes"}`) throws
|
|
29
|
+
`createRegistry: "settled" must be true or false` rather than silently binding the
|
|
30
|
+
plain drain, and `setled` gets a did-you-mean suggestion.
|
|
31
|
+
- `bench/torture/settled-torture.mjs` -- the 28th scenario (native, floor 1.11.0,
|
|
32
|
+
39 asserts): exact settle accounting across all three `flushStrategy` builds,
|
|
33
|
+
fan/batch/cascade coalescing, clean-quiescence negatives, observer isolation,
|
|
34
|
+
mid-fire un/subscribe safety, destroy, 10k-cycle + 1000-batch exact soaks;
|
|
35
|
+
`SETTLED_BREAK=phantom|lost` self-tests verified to fail the gate.
|
|
36
|
+
- `zerogc-torture` gains the 1.11.0-gated `steady-settled` lane: a LIVE subscriber
|
|
37
|
+
under the full witness battery (retained 0 B, poolGrowths 0, zero scavenges over
|
|
38
|
+
the 1M-op un-forced window) with in-loop fail-closed non-vacuity.
|
|
39
|
+
- `test/38-onsettled.test.mjs` (the authored discriminator, 9 tests) and ten new
|
|
40
|
+
`test/35` cases (the settled matrix rows, the suggestion-set test, and a
|
|
41
|
+
first-class option describe).
|
|
42
|
+
|
|
43
|
+
### Fixed (engine port, user-authorized, one-time)
|
|
44
|
+
- The staged `v1.11.0-candidate.1` engine had forked the rebuilt line at the SAME
|
|
45
|
+
pre-fix point as the 1.10.0 canary. Ported verbatim from the 1.10.0 engine:
|
|
46
|
+
the `disposeNode` **cursor repair** (+ branch-free `freeLink`) -- without it,
|
|
47
|
+
`scope-torture`, `retrack-dispose-torture` and `cleanup-return-torture` all
|
|
48
|
+
crashed (`Cannot set properties of null (setting 'headSub')`) -- and the
|
|
49
|
+
**1.4.5 `createRegistry` validation cascade** (+ the 2 pool-population stats
|
|
50
|
+
keys, 12 -> 14), whose absence failed ~34 unit tests including a real OOM
|
|
51
|
+
SIGABRT where the missing eager ceiling let the guard child OOM. Residual
|
|
52
|
+
engine diff vs 1.10.0 = the 8 authored onSettled hunks + the two `settled`
|
|
53
|
+
validation lines; **no hot body touched** (`flushEffectsPlain`'s body is
|
|
54
|
+
byte-identical to 1.10.0's `flushEffects` -- only the binding became a
|
|
55
|
+
build-time-selected const).
|
|
56
|
+
|
|
57
|
+
### Unchanged (proven, not asserted)
|
|
58
|
+
- A default registry (`settled` off) binds the **verbatim plain drain**, so its
|
|
59
|
+
`flushEffects` -- and the hot write path that calls it -- is **byte-identical** to
|
|
60
|
+
1.10.0 (body sha256). `markDownstream` / `executeEffect` / `pullComputed` untouched.
|
|
61
|
+
Zero cost BY CONSTRUCTION -- there is no per-flush check.
|
|
62
|
+
- Creation anatomy re-measured **IDENTICAL for the seventh engine running**
|
|
63
|
+
(`mint --verify` all pins PASS: signal 264.3 / computed 208.1 / effect 160.0 /
|
|
64
|
+
boxes 56.0 B/op all-space -- `CAP_SETTLED` is read once at `createRegistry`,
|
|
65
|
+
off the mint path). `visit-anatomy --verify` holds all 21 structural pins with
|
|
66
|
+
NO re-anchor. JIT strict: 4x monomorphic on a fresh Node-26 baseline.
|
|
67
|
+
VersionMatrix **GATE PASSED 5/5 first try** (floor 1.3.0 + rolling 1.5.0,
|
|
68
|
+
REPS=5 trimmed-spread; counter lane exact 288 allocs/frame min=max=p99 over
|
|
69
|
+
1500 frames, poolGrowths 0).
|
|
70
|
+
- Full ladder: unit 572/571/0/1 (`test:gc` 580/579/0/1); torture 27 pass /
|
|
71
|
+
1 opt-in skip / 0 fail with **zero floor-skips** (wraparound re-run at full
|
|
72
|
+
distance, 12/12); zgc 7/7 + report; hardening 23/0/5; harness 5/5; smoke PASS.
|
|
73
|
+
|
|
74
|
+
### Known sharp edge (observed, deliberately un-asserted)
|
|
75
|
+
- `fireSettled` iterates the live callbacks array while unsubscribe splices it:
|
|
76
|
+
a callback that unsubscribes ITSELF mid-fire makes its next sibling miss THAT
|
|
77
|
+
drain (recovery from the next drain on is exact); a mid-fire subscribe is
|
|
78
|
+
delivered in the same drain; `destroy()` retains `settledCallbacks` (bounded,
|
|
79
|
+
freed with the registry). Flagged for an explicit decision rather than pinned
|
|
80
|
+
as law -- see `settled-torture`'s header.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## [1.10.0-preview] -- 2026-09-06
|
|
84
|
+
|
|
85
|
+
The **verification-infrastructure parity cut** for the named-nodes + `whyDirty()`
|
|
86
|
+
feature (introduced in the 1.10.0-canary entry below, unchanged in behaviour).
|
|
87
|
+
The engine is byte-identical to the canary past the version banner EXCEPT for two
|
|
88
|
+
cold-path fixes ported from the 1.9.0 line (see Fixed); the four hot propagation
|
|
89
|
+
bodies stay byte-identical to 1.9.0 (sha-proven, WHY-1_10.md). This cut brings the
|
|
90
|
+
full 1.9.0-alpha audit infrastructure onto the folder and re-proves it here.
|
|
91
|
+
|
|
92
|
+
### Fixed -- two cold-path ports from LiteSignal1.9.0 (user-authorized, one-time)
|
|
93
|
+
|
|
94
|
+
- **disposeNode cursor repair.** The folder's v1.10.0-canary.1 engine had FORKED
|
|
95
|
+
the rebuilt-1.9 line before this fix landed: disposing a linked-but-unread source
|
|
96
|
+
from an observer's own body mid-retrack left the re-tracking cursor
|
|
97
|
+
(`activeObserverCurrentDep`) dangling at a freed link, then crashed `severTail` /
|
|
98
|
+
`freeLink` with `Cannot set properties of null (setting 'headSub')`. Reproduced by
|
|
99
|
+
scope-torture (dispose-linked-unread) and all five cleanup-return 6b geometries.
|
|
100
|
+
Ported verbatim from 1.9.0: advance the cursor to the next surviving dep when the
|
|
101
|
+
parked link is freed. Disposal path only; no steady-state cost.
|
|
102
|
+
- **createRegistry validation (1.4.5 backport).** The canary also predated the
|
|
103
|
+
config-validation cascade the other five folders carry: `ALLOWED_KEYS` /
|
|
104
|
+
did-you-mean / eager-construction ceiling, plus the `nodePoolPopulation` /
|
|
105
|
+
`linkPoolPopulation` stats keys (`stats()` 12 -> 14). Its absence failed 37 unit
|
|
106
|
+
tests. Ported verbatim; all cold, constructor-only.
|
|
107
|
+
|
|
108
|
+
### Added -- the 27-scenario torture suite (was 22) + audit lanes
|
|
109
|
+
|
|
110
|
+
- The 2026-08 audit scenarios (`contract`, `interop`, `retrack-dispose`,
|
|
111
|
+
`burst-profile`, opt-in `wraparound`), the 3-state runner with ENFORCED floors,
|
|
112
|
+
and the flush/cleanup-return folder supersets. On this engine **all 23 semantic
|
|
113
|
+
execute with zero floor-skips** (as on 1.9.0 -- `dispose` was the last gate);
|
|
114
|
+
suite verdict 26 pass / 1 opt-in skip / 0 fail.
|
|
115
|
+
- `test/25` rewritten against the REAL devtools 1.6.2 (14 tests): the exact 13-key
|
|
116
|
+
`capabilities()` fingerprint (identical to the 1.8.0/1.9.0 pairings -- devtools
|
|
117
|
+
1.6.2 has no 1.9/1.10 cap key, so the exact key set is the pin). New
|
|
118
|
+
`test/37-devtools-zerogc-probe` (renumbered above the native `36-named-and-whydirty`).
|
|
119
|
+
- `test/zgc/` (`test:zgc` 7/7 + report 3/3), `test/ProfilerTests` (`test:hardening`
|
|
120
|
+
22/0/6), `harness/ProfilerTools` (`test:harness` 5/5), and the phase-1/2/3 harness
|
|
121
|
+
instruments (`visit-anatomy`, `jit-health`, `mint-anatomy`, `costmodel`, `floors`,
|
|
122
|
+
`trend`, `creation-anatomy`, `burst-real`); `harness/run.mjs` gains `mint`.
|
|
123
|
+
- VersionMatrix read+counter lanes; **gate-self PASSED 5/5** vs floor-1.3.0 +
|
|
124
|
+
rolling-1.5.0, counter lane exact (288 allocs/frame, 0 poolGrowths).
|
|
125
|
+
|
|
126
|
+
### Measured on this engine
|
|
127
|
+
|
|
128
|
+
- **Mint anatomy IDENTICAL for the sixth engine running**: signal 264.3 / computed
|
|
129
|
+
208.1 / effect 160.0 / signalBox 56.0 / computedBox 56.0 B/op all-space -- the cold
|
|
130
|
+
`nodeNames.set` on named creation is off the unnamed fast path.
|
|
131
|
+
- visit-anatomy 21/21 with NO re-anchor (named/whyDirty add no eq-dispatch site;
|
|
132
|
+
both failure paths re-witnessed in scratch clones). jit-health strict: 4x
|
|
133
|
+
monomorphic. Cleanup-return compose order, the wraparound band, and every
|
|
134
|
+
audit-era pin: carried with ZERO pin flips.
|
|
135
|
+
|
|
136
|
+
### Changed
|
|
137
|
+
|
|
138
|
+
- devDeps: `@zakkster/lite-devtools` ^1.2.0 -> **^1.6.2**,
|
|
139
|
+
`@zakkster/lite-gc-profiler` ^1.15.0 -> **^1.16.0**.
|
|
140
|
+
- `test` / `test:gc` / `test:coverage` glob-scoped to `'test/*.test.mjs'`; unit suite
|
|
141
|
+
**553 tests, 552 pass, 0 fail, 1 skip** (`test:gc` 561/560/0/1). `verify` chains the
|
|
142
|
+
zgc gate. Banner v1.10.0-canary.1 -> v1.10.0-preview.
|
|
143
|
+
- Signal.js line-ref comments (capacity / deep-chain / error / owner tortures, test/30)
|
|
144
|
+
refreshed against the ported engine.
|
|
145
|
+
|
|
146
|
+
### Removed
|
|
147
|
+
|
|
148
|
+
- `test/33-computed-selfdirty-prev-owner.test.mjs` -- byte-identical duplicate of
|
|
149
|
+
`test/34-...` (sha `0f48d434`); its `33-` prefix collided with `33-cleanup-return`.
|
|
150
|
+
- The stale `bench-reactive` script and the llms `demo/index.html` +
|
|
151
|
+
"wired as prepublishOnly" claims (the gate is `npm run gate` -> `pre-publish.mjs`).
|
|
152
|
+
|
|
153
|
+
## [1.10.0-canary] -- 2026-07-XX (rebuilt line, candidate)
|
|
154
|
+
|
|
155
|
+
**Feature of the cut: named nodes + `whyDirty()` -- the tracing foundation.**
|
|
156
|
+
Two cold-path primitives the profiler tools (`lite-trace`, `lite-hud`,
|
|
157
|
+
`lite-devtools`) consume directly. No node-shape change; the pinned handle
|
|
158
|
+
shapes from `21-perf-pins` are untouched.
|
|
159
|
+
|
|
160
|
+
### Added
|
|
161
|
+
- `signal(v, {name})` / `computed(fn, {name})` / `effect(fn, {name})`. Names
|
|
162
|
+
live in a registry-side `Map<id, name>`, written only on named creation and
|
|
163
|
+
read only by `describeNode()` / `whyDirty()` (both cold). Unnamed nodes pay
|
|
164
|
+
a single guarded comparison on the creation path and carry no name key.
|
|
165
|
+
- `describe()` / `describeNode()` gain `name` when present (absent otherwise).
|
|
166
|
+
- `whyDirty(handle)` -- pull-side diagnostic. For a computed, walks its deps
|
|
167
|
+
and reports which one's version moved past the observer's `evalVersion`
|
|
168
|
+
(the SAME predicate `pullComputed` uses, `((dep.version - evalVer)|0) > 0`),
|
|
169
|
+
then traces transitively to the root signal write via `rootCause`. Read-only:
|
|
170
|
+
it never pulls, so it cannot perturb the graph. Returns `[]` for a clean
|
|
171
|
+
computed and for non-computed handles.
|
|
172
|
+
- `nodeNames` cleared by `destroy()`.
|
|
173
|
+
|
|
174
|
+
### Unchanged (proven, not asserted)
|
|
175
|
+
- Hot propagation bodies `markDownstream` / `flushEffects` / `executeEffect` /
|
|
176
|
+
`pullComputed` are **byte-identical** to 1.9.0 (sha256 over extracted bodies).
|
|
177
|
+
- Bars: `1to1batch` neutral (write path is the frozen set); `createSignals` /
|
|
178
|
+
`createEffects` within noise (the name comparison on the unnamed path is free).
|
|
248
179
|
|
|
249
180
|
## [1.9.0-preview] -- 2026-07-XX (rebuilt line, candidate)
|
|
250
181
|
|
|
@@ -438,7 +369,7 @@ run variance; the sha256 verification rules out any other mechanism.
|
|
|
438
369
|
- **`test/28-run-with-owner.test.mjs`** (16 tests, cascade-forwarded):
|
|
439
370
|
basic shape, degradation, and the three hazard pins with allocation
|
|
440
371
|
pressure applied so the ABA guard is actually exercised.
|
|
441
|
-
- **New: `test/
|
|
372
|
+
- **New: `test/33-computed-selfdirty-prev-owner.test.mjs`** -- a single
|
|
442
373
|
self-gating discriminator covering three feature bands:
|
|
443
374
|
- **`getOwner / runWithOwner`** -- **ACTIVE on 1.9.0** (owner APIs
|
|
444
375
|
are present via the cascade port). All 5 tests pass: `getOwner`
|
|
@@ -463,13 +394,11 @@ run variance; the sha256 verification rules out any other mechanism.
|
|
|
463
394
|
assertion from 1.6/1.7/1.8 (adds `flushPasses`).
|
|
464
395
|
|
|
465
396
|
**Note on the test file name convention:** the uploaded discriminator
|
|
466
|
-
file used `33-computed-selfdirty-prev-owner_test.mjs` (underscore
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
to avoid colliding with `33-cleanup-return.test.mjs`, which carries forward
|
|
472
|
-
from 1.8.0 since this line inherits the effect cleanup-return feature.
|
|
397
|
+
file used `33-computed-selfdirty-prev-owner_test.mjs` (underscore);
|
|
398
|
+
renamed to `.test.mjs` (period) in the delivered tree to match the
|
|
399
|
+
ecosystem-wide convention (`NN-name.test.mjs`) and pick up the standard
|
|
400
|
+
`test/*.test.mjs` glob. `_test.mjs` would be silently ignored by
|
|
401
|
+
`node --test`.
|
|
473
402
|
|
|
474
403
|
### The rebuilt-line rejection ledger (context for what does NOT ship)
|
|
475
404
|
|
|
@@ -561,80 +490,6 @@ twins (see the 1.12.0-preview trace-twin design).
|
|
|
561
490
|
between `createRoot` and `createScope`; sha256 confirms no
|
|
562
491
|
pre-existing function was disturbed by the insertion.
|
|
563
492
|
|
|
564
|
-
### Verified -- fresh 1.9.0-preview bench sweep (Apple M4 Pro / Node 26)
|
|
565
|
-
|
|
566
|
-
Both v3 instruments were re-run in full on the 1.9.0-preview engine on
|
|
567
|
-
**Apple M4 Pro darwin/arm64, Node 26.3.1**, with `#STAMP`-verified
|
|
568
|
-
outputs committed to `bench/r.txt` (microscope aggregate, 4 engines
|
|
569
|
-
across the six first-party shapes) and `bench/rb.txt` (mirror sweep,
|
|
570
|
-
Andrii's canonical adapter verbatim, lite vs alien across 47 rows,
|
|
571
|
-
isolated-per-row, 10 reps). Andrii 15-framework log at
|
|
572
|
-
`bench/AndriiVolynetsReactiveBench.log` (byte-identical to 1.8.0's --
|
|
573
|
-
the 1.9.0-preview engine is sha256-identical to 1.8.0 on all 14
|
|
574
|
-
propagation / flush-scaffold functions and differs only in `effect` and
|
|
575
|
-
`createScope` by one existence-guarded `[Symbol.dispose]` stamp line
|
|
576
|
-
each on the cold creation path, so the ranking numbers carry with zero
|
|
577
|
-
re-verification cost).
|
|
578
|
-
|
|
579
|
-
- **Andrii Volynets js-reactivity-benchmark position holds at 3rd of
|
|
580
|
-
15** (the position lite moved to on 1.8.0) with geomean **95.4 ms**;
|
|
581
|
-
lite is ahead of 4th-place @reactively (136.0, lite 1.43x faster) and
|
|
582
|
-
5th-place Preact Signals (148.8, ~56% ahead), behind only
|
|
583
|
-
alien-signals (77.5) and reflex (89.7). **20 outright wins** (the
|
|
584
|
-
eight canonical propagation shapes, all four wide fan-in / fan-out
|
|
585
|
-
shapes, `molBench`, and seven of the rectangular / layered DAG
|
|
586
|
-
shapes). Top-3 count: **29/47**. Since the engine is sha256-identical
|
|
587
|
-
to 1.8.0 across every propagation function, this is the same log
|
|
588
|
-
1.8.0 published; re-running Andrii's suite would produce host-noise
|
|
589
|
-
drift, not a code-driven delta.
|
|
590
|
-
- **Microscope aggregate on M4 Pro (r.txt):** on the six v3 microscope
|
|
591
|
-
shapes, lite wins vs alien on **MUX +34.9%** (fan-in), **SELECTIVE
|
|
592
|
-
DAG +20.9%**, **DYNAMIC DAG +16.1%**, and **BROADCAST +5.2%**
|
|
593
|
-
(narrowed from +9.4% on 1.8.0 but still on the win side of parity).
|
|
594
|
-
The wins hold within noise of the 1.8.0 M4 Pro sweep despite the two
|
|
595
|
-
`[Symbol.dispose]` stamp lines added at effect / createScope
|
|
596
|
-
creation, which is what "one existence guard per cold creation path,
|
|
597
|
-
nothing on the propagation hot path" looks like in the propagation
|
|
598
|
-
numbers. Alien ahead on **KAIROS -19.5%** (widened from -15.9% on
|
|
599
|
-
1.8.0 -- host-noise drift on the shape where lite is architecturally
|
|
600
|
-
weakest) and **DEEP CHAIN -72.8%** (the architectural weak spot:
|
|
601
|
-
recursive JS-stack computed resolution against alien's flatter
|
|
602
|
-
chain). Speed wins vs alien: **4/6**; heap wins: **5/6** with the
|
|
603
|
-
sixth being a shared-zero on BROADCAST.
|
|
604
|
-
- **Microscope heap (the actual story) on M4 Pro:** on every shape
|
|
605
|
-
where GC pressure exists at all, lite allocates **one to four orders
|
|
606
|
-
of magnitude less transient heap than alien** -- DEEP CHAIN 0.5 KB vs
|
|
607
|
-
1062 KB (>2000x, on the shape lite loses on time), MUX 0 KB vs 781
|
|
608
|
-
KB, KAIROS 23 KB vs 802 KB (34.3x), DYNAMIC DAG 3.4 MB vs 55.7 MB
|
|
609
|
-
(16.6x), SELECTIVE DAG 7.7 MB vs 76.5 MB (9.9x). Against
|
|
610
|
-
preact-signals and solid-signals the heap gap is even wider on the
|
|
611
|
-
fan-in / fan-out family; solid allocates ~17 MB on MUX and ~15 MB on
|
|
612
|
-
SELECTIVE DAG where lite allocates 0 KB and 7.7 MB on the same
|
|
613
|
-
shapes. The differentiated position is ALLOCATION, not raw
|
|
614
|
-
propagation speed -- competitive-to-winning throughput with
|
|
615
|
-
dramatically lower GC pressure, and that is the headline that
|
|
616
|
-
reproduces across hosts.
|
|
617
|
-
- **Mirror sweep on M4 Pro (rb.txt):** Andrii's canonical 47-shape
|
|
618
|
-
suite re-run isolated-per-row lite vs alien on M4 Pro reproduces the
|
|
619
|
-
same honest framing: lite runs **parity-to-behind alien on
|
|
620
|
-
throughput** across the head-to-head suite (wins outright on **3/47**
|
|
621
|
-
-- `1000x5 - 25 sources (wide dense)` +10.7%,
|
|
622
|
-
`manySourcesIntoOneComputedEffectWithDirect` +31.5%,
|
|
623
|
-
`manySourcesIntoOneComputedEffect` +30.2%; `molBench` dropped from a
|
|
624
|
-
razor-thin +0.3% win on 1.8.0 to -0.4% parity this sweep, taking the
|
|
625
|
-
outright-win count from 4/47 to 3/47), weak on the deep/layered-burst
|
|
626
|
-
family. That head-to-head result and the "3rd of 15 with 20 outright
|
|
627
|
-
wins" both live on the same Andrii log and are not contradictory: the
|
|
628
|
-
outright-of-15 rankings look at each shape across every framework in
|
|
629
|
-
the field, so shapes where alien beats lite by 20-30% but reflex
|
|
630
|
-
beats both and everyone else is slower can still count as a lite
|
|
631
|
-
outright win when measured that way.
|
|
632
|
-
- **Third-party engine versions carried forward** from the 1.8.0 sweep
|
|
633
|
-
(alien-signals 3.2.1, @preact/signals-core 1.14.2, @vue/reactivity
|
|
634
|
-
3.5.35, solid-js 1.9.13). No peer bumps this cycle; the deltas here
|
|
635
|
-
are the 1.9 engine's own footprint (the two `[Symbol.dispose]` stamp
|
|
636
|
-
lines) plus host noise.
|
|
637
|
-
|
|
638
493
|
### Migration
|
|
639
494
|
|
|
640
495
|
Zero work for every existing user. Symbol.dispose is additive; nothing
|
|
@@ -652,6 +507,8 @@ cascade forward from every prior 1.x line without semantic change.
|
|
|
652
507
|
|
|
653
508
|
## [1.8.0-preview] -- 2026-07-XX
|
|
654
509
|
|
|
510
|
+
## [1.8.0-preview] -- 2026-07-XX
|
|
511
|
+
|
|
655
512
|
The **effect cleanup return** minor -- Reflex-study pattern A. One additive
|
|
656
513
|
hot-path change: an effect body may now `return` a cleanup function, which
|
|
657
514
|
runs before the next re-run and on dispose, composing with imperative
|
|
@@ -950,9 +807,9 @@ monomorphic targets and inlines the body. In "eager" mode the inlined body is
|
|
|
950
807
|
byte-identical to the 1.6.0 inline check `if (batchDepth === 0) flushEffects()`
|
|
951
808
|
-- **zero behavioral or performance regression** for any existing user.
|
|
952
809
|
|
|
953
|
-
This is NOT ledger
|
|
810
|
+
This is NOT ledger §0b #6 (per-call closure-var load of a primitive). It is a
|
|
954
811
|
hoisted function reference resolved once at registry build time and is a NEW
|
|
955
|
-
mechanism by the v1 roadmap
|
|
812
|
+
mechanism by the v1 roadmap §0b line 100 definition.
|
|
956
813
|
|
|
957
814
|
The `getOwner` / `runWithOwner` port adds new user-API functions but touches no
|
|
958
815
|
hot path. sha256 over the extracted function bodies of `pullComputed`,
|
|
@@ -997,7 +854,7 @@ pristine 1.7.0-preview byte-for-byte; the two new functions are inserted between
|
|
|
997
854
|
|
|
998
855
|
Real wins, but smaller than the gap to Reflex on the same shapes. The residual
|
|
999
856
|
gap is structural (per-write `gen` check, batch-revert epoch tracking, global
|
|
1000
|
-
version bumping) -- design decisions accepted by
|
|
857
|
+
version bumping) -- design decisions accepted by §0b and not in scope here.
|
|
1001
858
|
Modern V8's `try/finally` elision varies; expect higher absolute speedups on
|
|
1002
859
|
production V8 than on this sandbox.
|
|
1003
860
|
|
|
@@ -1137,7 +994,7 @@ they produce are reproducible, comparable, and engine-version-aware.
|
|
|
1137
994
|
|
|
1138
995
|
- **Full suite green** against the 1.6.0 engine: 443 tests, 442 pass, 0 fail,
|
|
1139
996
|
1 skip (only the architecturally-N/A SSR case in `17-reactivity`). +4
|
|
1140
|
-
`createScope` tests in `test/
|
|
997
|
+
`createScope` tests in `test/28-scope_test.mjs`; the 1.5.0 box and createRoot
|
|
1141
998
|
suites carry forward unchanged. **Coverage** (c8@11, Node 22): `Signal.js`
|
|
1142
999
|
100% statements / 96.96% branches / 100% functions / 100% lines; `Watch.js`
|
|
1143
1000
|
100% across all four. The branch drop vs 1.5.0 (97.35% -> 96.96%) is the
|
|
@@ -1222,7 +1079,7 @@ dependency and updates correctly; a `computedBox` that reads a callable
|
|
|
1222
1079
|
the introspection surface all apply uniformly -- a box node is indistinguishable
|
|
1223
1080
|
from a callable node to the graph, the owner tree, and devtools.
|
|
1224
1081
|
|
|
1225
|
-
### Added -- `test/24-
|
|
1082
|
+
### Added -- `test/24-signalbox_test.mjs` activated (9 tests)
|
|
1226
1083
|
|
|
1227
1084
|
The suite that was committed-but-skipped since 1.3.0 now runs against the real
|
|
1228
1085
|
implementation: box get/set/peek/update, computedBox derive + memoize,
|
|
@@ -1269,7 +1126,7 @@ survives consumer re-runs.
|
|
|
1269
1126
|
- **Full suite green** against the 1.5.0 engine: 439 tests, 438 pass, 0 fail,
|
|
1270
1127
|
1 skip (only the architecturally-N/A SSR case in `17-reactivity`; the 9
|
|
1271
1128
|
`24-signalbox` tests are now active, +6 `createRoot` tests in
|
|
1272
|
-
`test/27-create-
|
|
1129
|
+
`test/27-create-root_test.mjs`, +3 box-coverage tests). **Coverage** (c8@11,
|
|
1273
1130
|
Node 22): `Signal.js` 100% statements / 97.35% branches / 100% functions / 100%
|
|
1274
1131
|
lines; `Watch.js` 100% across all four.
|
|
1275
1132
|
- **Box hot path is zero-GC**: 200,000 writes through a 256-wide box graph,
|
|
@@ -1504,7 +1361,7 @@ What `createNode` still writes are the *lifetime* writes for the new resident:
|
|
|
1504
1361
|
the new lifetime), plus the conditional owner-adoption splice
|
|
1505
1362
|
(`owner`, `nextOwned`, parent chain link).
|
|
1506
1363
|
|
|
1507
|
-
### Added -- `test/10-free-list-
|
|
1364
|
+
### Added -- `test/10-free-list-invariant_test.mjs`
|
|
1508
1365
|
|
|
1509
1366
|
A three-test invariant suite that asserts the audit's claim by inspecting
|
|
1510
1367
|
freshly-allocated nodes' underlying field state (via the documented
|
|
@@ -1522,7 +1379,7 @@ If any future change reintroduces a write to a clean-state field on the
|
|
|
1522
1379
|
dispose path or removes a write that turns out NOT to be redundant, this
|
|
1523
1380
|
suite catches it.
|
|
1524
1381
|
|
|
1525
|
-
### Added -- `test/11-devtools-
|
|
1382
|
+
### Added -- `test/11-devtools-contract_test.mjs`
|
|
1526
1383
|
|
|
1527
1384
|
A 12-test smoke probe of the introspection surface that lite-devtools 1.1 /
|
|
1528
1385
|
lite-studio 1.1 consume. Verifies handle resolution + walkers, owner-tree
|
|
@@ -1869,7 +1726,7 @@ over 1.1.4, no breaking changes.
|
|
|
1869
1726
|
shape kept uniform (monomorphic). **Zero steady-state cost.**
|
|
1870
1727
|
|
|
1871
1728
|
### Test suite
|
|
1872
|
-
- Added `test/15-
|
|
1729
|
+
- Added `test/15-identity_test.mjs`: 5 tests -- ids unique + stable, `nodeId`/`describe`
|
|
1873
1730
|
undefined on non-handles, descriptor shape `{ id, kind, value }`, descriptors re-walkable,
|
|
1874
1731
|
identity walks non-perturbing.
|
|
1875
1732
|
|
|
@@ -1921,7 +1778,7 @@ All accept a public `Signal`/`Computed` handle.
|
|
|
1921
1778
|
on a non-handle argument; `observeObservers` throws `TypeError`.
|
|
1922
1779
|
|
|
1923
1780
|
### Test suite
|
|
1924
|
-
- Added `test/13-
|
|
1781
|
+
- Added `test/13-introspection_test.mjs`: 10 tests across 3 describe blocks --
|
|
1925
1782
|
`hasObservers` (live observation reflects, peek doesn't count), `observeObservers`
|
|
1926
1783
|
auto-pause lifecycle (start-on-first/stop-on-last, no extra connect for a 2nd
|
|
1927
1784
|
observer, re-observe fires again, no churn on re-track, conditional reads toggle
|
|
@@ -1965,7 +1822,7 @@ allocation on whether the read will actually subscribe anything.
|
|
|
1965
1822
|
Roughly 1-2 ns per call.
|
|
1966
1823
|
|
|
1967
1824
|
### Test suite
|
|
1968
|
-
- Added `test/10-is-
|
|
1825
|
+
- Added `test/10-is-tracking_test.mjs`: 11 tests across 5 describe blocks --
|
|
1969
1826
|
observer-bodies (effect + computed), untracked windows (`untrack`, `subscribe`
|
|
1970
1827
|
callback, `onCleanup`, `watch` callback), outside-observer (module scope,
|
|
1971
1828
|
call-site of unobserved computed read), robustness (state restored after
|