LearnNewsExamplesServices
Frontmatter
id18616
titleA Provider formula never re-runs for a key absent at its first run
stateClosed
labels
bugaicore
assigneesneo-fable
createdAtSep 12, 2026, 4:05 PM
updatedAtSep 12, 2026, 6:58 PM
githubUrlhttps://github.com/neomjs/neo/issues/18616
authorneo-fable
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 12, 2026, 6:58 PM

A Provider formula never re-runs for a key absent at its first run

neo-fable
neo-fable commented on Sep 12, 2026, 4:05 PM

Standalone core ticket, referenced by #18605 (OQ8's engine half in D#18594). Not a leaf: it stands on its own and #18605's published-truth leaf seeds around it regardless. Decision Record impact: none.

unowned-rationale: filed from the design seat at graduation; claimable by self-selection.

Context

Measured in D#18594's receipt (arm 7 of DockReactiveSurface.scratch.spec.mjs at dev@28e56e1543, 10/10), with a prediction falsified on the way — which is why the boundary below is precise.

The Problem

Neo.state.Provider runs a formula as a lazy Effect once in onConstructed. A formula that reads data.dock.perspective.active while data.dock does not exist registers no dependency (there is no proxy parent to track), and when setData('dock.perspective', {...}) later creates the key, only the binding effects re-run (src/state/Provider.mjs #bindingEffects, :196–199; the new-key path around :451/:875 — verify the lines at claim). The formula's target keeps its first value forever.

The boundary, measured: a formula reading an absent leaf under a seeded parent does re-run, because the parent object is rewritten by bubbling; only an absent top-level key (or absent ancestor) is dead.

The Architectural Reality

Proxy reads register the leaf and every parent object on the path; getData(path) is exact-leaf; setData on a namespace merges. The dependency graph has nothing to attach a read of a non-existent ancestor to.

The Fix

Either (a) re-run formula effects on new top-level key creation the way binding effects re-run, or (b) let the proxy record reads of absent keys as dependencies (a "missed read" set per Effect) and re-run when the key appears. (b) is the general fix; (a) is the one-line one. The docblock on formulas states the semantics either way.

Acceptance Criteria

  • Unit spec: a provider with formulas: {x: data => data.a?.b} constructed without a; setData('a.b', 1) after construction re-runs the formula and its bound target updates; the same for setData('a', {b: 1}).
  • The existing Provider suite stays green; no double-run of formulas on ordinary leaf writes.
  • formulas docblock states when a formula re-runs.

Out of Scope

The ownership rule (a formula on an ancestor provider never observes a descendant's publication) — that is documentation, carried by #18605's guides leaf.

Related

#18605 · D#18594 (OQ8).

Filed at the graduation of D#18594; live latest-open sweep at 2026-09-12T13:55:27Z found no equivalent.

Origin Session ID: c42870ab-3721-40f0-a1f8-f385786ffc3c Retrieval Hint: "state.Provider formula absent top-level key never re-runs bindingEffects new key"

🪢 Mnemosyne (Claude Fable 5.1, Claude Code) · session c42870ab-3721-40f0-a1f8-f385786ffc3c