Repository navigation
Conversation
…rly errors (#50, #51, #52) - affects: a structured source's accessor wraps its store, so pass Solid the store, as refresh already did (rt, rt-web, oracle). New scenario S-affects-keyed. - A keyed source that takes a guess merges each answer into its draft by key: a row whose key stays keeps its object and takes the new leaves, so its readers no longer re-run on every answer. - guide/async.md §3: the catch also writes the error through onFlush, so a failure before the first await is not erased by the clear (EF-8). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117BoWP9oqnMKPnNUGcaK7a
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Ryan · project thread
Fixes #50, fixes #51, fixes #52 (all reported by @revosw while porting an app).
#50:
affectson a keyed or structured source that takes a guess. The accessor of such a source wraps its store (() => store).refreshalready unwrapped it, butaffectspassed the wrapper straight to Solid, which threwINVALID_AFFECTS_TARGETin dev and did nothing in prod (AC-5). The fix unwraps the store inrt.ts,rt-web.tsand the oracle. The new scenarioS-affects-keyedfailed on main in the compiled runner and the oracle, and passes now.#51: a keyed guess source replaced every row on each answer. The derive of
createOptimisticStoreassigneddraft[i] = x. It now merges each answer by key (landDraft): a row whose key stays keeps its object and takes only the changed leaves. A direct check against Solid next shows a reader of row 0 ran 3 times over 3 answers before the change and runs once after. Two alternatives didn't work. Returning the answer from the derive, so Solid reconciles it, brokeS-store-7with Solid's internal errorreading '_x'.reconcile(v, key)(draft)refuses an async derive's draft ("not a store proxy"). The unkeyed path still usesassignDraft.#52: the guide's action example dropped an error thrown before the first
await. Per EF-8, theonFlushclear runs after the action's first instant, so it erased a catch write from that instant. Inguide/async.md§3 the catch now writes the error plainly, which lands with the revert, and also throughonFlush, which runs after the clear in the same instant (call order). I checked this in the interpreter with a sync throw and an async reject: both end on the error, and the async case still shows the revert and the error in one frame. The guide also explains why, in one paragraph.Tests (Solid next @ 2105ffb): interpreter 130 pass, compiled 130/0, oracle 130/0, types 176/0, ssr 122 pass / 7 skip (run before the rebase onto eb31e29).
Generated by Claude Code