@zakkster/lite-signal 1.11.0-preview → 1.11.0-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/README.md +13 -4
- package/Signal.js +35 -3
- package/llms.txt +3 -2
- package/package.json +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,60 @@ 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.11.0-alpha.0] -- 2026-09-06
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- **The flagged settled sharp edge (user-authorized engine fix).** Unsubscribing
|
|
11
|
+
during a settle fire now NULLS the departing slot instead of splicing;
|
|
12
|
+
`fireSettled` skips nulls and compacts in place after the OUTERMOST fire only
|
|
13
|
+
(depth-guarded -- a settled callback that writes starts a fresh top-level drain
|
|
14
|
+
and a nested fire). The delivery law is exact and asserted (red-first proven:
|
|
15
|
+
the new assertions fail on the unfixed engine, then pass): a self- or
|
|
16
|
+
already-fired-sibling unsubscribe never costs any OTHER callback its
|
|
17
|
+
notification (the old splice walked an unvisited sibling into the visited index
|
|
18
|
+
and silently skipped it -- a real lost notification); unsubscribing a LATER
|
|
19
|
+
sibling silences exactly the target, immediately; a mid-fire subscribe still
|
|
20
|
+
delivers in the SAME drain (the ground truth lite-devtools 1.8.0 probed and
|
|
21
|
+
documented). Slot writes and integer sweeps only -- the fire loop stays
|
|
22
|
+
allocation-free (the zerogc `steady-settled` lane still reports 0 retained /
|
|
23
|
+
0 scavenges). `settled-torture` grows to 45 asserts (minAsserts pinned).
|
|
24
|
+
- **`destroy()` clears `settledCallbacks`** (nodeNames-consistent teardown), and
|
|
25
|
+
delivery cuts off at a mid-fire destroy: no sibling ever observes a registry
|
|
26
|
+
that no longer exists.
|
|
27
|
+
|
|
28
|
+
## [1.11.0-preview.1] -- 2026-09-20
|
|
29
|
+
|
|
30
|
+
Verification + docs increment over `1.11.0-preview`; **no engine change past the
|
|
31
|
+
version banner comment** (`Signal.js` byte-identical, banner line only). Migration
|
|
32
|
+
7 of the campaign: ports the standing perf-gate lane from the canonical 1.5.2
|
|
33
|
+
line onto this engine. (Orthogonal to the pending `[1.11.0-alpha.0]` promotion
|
|
34
|
+
above -- this increments the published preview line only.)
|
|
35
|
+
|
|
36
|
+
### Added -- perf-gate lane (`@zakkster/lite-perf-gate`, devDependency only)
|
|
37
|
+
|
|
38
|
+
- `test/39-perf-gate.test.mjs` + `npm run test:gate`
|
|
39
|
+
(`node --expose-gc --max-semi-space-size=4 --test test/39-perf-gate.test.mjs`),
|
|
40
|
+
chained into `test:all` after `test:zgc`. Where the existing `test:zgc` lane
|
|
41
|
+
(lite-gc-profiler) is the suite's bespoke zero-GC harness, this lane wires
|
|
42
|
+
`@zakkster/lite-perf-gate`'s `zgcSuite` as a standing, self-validating verdict:
|
|
43
|
+
five signals (scavenges / engine counters / retainedKB / oldGen /
|
|
44
|
+
arrayBuffersKB), two scales (N and k*N), positive+negative+large detector
|
|
45
|
+
controls on every run, and permanent `mustFail` negative controls.
|
|
46
|
+
- Seven claimed-zero steady-state scenarios, each anchored to its `llms.txt`
|
|
47
|
+
claim: `set-propagate` (1 signal -> 8 computeds -> 1 effect, sync flush),
|
|
48
|
+
`computed-cache-hit`, `computed-recompute-stable`, `effect-rerun-stable`,
|
|
49
|
+
`peek`, `batch-flush` (3 sets/batch), `box-set-propagate`. `statsOf` reads each
|
|
50
|
+
scenario's isolated registry ledger; `counters` pins
|
|
51
|
+
`totalAllocations`/`totalDisposals`/`poolGrowths` at 0-delta.
|
|
52
|
+
- Two `mustFail` controls that MUST trip the gate: a per-op `{x,y,z,w}` object
|
|
53
|
+
allocator, and the documented `signal()`+dispose churn (264 B/op). lite-perf-gate
|
|
54
|
+
DEFAULT thresholds, untouched (maxScavenges 2, maxRetainedKB 64, maxOldGen 0,
|
|
55
|
+
maxArrayBuffersKB 64).
|
|
56
|
+
- **Result on this engine (node v26.x): green and REAL, 10/10** -- all seven
|
|
57
|
+
claimed-zero paths pass under defaults, both `mustFail` controls trip. Plain
|
|
58
|
+
`npm test` is undisturbed (the in-glob file emits one loud named skip unless
|
|
59
|
+
BOTH `--expose-gc` and `--max-semi-space-size=4` are present).
|
|
60
|
+
|
|
7
61
|
## [1.11.0-preview] -- 2026-09-06
|
|
8
62
|
|
|
9
63
|
**Feature of the cut: `onSettled`, rebuilt as a creation-time capability.** The
|
package/README.md
CHANGED
|
@@ -868,8 +868,8 @@ Three tiers, all reproducible.
|
|
|
868
868
|
|
|
869
869
|
### Tier 1 -- Behavior (unit tests, fast)
|
|
870
870
|
|
|
871
|
-
On the 1.11.0 engine `npm test` reports **
|
|
872
|
-
`npm run test:gc` (Tier 2, `--expose-gc`) reports **
|
|
871
|
+
On the 1.11.0 engine `npm test` reports **580 tests, 579 pass, 0 fail, 1 skip**, and
|
|
872
|
+
`npm run test:gc` (Tier 2, `--expose-gc`) reports **588 tests, 587 pass, 0 fail, 1
|
|
873
873
|
skip**. `npm test` runs the glob-scoped suite in `test/`, covering:
|
|
874
874
|
|
|
875
875
|
- **`01-core.test.mjs`** -- signal/computed/effect basics, equality semantics, NaN/+/-0, subscribe/peek/update, untrack, batch, cleanup ordering, first-run error recovery, nested object reference-identity gotchas.
|
|
@@ -897,14 +897,14 @@ skip**. `npm test` runs the glob-scoped suite in `test/`, covering:
|
|
|
897
897
|
- **`24-signalbox.test.mjs`** -- the `signalBox` / `computedBox` allocation-light handle API, **activated in 1.5.0** (committed `{skip:true}` since 1.3.0, now running against the real implementation). 12 tests: box get/set/peek/update, `computedBox` derive + memoize, peek-does-not-track, subscribe fires-and-untracks, box<->callable interop both directions, batch coalescing (including set-then-revert net no-op), dispose with ABA-safety, the `equals` short-circuit, `computedBox.peek`, and the top-level helpers bound to the default registry.
|
|
898
898
|
- **`27-create-root.test.mjs`** -- `createRoot` (1.5.0), the ownership escape hatch. A watcher spawned inside a consumer effect via `createRoot` survives the consumer's re-run (the exact `lite-query` lazy-watcher pattern); the contrast case confirms an *unwrapped* spawn is cascade-disposed; `createRoot` returns `fn`'s value, detaches tracking in `fn`'s direct body while inner effect bodies still track, and composes with box handles. 7 tests, including a top-level-export binding case that closes the otherwise-uncovered top-level `createRoot` path.
|
|
899
899
|
- **`29-scope.test.mjs`** -- `createScope` (1.6.0), the adopting counterpart to `createRoot`. 4 tests: the scope owner runs exactly once on creation; direct-body signal reads in `fn` are untracked while inner effect/computed bodies track normally; `dispose()` cascade-disposes the owned subtree (effects + computeds) while a directly-allocated signal correctly survives (the engine never owner-adopts signals); a scope created inside a consumer effect SURVIVES that consumer's re-run -- the reconciler-critical detach property; `dispose()` is idempotent; the disposer is introspection-stamped to its owner effect (`describe(dispose).kind === "effect"`); and `totalAllocations - totalDisposals === activeNodes` holds across the entire lifecycle.
|
|
900
|
-
- **`25-devtools-real-boot.test.mjs`** -- the devtools pairing contract (
|
|
900
|
+
- **`25-devtools-real-boot.test.mjs`** -- the devtools pairing contract (22 tests). Boots the REAL installed `@zakkster/lite-devtools` 1.8.0 against this engine through an import-rewrite rig (both share ONE engine instance -- the rig catches the two-instance failure mode where the package resolves to the published build instead of the local engine). Pins the live-probed ground truth: all 25 function exports + the `VERSION` const, the EXACT 16-key `capabilities()` fingerprint with **every flag true** -- the first engine on which devtools' full capability vector lights up, `settled` included (on the 1.10.0 pairing the same key set carries `settled:false`; the VALUE is the discriminator) -- the named-node flow (`inspect().name` absent-not-empty on unnamed handles, serialize v2 name round-trip, `toDot`/`toTree` label precedence resolver > engine name > kind#id), the `whyDirty`/`explain` non-perturbing passthroughs, the **`watchSettled` live battery** (one `{settles, ts}` per top-level clean drain, batches coalesce, empty flushes silent, `count()`/idempotent `stop()`/`Symbol.dispose`, fail-closed null on a non-settled registry, throwing consumer callback swallowed) plus the **mid-fire `stop()` interplay pin** (a self-stopping handle never costs a sibling handle its settle -- devtools' deferred detach composed with the engine's fixed fire loop), the `burstProfile()` live-handle and `stop()` summary shapes, and the `Symbol.dispose` stamps on devtools' own stopper handles.
|
|
901
901
|
- **`26-free-list-invariant.test.mjs`** -- the 1.2.2 audit's cleanliness pins (3 invariant tests + 1 targeted coverage test). Asserts directly -- by inspecting freshly-allocated nodes through the documented `describe()` -> `NODE_PTR` introspection protocol -- that the `ReactiveNode` constructor and the fresh-pool-growth path initialize the ten fields the audit removed from `createNode` to identical values, so the deleted writes were defending against a state the engine cannot produce on a clean free list. The 4th test covers the swallow-on-self-dispose-then-throw branch in `pullComputed` (the path that lifted branch coverage from 98.07% to 98.43%).
|
|
902
902
|
- **`30-throwing-equals.test.mjs`** -- a user `equals` that THROWS, pinned at all five 1.11.0 invocation sites (9 tests): the three callable sites (signal set pre-check, batch revert, computed re-eval -- with a CONTRAST anti-tautology test proving the batch-revert pin is caused by the throw, not the set-then-back shape) and the two `signalBox` `boxSet` sites (pre-check leaves the box unmutated; batch-revert strands the version bump so the net value fires downstream).
|
|
903
903
|
- **`33-cleanup-return.test.mjs`** -- the 1.8.0 effect cleanup-return contract at unit grain (7 tests): timing (fires before re-run + on dispose), compose order with `onCleanup`, non-function returns ignored, the computed exclusion.
|
|
904
904
|
- **`34-computed-selfdirty-prev-owner.test.mjs`** -- forward-compat suite for the roadmap 1.10.x+ surface (11 tests): `computed(fn(prev), {initial})` and the gen-guarded owner APIs, feature-discriminated so legacy engines degrade cleanly; plus the DELIBERATE #179/#15 absorption pin (a computed writing its own tracked dep ABSORBS) that holds on every 1.x engine.
|
|
905
905
|
- **`35-config-validation.test.mjs`** -- the 1.4.5 `createRegistry` validation matrix on the 7-key config family incl `flushStrategy` and the 1.11.0 `settled` capability key (23 tests): per-option `TypeError`s, did-you-mean hints (`setled` suggests `settled`), the strict-boolean `settled` guard, the eager-construction ceiling, the two pool-population stats keys, and OOM rows spawned as child processes under a 256 MB cap via `35-config-oom.child.mjs`.
|
|
906
906
|
- **`36-named-and-whydirty.test.mjs`** -- the 1.10.0 discriminator (6 tests): `signal(v, {name})` / `computed` / `effect` names surface in `describe().name` (and are absent for unnamed nodes -- zero node-shape change); `whyDirty(computed)` returns EXACTLY the dep whose version moved past the observer's `evalVersion` (never the whole dep set -- the rejected-sketch bug), traces transitively to the root signal write, and is read-only (a `whyDirty` call never pulls, so it cannot perturb the clock it describes).
|
|
907
|
-
- **`37-devtools-zerogc-probe.test.mjs`** -- the zero-GC claim on the reactive-benchmark weak-group shapes (5 tests), through both the engine's `stats().poolGrowths` counter and devtools 1.
|
|
907
|
+
- **`37-devtools-zerogc-probe.test.mjs`** -- the zero-GC claim on the reactive-benchmark weak-group shapes (5 tests), through both the engine's `stats().poolGrowths` counter and devtools 1.8.0's `watchAllocations()` feed: the pool never grows its backing store (`poolGrowths` delta == 0).
|
|
908
908
|
- **`38-onsettled.test.mjs`** -- the 1.11.0 discriminator (9 tests, authored with the engine): `onSettled` throws without the capability and stays inert when off; fires once per top-level drain; coalesces under multi-effect fan-out, `batch()`, and nested writes during a drain; stays silent on empty and thrown flushes; unsubscribes cleanly with sibling callbacks unaffected.
|
|
909
909
|
|
|
910
910
|
```bash
|
|
@@ -926,6 +926,15 @@ If these fail, something allocates in the hot path and we want to find it before
|
|
|
926
926
|
npm run test:gc
|
|
927
927
|
```
|
|
928
928
|
|
|
929
|
+
Two standing zero-GC gates back this tier. `npm run test:zgc` runs the suite's own lite-gc-profiler harness (`test/zgc/*`). `npm run test:gate` (added 1.11.0-preview.1) runs **`test/39-perf-gate.test.mjs`**, a second, library-owned judge built on **`@zakkster/lite-perf-gate`** (devDependency only): its `zgcSuite` watches five signals (scavenges / engine `stats()` counters / retainedKB / oldGen / arrayBuffersKB) at two scales with positive+negative+large detector controls, over seven claimed-zero steady-state scenarios (`set-propagate`, `computed-cache-hit`, `computed-recompute-stable`, `effect-rerun-stable`, `peek`, `batch-flush`, `box-set-propagate`) plus two permanent `mustFail` controls (a per-op `{x,y,z,w}` allocator and the documented `signal()`+dispose 264 B/op churn). Thresholds are lite-perf-gate DEFAULTS (maxScavenges 2, maxRetainedKB 64, maxOldGen 0, maxArrayBuffersKB 64) -- a claimed-zero path that cannot meet defaults is a finding, not a config knob. Both lanes are chained by `test:all`.
|
|
930
|
+
|
|
931
|
+
```bash
|
|
932
|
+
npm run test:zgc # lite-gc-profiler harness (requires --expose-gc --max-semi-space-size=4)
|
|
933
|
+
npm run test:gate # lite-perf-gate judge; same two flags, else one loud named skip
|
|
934
|
+
```
|
|
935
|
+
|
|
936
|
+
`test:gate` runs REAL only under both `--expose-gc` and `--max-semi-space-size=4` (young-gen sensitivity); the script sets both. Under plain `npm test` / `test:gc` the in-glob file emits one loud named skip -- never a silent pass, never a false red.
|
|
937
|
+
|
|
929
938
|
### Tier 3 -- Performance (comparative benchmark)
|
|
930
939
|
|
|
931
940
|
`npm run bench` runs the **microscope** -- lite's recommended eager config on six first-party shapes; the aggregate output is [`bench/r.txt`](./bench/r.txt) (four engines: lite, alien, preact, solid). Cross-framework standing comes from the **mirror** (`node --expose-gc bench/mirror.mjs --self-verify` then `bench/sweep.mjs`), which runs Andrii's canonical adapter verbatim so rows diff 1:1 against his log; the aggregate output is [`bench/rb.txt`](./bench/rb.txt) (lite vs alien, all 47 shapes). Every output carries a machine-generated `#STAMP` (engine + harness sha256, the live registry config, host, node), so a header can never disagree with the code that ran. The pre-v3 five-framework reactivity suite was **removed after 1.5.1** (bench protocol v3). Full methodology: [`bench/README.md`](./bench/README.md).
|
package/Signal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @zakkster/lite-signal v1.11.0-preview
|
|
2
|
+
* @zakkster/lite-signal v1.11.0-preview.1
|
|
3
3
|
* Copyright (c) Zahary Shinikchiev <shinikchiev@yahoo.com>
|
|
4
4
|
* MIT License
|
|
5
5
|
* --------------------
|
|
@@ -1161,6 +1161,16 @@ export function createRegistry(config) {
|
|
|
1161
1161
|
// nothing -- zero cost BY CONSTRUCTION, decided before the first closure is built.
|
|
1162
1162
|
// Only a registry built with { settled: true } binds the settled variant.
|
|
1163
1163
|
const settledCallbacks = CAP_SETTLED ? [] : null;
|
|
1164
|
+
// 1.11.0-alpha.0: unsubscribing DURING a fire nulls the slot instead of
|
|
1165
|
+
// splicing -- a splice walks an unvisited sibling into the just-visited
|
|
1166
|
+
// index and silently skips it (a lost notification). fireSettled skips
|
|
1167
|
+
// nulls and compacts in place after the OUTERMOST fire only: a settled
|
|
1168
|
+
// callback that writes starts a fresh top-level drain and a nested fire,
|
|
1169
|
+
// so compaction is depth-guarded. Slot writes and integer sweeps only --
|
|
1170
|
+
// the fire loop stays allocation-free (the zerogc steady-settled lane
|
|
1171
|
+
// gates that).
|
|
1172
|
+
let settledFireDepth = 0;
|
|
1173
|
+
let settledHoles = false;
|
|
1164
1174
|
function onSettled(fn) {
|
|
1165
1175
|
if (!CAP_SETTLED) throw new Error("onSettled requires createRegistry({ settled: true })");
|
|
1166
1176
|
settledCallbacks.push(fn);
|
|
@@ -1169,14 +1179,32 @@ export function createRegistry(config) {
|
|
|
1169
1179
|
if (!live) return;
|
|
1170
1180
|
live = false;
|
|
1171
1181
|
const i = settledCallbacks.indexOf(fn);
|
|
1172
|
-
if (i
|
|
1182
|
+
if (i === -1) return;
|
|
1183
|
+
if (settledFireDepth > 0) {
|
|
1184
|
+
settledCallbacks[i] = null;
|
|
1185
|
+
settledHoles = true;
|
|
1186
|
+
} else {
|
|
1187
|
+
settledCallbacks.splice(i, 1);
|
|
1188
|
+
}
|
|
1173
1189
|
};
|
|
1174
1190
|
}
|
|
1175
1191
|
function fireSettled() {
|
|
1176
1192
|
const cbs = settledCallbacks;
|
|
1193
|
+
settledFireDepth++;
|
|
1177
1194
|
for (let i = 0; i < cbs.length; i++) {
|
|
1195
|
+
const fn = cbs[i];
|
|
1196
|
+
if (fn === null) continue; // unsubscribed during this fire
|
|
1178
1197
|
// A notification callback must never break the drain it observes.
|
|
1179
|
-
try {
|
|
1198
|
+
try { fn(); } catch (_e) { /* swallow: settled is an observer, not a control path */ }
|
|
1199
|
+
}
|
|
1200
|
+
settledFireDepth--;
|
|
1201
|
+
if (settledFireDepth === 0 && settledHoles) {
|
|
1202
|
+
settledHoles = false;
|
|
1203
|
+
let w = 0;
|
|
1204
|
+
for (let i = 0; i < cbs.length; i++) {
|
|
1205
|
+
if (cbs[i] !== null) { cbs[w++] = cbs[i]; }
|
|
1206
|
+
}
|
|
1207
|
+
cbs.length = w;
|
|
1180
1208
|
}
|
|
1181
1209
|
}
|
|
1182
1210
|
// The settle tail fires ONCE per top-level, non-empty, clean drain: re-entrant
|
|
@@ -2164,6 +2192,10 @@ export function createRegistry(config) {
|
|
|
2164
2192
|
*/
|
|
2165
2193
|
function destroy() {
|
|
2166
2194
|
nodeNames.clear(); // 1.10.0: drop the cold name table with the registry
|
|
2195
|
+
// 1.11.0-alpha.0: drop the settled roster too -- delivery must cut off
|
|
2196
|
+
// at destroy (a sibling must never observe a registry that no longer
|
|
2197
|
+
// exists), and the teardown is nodeNames-consistent.
|
|
2198
|
+
if (settledCallbacks !== null) settledCallbacks.length = 0;
|
|
2167
2199
|
const nodeCount = nodePool.length;
|
|
2168
2200
|
for (let i = 0; i < nodeCount; i++) {
|
|
2169
2201
|
const n = nodePool[i];
|
package/llms.txt
CHANGED
|
@@ -55,7 +55,8 @@ triggering write -- no `queueMicrotask`, no promises, no scheduler ticks.
|
|
|
55
55
|
|
|
56
56
|
## Version notes
|
|
57
57
|
|
|
58
|
-
- **1.11.0-preview** (current):
|
|
58
|
+
- **1.11.0-preview.1** (current): verification + docs increment -- no engine change past the banner comment (`Signal.js` byte-identical, banner line only). Ports the standing **perf-gate lane** from the canonical 1.5.2 line: `test/39-perf-gate.test.mjs` + `npm run test:gate` (`node --expose-gc --max-semi-space-size=4`), chained into `test:all` after `test:zgc`. Wires **`@zakkster/lite-perf-gate`** (devDependency only) as a second, library-owned zero-GC judge beside the bespoke `test:zgc` harness: `zgcSuite` watches five signals (scavenges / engine `stats()` counters / retainedKB / oldGen / arrayBuffersKB) at two scales with positive+negative+large detector controls, over seven claimed-zero steady-state scenarios (set-propagate, computed-cache-hit, computed-recompute-stable, effect-rerun-stable, peek, batch-flush, box-set-propagate) plus two permanent `mustFail` controls (per-op `{x,y,z,w}` allocator; the documented `signal()`+dispose 264 B/op churn). Thresholds are lite-perf-gate DEFAULTS, untouched. Green and REAL on this engine (10/10); the in-glob file emits one loud named skip unless both flags are set, so plain `npm test` is undisturbed. Orthogonal to the pending `[1.11.0-alpha.0]` promotion. See CHANGELOG `[1.11.0-preview.1]`.
|
|
59
|
+
- **1.11.0-preview**: **`onSettled` rebuilt as a creation-time capability** -- the redemption of the feature whose naive always-checked drain hook was the +27-31% 1to1batch regression that reset the line (ledger #17). `createRegistry({ settled: true })` selects ONCE at build time a `flushEffects` variant with a drain-complete tail (`const flushEffects = CAP_SETTLED ? flushEffectsSettled : flushEffectsPlain` -- the 1.7.0 flushStrategy const-selection discipline); a DEFAULT registry binds the verbatim plain drain, byte-identical to 1.10.0's, so the hot write path pays nothing BY CONSTRUCTION. `onSettled(fn)` (registry + module) fires once per top-level, non-empty, clean drain and returns an idempotent unsubscribe; throws without the capability; `settled` joins the validated config family as a strict boolean (typo suggestion included). Module **34 exports / registry 28 fns**. Suite on this cut: torture 27 -> **28 scenarios** (`settled-torture` NATIVE, 45 asserts incl the exact mid-fire delivery law, `SETTLED_BREAK=phantom|lost` verified exit 1; the zerogc `steady-settled` lane -- a live subscriber over the 1M-op window, 0 retained, 0 scavenges), unit **580 tests / gc 588** (test/35 -> 23 tests with the settled matrix + suggestion-set + first-class rows; new `test/38-onsettled` discriminator, 9 tests; test/25 re-pinned to the live devtools-1.8.0 pairing, 22 tests), mint re-measured IDENTICAL for the **SEVENTH engine** (264.3/208.1/160.0/56.0/56.0 B/op all-space -- `CAP_SETTLED` is read once at `createRegistry`, off the mint path), visit-anatomy 21/21 with NO re-anchor, jit strict 4x monomorphic (fresh Node-26 baseline), VersionMatrix **GATE PASSED 5/5 first try** (floor 1.3.0 + rolling 1.5.0; counter lane exact 288 allocs/frame min=max=p99 over 1500 frames, poolGrowths 0). devDeps: devtools ^1.8.0 (the flagged tripwire PAID OFF: test/25 re-pinned deliberately to the exact 16-key `capabilities()` vector -- the FIRST engine on which devtools' full capability set, `settled` included, reads true -- plus the `watchSettled` live battery and the mid-fire stop() interplay pin, devtools' deferred detach composed with the fixed fire loop), gc-profiler ^1.16.0. ENGINE NOTE: the staged v1.11.0-candidate.1 engine had forked at the SAME pre-fix point as the 1.10.0 canary; the disposeNode cursor-repair + the 1.4.5 createRegistry validation cascade were ported VERBATIM from the 1.10.0 engine (user-authorized; two plan-scoped adaptations: ALLOWED_KEYS gains "settled" + a strict boolean guard), fixing the same dispose-mid-retrack crash class (baseline: 3 torture scenarios crashed, ~34 unit fails, incl a real OOM SIGABRT from the missing eager ceiling); no hot body touched -- `flushEffectsPlain`'s body is byte-identical to 1.10.0's `flushEffects`, only the binding became a build-time-selected const. SHARP EDGE FIXED (this cut, user-authorized, red-first proven): unsubscribing during a settle fire now nulls the slot and `fireSettled` compacts after the outermost fire (depth-guarded, allocation-free), so a mid-fire unsubscribe never costs a sibling its notification (the old splice silently skipped one); a mid-fire subscribe still delivers same-drain; `destroy()` clears `settledCallbacks`. See CHANGELOG `[1.11.0-alpha.0]` + WHY-1_11.md.
|
|
59
60
|
- **1.10.0-preview**: **named nodes + `whyDirty()`** -- the tracing foundation, two cold-path diagnostics the profilers consume directly (`signal/computed/effect(v, {name})` into a cold registry-side `Map<id,name>`; `whyDirty(computed)` returns the deps whose version moved past the observer's `evalVersion`, tracing to the root signal write, read-only and never pulling). Zero node-shape change, zero cost for unnamed nodes; the four hot propagation bodies are byte-identical to 1.9.0 (sha-proven, see WHY-1_10.md). Module 33 exports / registry 27 fns. This cut ALSO lands the verification-infrastructure parity that the rest of the line carries: torture 22 -> **27 scenarios** (all 23 semantic execute, zero floor-skips), unit suite glob-scoped to **553 tests** (test/25 rewritten against the live devtools-1.6.2 pairing; new `test/36-named-and-whydirty` discriminator + `test/37` zero-GC probe), the `test/zgc` + `test/ProfilerTests` + `harness/ProfilerTools` lanes, the phase-1/2/3 harness instruments (mint measured IDENTICAL for the sixth engine; visit 21/21 no re-anchor; jit strict 4x monomorphic), and the VersionMatrix gate (PASSED 5/5, counters 288/0). devDeps: devtools ^1.6.2, gc-profiler ^1.16.0. ENGINE NOTE: the folder's v1.10.0-canary.1 engine had forked the rebuilt-1.9 line before two later cold-path fixes; the disposeNode cursor-repair and the 1.4.5 createRegistry validation (+ 2 stats keys) were ported verbatim from 1.9.0 (no hot body touched), fixing a real dispose-mid-retrack crash. See CHANGELOG `[1.10.0-preview]`.
|
|
60
61
|
- **1.9.0-preview.6**: backports the **1.4.5 `createRegistry` input validation** (all four findings) onto the 1.9.0-preview.5 engine. Only `createRegistry`'s *cold* path moved; hot paths stay byte-identical and `bench/torture/run.mjs` is unchanged at 22/22. Bad config now throws a named `TypeError` (unknown keys get a did-you-mean); an absurd eager capacity is refused before it can OOM the process; `stats()` grows to 14 keys (adds `nodePoolPopulation`/`linkPoolPopulation`, purely additive). New `test/*-config-validation.test.mjs` (matrix + ceiling + population + OOM child processes). See CHANGELOG `[1.9.0-preview.6]`.
|
|
61
62
|
- **1.9.0-preview.5**: a **packaging-only cut** -- the engine is
|
|
@@ -774,7 +775,7 @@ function dumpOwnerTree(handle, depth = 0) {
|
|
|
774
775
|
- `test/22-mutation-hook.test.mjs` -- 1.2.1 `onGraphMutation` registration + opcode emission (12 tests).
|
|
775
776
|
- `test/23-owner-introspection.test.mjs` -- `ownerOf`, `forEachOwned`, gen-guarded introspection (14 tests).
|
|
776
777
|
- `test/24-signalbox.test.mjs` -- the signalBox/computedBox handle API, active since 1.5.0: get/set/peek/update, derive + memoize, interop both directions, batch coalescing, dispose ABA-safety, plus the 1.9.0 `Symbol.dispose` box test (`using`-path disposal via the shared prototype stamp) (13 tests).
|
|
777
|
-
- `test/25-devtools-real-boot.test.mjs` -- real **devtools 1.
|
|
778
|
+
- `test/25-devtools-real-boot.test.mjs` -- real **devtools 1.8.0** boot against the 1.11.0 engine via the single-instance import-rewrite rig: all 25 exports + `VERSION`, the exact 16-key `capabilities()` fingerprint probed live with EVERY flag true (`settled:T` -- the first full-vector engine; the 1.10.0 pairing carries the same key set with `settled:F`), the named-node flow (inspect `name` absent-not-empty, serialize v2 round-trip, toDot/toTree precedence resolver > name > kind#id), `whyDirty`/`explain` non-perturbing passthrough, the `watchSettled` LIVE battery (coalesced `{settles, ts}` accounting, fail-closed null, throwing-consumer isolation) + the mid-fire stop() interplay pin (devtools' deferred detach composed with the fixed fire loop), live `burstProfile()` stop-summary, the `Symbol.dispose` stamps (22 tests).
|
|
778
779
|
- `test/26-free-list-invariant.test.mjs` -- 1.2.2: the audit's clean-free-list invariant, asserted by inspecting freshly-allocated nodes (4 tests).
|
|
779
780
|
- `test/27-create-root.test.mjs` -- `createRoot` (1.5.0), the ownership escape hatch; includes the top-level-export binding case (7 tests).
|
|
780
781
|
- `test/28-run-with-owner.test.mjs` -- `getOwner`/`runWithOwner`: 7 basic shapes, 3 degradation cases (null/undefined/signal-handle fall through to rooted execution), 3 HAZARD PINS under allocation pressure so the ABA guard is genuinely exercised (16 tests).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zakkster/lite-signal",
|
|
3
|
-
"version": "1.11.0-preview",
|
|
3
|
+
"version": "1.11.0-preview.1",
|
|
4
4
|
"description": "Zero-GC reactive graph. Monomorphic object pool, versioned push-pull propagation, 32-bit modular versioning. Built for hot paths and long-running processes.",
|
|
5
5
|
"author": "Zahary Shinikchiev <shinikchiev@yahoo.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"test:harness": "npm --prefix harness/ProfilerTools test",
|
|
36
36
|
"test:zgc": "node --expose-gc --max-semi-space-size=4 --test 'test/zgc/*.test.mjs'",
|
|
37
37
|
"test:zgc:report": "node --expose-gc test/zgc/zero-gc-gate.mjs",
|
|
38
|
-
"test:
|
|
38
|
+
"test:gate": "node --expose-gc --max-semi-space-size=4 --test test/39-perf-gate.test.mjs",
|
|
39
|
+
"test:all": "npm test && npm run test:hardening && npm run test:harness && npm run test:zgc && npm run test:gate",
|
|
39
40
|
"bench": "node --expose-gc bench/benchmark.mjs",
|
|
40
41
|
"harness": "node harness/run.mjs",
|
|
41
42
|
"harness:smoke": "node harness/run.mjs smoke",
|
|
@@ -90,8 +91,9 @@
|
|
|
90
91
|
},
|
|
91
92
|
"sideEffects": false,
|
|
92
93
|
"devDependencies": {
|
|
93
|
-
"@zakkster/lite-devtools": "^1.
|
|
94
|
+
"@zakkster/lite-devtools": "^1.8.0",
|
|
94
95
|
"@zakkster/lite-gc-profiler": "^1.16.0",
|
|
96
|
+
"@zakkster/lite-perf-gate": "^1.4.2",
|
|
95
97
|
"@zakkster/lite-profiler": "^1.1.0",
|
|
96
98
|
"@zakkster/lite-profiler-signal": "^1.2.0",
|
|
97
99
|
"@zakkster/lite-signal": "^1.3.0 || >=1.4.0-beta.0 || >=1.6.0-preview.0",
|