fix(web): revoke GET grants on rebind; never fold single-flight into reads - #3150
Merged
Conversation
…ortcomings. Adds a "Why Solid specifically" section: iterator close as the only protocol-level interruption hook among frameworks, action transactions as the UI half of a saga Effect can't provide, and matching pull-based execution models as the reason no binding library is needed. Co-authored-by: Cursor <cursoragent@cursor.com>
…to reads Co-authored-by: Cursor <cursoragent@cursor.com>
🦋 Changeset detectedLatest commit: bcdf79c The changes in this PR will be included in the next version bump. This PR includes no changesetsWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This was referenced Aug 31, 2026
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.
Closes #3129. Closes #3128.
Two grant-lifetime fixes on the server-function HTTP surface, both one-line runtime changes.
#3129 — a
GET()declaration outlived the function it was made aboutGET()records its grant against a function id;registerServerFunctionrebinds ids freely and never touchedMETHODS. A mutation registered onto a once-declared id (an id collision between integrations, or a module re-evaluated in a live process after an edit dropped the wrapper) inherited both things the declaration grants: GET dispatch and the origin-gate exemption (#3114).The fix binds the declaration's lifetime to the binding: rebinding an id to a different function deletes its
METHODSentry. Module order makes this self-healing — compiled output runsregisterServerReferenceand thenGET()in sequence, so a function that still declares GET re-grants itself immediately after the rebind revokes. Re-registering the same callback keeps the grant (integrations re-running their registration path lose nothing).The regression test pins both halves in gate order: after the rebind, a bare GET meets the re-armed origin gate (403) and a same-origin GET finds the allowlist no longer advertising the reads (405,
Allow: POST), while gated POST dispatch of the new function is untouched.#3128 — the single-flight request header reshaped a cacheable GET body
The fold check keyed off the address (
scripted), not the method, so aGET()-declared read honoredX-Single-Flight— two bodies at one cacheable url (the plain value and a{ value, data }envelope carrying data the flight hook computed from that caller's request), under the author's own publicCache-Control, with noVarynaming the variance. One curl could store the envelope under the plain key for everyone behind a shared cache.The client half of the rule already existed (
client.ts: reads "stay plain — folding per-request flight data into them would defeat caching"); this is the server half: the flight header is honored on POST only. The test verifies a declared read called with the header answers the plain body, emits no flight response header, and never runs the collector.Both from @frenzzy's HTTP-surface audit. All 671 web tests pass, including the #3132 pins merged ahead of this.
Made with Cursor