Derivations

A derived value recomputes when, and only when, an input it reads changes.

102 checks, 2 known failures in 3 files. Run: cd Typescript && npm run test:derivations. Source: Typescript/tests/

derivation-refs.test.ts32 checks

A formula recomputes when any path its evaluator could read changes: relative-first with root fallback, shadowed root paths, [i] rules reaching children added later, no dangling subscriptions after a formula is redeclared or removed. 16 cases, each in eager and lazy mode.

derivation-wave.test.ts46 checks, 2 known failures

Inputs before dependents, each derivation once per wave, unchanged values stop the wave (NaN to NaN counts as unchanged), the cache across learn, import and replay, a 100-dependent fan-out, and missing inputs or cycles giving undefined with a reason. The 2 known failures are issue #5 (a numeric segment after a dot, dep.2.out), eager and lazy.

pointer-target-invalidation.test.ts24 checks

Formulas that read through a pointer: target writes, redirects, target and pointer deletion, a chain of 3, a target that is itself a formula, batched mutations, a pointer into a secret scope, cycles that do not hang. 12 cases, each in eager and lazy mode.

Last result: 102 passed, 2 known failures (issue #5) printed as KNOWN FAIL. Run summary 2026-10-26