refactor: remove the patch channel and patch-mode list driver - #3229
Merged
Conversation
…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 detectedLatest 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 |
Coverage Report for CI Build 33677680498Coverage increased (+0.3%) to 71.844%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
Merging this PR will improve performance by 7.75%
|
| 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)
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
patchDriver: falsedefault 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.patch.ts(670 lines),patch-driver.ts(591), andpatch-hooks.tsdeleted; compiler-contract exports (registerPatch/registerRowOps/registerSlotPatch/patchableRaw,patchDriver/rowProof/driveList) removed from signals/solid/web/universal (client + server); the insert$llseam stripped; the scheduler's_heldPatchesmerge dropped; row-ops builders and every emission gate deleted from store/reconcile/optimistic.PatchChannelstruct 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.patchDriveroption,patch.rs/patch.tsanalysis modules, row-proof emission, and thedom-patchparity mode removed from both Rust and Babel.next.Size
Every measured tier shrinks; budgets ratcheted DOWN with notes:
csr-app-patch,csr-app-patch-lists) deleted.Test plan
has_bindingremoved)selectsanity: two A/B runs (8 and 16 iters, order swapped) vs next-tip baseline —selectat 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