Skip to content

refactor(signals): the store's backing visibility on the shared predicates — one holdVisible (move 3b, deletion half) - #3525

Merged
ryansolid merged 1 commit into
refactor/owns-holdfrom
refactor/store-hold-visible
Sep 17, 2026
Merged

ryansolid merged 1 commit into
refactor/owns-holdfrom
refactor/store-hold-visible

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Stacked on #3523. Zero semantic change; −313 B minified store. Kept separate from the S6 fix (next PR) so CodSpeed judges each alone.

What

readSource (adoption hold) and pendingBackingVisible (fold) each restated Rule 1's hold arms for a container — committed or staged — with six store-local helpers: heldFromReader, foreignHold, enterHeldBacking, staleReplay, inOwnerContext, inForbiddenScope. One holdVisible(txn, c) now, on core's ownsHold / recordStaleReplay / enterStagedRead:

  • the pass owns the hold, or there is none → staged;
  • a foreign hold → a stale pass keeps committed and is recorded for replay; a deriving pass takes staged and enters (A29).

Both callers serve context-free and children-forbidden readers the committed container themselves (A32). The store-only contracts are kept as written: the speculative peek (deep()/snapshot()), the projection's authoritative-elect backing, HELD truth on an optimistic family, drafts, write-override.

This is the twin serve() (#3523) could not absorb: a container has no node to select on, so the arms stay at the store — once, on the shared predicates, instead of six times.

Gate

check result
signals suite 3011 pass
oracles + 851-cell posture matrix byte-identical to #3523
solid-js / web 626 pass / same 25 pre-existing failures as origin/next in this worktree
size store −313 B minified, −87 B brotli; +createStore scenario −48 B, hydrating + stores −112 B; no caps exceeded

The size ceiling with the entire owner-context arm removed (semantics broken) was −738 B; the remainder is the container choice itself, which no node path can replace.

Made with Cursor

…cates — one holdVisible for both hold kinds (move 3b, the deletion half)

readSource (adoption hold) and pendingBackingVisible (fold) each restated Rule
1's hold arms for a CONTAINER — committed or staged — with their own helpers:
heldFromReader, foreignHold, enterHeldBacking, staleReplay, inOwnerContext,
inForbiddenScope. One holdVisible(txn, c) now, on core's ownsHold /
recordStaleReplay / enterStagedRead: the pass owns the hold (or there is
none) → staged; a foreign hold → a stale pass keeps committed and is recorded
for replay, a deriving pass takes staged and enters (A29). Both callers
serve context-free and children-forbidden readers the committed container
themselves (A32), with the store-only contracts kept as written: the
speculative peek, the projection's authoritative-elect backing, HELD truth
on an optimistic family (heldTruthMasked), drafts and write-override.

This is the twin serve() could not absorb: a container has no node to
select on, so the arms stay at the store — once, on the shared predicates,
instead of six times. Zero semantic change: the 851-cell posture matrix and
both oracles are byte-identical; suite green.

Store −313 B minified / −87 B brotli (the +createStore scenario −48 B,
hydrating + stores −112 B). The size ceiling with the whole owner-context
arm removed was −738 B; the remainder is the container choice itself.

Co-authored-by: Claude via Cursor <noreply@cursor.com>
@changeset-bot

changeset-bot Bot commented Sep 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9db33cf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@solidjs/signals Patch
test-integration Patch
@solidjs/web Patch
@solidjs/babel-plugin Patch
@solidjs/compiler Patch
@solidjs/diagnostics Patch
@solidjs/element Patch
@solidjs/h Patch
@solidjs/html Patch
solid-js Patch
@solidjs/universal Patch

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant