Skip to content

Commit 0a44c6c

Browse files
committed
docs(signals): Q-6 — what D-40 costs (prototype); pins unwrap the status error
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_015Q7JD9PktsxtBJJbWmtuwr
1 parent 0097594 commit 0a44c6c

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎packages/signals/docs/OPEN-QUESTIONS.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ The sequence is S-41: `count` 1 → 2; `data(2)` rejects while the sibling `slow
2424

2525
**Where the record leans.** B. F-1 (the fallback is content, F-4, and `Error 2` beside `slow`'s `1` is a value beside a stale derivation of its input); F-2 (a change that needs async shows nothing of itself until that async has landed; the error is part of the change); D-39's reading of the mirror. A was never ruled: the engine publishes an error straight into the node's working status, which is also what reads and effects see, so the error has one state where a value has two (staged, committed). "An error is the resolved future" is true of what the hold waits on, and both columns agree there.
2626

27+
**What B costs (prototype, 2026-10-12, branch `proto/staged-error`).** An error a held pass finds is staged in `_pendingValue` (a config bit marks it), propagated to dependents as a staging of their own by the same walk a published error takes, thrown to readers in the hold, and published by the commit when the frame lands; a held recovery keeps the shown error until its landing. S-41 passes in full, S-42 except the untracked read through the retry (the re-ask replaces the shown error with its pending mark, D-39's open deviation), the full suite is otherwise green, and #3886's own tests go from 43 to 35 failures (the rest are the standalone bugs and its contract changes). Untuned cost: **+243 B brotli / +764 B minified on the core floor**, about the same on every scenario, 230 B over the caps. The mechanism duplicates the immediate error path rather than replacing it; a size-neutral build would make every error stage (a plain flush commits it at its seam) and retire the immediate path, which is a larger change than the prototype.
28+
2729
**Not in the question.** The standalone bugs #3886 found beside this, each its own fix with no rule: an async recovery to the last good value never notifies the effect even with nothing held; a write to a failed writable memo does not clear its error; a thrown value whose `toString`/`message` throws reaches the arm as the formatter's error; a failing async comparator does not release unobserved lazy readers; snapshot scopes do not capture a failure.
2830

2931
### Q-7. `loadingValue` after a shown failure: does a pending retry serve the seed again? (from #3886)

‎packages/signals/tests/error-is-an-answer.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ function scene(boundary: boolean) {
7777
try {
7878
return data();
7979
} catch (e) {
80-
return e;
80+
// The engine throws its status wrapper; the user's error is its cause.
81+
return (e as Error).cause ?? e;
8182
}
8283
};
8384
return {

0 commit comments

Comments
 (0)