Skip to content

refactor: remove the patch channel and patch-mode list driver - #3229

Merged
ryansolid merged 5 commits into
nextfrom
remove-patch-driver
Sep 2, 2026
Merged

refactor: remove the patch channel and patch-mode list driver#3229
ryansolid merged 5 commits into
nextfrom
remove-patch-driver

Conversation

@ryansolid

@ryansolid ryansolid commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Removes the experimental patch channel and patch-mode list driver end to end. It was always opt-in (patchDriver: false default in both compilers), so this is behavior-neutral for every default user. The decision context: regions own value delivery, and the unified-For design owns list structure — both supersede the channel's push-based delivery machinery, which is the component every audit cycle traced its soundness problems to.
  • Runtime: patch.ts (670 lines), patch-driver.ts (591), and patch-hooks.ts deleted; compiler-contract exports (registerPatch/registerRowOps/registerSlotPatch/patchableRaw, patchDriver/rowProof/driveList) removed from signals/solid/web/universal (client + server); the insert $ll seam stripped; the scheduler's _heldPatches merge dropped; row-ops builders and every emission gate deleted from store/reconcile/optimistic.
  • Field diet: the six-field PatchChannel struct dies; the one core field it carried — the written-keys bound (wk, the O(written) setter-notify/hold-check optimization) — moves onto the target directly. Named-field count is unchanged, so the array hidden-class rule holds.
  • Compilers: patchDriver option, patch.rs/patch.ts analysis modules, row-proof emission, and the dom-patch parity mode removed from both Rust and Babel.
  • The first three commits are cherry-picks of the gut proven green on the region branch; the last two finish the job for next.

Size

Every measured tier shrinks; budgets ratcheted DOWN with notes:

  • signals + createStore: 14.66 → 14.00 kB (−660 B)
  • app: hydrating + every store family: 26.99 → 26.09 kB (−900 B)
  • app: CSR: 13.11 → 12.93 kB (−180 B)
  • core floor / isPending / minimal-app / hydrating no-store: −70 to −160 B each
  • Two patch-only scenarios (csr-app-patch, csr-app-patch-lists) deleted.

Test plan

  • signals 1461 passed, web 667, solid 580, babel-plugin 232, compiler 5335 JS + 49 Rust
  • size gate green with ratcheted-down budgets
  • Rust builds warning-free (dead has_binding removed)
  • jfb select sanity: two A/B runs (8 and 16 iters, order swapped) vs next-tip baseline — select at the 0.1 ms timer floor with direction flipping between runs (noise); select_lots (the amplified selection-map workload the wk bound protects) equal-or-faster for the removal in both runs (0.80x, 0.71x). No wk regression.

Made with Cursor

ryansolid and others added 5 commits September 2, 2026 12:08
…delivery mechanism

Size honesty for the region comparison (driver branches remain the
independent baseline): patch.ts (670 lines) and patch-driver.ts (591)
deleted; channel exports removed from signals/solid/web; the insert
$ll seam stripped; patch-hooks.ts reduced to typed NULL CONSTANTS so
all guarded emission sites compile unchanged and DCE strips them — which
the installable-let design could never prove. pc.wk written-keys fold
bookkeeping stays (write traps own it). Channel tests and the two patch
size scenarios removed; three non-store tiers ratcheted +45/+90/+12 B
for prototype export chunk sharing (gate before product); store tiers
land 230-260 B UNDER their pre-gut budgets.

Suites: signals 1433 passed, web 637 passed, treeshake floors green,
dbmon region fixture functional (probes: tick/sort/remount/unmount).

Co-authored-by: Cursor <cursoragent@cursor.com>
The patchDriver option (config.rs/compiler.rs/node_adapter/index.js/
index.d.ts), wrapPatchMode emission (dynamics.rs), row-proof stamping
(element.rs wrap_pure_row_expression + operations_are_row_inert +
PureRowProof + function-shape capture through shared/transform.rs), and
shared/patch.rs eligibility analysis are deleted; the dom-patch parity
mode, its expectation files, and the eight row-proof probes removed.
Compiler suite: 3923 passed across 29 files. The driver branch keeps the
full grammar as the external-audit comparison.

Co-authored-by: Cursor <cursoragent@cursor.com>
…iversal

Second surface pass: the in-repo babel plugin's patch grammar
(wrapPatchMode/recordPureRow/rowProof program-exit wrap, shared/patch.ts,
config option + normalization, rowproof spec), solid's For $ll list seam
and server channel stubs, the universal renderer's patchDriver method,
and the compiler types.d.ts option. Full monorepo builds; signals 1433 /
web 637 / solid 576 / babel-plugin 138 / compiler 3923 all green; size
gates pass unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
…dead builders, budget reclaim

The cherry-picked gut left null-constant hook seams and the pc struct;
this finishes the job: emission gates and row-ops builders deleted from
store/reconcile/optimistic, the scheduler's _heldPatches merge dropped,
and the six-field PatchChannel struct dieted to the one field the core
actually uses — the written-keys bound, now t.wk directly (same named-
field count, the array hidden-class rule holds). Rust loses the dead
has_binding helper. Patch size scenarios deleted; all seven remaining
tiers ratchet DOWN (up to -900 B brotli on the store-family app).

Suites: signals 1461, web 667, solid 580, babel 232, compiler 5335+49.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 26ac12b

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

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

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 33677680498

Coverage increased (+0.3%) to 71.844%

Details

  • Coverage increased (+0.3%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 1 coverage regression across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

1 previously-covered line in 1 file lost coverage.

File Lines Losing Coverage Coverage
packages/solid/src/client/flow.ts 1 53.13%

Coverage Stats

Coverage Status
Relevant Lines: 1002
Covered Lines: 768
Line Coverage: 76.65%
Relevant Branches: 788
Covered Branches: 518
Branch Coverage: 65.74%
Branches in Coverage %: Yes
Coverage Strength: 14.61 hits per line

💛 - Coveralls

@codspeed-hq

codspeed-hq Bot commented Sep 2, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 7.75%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 135 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
reconcile: deep tree, 10 of ~12k paths subscribed 3.4 ms 3.2 ms +7.75%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing remove-patch-driver (26ac12b) with next (d82c72c)

Open in CodSpeed

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.

2 participants