Repository navigation
Conversation
Envelope validation and load-bearing checks (duplicate ids, record existence, attach-state transitions, cloneProps ownership) stay unconditional; the per-command, per-handle-delta, and per-snapshot-node structural walks plus the whole-tree prepare check pass become development-only. Production keeps fail-stop: a corrupt commit rejects loudly through the staging guards and the apply-time fault path, pinned by a new production-module dual-thread suite. The profile hook gains prepareCheckMs, the dev-only check share of prepareMs. 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 not currently justified. The old validation-diet driver no longer owns a material share of current main; PR 700 profiles capability validation at only a small first-screen cost. |
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 #6. Stacked on #12 ([lynx-perf 4], base
lynx/plan-wire), which stacks on #11 → #10 → #1.Summary
LYNX_DEVELOPMENTdefine (process.env.NODE_ENV !== 'production', folded by Rspeedy/Rspack/Vite): development, vitest, and the two-realm CI rig keep every check exactly as before; an unsubstituted native bundle reads as production, which is what it is.clonePropsownership) and the apply-time fault path. A new dual-thread suite runs the real pipeline with production modules — the configuration no other suite exercised — and pins both halves: real scenes behave identically, and corruption faults instead of applying.Why
cloneProps(deep clone + freeze + cross-realm plain-prototype enforcement + worklet unwrap) is behavior — ownership and defense — and stays unconditional, as do all record-existence and attach-state checks the staging logic relies on.Changes
packages/lynx/src/core/protocol.ts:assertBatchkeeps the envelope (exact keys, renderer/version match, commands array) and gates the per-command structural walk; theackbranch gates the per-delta walk (the background's handle-delta reconciliation independently verifies every delta against staged transitions);assertFirstTreeSnapshotkeeps the envelope and gates the per-node walk (adoption touches every node anyway and faults on a shape it cannot adopt).packages/lynx/src/core/host-driver.ts: the pure assert helpers (assertSafeId,assertHostType,assertTextProps,assertNoCycle,assertNoMainThreadEventCollision) no-op in production at their definitions, so the development flow stays byte-identical; compound inline checks (text-parent, list-item placement, event-prop shape, destroy connectivity) gate in place; the whole-treefinalIdsset is built only in development or for first-tree adoption, so production prepare is O(batch), not O(final tree); the final check pass is development-only, with production collecting live lists from accepted + staged records (same membership, argued in-code).packages/lynx/src/core/profiling.ts:LynxWireProfilegainsprepareCheckMs— the development-only check share ofprepareMs, accumulated inside the driver, soprepareMs − prepareCheckMsis the staging cost both builds share. Production reports 0 there by construction.packages/lynx/tests/validation-diet.test.ts(new, 5): a production-module dual-thread rig (NODE_ENV=production+ fresh module registry, real jsdom Element PAPI). Scenes: full render/update/replace/unmount lifecycle; native-list creation + membership update; a minimally corrupt commit (fresh id, real type,nullprops —clonePropsis the only guard left) rejecting loudly; a duplicate host id rejecting; a malformed commit envelope rejecting. All five assert the DOM never changes on a rejected commit.@octanejs/lynxpatch.Measured
Same instrument as every cell in this stack: the deterministic in-process dual-thread rig (
benchmarks/lynx-table,__OCTANE_LYNX_PROFILE__build,NODE_ENV=production), whole-run at 10k rows, 3 reps back-to-back on a quiet host, medians:node benchmarks/bench.mjs --only lynx-table --ratios→ PASS, 25 guards checked, all deterministic counters unchanged (this diff removes checks, never commands). No ratio-guard changes: milliseconds are host-bound and deliberately not gated.Acceptance vs issue #6:
BENCH_AUTOROWS=10000build, Chromium, 3 reps each, medians): first text 5,614ms → 5,546ms, full 10k rows 5,910ms → 5,848ms, with rep spreads (±250ms) larger than the deltas. The reason is structural: the rig's first screen is main-thread-rendered, so commit-prepare validation was never on the FCP critical path — the walks this diff removes run post-FCP (background commits, acknowledgement, adoption). The issue's FCP prediction assumed validation sat before first paint; on this rig it does not. Reference frameworks not measured (no autorows reference bundles exist).Validation
pnpm format:checkpnpm typecheckpnpm test— full root run on this head: 16,917 passed / 106 skipped. 19 failed files = exactly the pre-existing environmental set from the PR perf(lynx): plan-aware wire — fold provable plan instances into instantiate-by-plan-id commands ([lynx-perf 4]) #12 baseline (Playwright-browser suites without a Chromium download, macOS-only rspeedy native-demo, website ssr suites); zero new failures.packages/lynx/tests(27 files / 300 tests, two-realm rig with validation on, incl. the 5 new production-module scenes)node benchmarks/bench.mjs --only lynx-table --ratios→ PASS (25 guards)clonePropsownership check (corrupt-commit test fails: the commit applies silently), gating the list collection (membership test fails: the new item never becomes enterable), over-gating placement staging (lifecycle + list tests fail). Reverting the diet entirely (all checks back on everywhere) keeps every test green by design — the suite pins behavior equivalence and fail-stop, both of which a checks-everywhere build satisfies; the performance claim is carried by the measured table, not a unit test.Risk / follow-ups
listUpdatesmembership identical to development at O(batch) cost.prepareCheckMslets a dev-profile build split check vs staging share; production builds report 0 by construction.Provenance
agent-authored)🤖 Generated with Claude Code
https://claude.ai/code/session_013br9KPN1riTSP683xEvUuU
Generated by Claude Code