Skip to content

solve-engine 2.39.1

Choose a tag to compare

@LiamRiddell LiamRiddell released this 23 Sep 15:37
· 117 commits to main since this release
a4cbc6f

An internal release: cross-document cells now carry the scope that owns them, and their notifications fire outside the value arena. Nothing a caller can observe changes; this is the groundwork the workspace model in the roadmap builds on.

What changed, internally

Every line now executes under a scope: the owner of a global :name cell it writes. The engine mints one anonymous scope per instance, carried on the execution context and set at every site one is built, the per-pass context, a goal-seek probe's own context, and the async pipeline's re-execution of a settled line. Nothing keys on the scope yet: the store stays realm-wide and keyed on the bare name, so two documents writing global :total still share one cell, exactly as before.

A cell's notification now waits. During an evaluation pass the write still lands in the store at once, so a later line reads what an earlier one wrote, but the notification to listeners, a document's dirty marking and an async read's first-write promise, is staged and replayed in write order once the pass leaves the value arena, rather than firing synchronously from inside it. A document's own dependents are marked through the dependency graph regardless, and another document re-evaluates on its own cadence after the pass returns either way, so the timing move is invisible. What it buys is a listener that may legitimately drive another pass, which a callback firing from inside the arena cannot.

The boundary: this is the seam, not the feature. Keying the store by scope so two documents' cells stop sharing, and refusing a write to a foreign scope, are a later major release, not this patch.

Verification

npm run verify:ci passes: 9,506 tests across 486 suites, with test:temporal across Europe/London, America/New_York and Pacific/Auckland and the bundled-consumer contract. The scope seam and the buffered notification are proven inert: every existing assertion is unchanged, and the document differential fuzz reports zero disagreements over 2,400 sessions, the incremental path agreeing with a settled from-scratch oracle after every edit.

This version did not reach npm: its publish run was cancelled. 2.40.0 carries its changes.