Skip to content

Rollback rejected Lynx Block render attempts - #310

Merged
Huxpro merged 1 commit into
new-lynxfrom
huxcx/m3-block-ack-abort-290
Sep 8, 2026
Merged

Huxpro merged 1 commit into
new-lynxfrom
huxcx/m3-block-ack-abort-290

Conversation

@Huxpro

@Huxpro Huxpro commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • journal Block-core value writes, keyed-range topology, ID allocation, and listener-table changes for one render attempt
  • publish derived component caches, hook effects, handlers, mount state, and unmount disposal only after the matching native ACK
  • roll back pre-ACK mount/update/unmount rejection to the last accepted logical tree while retaining post-ACK state when a later host fault is reported
  • keep an empty journal open between commits so hand-written Block programs that mutate and then call context.commit() receive the same rollback guarantee

Correctness boundary

The native host ACK is the publication boundary. Until it arrives, an event addressed to the accepted version continues to reach the accepted closure. A rejected frame publishes no effect or handler and can be retried without skipping host work. Once ACKed, a later fault does not roll accepted state back.

Regression coverage includes:

  • rejected first mount followed by a full retry
  • rejected update preserving the previous effect and old-version event handler
  • post-ACK host fault retaining the newly accepted effect and handler
  • rejected keyed structural update followed by a retry matching a fresh tree
  • carried-program mutation outside renderAsync
  • rejected carried-program unmount retaining the mounted program and logical range

Performance evidence

This is a semantic fix, not a speed claim.

The exact final production core-switch.mjs receipt (sha256:9d52233ec7bd910c09f69ce4fcc8d20e9c648d27e2281bc7ae17b0a7a9b78775) reports:

  • universal bundle: 578,211 raw / 204,049 gzip
  • Block bundle: 462,746 raw / 174,835 gzip
  • decoded Block BTS: 57,528 gzip; decoded MTS: 117,156 gzip and byte-identical to universal
  • Block BTS remains 29,596 gzip below universal, while the rollback contract costs about 981 gzip over the preceding merged Block baseline

An exact-final Lynx-for-Web 10k-row AB/BA window (n=15 per arm, 0 DNF, receipt sha256:775ffd32be3e186e9eb6ade8a1445e9f4b0dc6464be7084c4dd65286e5f2db85) produced overlapping/noisy ranges: candidate vs base medians were create 885.6/885.6, update10th 111.4/114.1, select 30.1/31.6, updateStorm 380.7/362.3, selectStorm 89.8/87.3, and clear 561.9/548.3 ms. No latency improvement is claimed.

Validation

  • pnpm exec vitest run --project lynx --silent=passed-only — 50 files, 871/871
  • focused Block background/component suite — 63/63
  • scoped typecheck for all changed TypeScript files
  • scoped Prettier check
  • pnpm sync
  • production Block/universal/core+program build controls
  • git diff --check

A local unconstrained whole-repository pnpm test exhausted the Vitest parent process at its 4.1 GB heap limit after about 20 minutes on the shared host. Before OOM, unrelated CLI/Solana tests hit their 5 s timeouts under concurrency and passed when rerun individually with one worker; a shared-node_modules Drei inventory digest differs from the clean lock receipt. This PR remains draft until clean current-head CI is fully green.

Refs #290

@Huxpro
Huxpro marked this pull request as ready for review September 8, 2026 12:43
@Huxpro
Huxpro merged commit 72eceb9 into new-lynx Sep 8, 2026
68 of 72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant