@zakkster/lite-signal 1.4.1 → 1.4.2
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 +58 -0
- package/README.md +20 -4
- package/Signal.js +1 -1
- package/llms.txt +18 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,64 @@ All notable changes to `@zakkster/lite-signal` are documented here.
|
|
|
4
4
|
Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
5
5
|
This project follows [Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [1.4.2] -- 2026-07-28
|
|
8
|
+
|
|
9
|
+
The verification-surface patch, round two. **The engine is unchanged**: as in
|
|
10
|
+
1.4.1, the only edit to `Signal.js` is the version string in its header banner,
|
|
11
|
+
and `Signal.d.ts` is untouched. Everything here lives in `bench/torture/`, which
|
|
12
|
+
does not ship -- `files[]` excludes it. If you consume the package, 1.4.2 is
|
|
13
|
+
byte-for-byte 1.4.1 plus a version number.
|
|
14
|
+
|
|
15
|
+
1.4.1 added five semantic scenarios and left the torture directory at eight. This
|
|
16
|
+
release completes it: eleven more scenarios land, and one runner now drives the
|
|
17
|
+
whole forward-compatible superset -- **19 scenarios (16 semantic + 3 soak)** --
|
|
18
|
+
across every version from this 1.4.x base through 1.9.
|
|
19
|
+
|
|
20
|
+
### Added -- eleven torture scenarios completing the 19-scenario suite
|
|
21
|
+
|
|
22
|
+
Each new scenario **feature-detects and skips cleanly** on an engine that predates
|
|
23
|
+
its feature: it prints `SKIP: <feature> requires <version>+` and exits 0 rather
|
|
24
|
+
than failing, which is what lets one directory ride every version on the rebuilt
|
|
25
|
+
line. Three run fully on this 1.4.x base; six self-skip until their feature exists;
|
|
26
|
+
two more run on the surfaces 1.4.x already has:
|
|
27
|
+
|
|
28
|
+
- **`op-accounting.mjs`** -- structural work read from the `onGraphMutation`
|
|
29
|
+
opcode lane (op 1-5): the op5 identity (op5 == computed recomputes + effect
|
|
30
|
+
executions), equality cutoff, diamond glitch-freedom by recompute count,
|
|
31
|
+
link/node balance, laziness, and a 400-seed op5-vs-wrapper differential.
|
|
32
|
+
- **`introspect-torture.mjs`** -- the read-only introspection surface
|
|
33
|
+
(`describe` / `nodeId` / `forEach*` / `hasObservers` / `isTracking` / `ownerOf` /
|
|
34
|
+
`observeObservers`): walk agreement against the real edge set including dynamic
|
|
35
|
+
rewiring, `hasObservers` transitions, `observeObservers` connect/disconnect
|
|
36
|
+
edges, and the ABA gen-stamp guard (a stale descriptor must resolve to nothing,
|
|
37
|
+
never a recycled resident).
|
|
38
|
+
- **`lifecycle-torture.mjs`** -- `destroy` (1.4.0+) registry reset: handles staled
|
|
39
|
+
via gen-bump, stale writes no-op, pool reusable, idempotent. Its `createRoot`
|
|
40
|
+
half (1.5.0+) self-skips on this base, and the PASS line reflects only what ran.
|
|
41
|
+
- **`async-torture.mjs`** -- `watch` / `when` / `whenAsync` contracts + a 300-seed
|
|
42
|
+
projection-guard storm.
|
|
43
|
+
- **`capacity-torture.mjs`** -- the fail-closed pool boundary: exact node/link
|
|
44
|
+
ceilings, `CapacityError`, `grow` mode crossing the boundary, no partial value
|
|
45
|
+
escapes.
|
|
46
|
+
- **`box-torture.mjs`** (1.5.0+), **`scope-torture.mjs`** (1.6.0+),
|
|
47
|
+
**`owner-torture.mjs`** (1.6.0+), **`flush-torture.mjs`** (1.7.0+),
|
|
48
|
+
**`cleanup-return-torture.mjs`** (1.8.0+), **`dispose-torture.mjs`** (1.9.0+) --
|
|
49
|
+
present and gen-guarded; each reports a clean SKIP on the 1.4.x engine.
|
|
50
|
+
|
|
51
|
+
### Changed -- one runner for the whole suite
|
|
52
|
+
|
|
53
|
+
`bench/torture/run.mjs` now registers all 19 scenarios in two groups (`semantic`,
|
|
54
|
+
`soak`), child-process-isolated (several assert on global pool accounting). New
|
|
55
|
+
flags: `--group semantic|soak`, `--list`. `npm run torture` /
|
|
56
|
+
`torture:semantic` / `torture:soak` drive them.
|
|
57
|
+
|
|
58
|
+
### Verified -- full suite green on the 1.4.2 engine (Node 22, `--expose-gc`)
|
|
59
|
+
|
|
60
|
+
- **Torture:** 19/19 -- `torture:semantic` 16/16 (10 executed, 6 clean skips:
|
|
61
|
+
box 1.5.0, scope/owner 1.6.0, flush 1.7.0, cleanup-return 1.8.0, dispose 1.9.0),
|
|
62
|
+
`torture:soak` 3/3 (zero errors, every pool back to its leaf-only floor).
|
|
63
|
+
- The engine is byte-for-byte 1.4.1; the unit suite is unaffected.
|
|
64
|
+
|
|
7
65
|
## [1.4.1] -- 2026-07-21
|
|
8
66
|
|
|
9
67
|
The verification-surface patch. **The engine is unchanged**: the only edit to
|
package/README.md
CHANGED
|
@@ -761,9 +761,14 @@ npm run bench
|
|
|
761
761
|
|
|
762
762
|
### Tier 4 -- Torture (correctness and resources under chaos)
|
|
763
763
|
|
|
764
|
-
`bench/torture/` holds
|
|
765
|
-
not perf benchmarks: the ops/sec figures reflect
|
|
766
|
-
engine throughput -- `bench/benchmark.mjs`
|
|
764
|
+
`bench/torture/` holds **19 scenarios (16 semantic + 3 soak)** in two groups,
|
|
765
|
+
behind one runner. They are not perf benchmarks: the ops/sec figures reflect
|
|
766
|
+
random workload composition, not engine throughput -- `bench/benchmark.mjs`
|
|
767
|
+
remains the canonical perf harness. Every scenario feature-detects and **skips
|
|
768
|
+
cleanly** below the engine version that introduces its feature (`SKIP: <feature>
|
|
769
|
+
requires <version>+`, exit 0), so the whole directory rides this 1.4.x base
|
|
770
|
+
forward through 1.9. On the 1.4.x engine, **10 semantic scenarios execute and 6
|
|
771
|
+
self-skip**.
|
|
767
772
|
|
|
768
773
|
```bash
|
|
769
774
|
npm run torture # everything
|
|
@@ -795,6 +800,17 @@ Run these on every commit. They pin values, wakeups, work and ordering.
|
|
|
795
800
|
| `work-accounting` | minimum body-execution counts across 10 fixed topologies -- no missing recompute, no surplus one |
|
|
796
801
|
| `concurrent-storm` | eight reentrancy and flush-ordering contracts: self-write, `CycleError` on mutual loops, nested-batch boundaries, cascade ordering, cleanup writes, dispose-mid-flush, self-disposal, async interleaving |
|
|
797
802
|
| `scheduler-storm` | deferred execution under 10,000 effects: the gen-bound thunk's ABA guard, `FLAG_QUEUED` coalescing, a throwing scheduler not taking the pass down |
|
|
803
|
+
| `op-accounting` | structural work read from the `onGraphMutation` opcode lane (op 1-5): the op5 identity, equality cutoff, diamond glitch-freedom by recompute count, link/node balance, laziness, a 400-seed op5-vs-wrapper differential |
|
|
804
|
+
| `introspect-torture` | the read-only introspection surface (`describe`/`nodeId`/`forEach*`/`hasObservers`/`isTracking`/`ownerOf`/`observeObservers`): walk agreement vs the real edge set incl. dynamic rewiring, `hasObservers` transitions, and the ABA gen-stamp guard (a stale descriptor resolves to nothing, never a recycled resident) |
|
|
805
|
+
| `lifecycle-torture` | `destroy` (1.4.0+) registry reset: handles staled via gen-bump, stale writes no-op, pool reusable, idempotent. Its `createRoot` half is 1.5.0+ and self-skips on this base |
|
|
806
|
+
| `async-torture` | `watch`/`when`/`whenAsync` contracts + a 300-seed projection-guard storm |
|
|
807
|
+
| `capacity-torture` | the fail-closed pool boundary: exact node/link ceilings, `CapacityError`, `grow` mode crossing the boundary, no partial value escapes |
|
|
808
|
+
| `box-torture` (1.5.0+) | `signalBox`/`computedBox` interop + surface -- SKIP on 1.4.x |
|
|
809
|
+
| `scope-torture` (1.6.0+) | `createScope` adoption + the disposal-crash fuzz -- SKIP on 1.4.x |
|
|
810
|
+
| `owner-torture` (1.6.0+) | `getOwner`/`runWithOwner` capture-restore + ABA degradation -- SKIP on 1.4.x |
|
|
811
|
+
| `flush-torture` (1.7.0+) | `flushStrategy` convergence + the value-never-defers invariant + `.subscribe()` -- SKIP on 1.4.x |
|
|
812
|
+
| `cleanup-return-torture` (1.8.0+) | an effect's returned cleanup: timing, compose order, self-dispose guard, computed exclusion -- SKIP on 1.4.x |
|
|
813
|
+
| `dispose-torture` (1.9.0+) | `Symbol.dispose` / `using` on lifecycle objects (five stamp sites) -- SKIP on 1.4.x |
|
|
798
814
|
|
|
799
815
|
Why this group exists: the resource soaks below pass green on an engine whose
|
|
800
816
|
computeds return stale values. Flipping the clean short-circuit in `pullComputed`
|
|
@@ -1235,7 +1251,7 @@ npm test # behavior suite, ~1.3s
|
|
|
1235
1251
|
npm run test:gc # zero-gc suite, requires --expose-gc, ~3s
|
|
1236
1252
|
npm run bench # comparative benchmark vs alien-signals (results.txt), ~5min
|
|
1237
1253
|
npm run bench-reactive # 5-framework reactivity suite (resultsReactive.txt)
|
|
1238
|
-
npm run torture # full torture suite, all
|
|
1254
|
+
npm run torture # full torture suite, all 19 scenarios
|
|
1239
1255
|
npm run torture:semantic # correctness scenarios only, ~10s
|
|
1240
1256
|
npm run torture:soak # resource soaks only, wall-clock bound
|
|
1241
1257
|
npm run verify # test + sanity bench; run before publishing
|
package/Signal.js
CHANGED
package/llms.txt
CHANGED
|
@@ -50,7 +50,23 @@ triggering write -- no `queueMicrotask`, no promises, no scheduler ticks.
|
|
|
50
50
|
|
|
51
51
|
## Version notes
|
|
52
52
|
|
|
53
|
-
- **1.4.
|
|
53
|
+
- **1.4.2** (current): the **verification-surface patch, round two**. No engine
|
|
54
|
+
change -- as in 1.4.1, the only edit to `Signal.js` is the banner version string,
|
|
55
|
+
`Signal.d.ts` untouched, `bench/torture/` excluded from `files[]`; for consumers
|
|
56
|
+
1.4.2 is byte-for-byte 1.4.1 plus a version number. It completes the torture
|
|
57
|
+
directory: 1.4.1 left it at eight scenarios, and this adds **eleven** more so one
|
|
58
|
+
runner drives the whole forward-compatible superset -- **19 scenarios (16 semantic
|
|
59
|
+
+ 3 soak)** -- from this 1.4.x base through 1.9. On the 1.4.x engine ten semantic
|
|
60
|
+
run and six self-skip (`box` 1.5.0, `scope`/`owner` 1.6.0, `flush` 1.7.0,
|
|
61
|
+
`cleanup-return` 1.8.0, `dispose` 1.9.0 print `SKIP: <feature> requires <version>+`
|
|
62
|
+
and exit 0). The two that run on surfaces 1.4.x already has: `introspect-torture`
|
|
63
|
+
(the read-only `describe`/`forEach*`/`hasObservers`/`ownerOf` surface + ABA
|
|
64
|
+
gen-stamp guard) and `op-accounting` (structural work via the `onGraphMutation`
|
|
65
|
+
opcode lane); `lifecycle-torture` runs its `destroy` contract (its `createRoot`
|
|
66
|
+
half is 1.5.0+ and self-skips). Verified green: torture 19/19; engine byte-identical
|
|
67
|
+
to 1.4.1, so the unit suite is unaffected.
|
|
68
|
+
|
|
69
|
+
- **1.4.1**: the **verification-surface patch**. No engine change --
|
|
54
70
|
the only edit to `Signal.js` is the version string in its header banner, and
|
|
55
71
|
`Signal.d.ts` is untouched. `bench/torture/` gains five deterministic
|
|
56
72
|
correctness scenarios (`oracle-fuzzer`, `glitch-hunter`, `work-accounting`,
|
|
@@ -617,7 +633,7 @@ function dumpOwnerTree(handle, depth = 0) {
|
|
|
617
633
|
- `bench/benchmark.mjs` -- anti-DCE throughput harness (ops/s; results.txt).
|
|
618
634
|
- `bench/benchmarkReactive.mjs` -- cross-framework reactivity suite vs alien-signals, preact, vue-reactivity, solid (resultsReactive.txt).
|
|
619
635
|
- `bench/dispose-recycle.mjs` -- 1.2.2 targeted microbench: create/dispose/recreate cycle (the free-list invariant audit target).
|
|
620
|
-
- `bench/torture/` --
|
|
636
|
+
- `bench/torture/` -- **19 scenarios (16 semantic + 3 soak)** behind one runner (`run.mjs`), two groups, forward-compatible through 1.9. Every scenario feature-detects and SKIPS cleanly below the engine version that introduces its feature (`SKIP: <feature> requires <version>+`, exit 0), so the whole directory rides this 1.4.x base forward. `semantic` (deterministic, fast, asserts on MEANING; run in CI) -- the **10 that execute on the 1.4.x engine**: `oracle-fuzzer` (every computed vs an independent uncached reference evaluator, 400 seeds x 120 ops), `glitch-hunter` (glitch freedom + exact wakeup counts), `work-accounting` (minimum body-execution counts over 10 topologies), `op-accounting` (structural work via the `onGraphMutation` opcode lane -- op5 identity, equality cutoff, link/node balance, 400-seed differential), `introspect-torture` (the read-only `describe`/`nodeId`/`forEach*`/`hasObservers`/`isTracking`/`ownerOf`/`observeObservers` surface: walk agreement vs the real edge set incl. dynamic rewiring, and the ABA gen-stamp guard), `lifecycle-torture` (`destroy` 1.4.0+ registry reset -- gen-bump staling, no-op stale writes, pool reuse, idempotence; its `createRoot` half is 1.5.0+ and self-skips), `concurrent-storm` (8 reentrancy / flush-ordering contracts, `CycleError` via `maxFlushPasses`), `scheduler-storm` (gen-bound thunk ABA guard, FLAG_QUEUED coalescing, throwing scheduler containment), `async-torture` (`watch`/`when`/`whenAsync` + a 300-seed storm), `capacity-torture` (the fail-closed pool boundary, `CapacityError`, `grow` crossing it, no partial value escapes); plus **6 that self-skip** until their feature exists: `box-torture` (1.5.0), `scope-torture` (1.6.0), `owner-torture` (1.6.0), `flush-torture` (1.7.0), `cleanup-return-torture` (1.8.0), `dispose-torture` (1.9.0). `soak` (wall-clock bound, asserts on RESOURCES; run nightly): `graph-fuzzer`, `scheduler-bench`, `torture-soak` -- exit 0 iff zero errors AND post-teardown pool at or below its leaf-only floor AND the JIT sink advanced. The runner spawns each scenario as a child process because several assert on global pool accounting, and passes `--expose-gc` unconditionally. Scripts: `npm run torture`, `torture:semantic`, `torture:soak`.
|
|
621
637
|
- `bench/torture/helpers/index.mjs` -- shared torture infrastructure: seeded `mulberry32` (failures replay from their seed), `soakRegistry` / `fixedRegistry`, `createReport` (collects failures rather than throwing on the first), and `VALUE_POOL`, the adversarial value domain containing the pairs where candidate equality definitions disagree (`Object.is` vs `===` on NaN and -0/0; `===` vs `==` on 0/""/false/"0" and null/undefined). Dependency-free and side-effect-free by contract: importing it must not touch the default registry.
|
|
622
638
|
- `bench/run-all.sh` + `bench/aggregate.mjs` -- cold-process-per-engine protocol + per-scenario aggregation.
|
|
623
639
|
- `demo/index.html` -- interactive visualization of the reactive graph.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zakkster/lite-signal",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
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",
|