Repository navigation
docs(spec): an async actor stays off the server through its own fxs, not its spawn - #11829
Merged
Merged
Conversation
…not its spawn Spec 005 SSR mode said the spawn fx is :platforms-gated and that an event handler can be client-gated. Neither holds: :rf.machine/spawn carries no :platforms, and :platforms on an event registration gates nothing (Spec 011 Effect handling on the server). The paragraph now names what does keep an async actor off the server, agreeing with Pattern-WebSocket SSR.
mike-thompson-day8
marked this pull request as ready for review
October 30, 2026 01:23
mike-thompson-day8
added a commit
that referenced
this pull request
Oct 30, 2026
Merge: 4306fc7 at 2026-10-30T01:23:52Z. Completeness: Both misleading Spec 005 sentences from rf2-2be6n are corrected and cross-linked to the owning Spec 011 contract. Full patch and complete source bead read. Correctness: The text agrees with the spawn registration inspected in the preceding review, Spec 011 platform rules, and the WebSocket guidance. Reported JVM control proves an event runs while its client-only effect skips. No finding. Implementation quality: A tightly scoped prose correction teaches one existing mechanism and avoids adding another platform-gating API. Findings: none. Source forward pointers: none.
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.
Summary
Spec 005 §SSR mode ("Machines are synchronous-only under SSR") said two things the framework does not do: that
:platforms-style suppression applies at the spawn-fx layer, and that a child actor can be spawned "from a client-gated event handler". This rewrites those two sentences and leaves the rest of the paragraph untouched.:rf.machine/spawnis registered with a:doconly and carries no:platforms(implementation/machines/src/re_frame/machines.cljc), so it defaults to both platforms and the spawn runs on a server frame.:platformson an event registration is stored metadata the router never reads (Spec 011 §Effect handling on the server, rule 5), so an event handler cannot be client-gated.The paragraph now says what does keep an async actor off the server: register the actor's own async fxs
:platforms #{:client}(the server's fx resolver skips them and emits:rf.fx/skipped-on-platform), or dispatch the spawning event only from client code, for example afterssr/hydrate!returns. It cross-links Spec 011 §Effect handling on the server, and agrees withspec/Pattern-WebSocket.md§SSR at trunk.Witness: JVM probe
A scratch deps project outside the tree, with
:local/rooton this branch'simplementation/core, run withclojure -M -eon an inline form: an event registered{:platforms #{:client}}that sets a flag and emits a{:platforms #{:client}}fx, dispatched on a{:platform :server}frame.Captured exit: 0. Output (final line):
The event handler ran on the server frame despite its
:platforms #{:client}; the control, its:platforms #{:client}fx, was skipped with one:rf.fx/skipped-on-platformtrace.Quality gates
py -3.14 scripts/check_doc_slugs.py, run by absolute path: exit 0.#effect-handling-on-the-server-planted(single-line anchor, 1 match). Slug gate exit 1:git checkout HEAD --; the working file's default-form blob hash 8b4c5fa546cf2c9e2e0c53819141f675c4132b10 equals the committed blob hash, andgit diff --quiet HEADexits 0. Line endings unchanged (CR == CRLF, no bare LF).py -3.14 -m mkdocs build --strict: exit 0 (the built page carries the new text).check_retired_spellings,check_retired_composition_vocab,check_keyword_catalogue_drift,check_flattened_lists,check_escaped_continuations,check_inject_cofx_residue,check_view_lifetime_residue,check_egress_walker_residue,check_ep_status_sync,check-no-hardcoded-paths.sh): each exit 0.Nothing validates markdown prose or rendering; the paragraph was read by hand.