Repository navigation
Conversation
…mpletion, and empty-commit elision Protocol version 2: the background derives acknowledgement handle deltas locally (production acks carry no handle payload; development acks carry a cross-check payload that must match the derivation), main merges completion into the acknowledgement when it has no post-ack work, and a value-identical re-render settles on the background without crossing the wire once a first batch has been accepted. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_013br9KPN1riTSP683xEvUuU
…he root's Protocol 2's empty-commit elision advances the root's accepted version without main ever seeing those batches. The engine tap path synthesized its event envelope with that root watermark, so handleEvent's main-origin staleness check rejected every tap that arrived while the two watermarks diverged — freezing all interaction after an idle (value-identical) re-render. Real-web repro: the bench app's select storm never delivered its first tap after the update storm's elided fold tail. Stamp the synthesized envelope with mainAccepted — the watermark handleEvent validates — and let it restamp the delivery up to the root's accepted version as before. Regression test drives the engine's own publishEvent path: a no-op state update settles locally, then the next tap must still run its handler. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_013br9KPN1riTSP683xEvUuU
…rness Gated page console/pageerror passthrough plus mount and rep-error markers. DNFs previously reported nothing; this flag is how the select-storm event-drop regression was traced. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_013br9KPN1riTSP683xEvUuU
This was referenced Aug 9, 2026
Closed
Owner
Author
|
Conclusion: close as superseded. Compact ACK and incremental template runs from octanejs/octane PRs 693 and 700 replace derived command handles; any remaining pacing question belongs in Huxpro/octane issue 45. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7. Stacked on #13 ([lynx-perf 5], base
lynx/validation-diet), which stacks on #12 → #11 → #10 → #1.Summary
{identity, adoption?, complete?}and no handle payload at all. Development acknowledgements still carry main's full payload, demoted to a cross-check that must match the derivation delta-for-delta (any divergence fail-stops the root).completemerges into the acknowledgement (complete: true) whenever main has no post-acknowledgement work (no adoption round trip, no queued host attachments), collapsing the common per-interaction tail from three messages to two.accepted= the root's version line,mainAccepted= the newest batch main actually applied) keeps main-originated events, attachments, faults, calls, and dispose validated against what main knows, with events re-stamped to the root's accepted version on delivery.Why
Changes
packages/octane/src/universal-core.ts,packages/lynx/src/core/protocol.ts:UNIVERSAL_TRANSPORT_PROTOCOL_VERSION/LYNX_TRANSPORT_PROTOCOL_VERSION1 → 2 (both slices still assert agreement).LynxTransportAcknowledgement.handlesbecomes optional (development cross-check), and the type gainscomplete?: true; validation accepts a bare ack, requirescomplete === truewhen present, and rejects merging completion into an adopting acknowledgement (repairedmay merge;adoptedstill needs its round trip).packages/lynx/src/core/client-driver.ts:prepareLynxHandleDeltasderives instead of installing. It mirrors main's staged generation bumps per create/recreate command (a destroy never clears the counter; entries netted away in-batch still commit — pinned by the batch-final-state test), synthesizes pure-identity snapshots ({$$kind, renderer, root, id, type, generation, selector}, exactly main's handle shape), maintains a topology mirror (parent/children/type) to derive root-connectivityattachedandlistDescendant, seeds new/recreated native-list cells as detached (cell materialization stays owned by the host-attachment channel), and replays main's exact list-ancestry flip walk. The development comparator toleratesattacheddivergence only for native-list descendants (cell-materialization timing).packages/lynx/src/main-thread.ts: the acknowledgement builds the handle payload only in development on a non-faulted apply; the per-updaterepublish loop is deleted (an update preserves identity, generation, and snapshot; its attachment bit is owned by the host-attachment channel);mergeCompleteshort-circuits the post-ack tail to attachment-drain → native-event drain → open background calls.packages/lynx/src/core/transport.ts: two watermarks (acceptedvsmainAccepted); a zero-command batch (after the first accepted batch — the first always crosses so the root activates main and the dispose handshake stays valid) settles locally inside the pace-gate dispatch through the normal entry lifecycle (finalize worklets, core acknowledge, main-call publication stamped with main's identity, synthetic completion);message.complete === truesettles the commit without a separatecompletemessage.5851cfc0, found by the real-browser harness): the engine tap path (dispatchNativeEventBatchNow) synthesized its event envelope with the root'sacceptedversion, buthandleEventvalidates main-originated events againstmainAccepted. Once an elided batch put the watermarks apart, every subsequent engine-delivered tap was dropped as stale — in the web bench the select storm froze after the update storm's elided fold tail. The envelope now carriesmainAccepted(the watermarkhandleEventvalidates) and is restamped up toacceptedon delivery as before. Regression test drives the engine's ownpublishEventpath: a no-op state update settles locally, then the next tap must still run its handler (red-checked: fails on the unfixed line).completevalidation; the paced-storm test pins that the empty tail never crosses;native-event-deliverygains the after-elision tap test above.benchmarks/baselines/ratios.json:update_storm_paced_commits_1ktightened 1.0× → 0.1× — the 47 empty fold-tail envelopes no longer cross (50 → 3 commits), and the old note had already named elision as the expected follow-up.benchmarks/lynx-table/web/run-web.mjs: env-gatedLYNX_BENCH_DEBUGconsole/pageerror capture (DNFs previously reported nothing; this flag is how the tap-drop regression was traced).universal-renderer-architecture.mdidentity sketchprotocol: 1→2. Changeset:@octanejs/lynx+octanepatch.Measured
Deterministic rig (
benchmarks/lynx-table, same instrument as every cell in this stack):create/update/select/swap/stormcommands and bytes unchanged; 174 commits / 304,416 commands / ~9.35 MB @10k whole-run).main-thread-events/background-root(ack arrives withcomplete: true; no separate completion) for every non-adopting, no-attachment commit.In-process stage timers (whole-run @10k,
NODE_ENV=productionbuild, 3 interleaved reps, medians) — reported for honesty, not as a win:Lynx-for-Web Chromium harness (real
postMessagestructured clone; medians of n=3, same host, baseline = #13 headdcb334afbuilt and run from a clean worktree; octane columns baseline → after):Every baseline→after delta is within rep spread (±6–±227 depending on cell): the real-thread-boundary wall clock is a wash too. The single-select ack payload was already small (~237 B in the deterministic rig), so removing it never had 10 ms of structured-clone to reclaim on this host. Select @1k sits at parity with vue-vdom (0.98×); updateStorm stays ahead (0.65× @10k). selectStorm's ~5× is commit pacing's one-commit-per-frame throttle on a 30-tick storm — present identically in the baseline, untouched by this PR.
Acceptance vs issue #7:
ackHandlesstage → ~0: the payload build is compiled out of production main (LYNX_DEVELOPMENT-folded), so its cost is structurally 0 on main; the rig'sackMstimer also charges the in-process background acceptance work and stays flat — reported as a wash above.main-thread.tsline count and bundle bytes down: modest —main-thread.ts−14/+34 lines (the cross-check build is retained for development by design; production builds fold it out, takingacknowledgementHandles,publicHandleUpsert, and thegetLynxHostPublicStateack-time walks with it).The web harness also caught a real interaction-freeze regression in the first cut of this PR (octane all-DNF; see the engine-event watermark fix above) that neither the in-process rig (fake synchronous main, no engine tap path) nor the two-realm unit suites could reproduce — it is now fixed and pinned by a unit test on the engine's own delivery path.
Validation
pnpm format:check(scopedformat:filesacross every changed file)pnpm typecheckpnpm test— full root run on this head: 1,556/1,576 files, 16,917 tests passed; 19 failing files are byte-identical to the perf(lynx): validation diet — dev-deep, prod-fast commit validation ([lynx-perf 5]) #13 baseline's pre-existing environmental set (Playwright-dependent browser suites, macOS-only rspeedy demo, website SSR e2e), plus onestreamdowntype-exports flake that passes in isolationpackages/lynx/tests— 27 files / 301 tests green (two-realm rig, validation on)node benchmarks/bench.mjs --only lynx-table --ratios→ PASS (including the tightened paced-commit guard) — rerun on the final headRisk / follow-ups
mainAccepted, notaccepted. The engine-event path was the one missed spot (fixed here); queued main calls and dispose already stampedmainAccepted, and the remainingacceptedstamps are root-facing only.completepath still exists for adopting acknowledgements and commits with queued host attachments; the completion-delivery-failure branch for that narrower path no longer has a dedicated test (the old one was repurposed to ack-delivery failure, the live common path) — residual, noted rather than hidden.background-roottests.snapshoton public handles is now pure identity in all builds (it always was on main's real handles; only hand-scripted test mains ever attached props there).Provenance
agent-authored)🤖 Generated with Claude Code
https://claude.ai/code/session_013br9KPN1riTSP683xEvUuU
Generated by Claude Code