@zakkster/lite-signal 1.6.0-preview.2 → 1.6.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (6) hide show
  1. package/CHANGELOG.md +661 -63
  2. package/README.md +344 -109
  3. package/Signal.d.ts +66 -0
  4. package/Signal.js +254 -3
  5. package/llms.txt +291 -104
  6. package/package.json +40 -11
package/CHANGELOG.md CHANGED
@@ -4,16 +4,340 @@ 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.6.0] -- 2026-06-26 (preview)
8
-
9
- The observability-and-lifecycle minor, shipping on the `preview` dist-tag while it
10
- settles. Two additions: `stats()` gains a twelfth key, **`flushPasses`**, plus two
7
+ ## [1.6.0-rc.1] -- 2026-09-05
8
+
9
+ Verification + docs increment over `1.6.0-rc`; **no engine change past the
10
+ version banner comment** (shasum-verified). Ports the mint-cycle allocation
11
+ anatomy probe from the canonical 1.5.1 line and re-measures it on this engine.
12
+
13
+ ### Added -- mint-cycle allocation anatomy probe (harness, ported from 1.5.1)
14
+
15
+ - `harness/mint-anatomy.mjs` + `node harness/run.mjs mint [--verify]`: per-op
16
+ all-space heap bytes for every creation primitive's mint+dispose cycle on a
17
+ pre-grown throw-policy registry (`maxNodes:1<<16, maxLinks:1<<18,
18
+ onCapacityExceeded:"throw"`), fresh child process per (variant, warmup) cell
19
+ (JIT tier state poisons same-process comparisons), relative pins P1..P5. See
20
+ the canonical CHANGELOG `[1.5.1]` for the full methodology: the LS-06
21
+ all-space accounting correction (a new-space-only witness undercounts the
22
+ callable mint by ~56 B/op of closure-feedback plumbing at pre-TurboFan tiers)
23
+ and the closure-pooling rejection rationale (reused accessor identity makes
24
+ the birthGen ABA guard undecidable -- fails open).
25
+ - **Measured on this engine (node v26.3.1 darwin/arm64): identical to the 1.5.x
26
+ line** -- `signal(1)`+dispose 264 B/op all-space (tier-invariant), `computed`
27
+ 208, `effect` 160, `signalBox`/`computedBox` 56, dispose side 0 (mint-and-hold
28
+ equals the cycle to +-0.3 B); all pins PASS at both warmups (12k / 250k). The
29
+ 1.6.0 additions (`createScope`, `flushPasses`, opcodes 6/7) sit outside the
30
+ creation path, and the measurement confirms it: creation economics carry over
31
+ from 1.5.x unchanged.
32
+
33
+ ## [1.6.0-rc] -- 2026-09-05
34
+
35
+ The release-candidate hardening pass. **No engine change past the version banner
36
+ comment** -- `Signal.js` hot paths are byte-identical to beta-1 (shasum-verified
37
+ before and after, and a line diff against the canonical 1.5.0 engine confirmed
38
+ 1.6.0 is a strict superset: nothing from the 1.5.0 line is missing here). What
39
+ moves is the entire verification surface: the canonical repo's audited 1.5.0
40
+ torture/harness/test infrastructure is merged in, re-targeted to this engine, and
41
+ then extended with 1.6.0-only gates.
42
+
43
+ ### Changed -- torture suite: 22 -> 27 scenarios, three-state protocol
44
+
45
+ `bench/torture/run.mjs` now registers **27 scenarios (23 semantic + 4 soak, one
46
+ opt-in)** under the audited runner protocol: skips exit 77 and version floors are
47
+ ENFORCED (a scenario that skips while the engine is at/above its floor FAILS the
48
+ run -- a dropped export cannot be a green skip), scenario wall-clock is capped,
49
+ and a PASS that asserted nothing is a failure. Ported from the canonical line:
50
+ `contract-torture`, `interop-torture`, `retrack-dispose-torture`, and the opt-in
51
+ full-distance `wraparound-torture` (the 2^31 dormancy band re-verified at
52
+ ~2.1B-spin distance ON THIS ENGINE, 12/12 -- the version-compare expressions are
53
+ byte-identical to 1.5.0). Every 1.5.0-observed behavioral pin re-verified
54
+ UNCHANGED here -- zero pin flips. On this engine the runner executes 20 semantic
55
+ scenarios with 3 legitimate floor skips (flush 1.7, cleanup-return 1.8,
56
+ Symbol.dispose 1.9); `scope-torture` and the owner/lifecycle lanes run natively.
57
+
58
+ ### Added -- the 1.6 flush lane gated engine-raw: `burst-profile-torture`
59
+
60
+ A new semantic scenario (floor 1.6.0) pins opcodes 6/7 + `stats().flushPasses`
61
+ exactly, with no devtools dependency: a B-write batch over K effects emits
62
+ exactly K op-7 enqueues (coalescing == 1.0x visible BEFORE any body runs),
63
+ 1000-burst linear accounting with zero drift, a D-stage cross-effect cascade
64
+ drains in exactly D passes with strict 7,6,7,6 alternation (the double-buffer
65
+ contract), a self-write takes one pass with no re-enqueue yet stays responsive
66
+ to external writes, the counter is FROZEN while no mutation hook is attached,
67
+ `destroy()` resets it, and the stat agrees with the op-6 count to the integer.
68
+ `BURST_BREAK=drop7` / `=ghost6` fault-injection self-tests prove the pins fire
69
+ (both exit 1). `contract-torture` adds the abnormal-path pins: a throwing
70
+ batch's finally-flush counts exactly ONE pass, and `CycleError` counts exactly
71
+ `maxFlushPasses` completed passes.
72
+
73
+ ### Added -- zero-GC scope lanes
74
+
75
+ `zerogc-torture` gains **churn-scope** (createScope adopt + cascade-dispose
76
+ churn under the sub-object retention floor + exact counters, with an in-loop
77
+ value check that crashes the lane on corruption instead of greenly measuring)
78
+ and **bounded-scope**, the zero-slack NODE twin of the link-graveyard witness:
79
+ `maxNodes:4` leaves nothing spare beyond the base signal, so the scope owner
80
+ node -- which no other churn lane covers -- plus the adopted computed+effect
81
+ must ALL recycle on the single disposer; 200,000 cycles with EXACT allocation
82
+ ledgers (3 per cycle). 56 asserts total; `ZEROGC_BREAK=1`/`=transient`
83
+ self-tests still exit 1.
84
+
85
+ ### Changed -- devtools pairing: lite-devtools 1.6.2 (burst tier LIVE)
86
+
87
+ devDependency `^1.2.0 -> ^1.6.2`; `test/25-devtools-real-boot` is rewritten
88
+ against the probed 1.6.2 x 1.6.0 ground truth: 22 function exports + the
89
+ `VERSION` const pinned, the FULL 13-key `capabilities()` fingerprint asserted
90
+ as an exact key set (`scopes:T burst:T statsKeys:14`, `flushControl:F
91
+ cleanupReturn:F` -- a silent capability drift now fails loudly),
92
+ `burstProfile()` is live and its stop()-summary is pinned exactly (a 3-write
93
+ batch = `passes:1, perPass:[1]`), and the 1.6.x `Symbol.dispose` stopper stamps
94
+ are asserted (`off[Symbol.dispose] === off`, `h[Symbol.dispose] === h.stop`).
95
+ The devtools zero-GC probe ports as `test/32` (canonical's test 31, renumbered
96
+ around this line's `31-config-validation`). `@zakkster/lite-gc-profiler` moves
97
+ `^1.15.0 -> ^1.16.0` with the per-scenario churn-floor refactor already carried
98
+ by the ported `zerogc-torture` (steady lanes still gate at exactly 0 B/call).
99
+
100
+ ### Added -- harness instruments + VersionMatrix lanes (canonical parity)
101
+
102
+ `harness/` gains the canonical attribution program: `visit-anatomy` (the
103
+ instrumented-engine structural-counter gate -- **all 21 exact pins hold on this
104
+ engine unchanged**, including the clean-short-circuit gate: 64 scHit/pull and
105
+ `depWalk == 0` on unrelated reads), `jit-health --strict` (all four handle
106
+ families MONOMORPHIC; deopt census baseline recorded for Node 26),
107
+ `creation-anatomy`/`costmodel`/`floors`/`trend`/`burst-real`, and the repaired
108
+ `creation-isolated`. VersionMatrix carries the calibrated read lane + the
109
+ exact-counter creation-churn lane (288 allocs/frame, 0 poolGrowths, zero
110
+ tolerance). Creation cost measured IDENTICAL to 1.5.0 (signal 27.2 vs 27.1
111
+ ns/op, signalBox 19.8 vs 19.9) -- the +19% cross-folder lead the trend
112
+ instrument flagged at beta-1 does not reproduce on this folder's own gate.
113
+
114
+ ### Fixed -- repo hygiene
115
+
116
+ - `test/28-scope.test.mjs` removed: byte-identical duplicate of `29-scope`
117
+ (collided with `28-run-with-owner`; inflated the suite by 4 tests).
118
+ - `test/zgc` positive control re-armed for Node 26: V8's adaptive/MinorMS
119
+ nursery absorbed the old 1-object-per-iter planted volume at 2 scavenges
120
+ (under the > MAX_SCAVENGES+3 budget) -- the meter still worked, it was
121
+ under-fed. Four fresh objects per iteration (~50 MB/run, mostly dropped)
122
+ restore a double-digit margin; negative control untouched. 7/7.
123
+ - `test:hardening` unbroken: the `test/ProfilerTests` sub-package it points at
124
+ now ships in-tree (ported from canonical).
125
+ - Stale `bench-reactive` script removed (its target was deleted at beta with
126
+ the bench-reactive-legacy deprecation; bench protocol v3 `mirror`/`sweep` is
127
+ the cross-framework instrument).
128
+ - Demos: both demos carry the 1.5.0-surface panels plus a new **v1.6 - scope**
129
+ control (createScope adopt/dispose with live readout; browser-verified, zero
130
+ console errors, exact node-count deltas). Non-shipping.
131
+
132
+ ### Verified (full ladder, this host, Node 26)
133
+
134
+ | gate | result |
135
+ | ---- | ------ |
136
+ | `npm test` / `test:gc` | 522/521/0 fail/1 skip · 530/529/0/1 |
137
+ | `npm run torture` | 27 registered: 23 pass, 4 legit skips, 0 fail |
138
+ | `TORTURE_WRAPAROUND=1` full-distance soak | PASS 12/12 (~51s) |
139
+ | `test:zgc` + `test:zgc:report` | 7/7 · ZERO-GC GATE PASS 3/3 |
140
+ | `test:hardening` / `test:harness` | 22/0/6 · 5/5 |
141
+ | `zerogc-torture` + both `ZEROGC_BREAK` modes | 56 asserts; both breaks exit 1 |
142
+ | `burst-profile-torture` + both `BURST_BREAK` modes | 26 asserts; both breaks exit 1 |
143
+ | `visit-anatomy --verify` | 21/21 exact pins |
144
+ | `jit-health --strict` | 4/4 monomorphic; baseline pinned |
145
+ | `npm run gate` (VersionMatrix pre-publish) | **GATE PASSED 5/5** vs floor 1.3.0 + rolling 1.5.0, same-host interleaved capture; creation counters exact (288 allocs/frame, 0 growths); per-workload sinks identical across all three versions |
146
+
147
+ ## [1.6.0-beta-1] -- 2026-08-20
148
+
149
+ Backports the **1.4.5 `createRegistry` input validation** (all four findings) onto
150
+ the 1.6.0-beta engine. Supersedes 1.6.0-beta. Only `createRegistry`'s *cold*
151
+ construction path changed -- the hot paths are byte-identical and the zero-GC gates
152
+ (`bench/torture/run.mjs` 22/22) are unchanged. If you had a typo in your registry
153
+ config, you will now hear about it.
154
+
155
+ ### Added -- createRegistry validates its config (fail closed)
156
+
157
+ - **Bounded eager construction.** `prealloc:"eager"` with a non-finite or absurd
158
+ capacity (`maxNodes:Infinity`, `maxNodes:1e9`) previously ran an unbounded
159
+ construction loop and killed the process with an **uncatchable SIGABRT**. It now
160
+ throws a `TypeError` **by name**, before allocating, gated on `(maxNodes+maxLinks)`
161
+ against a ceiling of `1<<24` (16,777,216) objects. `prealloc:"lazy"` keeps its
162
+ unbounded on-demand ledger, untouched.
163
+ - **Per-option validation by name.** `maxNodes` / `maxLinks` / `maxFlushPasses` must
164
+ be finite integers `>= 1`; `prealloc` must be exactly `"eager"` | `"lazy"`;
165
+ `onCapacityExceeded` must be exactly `"throw"` | `"grow"`. Each bad value throws a
166
+ `TypeError` prefixed `createRegistry: "<option>"` at construction -- not a delayed
167
+ internal `nextFree` TypeError on first use.
168
+ - **Config-shape gate.** A non-object, `null`, or array `config` throws
169
+ `createRegistry: "config"` rather than dying later.
170
+ - **Unknown-key rejection with did-you-mean.** An unrecognized key throws with a
171
+ Levenshtein suggestion (`maxNods` -> `maxNodes`, `preAlloc` -> `prealloc`) instead
172
+ of being silently ignored.
173
+ - **`stats()` gains `nodePoolPopulation` / `linkPoolPopulation`** -- the TRUE count
174
+ of physically constructed nodes/links, distinct from the `*Capacity` ledgers. A
175
+ silently mis-set `prealloc` is now observable (population 0 under lazy) instead of
176
+ telemetry-blind. **The one observable API change: `stats()` grows to 14 keys,
177
+ purely additive** -- no existing key changed; only an exact key-*count* assertion
178
+ is affected (updated in `test/03-pool.test.mjs`).
179
+
180
+ ### Tests
181
+
182
+ New `test/*-config-validation.test.mjs` adds the full config matrix, the did-you-mean
183
+ cases, the eager ceiling, the population contract, and the three OOM rows as isolated
184
+ child-process cases proving the fixed engine throws + exits 0 under a 256 MB cap where
185
+ the unvalidated engine died.
186
+
187
+ ## [1.6.0-beta] -- 2026-07-27
188
+
189
+ Promotes `1.6.0-alpha.0` to the `beta` dist-tag. The engine gains one behavioural
190
+ fix over alpha.0 -- the dangling re-tracking cursor crash below, which touches
191
+ `disposeNode` / `freeLink` -- plus 100% branch coverage and a completed torture
192
+ surface; `createScope`, the `flushPasses` stat, and the op-6 / op-7 mutation-hook
193
+ opcodes are carried forward from alpha.0 unchanged.
194
+
195
+ ### Added -- torture suite completed: `introspect-torture`, and `scope-torture` now runs
196
+
197
+ `bench/torture/run.mjs` now registers **22 scenarios (19 semantic + 3 soak)** --
198
+ full parity with the shipped 1.4.4 sibling, the forward-compatible superset
199
+ through 1.9. This is a **verification-only** parity pass: the engine
200
+ (`Signal.js` / `Signal.d.ts`) is **UNCHANGED** -- byte-identical shasum before
201
+ and after. Two changes matter on the 1.6.0 engine
202
+ specifically. First, **`scope-torture`** -- present but feature-skipped on
203
+ the 1.5.0 line -- now **executes**, since `createScope` exists: it fuzzes the
204
+ adoption contract (computeds/effects adopted, plain signals not; the
205
+ `signals + computeds + effects === activeNodes` invariant), the disposal-crash
206
+ repro and a 300-seed fuzz of it, `runWithOwner` re-attachment into a scope, and
207
+ pool balance over 200 scope rounds on a hard-ceiling registry. Second, a new
208
+ semantic scenario **`introspect-torture`** closes the one 1.6.0 gap the rest of
209
+ the suite left open: the read-only introspection surface
210
+ (`describe` / `nodeId` / `hasObservers` / `isTracking` /
211
+ `forEachObserver` / `forEachSource` / `forEachOwned` / `ownerOf` /
212
+ `observeObservers`) that lite-devtools and lite-studio build on. Because these
213
+ calls cannot corrupt a value, every value/wakeup/work oracle is blind to them --
214
+ so a wrong `hasObservers` or a `forEachSource` that skips a link is a silent
215
+ correctness bug in every tool that trusts it. It pins two load-bearing
216
+ properties: **walk agreement** (the source/observer walk must match the real edge
217
+ set and track dynamic rewiring, cross-checked against both the reference dep set
218
+ and the op-3/op-4 link lane) and **the ABA gen-stamp guard** (a descriptor
219
+ captured before a node is disposed and its slot recycled must resolve to nothing,
220
+ never the new resident -- the only scenario that catches this guard's removal).
221
+
222
+ Beyond `scope-torture` and `introspect-torture`, five further scenarios are
223
+ ported from the 1.4.4 sibling to close the parity gap: **`lifecycle-torture`**
224
+ (createRoot detachment + destroy registry reset), **`owner-torture`** (getOwner /
225
+ runWithOwner capture-restore, live-adoption cascade, and stale-handle ABA
226
+ degradation to rooted), **`error-torture`** (throwing effect bodies: per-effect
227
+ buffering, single re-throw vs `AggregateError`, and a 4096-cycle buffer drain),
228
+ **`deep-chain-torture`** (pullComputed recursion fail-closed with a `RangeError`
229
+ vs the iterative push path), and **`zerogc-torture`** (the zero-GC hot path made
230
+ falsifiable via `measureAllocs` / `measureOps` + `stats()` counters, with a
231
+ `ZEROGC_BREAK` self-test). Because 1.6.0 ships `createScope` / `getOwner` /
232
+ `runWithOwner` / `createRoot` **natively**, the owner/scope/createRoot scenarios
233
+ that SKIPPED on 1.4.4 (which lacks `createScope`) **run natively here** and passed
234
+ exactly as written -- no assertion needed pinning to a divergent behaviour; the
235
+ `churn-box` lane in `zerogc-torture` activates because `signalBox` exists. The
236
+ three soaks (`graph-fuzzer`, `scheduler-bench`, `torture-soak`) gain a
237
+ value-correctness oracle: a preallocated `Int32Array` shadow of every signal,
238
+ checked over a rotating window per tick and swept in full at teardown, alongside
239
+ the existing liveness assertions and the module-scoped int32 JIT sink.
240
+
241
+ Every scenario feature-detects and **skips cleanly** below the engine version
242
+ that introduces its feature, so on the 1.6.0 engine the runner executes **16
243
+ semantic** scenarios and reports a clean SKIP for the three later-version ones
244
+ (`flush-torture` 1.7.0, `cleanup-return-torture` 1.8.0, `dispose-torture` 1.9.0).
245
+
246
+ ### Changed -- test file numbering collision fixed
247
+
248
+ The new `createScope` unit file shipped as `test/28-scope.test.mjs`, colliding on
249
+ the `28-` prefix with `test/28-run-with-owner.test.mjs` (getOwner/runWithOwner).
250
+ It is renamed to `test/29-scope.test.mjs`. Both always ran under the
251
+ `test/*.test.mjs` glob; the rename only restores the one-file-per-number
252
+ convention.
253
+
254
+ A new unit file **`test/30-throwing-equals.test.mjs`** (numbered 30 -- 28 is
255
+ still occupied by both `28-run-with-owner` and the renamed history, and 29 is
256
+ taken) pins the behaviour of a user `equals` predicate that throws. It covers all
257
+ five physical `eq()` sites: the three callable sites (signal set pre-check
258
+ :1105, batch-revert check :1112, computed re-eval :986) with a contrast
259
+ anti-tautology test, plus the two `signalBox` boxSet sites (pre-check :1210,
260
+ revert :1217) -- confirmed to behave identically to the callable path.
261
+
262
+ ### Verified -- full suite green on the 1.6.0 engine (Node 22, `--expose-gc`)
263
+
264
+ - **Torture:** 22/22 -- `torture:semantic` 19/19 (16 executed, 3 clean skips),
265
+ `torture:soak` 3/3 (zero errors, value oracle clean, every pool back to its
266
+ leaf-only floor).
267
+ - **Unit:** 472 tests, 471 pass, 0 fail, 1 skip (the architectural SSR N/A in
268
+ `17-reactivity`), measured with the sibling `@zakkster/lite-devtools` resolvable
269
+ so the 10-test `test/25-devtools-real-boot` real-rig runs. The +9 over the
270
+ previous cut is the new `test/30-throwing-equals.test.mjs` (throwing-`equals`
271
+ site audit). Without the devtools sibling the 10 real-boot tests do not pass;
272
+ that rig is the only sibling-dependent surface.
273
+
274
+ ### Removed -- `bench-reactive-legacy` (deprecated in 1.5.0)
275
+
276
+ The pre-v3 five-framework reactivity suite is removed, per the 1.5.0 deprecation
277
+ (one-release window through 1.5.1). Cross-framework standing comes from the bench
278
+ protocol v3 **mirror** (`bench/mirror.mjs --self-verify` + `bench/sweep.mjs`).
279
+
280
+ ### Changed -- bench protocol v3 (carried forward)
281
+
282
+ The `bench/` harness is bench protocol v3: three instruments (microscope / mirror /
283
+ version-economics), each with a fixed config and a machine-generated `#STAMP`
284
+ (engine + harness sha256, live registry config, host, node). See `bench/README.md`.
285
+
286
+ ### Added -- Coveralls coverage badge
287
+
288
+ README carries a Coveralls badge; lcov is produced by `npm run test:report`
289
+ (`coveralls-next` in devDependencies).
290
+
291
+
292
+ ### Fixed -- dangling re-tracking cursor on source disposal (crash)
293
+
294
+ Disposing a signal/computed from inside an observer that had linked it on the
295
+ previous run, but had not yet re-read it on the current run, crashed with
296
+ `TypeError: Cannot set properties of null (setting 'headSub')`. `disposeNode`'s
297
+ sub-list teardown freed the link while the observer's re-tracking cursor
298
+ (`activeObserverCurrentDep`) was still parked on it; `severTail` then walked from
299
+ a freed link, wiped the observer's `headDep`, and double-freed the link. Reachable
300
+ from the plain public API (see `COVERAGE-NOTES.md` for the repro). Fixed with a
301
+ one-line cursor repair in `disposeNode` (advance the cursor to the next surviving
302
+ dep before the free); O(1), disposal path only, no steady-state cost. The now-dead
303
+ `freeLink` `-1` defensive ternaries were removed with it. Pinned by a regression
304
+ test in `test/12-coverage.test.mjs`.
305
+
306
+ **Hot-path parity note:** this touches `disposeNode` and `freeLink`, so their
307
+ sha256 no longer matches the `1.6.0-alpha.0` baseline. The steady-state read /
308
+ propagation bodies (`pullComputed`, `markDownstream`, `executeEffect`,
309
+ `flushEffects`, `allocateLink`, `severTail`, `createNode`, `runCleanup`) are
310
+ unchanged. Re-baseline the VersionMatrix engine sha256 on the next publish.
311
+
312
+ ### Changed -- branch coverage closed to 100%
313
+
314
+ Branch coverage on `Signal.js` went `96.96% -> 100%`. The gap the `1.6.0-alpha.0`
315
+ notes described -- the hook-attached side of the new op-6 / op-7 gates, which the
316
+ active suite never exercised because it never attached a hook -- is now closed by
317
+ a test that attaches a mutation hook and asserts both opcodes fire on the flush
318
+ path. Alongside it: the three reachable branches ported from the 1.4.0-rc pass
319
+ (`allocateLink` dead-target, `executeEffect` scheduler re-entrancy, `computed`
320
+ stale-handle read), the 1.5.0 box + owner surface (box stale-handle guards,
321
+ `computedBox` `equals`, top-level `getOwner` / `runWithOwner`), and the two
322
+ provably-unreachable clamps (link-ledger, `batchEpoch` wraparound) now carrying
323
+ `/* c8 ignore */` with proofs. See `COVERAGE-NOTES.md`; reconfirm under codify.
324
+
325
+ ## [1.6.0-alpha.0] -- 2026-07-XX
326
+
327
+ The observability-and-lifecycle minor, shipping on the `alpha` dist-tag while it
328
+ settles. Three additions: `stats()` gains a twelfth key, **`flushPasses`**, plus two
11
329
  flush-profiling mutation-hook opcodes -- the flush/recompute dimension
12
- lite-devtools 1.2 / lite-studio 1.2 read through `watchAllocations`; and
13
- **`createScope(fn)`** (landed in `preview.0`), the disposable-owner counterpart to
14
- `createRoot` that a keyed-list / scene reconciler needs for per-item teardown.
15
- Drop-in over 1.5.0: the callable API and hot paths are unchanged, and the new
16
- instrumentation is frozen and zero-cost unless a mutation-hook listener is attached.
330
+ lite-devtools 1.2 / lite-studio 1.2 read through `watchAllocations`;
331
+ **`createScope(fn)`**, the disposable-owner counterpart to
332
+ `createRoot` that a keyed-list / scene reconciler needs for per-item teardown;
333
+ and **`getOwner` / `runWithOwner`** carried forward from 1.5.0-beta.2 as the
334
+ capture-and-restore companion to `createRoot`. The engine hot path is **no
335
+ longer byte-identical to 1.5** for the first time since 1.2.2 -- `markDownstream`
336
+ and `flushEffects` picked up hook-gated fires for the two new opcodes -- but
337
+ the gate is a single branch-predicted `null` check per fire site and the
338
+ observable cost only shows on the cheapest propagation shapes (KAIROS, DEEP
339
+ CHAIN); the wide-aggregation and dynamic-DAG wins are unchanged. Drop-in over
340
+ 1.5.1-beta.1.
17
341
 
18
342
  ### Added -- `flushPasses` on `stats()` + flush-profiling opcodes
19
343
 
@@ -26,12 +350,25 @@ the flush dimension:
26
350
 
27
351
  Both the counter bump and the opcode dispatch sit behind the existing
28
352
  `if (mutationHook !== null)` gate, so when no profiler is attached they are inert:
29
- `flushPasses` is frozen and the flush loop is byte-identical to 1.5.0. This is what
30
- lets `watchAllocations` chart recompute/flush activity alongside the 1.4.0
31
- allocation counters (`totalAllocations` / `poolGrowths` / `totalDisposals`), which
32
- remain available from 1.4.0 on every engine -- only the flush series requires 1.6.
33
-
34
- ### Added -- `createScope(fn)` (disposable owner scope) [preview.0]
353
+ `flushPasses` is frozen and the flush loop is byte-identical to 1.5.0 EXCEPT for
354
+ the added `null` check itself. The residual cost is one branch-predicted `null`
355
+ check per fire site (per pass in `flushEffects`, per enqueued dirty subscriber
356
+ in `markDownstream`'s inner loop). Measurable on the very cheapest propagation
357
+ shapes where every iteration matters -- KAIROS moves from -7% -> -12% vs alien
358
+ on the 1.6.0-alpha sweep, DEEP CHAIN from -14% -> -21% -- and invisible on the
359
+ allocation-dominated shapes where the ratio of pool retracking to marker walks
360
+ favors lite by orders of magnitude (SELECTIVE DAG +49%, DYNAMIC DAG +43%, MUX
361
+ +35%, SMALL SELECTIVE +29% -- all unchanged from the 1.5.0-beta sweep). When a
362
+ profiler is actually attached the observable becomes the profiler's own cost and
363
+ the gate itself disappears from the picture. This is what lets `watchAllocations`
364
+ chart recompute/flush activity alongside the 1.4.0 allocation counters
365
+ (`totalAllocations` / `poolGrowths` / `totalDisposals`), which remain available
366
+ from 1.4.0 on every engine -- only the flush series requires 1.6.
367
+
368
+ The `03-pool` test for the `stats()` shape is bumped from "11-key 1.4.0 shape"
369
+ to "12-key 1.6 shape" with `flushPasses` in the expected key list.
370
+
371
+ ### Added -- `createScope(fn)` (disposable owner scope)
35
372
 
36
373
  `createScope` runs `fn(dispose)` in a detached scope and returns whatever `fn`
37
374
  returns, having handed `fn` a single `dispose` that **cascade-disposes every effect
@@ -64,26 +401,69 @@ pure-owner node transparently.
64
401
  Exported as a registry method and a top-level helper bound to the default registry,
65
402
  mirroring `createRoot`.
66
403
 
404
+ ### Added -- `getOwner` / `runWithOwner` (carried forward from 1.5.0-beta.2)
405
+
406
+ The re-attach companion to `createRoot`, ported forward from 1.5.0-beta.2
407
+ unchanged. `getOwner()` returns the current owner as an **opaque, gen-stamped
408
+ handle** (or `undefined` outside any effect/computed body); `runWithOwner(handle,
409
+ fn)` runs `fn` with the captured lifecycle scope reinstated so effects/computeds
410
+ created directly in `fn` are adopted by that owner. Nulls the tracking observer
411
+ for the duration of `fn` (same pairing as `createRoot`) so accidental cross-async
412
+ edges cannot form.
413
+
414
+ Handles are gen-stamped (the same `NODE_GEN` ABA-guard machinery
415
+ `describe` / `nodeId` / `forEachOwned` / `ownerOf` have used since 1.2.1) --
416
+ safe to hold across async boundaries. If the captured owner is disposed and
417
+ its pool slot recycled by an unrelated effect via the LIFO free list, the gen
418
+ no longer matches and `runWithOwner` degrades to **rooted execution** rather
419
+ than corrupting the graph. Two hazards on the raw-pointer alternative were
420
+ empirically reproduced against a 1.5.0-beta engine patched with the naive
421
+ implementation (`harness/owner-hazard-repro.mjs`) and are pinned in
422
+ `test/28-run-with-owner.test.mjs`:
423
+
424
+ - **Recycled-slot cascade death** -- capture, dispose owner, allocate a stranger
425
+ effect that reuses the slot, `runWithOwner(captured)` silently adopts
426
+ continuation into the stranger, stranger's re-run cascade-disposes it.
427
+ - **Corpse adoption = engine crash** -- capture, dispose owner but not-yet-
428
+ recycled, `runWithOwner(captured, () => effect(...))` splices a child into
429
+ a disposed owner's `firstOwned` and the next disposal walk recurses without
430
+ termination (`RangeError: Maximum call stack size exceeded`).
431
+
432
+ Both fail on the raw-pointer sketch; both pass on the shipped `describeNode` /
433
+ `liveNode` implementation. Test coverage: 16 tests in `test/28-run-with-owner`
434
+ (basic shape, degradation, and the three hazard pins with allocation pressure
435
+ applied so the ABA guard is genuinely exercised).
436
+
437
+ Exported as registry methods and top-level helpers, mirroring `createRoot` /
438
+ `createScope`.
439
+
67
440
  ### Added -- characterization harnesses (`burst-dag.mjs`, `pull-stress.mjs`)
68
441
 
69
- Two root-level standalone harnesses that exercise the new 1.6.0 instrumentation
70
- surface against the engine's two main hot paths. Both are engine-agnostic
71
- (`./Signal.js` + public `onGraphMutation` only), both expose a CLI + module
72
- exports, both stay out of `npm test` and the published tarball.
73
-
74
- **`burst-dag.mjs`** (`npm run profile:burst`, also `node --expose-gc burst-dag.mjs
75
- [--width=512 --layers=32 ...]`) reconstructs the published
76
- `js-reactivity-benchmark` burst shape (sources -> width x layers, fanIn 8, burst
77
- 16) and characterizes lite-signal's own flush behavior. The standalone path uses
78
- the new `stats().flushPasses` counter as a cross-check against the opcode-6 pass
79
- count -- by construction they must match when the hook is attached for exactly
80
- one burst, which the harness asserts inline. Also exports `burstDagScenario`
81
- (for plugging into a steady-state allocation gate) and `multiPassProbe` (a
82
- controlled two-effect write-back that forces a `passes > 1` case so the opcode
83
- dispatch can be smoke-tested on an engine where multi-pass actually occurs).
442
+ Two standalone harnesses in `harness/` that exercise the new 1.6.0 instrumentation
443
+ surface against the engine's hot paths, both consuming public `onGraphMutation`
444
+ (opcodes 5/6/7) and both staying out of `npm test` and the published tarball.
445
+ `pull-stress.mjs` imports `../Signal.js` and exposes a CLI + module exports;
446
+ `burst-dag.mjs` takes the engine path as an argument and is CLI-only.
447
+
448
+ **`burst-dag.mjs`** (`npm run profile:burst`, also `node --expose-gc
449
+ harness/burst-dag.mjs <Signal.js>`) reproduces Andrii's actual generator: the
450
+ layer edges use his **verbatim strided picker** (`base = (node*13 + layer*17) %
451
+ prevW`, strided step), `staticFraction = 1` (all-static computeds, per-batch pull
452
+ reads, no effects) -- the real `layered burst flush warm` shape. It runs that
453
+ head-to-head against the earlier contiguous-window guess it embeds and reports
454
+ structure (passes/burst, recomputed, maxRecompute/node, poolGrowths) plus median
455
+ us/burst for each. On 1.6.0-alpha the strided real topology recomputes ~2x the
456
+ nodes (15928 vs 8120) at ~26% higher us/burst, both with `passes = 0` (pure pull,
457
+ nothing to flush) and `maxRecompute/node = 1`: no redundant work either way, so
458
+ the ~2x gap is **locality** on the correct topology. This resolves the ROADMAP S5
459
+ open question (was the contiguous guess faithful to Andrii's generator?). The
460
+ earlier contiguous version -- with its `--width` / `--layers` CLI and its
461
+ `burstDagScenario` / `multiPassProbe` exports for the zero-GC gate -- is archived
462
+ as `harness/attic/burst-dag.mjs`; nothing mounted those exports, so retiring it
463
+ is inert.
84
464
 
85
465
  **`pull-stress.mjs`** (`npm run profile:pull`, also `node --expose-gc
86
- pull-stress.mjs [--maxDepth=3584 --step=512 ...]`) is the pull-path companion:
466
+ harness/pull-stress.mjs [--maxDepth=3584 --step=512 ...]`) is the pull-path companion:
87
467
  characterizes how the recursive pull scales with chain depth and binary-searches
88
468
  the exact overflow point. Three answers per run: (1) the exact deepest chain
89
469
  that pulls successfully (the roadmap's "~5,000 chained computeds" pinned to a
@@ -99,24 +479,32 @@ supported and surface a real engine difference (box pulls overflow earlier
99
479
  because `box.get()` adds a prototype-method frame per level, and cached box
100
480
  reads are several times more expensive than cached callable reads).
101
481
 
102
- Both files import only `./Signal.js`, so the same harness runs against any
103
- engine build: point `Signal.js` at 1.5.x to compare without the counters
104
- (`burst-dag` adapts -- only opcode 5 fires on that engine -- and `pull-stress`
105
- works identically), or at a rejected candidate to re-verify on. The numbers
106
- they produce are reproducible, comparable, and engine-version-aware.
482
+ `pull-stress` imports only `../Signal.js`, and `burst-dag` takes the engine path
483
+ as an argument, so both run against any engine build: point them at 1.5.x to
484
+ compare without the new counters (`burst-dag` adapts -- only opcode 5 fires on
485
+ that engine, so `passes` reads 0 -- and `pull-stress` works identically), or at a
486
+ rejected candidate to re-verify on. The numbers they produce are reproducible,
487
+ comparable, and engine-version-aware.
107
488
 
108
489
  ### Verified
109
490
 
110
- - **Full suite green** against the 1.6.0 engine: 443 tests, 442 pass, 0 fail,
111
- 1 skip (only the architecturally-N/A SSR case in `17-reactivity`). +4
112
- `createScope` tests in `test/28-scope_test.mjs`; the 1.5.0 box and createRoot
113
- suites carry forward unchanged. **Coverage** (c8@11, Node 22): `Signal.js`
114
- 100% statements / 96.96% branches / 100% functions / 100% lines; `Watch.js`
115
- 100% across all four. The branch drop vs 1.5.0 (97.35% -> 96.96%) is the
116
- zero-cost gate on `flushPasses` / opcode 6 / opcode 7 -- the
117
- `if (mutationHook !== null)` mutation-hook-attached branch is not exercised
118
- by the active test suite, which never attaches a hook; the inert path is
119
- covered.
491
+ - **Full suite green** against the 1.6.0-alpha engine (getOwner + runWithOwner
492
+ merged in from 1.5.0-beta.2): **447 tests**, 436 pass, 0 fail, 1 skip
493
+ (only the architecturally-N/A SSR case in `17-reactivity`), 10 cancelled
494
+ (the `25-devtools-real-boot` cases that need `@zakkster/lite-devtools`
495
+ installed as a peer -- pre-existing, unrelated to any 1.6 change). +4
496
+ `createScope` tests in `test/28-scope_test.mjs`; +16 `getOwner` /
497
+ `runWithOwner` tests in `test/28-run-with-owner.test.mjs` (basic shape,
498
+ degradation, and the three hazard pins -- recycled-slot cascade / corpse
499
+ adoption / composed with allocation pressure); the 1.5.0 box and createRoot
500
+ suites carry forward unchanged. `test/03-pool` "stats() shape" test
501
+ updated from the 11-key 1.4.0 shape to the 12-key 1.6 shape (adds
502
+ `flushPasses`). **Coverage** (c8@11, Node 22): `Signal.js` 100% statements /
503
+ 96.96% branches / 100% functions / 100% lines; `Watch.js` 100% across all
504
+ four. The branch drop vs 1.5.0 (97.35% -> 96.96%) is the zero-cost gate on
505
+ `flushPasses` / opcode 6 / opcode 7 -- the `if (mutationHook !== null)`
506
+ mutation-hook-attached branch is not exercised by the active test suite,
507
+ which never attaches a hook; the inert path is covered.
120
508
  - **`createScope` behavior** (4 tests, `node --expose-gc`): returns `fn`'s value and
121
509
  runs the owner exactly once even when `fn` reads signals in its direct body
122
510
  (untracked); inner effects/computeds track and update; `dispose()` cascade-disposes
@@ -127,11 +515,141 @@ they produce are reproducible, comparable, and engine-version-aware.
127
515
  introspection-stamped to its owner effect; and `totalAllocations - totalDisposals
128
516
  === activeNodes` holds after teardown. Plus a smoke confirming signal -> computed ->
129
517
  effect is unaffected by the additive change.
518
+ - **`getOwner` / `runWithOwner` port**: sha256 over the extracted function bodies of
519
+ `pullComputed`, `executeEffect`, `allocateLink`, `severTail`, `createNode`,
520
+ `runCleanup`, `disposeNode`, `createRoot`, `createScope` matches the pristine
521
+ 1.6.0-alpha engine byte-for-byte -- port touched no hot path. `Publications/
522
+ owner-hazard-repro.mjs` reports **`VERDICT: SAFE`** on the merged engine on both
523
+ hazards (continuation runs 2 times before stranger disposal, 3 after; corpse
524
+ case runs 2 without `RangeError`).
130
525
  - **Instrumentation is zero-cost when unobserved**: `flushPasses` advances and opcodes
131
- 6/7 fire only while a mutation-hook listener is attached; with none, the flush path
132
- is unchanged from 1.5.0.
133
-
134
-
526
+ 6/7 fire only while a mutation-hook listener is attached; with none, the two hook
527
+ fire sites are pure `null`-check branches (branch-predicted-free after warmup).
528
+
529
+ ### Verified -- fresh 1.6.0-alpha bench sweep (dual-host: Apple M4 Pro + 2016 Intel MacBook)
530
+
531
+ Both v3 instruments were re-run in full on the 1.6.0-alpha engine on **two hosts**:
532
+ the current authoritative machine **Apple M4 Pro darwin/arm64, Node 26.3.1** (with
533
+ `#STAMP`-verified outputs committed to `bench/r.txt` -- microscope aggregate, 4
534
+ engines across the six first-party shapes -- and `bench/rb.txt` -- mirror sweep,
535
+ Andrii's canonical adapter verbatim, lite vs alien across 47 rows, isolated-per-row,
536
+ 10 reps) and the older reference host **2016 Intel MacBook Pro, Node 22** (kept
537
+ sweep-over-sweep for cross-host reference; `bench/results.txt` propagation, 9
538
+ scenarios, and `bench/resultsReactive.txt` cross-framework reactivity, median-of-10,
539
+ 34 tests -- the 10 raw reactive-suite runs sit under `bench/bench-runs-reactive/
540
+ run_1.txt` ... `run_10.txt` so anyone can re-median independently). The M4 Pro host
541
+ has a lower run-to-run noise floor than the Intel host, so the sub-percent parity
542
+ band tightens; conversely the Intel host makes small branch-cost swings visible
543
+ that the M4 Pro's frontend absorbs.
544
+
545
+ - **Microscope aggregate on M4 Pro (r.txt):** on the six v3 microscope shapes, lite
546
+ wins vs alien on **MUX +35.3%** (fan-in), **SELECTIVE DAG +20.6%**, **DYNAMIC DAG
547
+ +17.7%**, and -- new this sweep -- **BROADCAST +12.0%** (flipped from -1.2%
548
+ parity on 1.5.0-beta; fan-out is now a fourth speed win). The three allocation-
549
+ heavy wins hold their 1.5.0-beta M4 Pro magnitudes within noise because the
550
+ mutation-hook gate is round-off relative to per-iteration retracking work.
551
+ **KAIROS narrowed from -15.7% to -9.9%** -- the exact opposite of what the Intel
552
+ host shows for the same engine, which is what you would expect if branch
553
+ prediction on the M4's frontend is absorbing the two hook-gate `null` checks
554
+ completely. DEEP CHAIN stays firmly in alien's column at -73.8% (the
555
+ architectural weak spot the honest framing has always named: recursive JS-stack
556
+ computed resolution against a flat chain). Speed wins vs alien: **4/6** (was
557
+ 3/6 on 1.5.0-beta); heap wins: **5/6** with the sixth being a shared-zero on
558
+ BROADCAST.
559
+ - **Propagation bench on Intel (results.txt):** lite +49% / +43% / +35% / +29% on
560
+ the four allocation-heavy scenarios (SELECTIVE DAG / DYNAMIC DAG / MUX / SMALL
561
+ SELECTIVE) -- unchanged in character from the 1.5.0-beta Intel sweep, confirming
562
+ the gate is round-off on allocation-dominated shapes. Parity on LARGE WEB APP
563
+ (-3%) and WIDE DENSE (-6%), inside host noise. **Alien-signals ahead on
564
+ BROADCAST (-10%), KAIROS (-12%, was -7% on 1.5.0-beta), and DEEP CHAIN (-21%,
565
+ was -14% on 1.5.0-beta)** -- the KAIROS and DEEP CHAIN widening IS the observable
566
+ gate cost on this slower host, one predicted `null` check per inner-loop
567
+ iteration on shapes that iterate 1000-25000 times per rep. That the same
568
+ engine reads KAIROS -12% on Intel and -9.9% on M4 Pro is not a contradiction;
569
+ it is what a cross-host branch-cost artifact looks like when only one of the two
570
+ frontends can hide it. Speed wins vs alien on Intel: **4/9** (was 5/9); heap
571
+ wins: **8/9** (unchanged).
572
+ - **Microscope heap (the actual story) on M4 Pro:** on every shape where GC
573
+ pressure exists at all, lite allocates **one to four orders of magnitude less
574
+ transient heap than alien** -- DEEP CHAIN 0.5 KB vs 1062 KB (>2000x, on the
575
+ shape lite loses on time), MUX 0 KB vs 781 KB, KAIROS 23 KB vs 802 KB (34.3x),
576
+ DYNAMIC DAG 3.4 MB vs 60.0 MB (17.9x), SELECTIVE DAG 7.6 MB vs 78.2 MB (10.3x).
577
+ Against preact-signals and solid-signals the heap gap is even wider on the
578
+ fan-in / fan-out family; solid allocates ~17 MB on MUX and ~15 MB on SELECTIVE
579
+ DAG where lite allocates 0 KB and 7.6 MB on the same shapes. The
580
+ differentiated position is ALLOCATION, not raw propagation speed --
581
+ competitive-to-winning throughput with dramatically lower GC pressure, and
582
+ that is the headline that reproduces across hosts.
583
+ - **Mirror sweep on M4 Pro (rb.txt):** Andrii's canonical 47-shape suite re-run
584
+ isolated-per-row lite vs alien on M4 Pro reproduces the same honest framing:
585
+ lite runs **parity-to-behind alien on throughput** across the suite (wins
586
+ outright on **5/47** -- `1000x5 - 25 sources (wide dense)` +12.2%,
587
+ `manySourcesIntoOneComputedEffectWithDirect` +31.8%,
588
+ `manySourcesIntoOneComputedEffect` +31.4%, `molBench` +1.0% (new this sweep),
589
+ and `createComputations4to1` +9.5%; up from 4/47 on 1.5.0-beta), weak on the
590
+ deep/layered-burst family. Every row carries a `#STAMP` and the counters
591
+ (`nodesRecomputed` / `edgesTraversed` / `sinkReads`) match Andrii's published
592
+ suite exactly (`mirror.mjs --self-verify`), so a lite-vs-alien delta here is
593
+ identical work, not DCE.
594
+ - **Reactive suite on Intel (resultsReactive.txt):** fastest of five frameworks
595
+ on all five `dyn` rows (simple +19%, dynamic +13%, large web app +11%, wide
596
+ dense +4%, deep +16%). On the `S: updateComputations` micro-rows lite trades
597
+ the lead with alien: **4/7 wins this sweep** (was 7/7 on 1.5.0-beta),
598
+ consistent with the gate cost on 50-70ms rows that iterate many thousands of
599
+ times per measurement on the Intel host.
600
+ - **Andrii Volynets js-reactivity-benchmark position holds at 4th of 15** with
601
+ geomean **73.1ms** (raw log `bench/AndriiVolynetsReactiveBench.log`, all 15
602
+ x 47 rows); lite is ahead of 5th-place Preact Signals (79.9) by ~9%.
603
+ Outright-fastest-of-15 wins jumped to **6 shapes**: `broadPropagation`,
604
+ `manyEffectsFromOneSource`, `manySourcesIntoOneComputedEffect`,
605
+ `manySourcesIntoOneComputedEffectWithDirect`, `molBench`, and the `32x8 - 4
606
+ sources - pull` DAG. Top-3 count: 23/47. (Outright wins swing at the top of
607
+ a very tight leaderboard; the stable metric across every sweep is the
608
+ geomean rank at 4th of 15.)
609
+ - **Third-party engine versions carried forward** from the 1.5.0-beta sweep
610
+ (alien-signals 3.2.1, @preact/signals-core 1.14.2, @vue/reactivity 3.5.35,
611
+ solid-js 1.9.13). No peer bumps this cycle -- the deltas here are the 1.6
612
+ engine's own footprint plus host noise.
613
+
614
+ ### Tooling -- harness reorganization (no published-surface change)
615
+
616
+ The loose `harness/` probes are routed through a single dispatcher
617
+ (`harness/run.mjs`) and exposed as npm scripts: `harness:field`,
618
+ `harness:dispose`, `harness:churn`, `harness:owner`, `harness:creation`, and
619
+ `harness:all` (field + dispose + churn in sequence). `harness:field` is the
620
+ portable fieldkit verify + cold-child A/B bench; the rest map one-to-one to the
621
+ existing probe files. Paths resolve from the dispatcher, so the working
622
+ directory no longer matters.
623
+
624
+ - **`churnprobe.mjs` corrected.** It read link churn from `stats().totalLink*`
625
+ fields that never existed on this engine (`stats()` tracks only NODE lifecycle
626
+ plus a live `activeLinks` gauge), so every row printed `NaN`. It now counts
627
+ gross link churn off `onGraphMutation` -- opcode `3` (link-add) and `4`
628
+ (link-sever) -- which is strictly better: a net `activeLinks` delta would read
629
+ zero on `dep-flip` because each sever is matched by an add, hiding exactly the
630
+ retracking the probe exists to catch. Stable shapes now read `churn/recompute
631
+ = 0`; `dep-flip` reads `2.0`. Opcodes `3`/`4`/`5` are unchanged from 1.5; the
632
+ probe does not use the new `6`/`7` flush opcodes.
633
+ - **`burst-dag.mjs` reconciled.** The contiguous-window guess was first promoted
634
+ from `futureVersions/` into `harness/` (wiring up the `profile:burst` script
635
+ that already pointed there), then superseded by the verbatim-Andrii strided
636
+ reconciliation now carrying that name (see Added above); the contiguous guess
637
+ and its `burstDagScenario` / `multiPassProbe` exports are preserved in
638
+ `harness/attic/`. `pull-stress.mjs` -- the pull-path companion documented
639
+ alongside it -- landed in `harness/`.
640
+ - **The owner-recycling reproducer** is documented at its real home,
641
+ `harness/owner-hazard-repro.mjs`; the earlier `Publications/...` citations
642
+ in README / CHANGELOG / llms.txt pointed at a path the file was never in, and
643
+ are corrected. The createComputations matrix parent/child link
644
+ (`creation-isolated.mjs` -> `andrii-isolated-child.mjs`) is repaired.
645
+ - **Six settled one-off probes** -- the five from the 1.2.0 -> 1.2.1
646
+ construction-shape regression hunt, plus the superseded
647
+ `repro-set-after-dispose.mjs` (its invariant now pinned by `test/07-dispose`
648
+ and `test/26-free-list-invariant`) -- are parked in `harness/attic/` with a
649
+ README explaining each.
650
+
651
+ `Signal.js` and the published `files[]` whitelist are untouched by any of the
652
+ above; this is a repo-tooling change only.
135
653
 
136
654
  ## [1.5.0] -- 2026-06-XX
137
655
 
@@ -194,13 +712,17 @@ dependency and updates correctly; a `computedBox` that reads a callable
194
712
  the introspection surface all apply uniformly -- a box node is indistinguishable
195
713
  from a callable node to the graph, the owner tree, and devtools.
196
714
 
197
- ### Added -- `test/24-signalbox_test.mjs` activated (9 tests)
715
+ ### Added -- `test/24-signalbox_test.mjs` activated (12 tests)
198
716
 
199
717
  The suite that was committed-but-skipped since 1.3.0 now runs against the real
200
- implementation: box get/set/peek/update, computedBox derive + memoize,
201
- peek-does-not-track, subscribe fires-and-untracks, box<->callable interop both
202
- directions, batch coalescing across boxes, dispose stopping updates with
203
- ABA-safety, and the `equals` short-circuit. All 9 pass.
718
+ implementation. The 9 originally-staged tests cover box get/set/peek/update,
719
+ computedBox derive + memoize, peek-does-not-track, subscribe fires-and-untracks,
720
+ box<->callable interop both directions, batch coalescing across boxes, dispose
721
+ stopping updates with ABA-safety, and the `equals` short-circuit. The 3
722
+ box-coverage additions for 1.5.0 cover `computedBox.peek` (track-free read on
723
+ the derived shape), the set-then-revert net no-op in a batch (pre-batch revert
724
+ applies to box writes too), and the top-level `signalBox` / `computedBox`
725
+ helpers binding to the default registry with full callable interop. All 12 pass.
204
726
 
205
727
  ### Added -- `createRoot(fn)` (ownership escape hatch)
206
728
 
@@ -237,11 +759,13 @@ query-watcher being the first in the ecosystem. Those consumers wrap the spawn i
237
759
  `createRoot(() => effect(...))` and dispose it themselves; the watcher then
238
760
  survives consumer re-runs.
239
761
 
762
+ ### Verified
240
763
 
241
764
  - **Full suite green** against the 1.5.0 engine: 439 tests, 438 pass, 0 fail,
242
765
  1 skip (only the architecturally-N/A SSR case in `17-reactivity`; the 9
243
- `24-signalbox` tests are now active, +6 `createRoot` tests in
244
- `test/27-create-root_test.mjs`, +3 box-coverage tests). **Coverage** (c8@11,
766
+ `24-signalbox` tests are now active and the suite carries +3 box-coverage
767
+ additions for a 12-test file, +7 `createRoot` tests in
768
+ `test/27-create-root_test.mjs`). **Coverage** (c8@11,
245
769
  Node 22): `Signal.js` 100% statements / 97.35% branches / 100% functions / 100%
246
770
  lines; `Watch.js` 100% across all four.
247
771
  - **Box hot path is zero-GC**: 200,000 writes through a 256-wide box graph,
@@ -262,7 +786,60 @@ survives consumer re-runs.
262
786
  cleanly -- detachment costs no auto-cleanup but introduces no leak. Verified
263
787
  against the exact lazy-watcher pattern `lite-query` uses.
264
788
 
265
-
789
+ ### Added -- VersionMatrix identical-code guard (harness/VersionMatrix/)
790
+
791
+ The regression gate (`harness/VersionMatrix/`, wired into `prepublishOnly` since
792
+ 1.4.0) gains an **identical-code guard**: each capture records the sha256 of the
793
+ engine source (`baselines/<label>/engine.sha256`). If the candidate's hash matches
794
+ a baseline's, that axis is running the *same bytes* -- any measured delta is host
795
+ noise, not a regression -- so the gate marks it `SKIP` rather than let variance
796
+ flag a phantom. This is what saves you when you re-version without a code change:
797
+ a `1.5.0-beta.0` that is byte-identical to a published `1.5.0-alpha.1` cannot
798
+ regress against it, and the gate says so structurally instead of failing on a
799
+ noisy median. Genuine code changes produce a different hash and are gated
800
+ normally. Everything else about the harness -- cold-process-per-version,
801
+ LCG-deterministic input, two baselines (floor `1.3.0` + rolling), calibrated
802
+ tolerances (`frame.avg` 5% rolling / 10% floor, `frame.p99` and `phase.write.p99`
803
+ 18% / 30%), four workloads mapping to public bench claims -- carries forward
804
+ from 1.4.0. Details in `harness/VersionMatrix/README.md`.
805
+
806
+ ### Verified -- fresh 1.5.0-beta bench sweep
807
+
808
+ Both benches were re-run in full on the 1.5.0-beta engine and their outputs
809
+ committed to `bench/results.txt` (isolated propagation, 9 scenarios) and
810
+ `bench/resultsReactive.txt` (cross-framework reactivity, median-of-10, 34
811
+ tests). The 10 raw reactive-suite runs sit under `bench/bench-runs-reactive/
812
+ run_1.txt` ... `run_10.txt` so anyone can re-median independently.
813
+
814
+ - **Propagation bench (results.txt):** lite +48% / +45% / +33% / +29% on the four
815
+ allocation-heavy scenarios (SELECTIVE DAG / DYNAMIC DAG / MUX / SMALL
816
+ SELECTIVE); **LARGE WEB APP flipped into a small lite win (+2%, from -3% on
817
+ 1.4.0)** after the alien-signals 3.1.2 -> 3.2.1 bump between sweeps; parity on
818
+ WIDE DENSE (-6%) and KAIROS (-7%); alien ahead on BROADCAST (-12%) and DEEP
819
+ CHAIN (-14%, narrowed from -29% on 1.4.0 for the same alien-version reason
820
+ -- lite's DEEP CHAIN barely moved, 395 -> 398ms). Speed wins vs alien: **5/9**
821
+ (was 4/9); heap wins: 8/9.
822
+ - **Reactive suite (resultsReactive.txt):** fastest of five frameworks on all
823
+ five `dyn` rows (simple +19%, dynamic +16%, large web app +9%, wide dense +6%,
824
+ deep +12%), and **lite now leads alien on ALL 7 `S: updateComputations` rows**
825
+ this sweep (+3% / +6% / +3% / +12% / +3% / +2% / +8%; was 4/7 on 1.4.0).
826
+ - **Andrii Volynets js-reactivity-benchmark position holds at 4th of 15** with
827
+ geomean **79.3ms** (raw log `bench/AndriiVolynetsReactiveBench.log`); lite is
828
+ ahead of 5th-place Preact Signals (99.8) by ~21% -- the gap widened this
829
+ sweep after Preact's own regression on the newer 1.14.2. Top-3 count moved
830
+ from 21/47 (1.3.0 log) -> 23/47 (1.4.0 log) -> **25/47 (1.5.0-beta log)**;
831
+ outright-fastest-of-15 wins fluctuate at the top of a very tight leaderboard
832
+ where alien-signals / reflex / lite trade sub-percent margins per shape (5
833
+ outright wins on 1.4.0, **2 outright wins on 1.5.0-beta** -- `createComputations4to1`
834
+ and `1000x5 - 25 sources (wide dense)`). The stable metric across every
835
+ published sweep is the geomean rank at #4 of 15.
836
+ - **Third-party version bumps** used in this sweep vs 1.4.0: alien-signals
837
+ 3.1.2 -> 3.2.1, @preact/signals-core 1.14.1 -> 1.14.2, @vue/reactivity
838
+ 3.5.13 -> 3.5.35, solid-js 1.9.12 -> 1.9.13. Any within-lib delta between
839
+ the two sweeps reflects those bumps + host noise, not lite-signal changes:
840
+ 1.4.0 -> 1.5.0 hot-path bytes are byte-identical (1.5.0 adds only the
841
+ non-callable box handle shape, which affects construction cost and handle
842
+ ergonomics but not the pooled-node read/write path).
266
843
 
267
844
  ## [1.4.0] -- 2026-06-XX
268
845
 
@@ -320,6 +897,31 @@ with the rest of registry state, so a reused registry reports lifecycle numbers
320
897
  for its current epoch only. Grown pool *capacity* is retained across `destroy()`
321
898
  as before (the reset keeps the arena warm); only the cumulative counts reset.
322
899
 
900
+ ### Added -- VersionMatrix regression gate (harness/VersionMatrix/)
901
+
902
+ A **same-host, cold-process regression gate** for the engine ships alongside the
903
+ observability counters, wired into `prepublishOnly` -- a candidate that regresses
904
+ beyond calibrated tolerances aborts `npm publish` before it starts. Each
905
+ version-x-workload is profiled in its own `node` invocation (V8 never carries
906
+ inline caches or JIT state across versions), fed an identical LCG write sequence
907
+ (delta = engine change, not input), and reduced to a per-metric median-of-N
908
+ (default 5). **Two baselines** gate every publish: a **floor** (never moves;
909
+ "we shall not regress below this line") and a **rolling** baseline (previous
910
+ published version); a candidate must clear BOTH. Tolerances calibrated against
911
+ measured self-noise (`npm run calibrate`): `frame.avg` is the stable anchor at
912
+ 5% vs rolling / 10% vs floor (self-noise <=~3%); `frame.p99` and
913
+ `phase.write.p99` sit at 18% / 30% (self-noise up to ~14%, so a p99 fail should
914
+ be re-run to confirm). Four workloads map to public bench claims:
915
+ `reactive-graph-mix` (KAIROS / mol pattern), `deep-chain` (the DEEP CHAIN weak
916
+ spot), `broadcast-fanout` (the BROADCAST fan-out), and `dynamic-dep-churn` (the
917
+ DYNAMIC / SELECTIVE DAG wins). Committed median baselines under
918
+ `harness/VersionMatrix/baselines/` are the public evidence surface (each
919
+ carrying `env` metadata: CPU, node, date); the gate itself always re-captures
920
+ floor / rolling / candidate in the same job so it never diffs across hosts.
921
+ Manifest at `manifest.json` pins the floor (`1.3.0`), the rolling reference, and
922
+ the workload list. Details in `harness/VersionMatrix/README.md`. (The 1.5.0-beta
923
+ identical-code guard extending this gate lands in the 1.5.0 entry above.)
924
+
323
925
  ### Verified
324
926
 
325
927
  - **Full suite green** against the 1.4.0 engine: 429 tests, 419 pass, 0 fail,
@@ -338,8 +940,6 @@ as before (the reset keeps the arena warm); only the cumulative counts reset.
338
940
  the `stats()` surface (the 1.2.x / 1.3.0 entries described the absence of the
339
941
  counters in prose; 1.4.0 codifies the new shape as a test assertion).
340
942
 
341
-
342
-
343
943
  ## [1.3.0] -- 2026-06-XX
344
944
 
345
945
  The pool minor: the node and link pools become **growable and incrementally
@@ -433,9 +1033,7 @@ in 1.3.0.
433
1033
  counters (`totalAllocations` / `totalDisposals` / `poolGrowths`) remain
434
1034
  reserved for 1.4.0 and are still absent here.
435
1035
 
436
-
437
-
438
- ## [1.2.2] -- 2026-06-XX
1036
+ ## [1.2.2] -- 2026-06-14
439
1037
 
440
1038
  A code-deletion ship: a `createNode` audit removes ten redundant field-writes
441
1039
  that defended against a state the engine cannot produce on a clean free-list.