Skip to content

[Lynx M0] 固定最新 upstream 与竞品对照,建立完整 correctness / 性能矩阵 #283

Closed

Description

@Huxpro

总路线:#282(承接 #281)。所属 milestone:Lynx ceiling M0 — 可信基线与真机归因。

目的与现状

为后续优化建立可复现的比较对象,让“超越 upstream”有明确含义。规划时 new-lynx 为 ac9bb9286,upstream octanejs/octane/main 为 67ae07ffd(包版本 0.2.3),merge-base 为 d5175ca89;upstream 有 105 个当前 fork 不含的 commits。此计数不是性能差距。

#227 的同步实验已证伪“差距主要来自 fork drift”:当时 post-sync weighted ratio 为 1.0951 [1.0371, 1.1542],create 是主要残差。不得把再同步当作自动解决性能问题。

工作与切分

  1. 先冻结四个 Octane 身份:旧历史参考、当前 new-lynx、最新 upstream、后续 candidate。保存源码/patch/依赖/引擎/配置/bundle hashes。对齐同一用户行为;保留生产默认与显式优化配置两列,不能拿 fork 实验开关对 upstream 的人为慢路径。
  2. 更新独立命名的 ReactLynx、Vue VDOM、Vue Vapor 对照,不覆盖历史 artifacts。旧 manifest 的 React 0.122.1 和首屏 0.124.0 是不同产物。新的 ReactLynx 包含 Element Template 实现,须记录其 capability 与是否启用。
  3. 运行共享 correctness preflight:真实首屏/adoption、native tap、create/replace/append/remove/select/update/swap/clear/recreate、dispose;PR bench: refresh Octane Hux compiled-create + FCP data lynx-js-framework-benchmark#50 的旧 append/remove DNF 必须在当前 head 重验。失败先归属包和回归用例,不能改 driver 绕过或排除该 cell。
  4. 冻结 scorecard 的 operation/scale/weights/超时和统计方法,再测。先 0/1k 与 1k/2k/3k/5k scale,设备容量允许后再上 10k;Web 的 30k 不自动变成设备要求。
  5. 单独一条 integration PR 纳入适用 upstream 正确性与性能变化,保留 fork 意图;重做 pre/post 对照。upstream 的 codec、readiness、teardown 更新可能与 fork 重叠,必须逐项核对,不能重复实现。

验收

  • 完整 provenance、同 workload 的行/文本/事件/identity 断言、共享 host 结构 census;更少 host 只有在语义、布局与可访问性等价时才可记成优化。
  • Web/JIT、诊断 interpreter、Android LepusNG、iOS 分列,不能混排;FCP、handler→visible frame、ACK、ready 明确分列。
  • 正确性问题有归属与修复;缺失能力/超时明确 DNF,不可视为 0 或从总分分母删除。最新 upstream 若不能原生运行,标 blocked 并修复/贡献,不拿被修补产物冒充原版。
  • 交付一个可重复的 cohort recipe,供 bench(lynx): native attribution benchmark — split BTS / bridge / MTS ownership of the LepusNG create collapse #278 和后续 issues 使用。先完成 baseline,再同步,再 rerun,避免同时改变对照与候选。

通用合并与证据契约

  • 保持 Octane 的 hooks、refs/effects、原生事件、Suspense/Activity/portal、reject/abort 与 cleanup 语义;适用模式必须覆盖。共享两条路径时使用同一语义实现,并加独立的用户可观察断言,不能只做 differential 对比。
  • 每个优化 PR 带 baseline/candidate 的精确 SHA、生产 bundle hash、机制命中/回退原因、同窗口 AB/BA 原始样本及成本归属;profile 负责解释,未插桩生产产物负责 headline。未测到的收益标为 hypothesis。
  • 先拿到相关 owner 数据,再实现一个机制一条 PR;正确性与 current-head CI 通过才算交付。记录对冷启动、另一线程、GC、内存和 bundle 的成本转移。

由 agent 根据 #281 的后续规划请求创建。

Activity

  1. Huxpro commented on Sep 6, 2026

    @Huxpro
    OwnerAuthor

    M0 scorecard/statistics contract is now frozen prospectively in Huxpro/lynx-js-framework-benchmark#53 (merged as 6d8b85a7c94ffce2e245e12b24079b6a0bf7cd91).

    Evidence:

    • one shared source for the exact nine js-framework interaction cells/weights and the separate 0/1k/10k startup score
    • Web JIT, diagnostic Web interpreter, Android LepusNG, and pinned iOS native runtime remain separate lanes
    • shared correctness/engagement, timeout, DNF, tail, memory, identity, receipt, and default-vs-explicit-optimized gates
    • deterministic session-paired AB/BA bootstrap qualification: >=10 pairs, 10,000 resamples, aggregate CI upper <1, point <=0.95, every core cell CI upper <=1.05
    • workload receipt now binds the scorecard sources/version

    Validation: 165/165 tests, production site build, 25/25 entry verification, collect snapshot exactly in sync (23,063 records), Chromium dual-thread harness smoke. PR current-head CI and merged-main push CI are green.

    This is a prospective measurement contract only. It makes no performance claim; comparator identity refresh, shared preflight, paired production observations, and raw evidence are still pending.

  2. Huxpro commented on Sep 6, 2026

    @Huxpro
    OwnerAuthor

    M0 source-built cohort identities and reproducible artifacts are now merged in Huxpro/lynx-js-framework-benchmark#54 as 34f996b023f725dd37b209f72b3ac49fe9a900cb; merged-main CI 34066993785 is green. Comparator source prerequisites are Huxpro/vue-lynx#392 and #393 (db60b3d32c4253400d0ae3b259ebf522ffdf859d, feature-base merge 8b8b81d374fdd680b664ead86c3ea240ba47c7eb).

    Frozen production identities/artifacts:

    • current fork e82160fc0e663f52848e2181d83c6203d633bc86 and latest upstream 184631809c8eb61f5bbf15fa23b2470c1d38eea6, built with identical Node 22.22.2 / pnpm 11.15.1 / Rspeedy 0.16.0
    • ReactLynx 0.126.0 default and explicit ET
    • Vue 3.6.0-beta.17 / vue-lynx 0.5.1 VDOM default + IFR/ET and Vapor default + IFR
    • exact 0/1k/2k/3k/5k/10k Web+Native bundles and source/lock/toolchain/config/runner+source-contract/SHA-256 receipts

    Corrections caught before measurement (the invalid products were discarded): the first React 0.126 build used Vue's older Rspeedy; Vue optimization flags did not reach BENCH_CELL; output directories were guessed; and all nominal comparator scales initially compiled to byte-identical zero-row bundles. The final verifier rejects all of these classes, plus dirty/wrong commits, scale collisions, config collisions, and fork/upstream toolchain drift.

    Observed capability boundary: ReactLynx ET calls __CreateTypedElementTemplate; Lynx for Web 0.22.1 and inspected 0.26.0 do not expose it. It is therefore explicitly Native-only, with the Web artifact retained/hash-audited and a deterministic unsupported reason. TASM 0.0.49 confirms the Native ET backend. No default result is substituted.

    The 2k diagnostic is now unambiguous: the 1k/2k/3k/5k/10k ladder is the real production BENCH_AUTOROWS mount-create capacity/attribution path, not a fabricated interaction button and not an extra score cell.

    Validation on the artifact head: 33 entries verified; 172/172 tests; collect exact at 62 runs / 23,231 records; production site build; Chromium JIT preflight; every comparator has 6/6 distinct Web and Native scale hashes; all default/optimized pairs differ at every scale; real production create@1k correctness smoke completed for all seven Web-capable M0 identities with row-count and 10k→clear memory observations.

    This still makes no performance claim. The smoke was one repetition. Full shared correctness/adoption/dispose preflight, same-window order-balanced M0 baseline, and #278 Native attribution are the remaining #283 work.

  3. Huxpro commented on Sep 6, 2026

    @Huxpro
    OwnerAuthor

    The remaining prospective execution gates are now merged and green before formal M0 timing:

    • fix(runner): preserve explicit AB/BA entry order lynx-js-framework-benchmark#55 (c832d1df): explicit --entry order is now the actual execution order; duplicate/unknown selections fail; Web/Native raw evidence records entryOrder and sessionId; schedule identity remains auditable without incorrectly splitting comparable cohorts. A real BA smoke confirmed upstream -> current in execution, source-record order, metadata, and receipt.
    • perf(lynx): take first-tree capture off the first-paint path #56 (36f1f0c4): fail-closed raw-run qualification requires schema-v4 sources, clean harness, one machine/cohort/source identity, balanced unique AB/BA sessions, complete DNF-free raw repetitions, and identical measurement contracts. It re-derives medians from samples and emits input SHA-256 before the frozen 10,000-resample paired bootstrap.
    • [lynx-perf-live 9] Loop: drive clear teardown toward the Vue/React tier #57 (926c1e80): shared Web correctness preflight plus checked-in evidence. All 7 Web-capable M0 identities passed startup/adoption, real pointer create/select/update/swap/remove/clear/recreate/replace/append/dispose, row/text checks, survivor identity, and host census. Evidence SHA-256: 55599c49d94e40adf25a0f77f07b5bc0a54b45acd478b0ad63a10c53b9e1fbb4. ReactLynx ET remains explicitly Native-only and was not substituted.

    All three PR heads and merged-main push CI are green. No performance claim is made by these gates; the clean merged runner commit is now ready for the 5xAB/5xBA production Web baseline.

  4. Huxpro commented on Sep 7, 2026

    @Huxpro
    OwnerAuthor

    Formal M0 Web/JIT current-vs-upstream baseline is now merged in Huxpro/lynx-js-framework-benchmark#58 as 9bc99c63b08cfeb134d6934ce49f7b52c539602a; merged-main CI run 34072925350 is green. This is deliberately a failed pre-optimization verdict, not an acceptance claim.

    Frozen execution/evidence:

    • candidate new-lynx@e82160fc0e663f52848e2181d83c6203d633bc86; source-built comparator upstream/main@184631809c8eb61f5bbf15fa23b2470c1d38eea6
    • runner 926c1e800b13b984031430bff073e577dc86d668; cohort sha256:db51a1d24f7c7686815409e65f85d61d9a14fdbe3800d51a548adf44b03198c6
    • one host, ten independent sessions, exact 5xAB/5xBA alternating order, 2,380 raw records; every interaction cell 7/7 and startup cell 5/5, zero DNF
    • session-paired bootstrap, 10,000 resamples, raw medians re-derived fail-closed; qualification artifact SHA-256 75004757752aaf33d6d0e92702976261896931c202a6

    Verdict:

    • interaction aggregate 0.95747, 95% CI [0.94062, 0.97437]: statistically strict win, but misses the <=0.95 point target; update10th@1k, swap@1k, and remove@1k miss the per-cell CI-upper <=1.05 gate
    • startup aggregate 0.96923, 95% CI [0.95801, 0.98111]: statistically strict win, but misses the <=0.95 point target; fcp@0 is 1.04574 with CI [1.01798, 1.07013] and fails non-inferiority
    • therefore M0 remains open

    The checked-in report is docs/OCTANE_M0_WEB_JIT_BASELINE.md; all ten schema-v4 raw sources and the machine-readable qualification are preserved with SHA-256. Web raw attribution further narrows the next diagnosis: update10th BTS CPU is 1.1416x upstream while MTS CPU is 0.9122x and wire is unchanged; swap/remove and fcp@0 have worse end-to-end latency despite lower MTS CPU/wire, so they are not assigned to transport without Native phase/trace evidence.

    Native read-only probe support, previously used by the old fail-closed #278 attempt but never merged, is being replayed separately in benchmark PR #59 before taking a new Sandbox lease.

  5. Huxpro commented on Sep 7, 2026

    @Huxpro
    OwnerAuthor

    M0 baseline/attribution work is now complete and frozen; this closes the measurement milestone, not the performance target.

    The roadmap proceeds to M1 #284. No result here is carried forward as a claim that #291 passes.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-authoredenhancementlynx

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions