Skip to content

Patch mode default-on: channel hardening rounds 6–10.14, static manifests, node-driven delivery - #3091

Open
ryansolid wants to merge 45 commits into
nextfrom
patch-hardening-r6
Open

Patch mode default-on: channel hardening rounds 6–10.14, static manifests, node-driven delivery#3091
ryansolid wants to merge 45 commits into
nextfrom
patch-hardening-r6

Conversation

@ryansolid

@ryansolid ryansolid commented Aug 28, 2026

Copy link
Copy Markdown
Member

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 patchDriver bindings by default; opt out with patchDriver: false. All fixture corpora regenerated; parity tier dom-nopatch fences the opt-out. Server entries carry patchDriver/rowProof stubs 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:

  • A patch body never reads an accessor raw — admission scans, adoption re-scans, and deferred demotion (getter arrivals convert consumers to per-entry render effects reading their OWN manifest envelope; failed computes never commit; errors route per-entry to the registrant's boundary).
  • Deliveries mirror classic effects, lane for lane — optimistic writes are lane-timed, held boundaries defer INTO their owner queues (value AND structural, with live resync at release), late registrants under held commits get identity-aligned resyncs, transition merges canonicalize stamps (no duplicate or lost deliveries).
  • Emission is primitive-owned — one bump primitive owns consumer gating, ancestor bubbling, and transaction-scoped dedup; no seam gets to skip ancestors.
  • 2.0.0-rc.5 optimistic store resets when new data arrive #3123 integration (final round): equal landings never flash committed state through value patches (optimistic families always take the override-composing proxy read — the payload fast path is gated to non-optimistic families); contradicting landings notify authoritatively — one regular-timed delivery coalesced with the adoption's emission plus a row-ops resync at the landing.

Observability (dev-only, zero prod bytes — verified byte-identical)

Attribution cause chains flow through deliveries (patchEmit/patchDispatch/patchDelivered/patchStructural), channel-side HUGE_FAN_OUT/WIDE_WRITE twins, synthetic structural rerun events.

Size

Two dedicated size passes (recording-proxy deletion + single-mode dispatch; shape consolidation). Costs are tiered pay-for-use:

  • value tier (any app with one eligible template): ~1.5 kB brotli over classic
  • list tier (driver-eligible store lists): ~2.1 kB on top — the tier the dbmon wins accrue to
  • All scenario budgets green post-rebase; the audit-hardening total on the value tier is ~1.9 kB, measured and annotated per round in .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)
  • Full signals (1,496) + web (709) suites green; compiler parity 108/108 with patch on; size-limit all scenarios green
  • Audit trail: packages/signals/AUDIT-BRIEF-R6.md (per-round findings + fixes), packages/signals/DESIGN-PATCH-CHANNEL.md (architecture + decisions)
@changeset-bot

changeset-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 46930be

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 Major
@solidjs/web Major
@solidjs/babel-plugin Major
@solidjs/compiler Major
@solidjs/universal Major
test-integration Patch
@solidjs/element Major
@solidjs/h Major
@solidjs/html Major
solid-js Major
@solidjs/diagnostics Major

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

@github-actions

Copy link
Copy Markdown

size-limit report 📦

Path Size
signals: core floor (createSignal/Memo/Effect/Root/flush) 7.72 KB (+0.69% 🔺)
signals: + createStore 14.12 KB (+1.02% 🔺)
signals: + isPending/latest 9.7 KB (+0.96% 🔺)
app: render + one signal (the simple-app floor) 10.44 KB (+0.84% 🔺)
app: hydrating (no stores) with Show/For/Loading/Errored/lazy 17.15 KB (+0.46% 🔺)
app: hydrating + every store primitive family 25.52 KB (+0.54% 🔺)
app: CSR with Show/For/Loading/Errored/lazy 12.55 KB (+0.18% 🔺)
app: CSR flip preview — + patchDriver (non-list patch templates) 0 B (-100% 🔽)
app: CSR flip preview — + rowProof (patch-mode list driver) 0 B (-100% 🔽)
frames: eager client consumer (frames client + transport, lazy codec) 10.64 KB (0%)
app: CSR default-on — + patchDriver (non-list patch templates) 14.56 KB (+100% 🔺)
app: CSR default-on — + rowProof (patch-mode list driver) 16.79 KB (+100% 🔺)
@coveralls

coveralls commented Aug 28, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 33487115013

Coverage remained the same at 71.572%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1003
Covered Lines: 767
Line Coverage: 76.47%
Relevant Branches: 791
Covered Branches: 517
Branch Coverage: 65.36%
Branches in Coverage %: Yes
Coverage Strength: 14.55 hits per line

💛 - Coveralls
@codspeed-hq

codspeed-hq Bot commented Aug 28, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 5.63%

⚠️ 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 regressed benchmark
✅ 135 untouched benchmarks
⏩ 132 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
reconcile: deep tree, 10 of ~12k paths subscribed 3.4 ms 3.6 ms -5.63%

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 (a4c439b) with next (a536e29)

Open in CodSpeed

Footnotes

  1. 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.

@ryansolid

Copy link
Copy Markdown
Member Author

Post-round-6 + default-flip dbmon (octane harness, alternating 30-iter rounds, midday machine — medians in ms):

op octane solid (this branch) ratio (octane/solid score)
mount 4.00 6.40 0.63–0.67x
tick 1.60 1.80 0.83–0.85x
tick_partial 0.70 0.50 0.93x
remount 4.10 4.80 0.77–0.79x
sort 2.00 2.30 0.74–0.84x
unmount 1.60 1.70 high variance

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.

@ryansolid

Copy link
Copy Markdown
Member Author

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):

op octane solid patch (default) solid classic (patchDriver: false) patch speedup
mount 4.10 6.40 14.10 2.2x
tick 1.60 1.90 6.70 3.5x
tick_partial 0.70 0.50 1.10 2.2x
remount 4.30 4.80 9.10 1.9x
sort 2.10 2.20 2.60 1.2x
unmount 1.70 1.70 2.20 1.3x

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 patchDriver: false in the octane repo before measuring.)

@ryansolid

Copy link
Copy Markdown
Member Author

Round 7 pushed — all nine audit findings fixed, harness-first. Three commits:

  1. Red invariant harness (committed failing, before any fix): channel contracts, driver throw-atomicity matrix over every build entry point, lane-interleaving with an effect-parity oracle, consumer-list lifecycle at emission/drain/merge boundaries, and imports⊆documented-surface contract tests per generate mode. 10 red / 8 green against the audited tree — each red reproduced a finding; the greens document invariants that already held (initial-construction atomicity, staged-update atomicity, deep resync atomicity, universal import discipline).
  2. Runtime fixes for P1-2/3/5/6 and P2-2/3/9 (see AUDIT-BRIEF-R6.md §Round 7 for the per-finding approach).
  3. P1-1 + P1-4: static read manifests from BOTH compilers (hoisted _mf$ arrays, byte-parity, full fixture regen — 4321 oxc + 153 babel tests green) replacing runtime recording, which provably cannot see untaken ternary branches; Renderer/README/type now document patchDriver with contract tests pinning compiled imports to documented surfaces.

Also new: PINV-1..3 per-flush channel-ledger assertions in the __TEST__ invariant infra — registration accounting, stamp retention, and queue drainage are now checked at every quiescence point in every test, not per-scenario.

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.

@ryansolid

Copy link
Copy Markdown
Member Author

Quiet-machine confirmation sweep (evening, 80% idle, both orders, 30 iters):

op octane solid (round 7 final) round-6 reference
mount 4.10–4.20 6.20–6.40 6.30–6.40
tick 1.60 2.00 1.90
tick_partial 0.70 0.50–0.60 0.50
remount 4.00–4.30 4.60–4.70 4.80

Mount fully recovered — the _mf$ hoisting eliminated the intern misses exactly as profiled. The final price of prod-sound accessor demotion across ternary branches and nested chains is +0.1 ms on the full tick (~5%), zero on mount, and partial ticks still beat octane. Classic (patch off) remains 6.7 on the same tick for scale.

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.

@ryansolid

Copy link
Copy Markdown
Member Author

Round 8 pushed — 8/8 findings fixed, harness-first again (the new invariant tests committed red where reproducible). Highlights beyond the straight fixes:

  • The P2 duplicate-apply finding had a deeper root cause: patchableRaw served pb ?? v, leaking uncommitted transition drafts to mid-transition mounts. Initial applies now read the COMMITTED view, and generation-stamped drains skip consumers that initialized from an entry's state (transition releases exempt themselves — their late consumers saw the pre-commit view). The fold path was verified unreachable for the reported interleaving — the walk queues value entries before structural ops by design, and a test now pins that — but the cross-queue optimistic window was real.
  • The structural-capture fix nearly shipped a 3.7 kB regression: binding captured records needs raw→proxy wrapping, and importing wrapNext into the channel would retain the entire trap/write engine in store-less bundles that merely compile a rowProof list. The size gate caught it; the wrap now rides a hook createTarget installs (if no store ever created a target, no raw can need resolving).
  • Tentative ancestor bubbles are two-sided: lane-timed forced entries for in-flight visibility plus settle-held twins, so reverts restore ancestor expressions and landings show landed truth — the harness asserts both directions.

Everything else as reported: manifest deep-probe at admission, decimal-key ineligibility in both compilers (byte-parity fixtures regenerated), rowProof on the createRenderer surface with the contract test extended to the whole patch tier, and the universal patchDriver commit phase untracked.

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.

@ryansolid

Copy link
Copy Markdown
Member Author

Round 9 pushed — 11/11 findings addressed, harness-first, with three findings materially refined during verification:

  • The gen-stale finding's ambient case self-corrects (eager adoption swaps the committed backing at walk time, so pre-flush mounts read the new state — pinned by a test). The REAL stale window was mid-transaction, and the fix is semantic: the skip rule now applies only to entries emitted from committed-VISIBLE state, patchableRaw serves the held view for masked targets, and the mount invariant test anchors to what an untracked proxy reader sees rather than to any implementation detail.
  • The optimistic-getter finding uncovered a missing seam, not just a missing probe: tentative reconciles never emitted on the record's own channel at all — effects saw the tentative view, patches didn't. They now emit the view at lane timing, the optimistic drain probes payloads for accessors, and demotion there runs its re-drives IMMEDIATELY (the global render queue is stashed in flight; deferral would postpone visibility to settle).
  • The NaN/unstable-getter fallback fix is structural: the manifest IS the read set, so the effect fallback's compute pass reads the declared envelope directly and never executes the body — write-free by construction, applied to both web and universal drivers.

The rest as reported: per-queue forced-stamp clearing + merge repair, isWrappable bind guards, server-entry patchDriver/rowProof (notSup/identity, matching the template stub class), function-intermediate probes (accessor carriers demote conservatively), safe-integer-only manifest keys in both compilers, and unchanged reconciles no longer bubble. The attribution CI flake is fixed two-sided: the harness mutes its expected demotion warnings, and the attribution test now counts its own diagnostic's warns instead of the process-global total.

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.

@ryansolid

Copy link
Copy Markdown
Member Author

Review note from #3161 (For + siblings hydration desync, fixed in 91e300a): the regression came from the list seam's lazy mapArray creation minting the list's hydration id scope at insert time instead of source position. The fix makes a hydrating <For> create eagerly, which covers the classic path this PR inherits — but once this PR arms the driver by default, driver-ENGAGED hydration takes a different road: driveList claims rows positionally by _hk and mints its own listOwner child id at insert time. Before flipping, the parity matrix should pin the for-then-siblings fragment shape (now in test/harness/scenarios.tsx) with a store-backed, stamped-row list that actually engages — verifying siblings after a DRIVEN list keep their keys on both the engage and decline roads.

@ryansolid ryansolid changed the title Patch channel round-6 hardening + patch-mode default flip Aug 31, 2026
@ryansolid

Copy link
Copy Markdown
Member Author

Heads-up for anyone continuing work on this branch: two review commits landed directly on patch-hardening-r6 — do not force-push over them; fetch and rebase local work on top.

  • 3e12ffd — P1 fix found while reviewing the 2.0.0-rc.5 optimistic store resets when new data arrive #3123 integration: the third landing posture (a CONTINUATION landing echoing a replayed keyed add, delivered to a driven list) was untested. Red harness first: the row-ops channel served the bare landed base (the wipe's mid-reckoning snapshot) plus per-edit replay drafts — states classic readers never render. Fix: wipe + replay notify as ONE reckoning — notifyOptimisticWrites suppresses write-site row-ops frames while replaying, and consumeOverridesNext emits the landing notification after the replay half via emitLandingConsumption, carrying the optimisticView-composed snapshot. The changeset for the landing-integration entry was extended to cover it.
  • 2226872 — test-only: pins the fourth posture (settle-drain reckoning). Entangled retainers settle together — one action completing early strips no mask — and the joint settle lands the channel on committed truth. Already green; now locked.

Full signals + web suites green on the new head, size inside budgets. The branch is also one commit behind next (#3162, web-only preload merge — no interaction); a trivial merge when convenient.

@ryansolid

Copy link
Copy Markdown
Member Author

Structural audit round landed on top of the review commits (no force-push — fetched and built on 3e12ffdb/22268722 as asked). Three root causes behind the six findings:

  • Sweep mechanics (holds + window + quadratic, one mechanism): the late-registrant sweep is rebuilt on registration sequence numbers — entries stamp sq = ++pc.rq, items stamp the watermark at emission, so late entries are a suffix of the append-ordered live list and the sweep is an O(#late) tail scan (was indexOf-per-entry). The window is fixed at both edges (in-snapshot entries and mid-drain registrants excluded), and held owner queues defer via deferIntoQueue — never through the hold. Contract refinement pinned by test: plain stores emit at the fold, so pre-flush registrants ride the snapshot with baseline-correct real ops — the sweep's genuine audience is lane items and stash windows.
  • Visible-view resyncs: every drain-resolved structural next (resync forms, held releases, late sweeps) resolves through visibleStructRows — optimistic families read the override-composing proxy, never bare committed backing. This also closes the seam your one-reckoning suppression leans on at partial settles (the pb ?? v note in 3e12ffd holds for joint settles; an aborted retainer with a surviving sibling re-arms overrides that a committed read would drop). Deleted-slot ticks coalesced past a shrink are gated out on both snap and resync paths.
  • Superseded work: emitLandingConsumption now bumps a structural generation (pc.sg); items stamp it at emission and both drains skip stale-generation items — transition-held row/slot ops can't replay over a landing's resync at settle.

Audit of 3e12ffd: sound — replaying is try/finally-safe with per-edit throw isolation, and the composed-snapshot emission is correct (composed with the sg bump above). Added a fifth-posture pin (aborted-retainer survivor, oracle-anchored at classic parity) alongside your fourth.

Hydration ask: for-then-siblings-driven is in the parity matrix — store-backed rows whose template provably emits rowProof under the harness's flags (attribute-only binding; text holes disqualify the purity proof, verified against the compiler). The update pushes a row through the engaged driver; invariants pin sibling node identity across the driven structural update. Static-row scenario remains the decline road.

Also merged next (#3162, trivial). Gates: 39/39 invariant harness, signals 1,504, web 719, parity matrix 153/153, size green (two ratchets with notes: +27 B store-family, +41 B list tier — stamps and gates).

@ryansolid

Copy link
Copy Markdown
Member Author

Follow-up round landed (ada689c7). The two P1s, the two P2s, and two findings that turned out to be upstream of this branch:

  • Slot registrants (P1): registerSlotPatchNext was indeed missing the sequence stamp — the suffix scan read sq 0 and broke immediately. And you were right about the test: every() over an empty tick list passed vacuously, and the construction was doubly wrong (slot ticks only emit from the reconcile walk; direct setter writes never produce them). The test now requires the surviving slot's resync to arrive and emits through reconcile.
  • Back-to-back landings (P1): chased through five interleavings (spaced/same-microtask × echo/non-echo × blind/until-gated) with frame-level classic/channel logs. The channel-side mechanism is closed: emitLandingConsumption's row emission composed its snapshot at emission time from the mid-reckoning draft — a parked or superseded landing's topology could reach the DOM while classic held the previous view. The new emitRowOpsLanding hook keeps the lane (a reverting action's stash must not own the landing's notification — that's why the regular queue is wrong here; verified by a red 10.14 test when I tried it) but resolves at drain time through visibleStructRows, which reads exactly what classic renders at that moment. Parity by construction.
  • In the process, two upstream findings (pinned as it.fails in createOptimisticStore.test.ts, channel-independent — bare projection, no actions, no consumers, classic effects only):
    1. A second continuation landing arriving in the same microtask chain is swallowed — committed truth permanently loses the landed row (confirm({id:0}); confirm({id:2}) → final committed [0], not [0,2]).
    2. Downstream: an until()-gated action waiting on the swallowed echo wedges forever (authoritative truth never carries the row).
      Both sit in the 2.0.0-rc.5 optimistic store resets when new data arrive #3123 continuation-reckoning machinery — flagged with minimal repros rather than unilaterally reworked, since that seam is actively yours. I suspect your P1's "classic remains on the previous topology until action settlement" observation and these are the same root: the second landing's commit is deferred/lost while the channel (pre-fix) showed its draft.
  • P2s: late-row resyncs dedup per drain (was item-count × consumer-count); the superseded-work gate now re-resolves standalone slot ticks against the live view instead of dropping them (row items still drop — the landing resync covers those).

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.

ryansolid and others added 13 commits September 1, 2026 00:56
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>
Contract-derived tests, not instance reproductions: accessor-safety across
admission/adoption axes, one-apply-per-batch under lane interleaving,
consumer-list lifecycle at emission/drain/merge boundaries, throw-atomicity
at every row-build entry point, hydration region surrender, Tier-2 read-set
completeness, and compiled-imports ⊆ documented-runtime-surface contracts.
10 red / 8 green against the round-6 branch; each red is a confirmed
audit-7 finding, each green documents an invariant that already holds.

Co-authored-by: Cursor <cursoragent@cursor.com>
Each fix flips a red invariant-harness test green: stateless adoption
probes against the incoming backing, prototype-plainness admission,
split normal/optimistic stamps, emission-snapshot structural queues +
drain-live value lists (with cross-release coalescing), build-before-
destroy slot rebuilds, and full server-region surrender on hydration
throw. Store+core suites 465 green; driver suites green.

Co-authored-by: Cursor <cursoragent@cursor.com>
…1; renderer surface documents patchDriver (P1-4)

Both compilers emit the body's full static read envelope (hoisted _mf$
arrays, deduped per module); the runtime interns manifests by identity,
probes deep paths as a prefix tree at adoption gates and forced applies,
bubbles ancestors on targeted reconciles, and resolves forced next through
the proxy for deep-path channels. Eligibility: bare-subject reads and
dotted string keys compile classic. Renderer type/README/contract tests
pin patchDriver into the documented surface. PINV per-flush ledger checks
wired into the __TEST__ invariant infra. dbmon: tick 2.1ms quiet-machine
(was 1.9 unsound / 2.5 first sound cut), mount intern misses eliminated.

Co-authored-by: Cursor <cursoragent@cursor.com>
Admission deep-probes manifests + committed-view reads, captured-record
structural binds (patchProxyFor via createTarget-installed wrap hook —
keeps the trap engine shakeable), lane-timed tentative ancestor bubbles
with settle twins, generation-stamped drains, forced-bubble coalescing,
decimal-key ineligibility (both compilers), rowProof on the createRenderer
surface, untracked universal commit phase. dbmon unchanged (6.4/2.0/0.5).

Co-authored-by: Cursor <cursoragent@cursor.com>
Committed-visible skip markers + held-view admission, optimistic-view
mounts, manifest-read fallback compute (write-free), tentative self
emission + immediate lane demotion, per-queue forced stamps + merge
repair, isWrappable binds, server patch-tier exports, function-carrier
probes, safe-int keys, unchanged-reconcile bubble gate. Attribution test
warn-count flake fixed two-sided. dbmon 6.3/2.1/0.6 (parity with r7/r8).

Co-authored-by: Cursor <cursoragent@cursor.com>
One bare version signal per record (pc.dn) bumped at emission seams; the
driver's delivery effect applies compiled bodies with post-apply prev
snapshots and scan-free committed reads. dbmon: tick/partial parity with
the channel (2.1-2.2 / 0.6 both orders), mount +0.5-1ms (per-row root
creation, optimizable). The queue/stamp/skip machinery is untouched but
unused under the flag — candidacy evidence for deleting it.

Co-authored-by: Cursor <cursoragent@cursor.com>
Value tier fully node-driven: per-channel render effect (createRoot-owned,
disposed with last entry) dispatches applyEntries with manifest-shaped
prev snapshots and a single visibleView() decision (optimistic view /
held mask / committed). Value queues, stamps, cm/gen skip rules deleted;
structural queue kept slim. Types clean, builds green.

HARNESS TRIAGE PENDING (~24 red): known classes — (a) tests asserting
queue-era mechanisms (force flags on ancestor re-applies — semantics hold,
compares are exact now); (b) REAL defects to diagnose: structural tests
red (row-ops path or reconcile gates), same-batch coalescing red, error
routing through the detached delivery root (drain used haltReactivity;
effect throw surfaces differently), optimistic in-flight timing.
NOT MERGEABLE — checkpoint for fresh-eyes triage.

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

Fixed tonight, each traced to first principles:
- INV-2 violation: the delivery signal's override slot must be armed
  (NOT_PENDING) without CONFIG_OPTIMISTIC — plain bumps stay held-write,
  optimistic bumps ride the engine with correct revert registration.
- Channel error contract restored: unhandled patch errors defer the halt
  one queue phase so sibling channels' deliveries complete first (the
  round-2 pin); flush still throws.
- visibleView reads optimistic families THROUGH THE PROXY — tentative
  values live in node overrides at any depth; root-level view merges miss
  children.
- The delivery signal + bump/dispatch bookkeeping PERSIST across consumer
  churn (only the effect root lives with consumers): held write-time
  emissions ride the signal's pending commit and died with disposal.
- Value bumps moved to FOLD COMMIT (post-swap) — write-time bumps raced
  transition settles, delivering pre-fold state.

REMAINING (11): the fold-commit move exposed the deepest discrimination —
in-place folds are identity-invisible at drainFolds (t.v === old continue),
which is WHY the queue design emitted at write time. Correct fix sketch:
wk (written-keys) evidence at the identity-continue + ambient/transition
bump gating at the setter site. Plus: force-flag test modernizations,
optimistic in-flight set, projection refetch. NOT MERGEABLE.

Co-authored-by: Cursor <cursoragent@cursor.com>
Session fixes, each traced: armed override slot without config reroute
(INV-2), deferred halt preserves the round-2 sibling contract, proxy
visibleView for optimistic families, persistent delivery signal across
consumer churn, fold-commit bumps (write-time raced settles) + overlay-
merge bumps (in-place folds are identity-invisible downstream — the
undocumented reason the queue emitted at write time), write-override
landing bumps, per-entry prev baselines (replaces gen/cm skip rules
entirely — the compare IS the decision), untracked snapshots (tracked
proxy spreads subscribed registrants' boundaries), owner-neutral delivery
roots (boundary-queued effects missed lane runs), demote-at-delivery
(effects created in setter write windows never subscribe), owned-write
exemption on the delivery node.

Full signals suite 1,415 green including PINV ledger. Web driver at 5
red (projection structure ×2, shallow retention, optimistic push
visibility, nested-chain targeted reconcile) — diagnosis next.

Test modernizations (asserting queue mechanisms → semantics): force flags
×2, mid-flush mount (compare-gated oracle), boundary isolation (restored
to ORIGINAL queue expectations — owner-neutral effects deliver before
teardown), tentative getter (effect-parity bounded: the queue EXCEEDED
parity by delivering ambient writes in-flight).

Co-authored-by: Cursor <cursoragent@cursor.com>
1,415 signals + 683 web + 150 hydrate + 32/32 monorepo tasks under node
delivery: the entire nine-round invariant harness passes with the value
queues deleted. Final session fixes: dp-channels read through the proxy
(forcedNext's staleness call, reborn), null-baseline first deliveries
force (projection materialization — one crash was halt-poisoning three
equivalence tests), emission payload fast path (bc-tagged np), owned-write
exemption on the delivery node, hook guards on revert-ancestor bumps.

Sizes (vs channel): patchDriver tier 15,825 (-164), rowProof 18,358
(-112) — before deleting the now-dead stamp/merge machinery.

PERF: NOT DONE. dbmon tick 8.3 / mount 12.0 (channel: 2.0 / 6.3).
Profile: GC 1.6s (per-delivery manifestSnapshot allocation storm) +
serveDataKey/get 1.1s (proxy reads leaking past the payload gate —
double-bump suspected, uninstrumented). OPTIMIZATION DESIGN, verified
against the profile: (1) pv = the swapped-out backing REFERENCE for
adoption-style ticks (zero alloc — old backings are immutable after
swap); clone only at the overlay (in-place) fold, exactly where the queue
design ran clonePrev; (2) verify np payload engagement per tick (count
np-hits vs proxy fallbacks); (3) registration-side pv laziness for mount.
The flag-prototype measured 2.1/7.2 with flat spreads — the target is
real.

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

Three fixes: the dispatch-side payload gate had silently failed to apply
(every delivery took the proxy path — the whole 8.3ms tick); reference
prev baselines (raw backings are immutable after adoption swaps; the
overlay fold clones just-in-time via prepareInPlaceFold — the queue's
clonePrev moment, now pay-per-in-place-fold); registration baselines by
reference. Payload gate: 10,000 hits / 0 misses over 10 dbmon ticks.

dbmon (PROVISIONAL — battery): tick 2.1 / partial 0.5 / mount 7.8 vs
channel 2.0 / 0.5-0.6 / 6.3-7.5. Parity on updates; mount ~+0.5-1ms
(per-row delivery root, documented).

Dead machinery deleted: clearStamp, gen/cm skip fields, value-era merge
dedup + stamp repair (scheduler merge is a plain structural move now),
prototype exports (patchVersion/patchCommittedRaw). PINV-2 restated for
node delivery (undispatched-bumps-at-quiescence). Sizes vs channel: core
floor -157 B (the rounds-6/9 merge bumps reclaimed), createStore -112,
patchDriver tier -169, rowProof -105 — net smaller WITH the delivery
machinery added.

All gates green: 1,415 signals + 683 web + 150 hydrate + 32/32 tasks.
Authoritative dbmon pending wall power.

Co-authored-by: Cursor <cursoragent@cursor.com>
ryansolid and others added 18 commits September 1, 2026 00:56
…d, single-mode dispatch

Manifest-less registrations poison the key union (akAll → full-scan
probes) replacing the drain-side recording proxy; applyEntries drops its
dead prev/force modes; deferHalt/routeEntryError shared across all four
dispatch shapes; emitPatchLocal aliased. Value tier 16.22 → 16.05 kB,
list 18.79 → 18.60 (ratchets tightened). Includes the auditor's
round-10.8 lifecycle suite (8 tests, synthetic held-queue harness).
Ticks unchanged in paired A/B (2.4/2.4 under load; mount delta within
sd=1.07 noise — quiet-machine confirm noted).

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

Patch consumers aren't graph subscribers (_subCount sees one delivery
edge), so the channel witnesses its own shape: registration milestones
fire HUGE_FAN_OUT, wide dispatches fire WIDE_WRITE with a doubling memo
— same codes/thresholds as the graph twins, dev-only (sizes unchanged).
Multi-subject/dynamic-key expressions stay patch-ineligible and keep
classic graph attribution. Stale createSelector advice updated.

Co-authored-by: Cursor <cursoragent@cursor.com>
patchEmit hook re-stamps the delivery signal after each bump with the
record's store path (name-only on bubbles, value previews on self
emissions), and delivery effects self-name patchDelivery(store.path) —
rerun events for patch-applied updates now read as the causing record
write. Dev-only via attrHooks (no engine coupling, no-try rule kept,
sizes unchanged). Pinned by tests/attribution-patch.test.ts.

Co-authored-by: Cursor <cursoragent@cursor.com>
…computes never commit

Per-entry manifest envelopes for demoted bodies (the channel union would
subscribe and fail every sibling on one sibling's keys); computeFailed
latch skips the commit after a routed compute error (the auditor's
lifecycle suite updated from the swallow-then-apply behavior it pinned);
redrive roots transparent (hydration-ID depth parity); akAll ref-counted
via entry.ml/pc.mlc, released on unbind and demotion. Three tier
ratchets (+105/+23/+8 B — demotion lifecycle bytes).

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

readDeepChildren descends from the once-read root value (unstable
getters track what they commit) and through functions; iterable
manifests keep PropertyKey symbols (RED-verified: stringified envelopes
tracked "Symbol(x)" and went stale); WIDE_WRITE twin engine-owned via
patchDispatch (options.wideWrites, same memo/metadata); patchEmit origin
threads the true write source through ancestor bubbles (chains report
the child, not the ancestor); row-ops/slot registrations fire the
HUGE_FAN_OUT milestones. Boundary-recovery thread closed by the auditor
as a faulty probe.

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

bumpAncestors moved INTO demoteToEffects (the already-empty demote on a
previously-demoted child never bubbled — RED-verified after correcting
the repro to put the accessor on a DECLARED key; off-envelope getters
are correctly ignored by the manifest-scoped probe); ProcessedManifest
gains a root-aligned deep index (dpr — envelope walk linear); coalesced
bumps append origins via patchOrigin (chains report every feeding
child); applyStructural dispatches through the engine's wide-write
policy keyed on the consumer list. Runtime correctness otherwise closed
per the auditor.

Co-authored-by: Cursor <cursoragent@cursor.com>
…tics, combined budgets

-X theirs clobbered upstream's contradicted-landing gate and retained-
edit drop() in optimistic.ts (caught by upstream's own suites); the file
is reset to next's version with only the branch's three emission-gate
changes re-applied (diff verified minimal). Native compiler binary
rebuilt (stale pre-rebase build re-minted the #3105 lone-spread merge —
hydrate parity caught it). Four size tiers ratcheted for upstream drift
stacking with branch bytes; treeshake core floor merged at 21.7k.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ents, cause hygiene

QueuedApply.pc backref (never consulted by drains) keys wide-dispatch
memos and anchors structural naming/causes; patchStructural records
synthetic rerun events for commit-drain dispatches; appendPatchOrigin
name-dedupes; patchDelivered marks consumed stamps so self-emissions
carry forward only undelivered child causes; bumpAncestors uses path
origins for demoted children (live-consumer gate). All five auditor
P2s pinned in attribution-patch.test.ts.

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>
ryansolid and others added 2 commits September 1, 2026 01:14
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>
@ryansolid

Copy link
Copy Markdown
Member Author

Fold-audit round landed (a4c439b7). All four P1s closed, harness-first (four red repros, then fixes):

  • Per-index held-slot defers: exactly as flagged — deferIntoQueue's shared hq flag collapsed a multi-slot batch to its first index behind a hold. Slot items now dedup per (entry, index) via entry.hqs; row items keep the single-run dedup since their resync reads live truth.
  • Resync-then-stale-ops double-build: the late sweep now runs once at DRAIN END against a per-channel highest-emission watermark. Entries at or below maxRq rode some item's snapshot and received real, baseline-sound ops; the sweep covers exactly (maxRq, winEnd] — the audience no snapshot reached — still a suffix tail scan. This also structurally removes the item-local repetition (your P2 from last round's shape).
  • Staged raw mutation: stagedApply recursed into children read through the draft proxy — for SHALLOW stores that read returns the raw row, and the merge mutated committed truth in place: visible before the reveal, notified to no one. Descent is now gated on the child being a live draft proxy (stagedChild); raw children replace their slot wholesale, so the write parks and reveals like any other.
  • Reveal coverage: both fold-site row-ops emissions gated on t.fam?.opt !== true — correct for override materializations (lane channel), wrong for STAGED TRUTH folding at the reveal. A root array retained only through a descendant's override isn't overlaid, so the settle loop's resync never reached it and the gate silenced the fold's own ops. t.sf (set in ensurePB when an optimistic-family draft is written under the authoritative posture — exactly the staging bracket) exempts staged folds, and a slot-diff twin ticks changed slots, since staged reveals bypass every walk.

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 (68087b57: the eager parent-slot repair ran ungated in patch-less apps — privatization re-cloned every adopted interior backing per reconcile and the identity swaps caused keyset/deep bump storms; now gated on hasPatches()).

Gates: 1,511 signals + 2 expected-fail pins (the same-microtask swallow and wedged until() persist under fold — still upstream), 719 web, size green with four ratchets (sweep bookkeeping is most of it). Confirmed on your note: the consecutive-landing divergence is resolved by the #3164 integration.

…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>
@ryansolid

Copy link
Copy Markdown
Member Author

Redesign landed (b296640d) — per the trigger set two rounds ago, the five findings at a4c439b7 are closed by replacing the structural coverage machinery, not by a fifth round of point fixes.

The structural version chain: every emission stamps a per-kind version (sv rows, svs slots — separate consumer lists, separate chains); the channel tracks the VISIBLE version (bumped when items enter the live queue — commit-coincident emissions immediately, stashed items at their releaseBatch, lane items at emission). An entry initializes its applied version to the visible one — exactly what its registration read covered — and applies an item's payload only on an unbroken chain (av === svAt − 1: the item's baseline IS the entry's last-seen state). Anything at-or-below skips; any gap takes exactly ONE resync at the END of the flush, after every queue. Deleted wholesale: emission-snapshot membership, the maxRq/winEnd watermarks, the per-item sweeps, the drain-generation dedup, the rq/sq stamps.

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): repairAncestorSlots at registration fixes the target's ancestor chain — gated to stale aliases of the SAME child, map-resolved. That gate matters: the ungated first cut wrote tentative rows' backings into committed truth (all four optimistic equivalence failures during development were this one root cause — a tentative row registering mid-flight has no committed slot, and absent/different slots must never be written).

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.

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>
@ryansolid

Copy link
Copy Markdown
Member Author

Fold audit 2 landed (a65c3ca1) — all five closed. Your root-cause was exact: the visible-version init was unsound for mounts inside the writing transition.

  • Transition-aware av init (P1): a consumer mounting inside the writing transition reads the SPECULATIVE view, so its baseline now covers the stashed emissions (av = sv when activeTransition is set at registration); ambient mounts keep the visible-version init and receive the stashed ops at release. The bac/abc replay is pinned by a repro asserting every frame the mid-transition mount sees equals the speculative order.
  • One-channel reveals (P1): the fold-site emission now applies the walk's split — aligned windows (same length) are value replacements and ride slot ticks only; length changes ride row ops only. Pinned with a shallow-reveal repro asserting zero non-null row ops at the reveal.
  • Target-keyed staged identity (P1): staged-reveal diffs resolve rows through the family map before matching — the fold re-seats retained rows' raws, and raw-keyed matching rebuilt rows whose proxies never changed.
  • P2s: held releases fast-forward entry.av (no redundant follow-up resync), and all | 0 coercions are gone from version arithmetic (2^53 doubles; no wrap suppression).

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 driveList; the octane-era numbers we'd been comparing against turned out to come from an orphaned stale server), and classic shows a consistent ~5–10% tax needing a profile-driven gate-consolidation pass. Those are the blockers before this merges; next session is dedicated to them.

… version chain; harness ghosts documented

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

Copy link
Copy Markdown
Member Author

Perf verification complete (6aa9ad93) — the octane bar is met on the update paths, and the earlier regression readings were harness ghosts.

The sweep (30 iter, servers verified fresh):

op octane-tsrx classic (next) driver (branch)
mount 4.40 16.40 7.10
tick 1.80 6.10 2.20
tick_partial 0.80 1.30 0.50
remount 4.70 9.90 5.00
sort 2.20 2.90 2.50
unmount 1.70 2.50 0.30
  • The version chain kept the wins: driver matches the historical ledger (6.6/2.1/0.6) within noise. vs octane: tick 1.22×, partial and unmount AHEAD, remount 1.06×; mount holds the known 1.6× gap.
  • Mount gap named (profiled): store-model cost — createTarget/wrapNext/accessor scans ≈0.6 ms per mount plus GC pressure; DOM costs match octane. The next lever is lazy target creation at bind time, an increment, not a blocker.
  • The classic "regression" dissolves under controlled conditions: classic-vs-classic with the same native compile is ≤5% on the bench and at PROFILE-PARITY on tick totals (306 vs 311 ms over 50 ticks). Two harness ghosts caused the earlier readings: an orphaned months-old preview server on :5200 serving a stale build (every earlier "solid" column was that ghost — it answered current asset URLs with HTML fallbacks), and the babel-preset fixture path never stamping $ll (the driver column silently ran classic; solid-compiled with explicit patchDriver is the real driver fixture — its attribute-only rows are by design, text holes disqualify the purity proof).

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 it.fails pins (reckoning swallow/wedge — not channel), and the mount-gap increment as post-merge work.

…/multiplexing deferred to future RC

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

Copy link
Copy Markdown
Member Author

Ship ruling (46930bec): per Ryan, this ships as-is pending the final audit pass. The documented driver contract for this release is deep keyed stores via reconcile — the benched configuration (octane-class on update ops: tick 1.22×, partial/unmount ahead; mount 1.6× with the gap attributed to store wrapping).

Deferred to a future RC, recorded in the brief:

State for the final audit: head 46930bec, all suites green (1,513 signals + 2 expected-fail upstream pins, 719 web, 153 hydration parity), size budgets green, CodSpeed pending on the fresh push. The last two audit rounds (version chain at b296640d, fold-audit-2 at a65c3ca1) are the ones not yet re-reviewed.

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

Labels

None yet

2 participants