You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 62b0a22
Browse filesBrowse the repository at this point in the historyBrowse files
committed
fix(signals): a render effect that stops reading a pending memo releases the memo's source (fuzzer #3446 P1)
A pending REPORTER that recovers without its flight landing — its pass no
longer reads the source (a show() gate closed) — stops counting for the
transaction it reported to (A15 / #3426: the hold lasts while a live
reporter observes the flight). `reporterBlocksSource` already judged the
re-run effect dead; nothing RE-JUDGED the parked transaction, since the
flush that re-ran the effect had no active transaction, and the writes held
with it stayed staged for as long as the flight stayed up — forever, for one
that never lands.
recompute's tail now treats that recovery as the completion event it is and
wakes the transaction (wokenTransitions — the third site after disposal
#3372 and boundary reset #3375), skipped under the transaction's own flush,
which judges the landing itself. Reporters are stamped, so no unstamped
fallback is needed.
Found by the semantic fuzzer (#3446, law P1, 21/1000 cases in one symptom
group, case 854); reproduced as the posture matrix's `effect × gatedAway`
cell on the "observed only by the matrix reader" state — the memo-between
variant (`memo × gatedAway`) already released, which is what narrowed it to
the direct-effect reporter. Pin flipped from it.fails; spec O3 fixed.
+100 B minified (24,478 -> 24,578).
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
A render effect that stops reading a pending async memo no longer keeps the memo's source held. A pending reporter that recovers without its flight landing — its pass no longer reads the source, e.g. a `show()` gate closed — is a completion event for the transaction it reported to: `recompute` now wakes that parked transaction (`wokenTransitions`, the third site after disposal #3372 and boundary reset #3375) so it is re-judged and its held writes commit. Before, `reporterBlocksSource` already judged the effect dead but nothing re-asked the parked transaction, and an ordinary write to the source stayed staged for as long as the flight stayed up — forever when it never landed. Found by the semantic fuzzer (#3446, law P1, 21/1000 cases) and reproduced as the posture matrix's `effect × gatedAway` cell.
Copy file name to clipboardExpand all lines: packages/signals/docs/SPEC-ASYNC-SEMANTICS.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -308,11 +308,13 @@ An error escaping every boundary permanently halts the system with `REACTIVITY_H
308
308
**Current behavior:** a memo + render effect created inside a live action's body over a value another action holds (or over the superseded / body-ended states) direct-commits (`recompute`'s `create && bornHeld === null` arm — `stagedEntry` is only recorded when `activeTransition` is null) and its render effect publishes the held value, while untracked reads keep the committed frame until both actions settle. Mainline creation over the same value is born held (A29's creation-time form, 2026-09-14). Creation inside the HOLDING action's own body is unaffected: the body's write is unflushed (A28), the creation reads the committed frame.
309
309
**Tension:** A29 (born held) applies to mainline creation only; the "isn't visible" premise does not hold for a render effect created in the body. A future ruling either extends A29 to every posture (`creatingPass` in `enterStagedRead`, prototyped 2026-09-15: +83 B, suite green) or states creation-escapes as the rule and re-examines the mainline form.
310
310
311
-
### O3. A render effect gated away from a never-landing flight keeps the source's write held — violation, open
311
+
### O3. A render effect gated away from a never-landing flight keeps the source's write held — fixed
312
312
313
-
**Status:****violation, recorded** 2026-09-15 — fuzzer #3446 law P1 ("ordinary writes publish after a drain when no visible reader still needs an unresolved answer"), 21 of 1,000 cases in one symptom group, reduced to case 854; reproduced in the posture matrix (`effect × gatedAway` on the "observed only by the matrix reader" state) and pinned`it.fails` in `tests/posture-born-held-and-observation.test.ts`.
313
+
**Status:****violation, fixed** 2026-09-16 — fuzzer #3446 law P1 ("ordinary writes publish after a drain when no visible reader still needs an unresolved answer"), 21 of 1,000 cases in one symptom group, reduced to case 854; reproduced in the posture matrix (`effect × gatedAway` on the "observed only by the matrix reader" state) and pinned in `tests/posture-born-held-and-observation.test.ts`.
314
314
**Current behavior:** a render effect that directly observed an uninitialized async memo registers as the flight's reporter (`_asyncReporters`); when it re-runs without reading the memo (a `show()` gate closes) the source's ordinary write stays held — forever when the flight never lands. A memo between the effect and the flight releases the hold (its re-run clears its status). `reporterBlocksSource` still answers true for the effect from its stale `_pendingSources` / NotReady `source`, and the parked transaction's verdict may not be re-evaluated by a flush with no async event.
315
-
**Rule:** A15 / #3426 — the hold lasts while a LIVE reporter observes the flight; "re-ran and no longer derives from the source" is the fifth liveness case after disposed, zombie, behind-fallback and first-observer. The fix belongs in one `readerLive()` predicate, not a fifth arm.
315
+
**Rule:** A15 / #3426 — the hold lasts while a LIVE reporter observes the flight; "re-ran and no longer derives from the source" is the fifth liveness case after disposed, zombie, behind-fallback and first-observer.
316
+
**Mechanism (2026-09-16):** the predicate was already right — `reporterBlocksSource` judged the re-run effect dead; nothing RE-JUDGED the parked transaction. `recompute`'s tail now treats a pending reporter recovering without its flight landing as the completion event it is: it wakes the transaction it reported to (`wokenTransitions`, the third site after disposal #3372 and boundary reset #3375; `wakeParked` when the reporter carries no stamp), skipped under that transaction's own flush, which judges the landing itself. 21 → 4 of 1,000 fuzzer cases.
317
+
**Remaining form (open):** gate and write in ONE flush (fuzzer case 21; case 79 is the multi-step variant). The effect is notified pending by the write — registering as the reporter — and dirtied by the gate in the same flush; the verdict runs after the pure phase, before effects, so the effect still looks live, the transaction parks, and the effect's run (which would prove it dead) is stashed with the transaction. The hold keeps the run that would release it; disposal releases (#3372). Pinned `it.fails`. Belongs with the effect-phase parking question (#3407: which world an effect's run belongs to when a mainline write and a held flight dirty it in one flush).
Copy file name to clipboardExpand all lines: packages/signals/tests/posture-born-held-and-observation.test.ts
+62-32Lines changed: 62 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -122,43 +122,73 @@ describe("B — creation under a transaction escapes the hold (OBSERVED, spec O2
122
122
});
123
123
});
124
124
125
-
describe("P1 — a reader that stopped reading the flight must not keep its hold (fuzzer #3446 P1; A15 / #3426 live reporter) — VIOLATION, pinned it.fails",()=>{
125
+
describe("P1 — a reader that stopped reading the flight does not keep its hold (fuzzer #3446 P1; A15 / #3426 live reporter)",()=>{
126
126
// Reduced from fuzzer case 854 (seed 3289) and the posture matrix's
127
127
// `effect × gatedAway` cell on the "observed only by the matrix reader"
128
128
// state. A render effect DIRECTLY observing an uninitialized async memo
129
129
// registers as the flight's reporter; when it re-runs without reading the
130
130
// memo (gate closed) nothing visible needs the unresolved answer, yet the
131
131
// source's ordinary write stays held — forever, since the flight never
132
-
// lands. With a memo between the effect and the flight the hold releases
133
-
// (the memo's re-run clears its status); the effect's own stale
0 commit comments