Patch mode default-on: channel hardening rounds 6–10.14, static manifests, node-driven delivery - #3091
Patch mode default-on: channel hardening rounds 6–10.14, static manifests, node-driven delivery#3091ryansolid wants to merge 56 commits into
Conversation
🦋 Changeset detectedLatest commit: 554520c 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 |
size-limit report 📦
|
Coverage Report for CI Build 33542619826Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Warning No base build found for commit Coverage: 71.572%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 degrade performance by 23.52%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | omit |
169.8 µs | 269 µs | -36.87% |
| ❌ | reconcile: deep tree, 10 of ~12k paths subscribed |
3.4 ms | 3.7 ms | -7.36% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing patch-hardening-r6 (554520c) with next (5eb3250)
Footnotes
-
132 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
|
Post-round-6 + default-flip dbmon (octane harness, alternating 30-iter rounds, midday machine — medians in ms):
Tick at 1.8 matches the recording+probe expectation measured when A1 landed (1.8 vs 1.7 with no demotion check vs 1.9 full-scan) — the round-6 hardening added no regression beyond the already-priced probe cost. Partial-tick diff-skip ratio 0.28–0.30 (better than octane's 0.32). Semantic gate green both rounds. |
|
Patch-mode worth-proof: same branch, same runtime, same fixture source — the ONLY difference is the compiler flag (three-way alternating, 30 iters, medians ms):
Patch mode is what puts this next to octane: classic sits 4.2x behind on the full tick; patch is within ~19%. The ~1.5–3.6 kB bundle cost in the size scenarios buys this column. (Incidentally the flip surfaced in the harness itself: the fixture's opt-out env passed empty compiler options, which now mean patch-ON — fixed to explicit |
|
Round 7 pushed — all nine audit findings fixed, harness-first. Three commits:
Also new: PINV-1..3 per-flush channel-ledger assertions in the Perf, quiet machine: dbmon tick 2.1 ms vs round-6's 1.9 — the +0.2 is the honest price of sound accessor demotion across branches and nested chains (first sound cut measured 2.5; manifest interning, prefix-tree probing, and leaf inlining recovered the rest — two profiler passes attached to the work, not guesses). Partial tick still beats octane (0.5 vs 0.7). Mount's intern misses were profiled to zero after array hoisting; final mount number needs one quiet-machine confirmation (a parallel build was loading the box during the last sweep). Gates: 32/32 monorepo tasks, size scenarios ratcheted with dated notes (net round-7 cost: ~+0.3 kB store apps, ~+0.6 kB patch-list apps), changesets included. |
|
Quiet-machine confirmation sweep (evening, 80% idle, both orders, 30 iters):
Mount fully recovered — the That closes round 7 end to end: 9/9 findings fixed harness-first, gates green, perf within noise of the pre-audit numbers with the soundness holes closed. |
|
Round 8 pushed — 8/8 findings fixed, harness-first again (the new invariant tests committed red where reproducible). Highlights beyond the straight fixes:
Everything else as reported: manifest deep-probe at admission, decimal-key ineligibility in both compilers (byte-parity fixtures regenerated), Gates: 32/32 tasks, 4,323 compiler + 153 Babel + 468 signals + 71 driver tests, size ratcheted (+~0.3 kB per tier with dated notes). dbmon identical to round-7 finals: mount 6.4 / tick 2.0 / partial 0.5, quiet machine, both orders. |
|
Round 9 pushed — 11/11 findings addressed, harness-first, with three findings materially refined during verification:
The rest as reported: per-queue forced-stamp clearing + merge repair, isWrappable bind guards, server-entry Gates: 32/32 tasks, 4,325 compiler tests, size gates ratcheted with dated notes. dbmon 6.3 / 2.1 / 0.6 — parity with rounds 7–8. Standing note for the next design pass (also in the brief): rounds 7–9's P1s are dominated by hand-replicated visibility rules at channel seams. I'm prototyping node-driven delivery (one hidden node per patched record, compiled bodies unchanged) as the by-construction answer before the next audit round — if per-record nodes hold dbmon, that eliminates the timing-divergence class entirely. |
|
Review note from #3161 (For + siblings hydration desync, fixed in 91e300a): the regression came from the list seam's lazy |
36d1d38 to
8527c6e
Compare
|
Heads-up for anyone continuing work on this branch: two review commits landed directly on
Full signals + web suites green on the new head, size inside budgets. The branch is also one commit behind |
|
Structural audit round landed on top of the review commits (no force-push — fetched and built on
Audit of 3e12ffd: sound — Hydration ask: Also merged |
|
Follow-up round landed (
Gates: 1,505 signals + 2 expected-fail pins, 719 web, size green — store-family app actually DOWN 50 B (the emission-time composition deleted), patch tiers +61/+111 B ratcheted with notes. |
4c7eedf to
b31e992
Compare
|
Fold-audit round landed (
Also on the branch since your audit point: the rebase onto the pushed fold commit with the channel integration re-derived for fold semantics (landing-time machinery deleted — staged truth rides held-write semantics, the reveal rides the settle resync loop; the round-10.5 ancestor gate your rewrite reverted is re-applied), and the CodSpeed −11% root-caused and fixed ( Gates: 1,511 signals + 2 expected-fail pins (the same-microtask swallow and wedged |
|
Redesign landed ( The structural version chain: every emission stamps a per-kind version ( Against your findings: (1) and (2) and (4) have no mechanism left to be wrong in — no watermark, no per-queue sweep, no per-item repetition. (3): the settle loop skips staged-fold targets; the fold's own emission carries the reveal, pinned with a single-rebuild assertion. (5): Two contract notes: held-window registrants IMPROVE — their chain connects, so they receive real baseline-sound ops at release instead of an identity rebuild (10.13 pin updated to accept either sound form). Revert-form resyncs resolve COMMITTED raw only — never a lingering draft backing (row escape materializes one), never the composing proxy. Gates: signals 1,511 (+2 expected-fail upstream pins), web 719, parity 153, size green with three ratchets (17.15/19.6/27.4 — flat redesign cost; measured honestly, this is +230 B on the value tier, bought to stop the ~150 B/round accretion this class was generating). Your adversarial repros against the new head would be the confirmation that matters. |
|
Fold audit 2 landed (
Gates: signals 1,513 (+2 expected-fail upstream pins), web 719, parity 153, size green (two 20 B ratchets). Standing merge position, per the thread with Ryan: correctness rounds keep closing, but the branch's PERFORMANCE case is currently unproven — the dbmon driver column can't be measured (the babel-preset fixture path never engages |
|
Perf verification complete ( The sweep (30 iter, servers verified fresh):
With this, both merge blockers from the perf thread are resolved: the driver column demonstrates octane-class update throughput on the branch head, and classic carries no profile-visible tax. Remaining open: the two upstream |
|
Ship ruling ( Deferred to a future RC, recorded in the brief:
State for the final audit: head |
|
Fold audit 3 landed (
Gates: signals 1,515 (+2 expected-fail upstream pins), web 719, size green (one 24 B ratchet, createStore tier 15.3). Head for the next pass: |
|
Fold audit 4 landed (
Gates: signals 1,517 (+2 expected-fail upstream pins), web 719, size green (two ratchets: 15.4/27.55 — the multiset check and epoch plumbing). Head for the next pass: |
|
Fold audit 5 landed ( Primitive rows retain by value: One workspace note: the worktree currently carries unrelated in-progress edits to Store suites 530 green (+2 expected-fail upstream pins). Head: |
|
Correction to my previous comment's workspace note: the Restored to HEAD: working tree clean, and both previously-failing suites pass ( Process note taken: no more backgrounded jobs that perform |
2fadc59 to
d9d147d
Compare
Prod-sound getter demotion (accessed-key recording + bounded adoption probes), transition-merge same-channel coalescing, unbind-safe structural queue dispatch, fixed dispatch windows, initial-construction severing on throw, and active failed-apply resync. Co-authored-by: Cursor <cursoragent@cursor.com>
Both compilers now emit patchDriver/rowProof templates by default (opt out: patchDriver: false). Regenerated fixture outputs and Oxc expectations; parity tier dom-nopatch fences the opt-out. Size scenarios renamed from flip-preview to default-on and ratcheted with round-6 notes. Includes AUDIT-BRIEF-R6.md for the pre-merge audit. Co-authored-by: Cursor <cursoragent@cursor.com>
…ant resync Structural entries capture their owner queue; dispatch defers held consumers into it (deferHeldStructural, live RESYNC at release — row ops are baseline-relative and stale by then); the drain sweeps the LIVE consumer list for held-window registrants and resyncs them (round-7 "receive nothing" pin refined: never ops, always the identity rebuild). The equal-landing/contradicting-landing P1s are PAUSED per Ryan — both are patch-channel integration with #3123's in-flux landing semantics. Two tier ratchets (16.6/19.1). Co-authored-by: Cursor <cursoragent@cursor.com>
One queueIsHeld probe, one deferIntoQueue shape for held consumers, shared channelTarget registration prologue and structuralUnbind. Behavior-neutral: 514 signals store tests + 709 web tests green. Compressed size is a wash (brotli +11 B, raw -34 B) — the repeated shapes were already deduplicated by compression; kept for maintainability so future hold-routing changes land in one place. Co-authored-by: Cursor <cursoragent@cursor.com>
The rebase conflict policy kept the branch's evolving .size-limit.js at each replayed commit, dropping upstream's #3122/#3123 note blocks (the limits themselves were already above upstream's). Restores the six note blocks with post-rebase measured values; all scenarios pass unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
…o paused P1s) Equal-landing flash: emitPatch's raw payload fast path (pc.np) served committed backings directly to deliveries, bypassing visibleView's optimistic-family proxy rule — an equal landing (overrides held) flashed committed state through value patches while classic effects kept the override view. The stash is now gated on non-optimistic families; perf paths keep the payload. Contradicting-landing notification: consumeOverridesNext's wipe emitted through the optimistic lane for an authoritative change — timing divergence, duplicate delivery, and no structural resync (consumption removes the target from `overlaid` before the settle drain's resync loop reads it). The wipe's landing posture now emits a regular bump (coalesces with adoption's emission into one classic-schedule delivery) plus the row-ops resync form at the landing. The settle-drain site keeps the lane form — its own loop covers structure there. Both reproduced RED first in the invariant harness (classic-parity oracle). Full signals + web suites green; size inside existing budgets. Co-authored-by: Cursor <cursoragent@cursor.com>
…derived view The third landing posture was untested: a CONTINUATION landing echoing a replayed keyed add (d813a96's echo-mask semantics) against a driven list. RED first in the invariant harness — the channel delivered the bare landed base (the wipe's resync snapshot, taken mid-reckoning) and per-edit replay drafts, both states classic readers never render. Wipe + replay is ONE reckoning: notifyOptimisticWrites suppresses the write-site row-ops frame while replaying, and consumeOverridesNext emits the landing notification only after the replay half, carrying the optimisticView-composed snapshot (the target-resolved resync form reads pb ?? v — right for the settle-drain revert site it serves, a half-state here). Full signals + web suites green; size inside budgets. Co-authored-by: Cursor <cursoragent@cursor.com>
Entangled retainers (actions sharing one optimistic store) settle together — one completing early strips no mask — and the joint settle's wipe+replay lands the channel on committed truth with no half-state frames. Already green; the posture was the last one unpinned. Co-authored-by: Cursor <cursoragent@cursor.com>
…superseded work Six findings, three root causes, composed with review commit 3e12ffd (one-reckoning landing notification — audited: replaying latch is try/finally-safe with per-edit throw isolation): - Late-registrant sweep rebuilt on registration sequences: fixed window at both edges (in-snapshot entries and mid-drain registrants excluded), held owner queues defer via deferIntoQueue, and the scan is an O(#late) suffix walk (was indexOf-per-entry, quadratic). Contract refinement pinned: plain stores emit at the fold, so pre-flush registrants ride the snapshot with baseline-correct ops. - Drain-resolved structural next (resyncs, held releases, late sweeps) reads visibleStructRows — optimistic families through the composing proxy, never bare committed backing. - Deleted-slot gate: ticks coalesced past a shrink are skipped, snap and resync paths both. - Superseded-work generation: emitLandingConsumption bumps pc.sg; drains skip stale-generation items — transition-held ops can't replay over a landing's resync at settle. - Fifth-posture pin: aborted-retainer survivor kept at classic parity (oracle-anchored). 39/39 invariant harness, full signals (1,504) + web (709) suites green; two size ratchets with notes (+27 B store-family, +41 B list tier). Co-authored-by: Cursor <cursoragent@cursor.com>
Review ask from #3161's follow-through: post-flip, driver-ENGAGED hydration takes a different road than the classic seam (#3161's fix covered) — driveList claims rows positionally by _hk and mints its own listOwner child scope. The new scenario is the driven twin of the static one: store-backed rows whose template PROVES pure (attribute- only binding — text holes disqualify rowProof; emission verified against the compiler for this exact shape under the harness's flags). The update pushes a row THROUGH the engaged driver and bumps a sibling signal; the parity invariants pin no client-created DOM during hydration, no warns, textContent, and sibling node identity across the driven structural update. Both roads now covered: static rows decline at runtime (classic seam), store rows engage. Server harness 62/62, parity matrix 153/153. Co-authored-by: Cursor <cursoragent@cursor.com>
…on, drain dedup, slot-tick preservation Two P1s + two P2s from the follow-up audit, plus two OPEN upstream pins: - Slot-patch registrations stamp `sq` (the suffix scan read 0 and broke immediately — held-window shallow-list mounts stayed stale). The regression test is non-vacuous now: the surviving slot's resync must arrive, and emissions go through the reconcile walk. - emitRowOpsLanding hook: lane-timed (a reverting action's stash must not own the landing's notification) but DRAIN-RESOLVED — the emission-time composed snapshot read the mid-reckoning draft and could reach the DOM ahead of classic. visibleStructRows at drain reads what classic renders. Probed across five landing interleavings at parity. - Per-drain dedup for item-local late-row resyncs (was item-count × consumer-count repeats). - sg-stale SLOT items re-resolve live and keep their delivery (standalone value notifications the landing's row resync does not cover); sg-stale ROW items still drop. - OPEN upstream ×2, pinned it.fails: a second same-microtask continuation landing is swallowed (bare projection, no actions/consumers — committed truth loses the row); an until()-gated action wedges on the swallowed echo. #3123 reckoning seam — flagged, not unilaterally fixed. Full signals (1,505 + 2 expected-fail) + web (719) green; two size ratchets (16.7/19.3), store-family app DOWN 50 B (composition deleted). Co-authored-by: Cursor <cursoragent@cursor.com>
The re-ruled landing contract (truth folds into the retaining transaction, atomic reveal at settle) obsoletes the branch's landing integration wholesale: emitLandingConsumption/emitRowOpsLanding and the superseded-work generation (pc.sg + drain gate + item stamps) are DELETED with the contract they served — staged truth is transition-held (channel held-write semantics apply by construction) and the reveal rides the settle drain's existing resync loop. The registration- sequence sweep window, hold routing, visible-view resolution, and the deleted-slot gate are contract-independent and stay. Re-applies the round-10.5 primitive-owned emission gate the upstream rewrite reverted (settle-loop value emission gated on the local consumer list — silences ancestor channels, round-10 P1-3; two invariant tests caught it). Landing invariants re-pinned to fold semantics: interim landings invisible to both channels, atomic flip at settle, classic-parity oracles unchanged. The two upstream it.fails pins (same-microtask swallow, wedged until()) STILL FAIL under fold — they ride on. Full signals (1,507 + 2 expected-fail) + web (719) + hydration parity (153) green; two ratchets for upstream fold bytes (15.15/27.25). BASED ON UNPUSHED next (a536e29) — hold pushes until it lands. Co-authored-by: Cursor <cursoragent@cursor.com>
The round-10.11 eager path-copying in adoptPB ran per eager child adoption with no channel gate. Ancestor committed raws are only ever served to PATCH consumers (patchableRaw / delivery payloads) — classic readers resolve through proxies and nodes — so in a patch-less app the repair bought nothing and cost plenty: privatizeCommitted re-cloned every freshly adopted interior backing per reconcile (an extra tree copy per iteration), and the clone's identity swap turned downstream equality gates into keyset/deep bump storms (insertSubs 7.8x on the listened-paths deep() bench; CodSpeed -11% on the sparse case). Profiled standalone against the merge-base prod dist: parity restored (interleaved min/median within noise), patch-mode tests unchanged (the deep-path invariants register channels and keep the repair covered). Co-authored-by: Cursor <cursoragent@cursor.com>
…l coverage Four P1s at b31e992, harness-first: - Held slot deliveries defer PER INDEX (entry.hqs): the shared hq flag collapsed multi-slot batches to the first index behind a hold. - Late-registrant sweep moved to DRAIN END with a per-channel highest- emission watermark: the per-item sweep resynced to live state and a later item's baseline ops re-applied on top, double-building rows. Audience unchanged: exactly the entries no snapshot reached, still a suffix tail scan. - stagedApply descends only through live draft proxies (stagedChild): recursing into a SHALLOW store's raw rows mutated committed truth in place — visible before the reveal, notified to no one. Raw children replace their slot wholesale. - Staged-truth folds emit at the reveal: t.sf marks optimistic-family drafts written under the authoritative posture (the staging bracket); both fold-site row-ops gates exempt it, and a slot-diff twin ticks changed slots. The old opt-family gates cover override materializations only — a root array retained through a DESCENDANT override is not overlaid, so the settle loop's resync never reached it. Full signals (1,511 + 2 expected-fail) + web (719) green; four size ratchets with notes (15.2/27.35/16.9/19.45). Co-authored-by: Cursor <cursoragent@cursor.com>
…ng class Five findings at a4c439b, four in the accreted sweep machinery. Per the standing decision, redesigned rather than patched a fifth time: Emissions stamp svAt (per-kind: sv rows, svs slots); the channel tracks the VISIBLE version (svv/svvs — live-queue entry, releaseBatch for stashed items, emission for lane items); entries init av to it and apply an item only when av === svAt-1 (the item's baseline IS their last-seen state). Gaps take ONE flush-end resync after every queue. Deleted: emission-snapshot membership, PcSweep/noteSweep/sweepList/runLateSweeps, maxRq/winEnd watermarks, drainGen/dg, rq/sq stamps. Findings 1/2/4 are unaskable under the chain. Finding 3: settle loop skips staged-fold targets (single reveal notification, pinned). Finding 5: repairAncestorSlots at registration, gated to stale aliases of the SAME child resolved through the family map — the ungated first cut injected tentative rows into committed truth (all four optimistic equivalence failures, one root cause). Revert-form resyncs (cm items) resolve committed raw only — never a lingering draft, never the composing proxy. Held-window registrants improve: chain connects, real baseline-sound ops at release instead of a rebuild (pin updated). Signals 1,511 (+2 expected-fail) | web 719 | parity 153 — all green. Three ratchets (17.15/19.6/27.4): flat redesign cost, accretion stops. Co-authored-by: Cursor <cursoragent@cursor.com>
Five findings at b296640 (3 P1 + 2 P2), all in the chain's edges: - av init is TRANSITION-AWARE: a consumer mounting inside the writing transition reads the SPECULATIVE view, so its baseline covers the stashed emissions (av = sv); the old svv init replayed stashed ops over DOM already built from them (store bac, DOM abc). Ambient mounts keep the visible-version init and receive stashed ops at release. - Staged reveals ride ONE channel: aligned windows (same length) are value replacements — slot ticks only; length changes are structure — row ops only. Both channels for one replacement rebuilt the row twice (lifecycle/focus divergence). - Staged-reveal identity diffs key rows through the FAMILY MAP: the fold re-seats retained rows' raws, and raw-keyed matching rebuilt rows whose proxies never changed. - Held structural releases fast-forward entry.av (a gap right after a release forced a redundant full resync). - Version arithmetic drops |0 coercions (2^31 wrap = permanent delivery suppression at scale). Signals 1,513 (+2 expected-fail) | web 719 green; two 20 B ratchets. Co-authored-by: Cursor <cursoragent@cursor.com>
… version chain; harness ghosts documented Co-authored-by: Cursor <cursoragent@cursor.com>
…/multiplexing deferred to future RC Co-authored-by: Cursor <cursoragent@cursor.com>
…l mark on both channels Two P1s at 6aa9ad9: - av init keys off queueIsHeld(entry.q), not activeTransition: parked actions clear the execution-time flag while held-boundary registrants still read speculative state — the flag-based init handed them a committed baseline and stashed ops replayed over speculative DOM. White-box pin: held registrant av === sv, ambient av === svv, in a parked window. - Aligned-window classification checks reference MOVEMENT, not just length: an equal-length staged reorder is STRUCTURE (row ops); slot ticks only when every differing slot is a non-wrappable replacement. Pinned: reorder = one ops event, zero ticks. - The reveal marks rf on BOTH branches (slot ticks are a reveal too) and the settle loop consumes it — the shallow repro now asserts the row channel is COMPLETELY silent at an aligned reveal (the old assertion filtered out the null resync that revealed the double). Signals 1,515 (+2 expected-fail) | web 719 green; one 24 B ratchet. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
… primitive reorders Three P1s + one refinement at eae7322, and the root simplification the auditor's parked-ambient finding exposed: ADOPTION COMMITS EAGERLY (only notifications batch), so every reader's init read includes every emitted walk state — parked windows, held boundaries, and ambient mounts alike. The visible version now bumps AT EMISSION for all structural emitters, deleting the deferred-svv machinery and the held-queue registration special case; no reader anywhere can replay stashed ops it already rendered. Two stash-window pins updated to the corrected contract (late registrants are owed NOTHING; the deleted-slot gate asserts on the early consumer). - rf reveal marks are EPOCH-stamped (a boolean lingered on descendant- retained roots outside `overlaid` — the settle loop never visits them to consume it — and suppressed a LATER revert's resync). - rf is set only on PROVEN emission (emitSetterRowOps returns emitted; the slot branch counts ticks) — a no-op fold suppressed the only revert resync a driven list needed. Pinned: no-op staged fold, revert still lands [1]. - Equal-length PRIMITIVE permutations are structure (classic keys primitive rows by VALUE): same multiset + moved positions = row ops, zero slot ticks. Pinned. Signals 1,517 (+2 expected-fail) | web 719 green; two ratchets (15.4/27.55). Co-authored-by: Cursor <cursoragent@cursor.com>
…hing buildRowOps admitted only wrappable rows to the occurrence-aware key queues: a primitive permutation emitted sources:[-1,…], rebuilding every moved row instead of retaining nodes. Primitives now key by their VALUE on both the queue-build and match sides (classic value-identity; duplicate occurrences already sound through the queues; undefined rows still rebuild). Pinned: a staged primitive permutation's ops carry no -1 sources. NOTE: committed scope is exactly this fix + pin — core.ts/verdict.ts carry unrelated in-progress edits (a #3166 revert) in the worktree that break tests/latest-pending-probe-mid-flight and fold-3164's store path; left untouched. Store suites 530 green (+2 expected-fail pins). Co-authored-by: Cursor <cursoragent@cursor.com>
…drift ratchets Co-authored-by: Cursor <cursoragent@cursor.com>
…ation — three drift ratchets Co-authored-by: Cursor <cursoragent@cursor.com>
…room on three tiers Co-authored-by: Cursor <cursoragent@cursor.com>
d9d147d to
c48aed8
Compare
…cher key spaces - INV-6 (P1): a settle-drain revert bump arms a fresh override on the delivery signal AFTER its lane resolved; with another flight open it lands there and survives to quiescence. Deliveries now CONSUME any override on the notification signal (pure-notification node; _transition left for parked plain-write bookkeeping). - Mixed identities (P1): object rows key through keyFn (usually a primitive id) and collided with value-keyed primitive rows in one map. buildRowOps now holds two key spaces; the identity prefix scan is kind-aware (keyFn on a primitive yields undefined on both sides and falsely aligned different values). - undefined moves (P2): undefined rows and sparse holes participate via a sentinel instead of being skipped — plain moves retain rows. Repros: matcher-level pins for both key-space findings; the equal-landing tests now enforce INV-6 through the suite exit code. Size: +31 B store-family, +47 B rowProof tier (ratcheted with notes). Co-authored-by: Cursor <cursoragent@cursor.com>
…lueZero A moved NaN row was rebuilt: the matcher (Map, SameValueZero) proved the source, then applyOps re-tested the pair with strict !== and replaced the node — losing lifecycle/focus identity classic rendering keeps (classic's newIndices Map matches NaN for free). One inline SameValueZero comparison on the refRebuild branch (+12 B rowProof tier, ratcheted). Co-authored-by: Cursor <cursoragent@cursor.com>
|
Held out of rc.5 (decision 2026-09-01): an audit probe found the patch channel tearing through the A second structural review identified the root pattern: the channel re-decides visibility at emission/delivery time with private bookkeeping (counters, transaction stamps, transition-keyed stashes), so every new scheduler behavior (merges, boundary holds, parked windows, now steals) has needed a hand-written mirror. Plan for the rc.6 window, before default-on ships:
CI is otherwise clean at |
…t of rc.5) External audit probe, reproduced verbatim then pinned it.fails: a registerPatch consumer on the confirming foreign store observes the new world mid-hold (saving=true at delivery) while value-channel bindings correctly hold — the delivery reads its view outside the masked read seam, so node-mask holds (the flip-entanglement steal) are invisible to it. rc.6 consolidation: deliveries read through the store traps' hold resolution + snapshot compare; structural stash mirrors the steal like mergeTransitionState mirrors merges. No changeset: test-only. Co-authored-by: Cursor <cursoragent@cursor.com>
…ns move to the seam Held #3091 out of rc.5 over the until()-entanglement patch tear. This pass fixes the class at the read seam, zero core-scheduler changes: - nodeValue held-truth arm: the steal parks node truth PAST the flush while the backing commits eagerly — committed truth then lives only in _value, which the untracked fallthrough never served. Untracked readers (userland untrack(), the channel's visible view) saw the future while tracked readers held. User-visible beyond the channel. - Parked-truth deferral (value): optimistic-family deliveries whose record truth is parked under a not-done transaction defer without consuming; a redrive stashes on the holder (named by the nodes' own _transition — follows merges and the steal for free) and re-bumps at its commit. Landings emit with no ambient transaction, so transaction stamps could not gate this; only t.fam?.opt probes (plain bumps park the delivery signal itself — dbmon path never probes). - Parked-truth re-stash (structural): apply-time probing subsumes the carrier-side mirrors (steal stash-move + forwarding pointer were built, proven, then DELETED — ordering-free beats carrier games). Probes pinned as regular tests (value + structural twins). Sizes: +36 B createStore, +294 B patchDriver tier, +221 B list tier (ratcheted). Co-authored-by: Cursor <cursoragent@cursor.com>
Patch channel: default-on flip + full hardening line
Scope:
next..patch-hardening-r6(33 commits). This PR carries the complete patch-mode line since round 6: the DEFAULT-ON compiler flip, ten audit-hardening rounds (all findings closed), static read manifests, the node-driven delivery architecture, two size passes, and the #3123 landing-consumption integration. The runtime audit backlog is EMPTY — nothing paused, nothing open except P3 diagnostics polish.What ships
Default flip (patch mode ON)
Both compilers (Babel + Oxc/Rust) emit
patchDriverbindings by default; opt out withpatchDriver: false. All fixture corpora regenerated; parity tierdom-nopatchfences the opt-out. Server entries carrypatchDriver/rowProofstubs so compiled DOM modules link under Node.Node-driven delivery (the architecture change)
Patch delivery moved from queue-driven to NODE-driven: each channel owns a detached
deliveryEffect(bare node, one static source, no root/owner bookkeeping) bumped by a channel signal. Emissions are signal writes — they inherit the engine's scheduling, transition stamping, and hold semantics instead of reimplementing them queue-side. Raw payload fast path (pc.np) serves fresh backings scan-free on the hot path. dbmon: mount 6.6 vs classic 15.1 ms, tick 2.1 vs 7.9, partial 0.6 vs 1.2 (2.3×/3.8×/2×).Static read manifests
Compilers emit each template's read set (
registerPatch(record, fn, keys)); manifests are interned per template (WeakMap, prefix trees for deep paths) and shared by reference across rows. Closes the prod-soundness hole (getter demotion probes exactly the declared envelope) and the round-7 mount regression (~0.1 ms/1000 rows).Hardening rounds 7–10.14 — the invariant harness
Every audit finding closed harness-first (RED test, then fix). The big structural rules now pinned:
Observability (dev-only, zero prod bytes — verified byte-identical)
Attribution cause chains flow through deliveries (
patchEmit/patchDispatch/patchDelivered/patchStructural), channel-sideHUGE_FAN_OUT/WIDE_WRITEtwins, synthetic structural rerun events.Size
Two dedicated size passes (recording-proxy deletion + single-mode dispatch; shape consolidation). Costs are tiered pay-for-use:
.size-limit.js.Verification
packages/signals/tests/store/patch-invariants.test.ts— the channel-contract harness (axis products: registration mode × backing shape × lane × timing × consumer lifecycle)packages/web/test/for.patchinvariants.spec.tsx— driver-level invariants (deep paths, holds, selections, cross-family)packages/signals/AUDIT-BRIEF-R6.md(per-round findings + fixes),packages/signals/DESIGN-PATCH-CHANNEL.md(architecture + decisions)