refactor(signals): shared read predicates — readerSeesCommitted, visibleOverride, one hasActiveOverride - #3515
Conversation
🦋 Changeset detectedLatest commit: 449ef6e The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
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 |
Coverage Report for CI Build 35255614381Warning No base build found for commit Coverage: 71.304%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
Merging this PR will not alter performance
Comparing Footnotes
|
…bleOverride, one hasActiveOverride Zero-semantic-change step 1 of DESIGN-CONSOLIDATION move 3b (one implementation per rule). read()'s slow tail called the full committed-vs-staged arm inline; it is now readerSeesCommitted(el, c, owner, noCommitted), documented as the rule it enforces, for the store's backing selection and the verdict arms to adopt. hasActiveOverride existed twice (lanes.ts, store.ts) and the composite 'hasActiveOverride && !unflushedOverride' was restated at five sites (latestRead, computePendingState ×2, the store's reader selection, plus the store's own visibleOverride) — one visibleOverride in core now. Gate: signals suite green; visibility oracles and the 738-line posture matrix report are byte-identical to next. Co-authored-by: Claude via Cursor <noreply@cursor.com>
Regenerate the rules index and record bundle measurements after rebasing the shared read predicates over current next.\n\n— GPT-5.6 Sol via Cursor Co-authored-by: Cursor <cursoragent@cursor.com>
6c86076 to
449ef6e
Compare
Step 1 of DESIGN-CONSOLIDATION move 3b (one implementation per rule). Zero semantic change — the gate is the point of the PR, not the code.
What moved
readerSeesCommitted(el, c, owner, noCommitted)(core.ts): the full committed-vs-staged arm — untracked / lane-reads-committed (Existing and newly revealed latest readers display different values #3460) / nothing staged / children-forbidden (A32) / stale-of-foreign (heldFromStale) / HELD-truth mask (2.0.0-rc until doesnt entangle the update resolving it with the action update #3164) — thatread()'s slow tail used to inline. Documented as the rule it enforces; the store's backing selection and the verdict arms adopt it in step 2.hasActiveOverride: existed twice (lanes.ts, store.ts). One definition in core.ts now; lanes.ts and store.ts re-export.visibleOverride(hasActiveOverride && !unflushedOverride, A28 (5)): was the store's helper, restated by hand at latestRead, computePendingState ×2 and the store's reader selection. One definition in core.ts; five call sites.Hot paths untouched:
readNodeFast,read()'s fast block,setSignal,recomputeare byte-identical.read()'s override arm keeps its shape (the AUTHORITATIVE_OBSERVED mark still fires for an unflushed override) — only the inline test becamehasActiveOverride(el).Gate
nextnextnextorigin/nextin this worktree (component-location naming, unrelated)treeshakefixture)Three size-limit caps ratcheted (+9 / +44 / +21 B brotli on esbuild app bundles) with notes: the ten scenarios moved −19…+45 B in both directions, compressor layout, not code.
Local wall-clock microbench A/B was order-dependent (−7% one order, +4% the other) — CodSpeed on this PR is the perf verdict; structurally only
read()'s slow tail gained a call (small, monomorphic, inlined).Next (step 2)
serve(el, reader): the store'spendingBackingVisibleandserveDataKeyadoptreaderSeesCommitted; thenreaderLive(reporter, verdict); then the verdict-deferred list.Made with Cursor