Repository navigation
Description
总路线:#282(承接 #281)。所属 milestone:Lynx ceiling M2 — 首屏可交互与稀疏更新。
问题与假设
旧 benchmark#50 的 rows1k startup commit-ACK 约 43.4s 是 adoption/settlement 边界,不是 FCP,且不是当前 head 的复测。目标同时缩短 first paint→ready 和首次 native tap→frame,避免只把 capture 移出 FCP。
依赖 #283、#278、#284。#277 的 frame rung 是独立较小工作,可先交付;本 issue 针对 row-scale adoption 的剩余 CPU、描述、比较和临时对象。
设计
研究 Vue Vapor 的 deterministic allocator / adoption,借鉴可证明身份而不照搬“删掉 snapshot 就等价”。Octane 的条件 hooks、动态 range、initial props、refs/effects、render-phase state、portal/list、并发更新使无条件 replay identity 不成立。
先列出 eligible first-screen shape 的证明边界:同 module/layout digest、初值/分支 shape、id allocation domain 与 epoch。用紧凑 program/run adoption manifest 复用已绘制 host 身份;必要动态状态仍跨界。对不满足证明的子树维持现在的 snapshot/repair 与清晰原因。
避免“两边各推导一遍且都错”的校验:身份契约来自 #284,独立 native element 身份、事件与状态断言负责观测。按 ①manifest + mismatch/repair,②删除已证明多余描述/比较 两条小 PR 交付。
验收
paint → capture/announce → adopted → ready各边界和 first tap latency 同时测;同一初始树无重复 host create,BTS replay 的必要组件 setup 与用户 side effect 不能被删。- tap/snapshot/inbound commit/sync-ready/第二次 render/unmount/close 在每个 gap 中均只 capture 一次,旧回调不可操作新 root;沿用 perf(lynx): describe the first tree after the frame it describes #273/perf(lynx): #273's default setTimeout rung fires before the first frame on LepusNG #277 fence。
- props/data 到达顺序、动态 text/range、不同 realm 环境、mismatch、拒绝/abort、重复 mount 全覆盖。无需快路径的应用不付整树额外扫描。
- 结构传输按 programs/runs,必要数据按实际动态状态增长;冷 FCP、ready、首次交互、settled CPU、GC/retention 和 bundle 联合报告。
通用合并与证据契约
- 保持 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
Huxpro commentedon Sep 7, 2026
Slice 1/2 merged: proof-bearing program manifests
PR #297 merged into
new-lynxat99576f6ea7196d79a8f71e0c93e002e986584267after the exact head passed all 26 CI jobs.What landed:
Mechanism evidence: 5/5 production-profile first screens at both 1k and 10k reported one manifest run, one match, and
adopt. The uninstrumented PAPI A/B remained neutral/noisy (1k 120.4 vs 119.4 ms; 10k 787.5 vs 794.1 ms), with exactly the same 17,113/170,113 host calls and two flushes in both revisions.This is deliberately not counted as a speedup. The cost ledger records Web +11,656 B, Lynx +10,406 B, and a provisional +70.2 ms 10k paint-to-settled median in the sampling build. Slice 2 must use this proof to remove the redundant expanded description and per-program-node comparison, repay the temporary debt, and rerun ready/interaction/GC/bundle gates before #287 closes.
Report and raw samples: https://github.com/Huxpro/octane/tree/new-lynx/docs/reports/lynx-issue287-program-manifest
Huxpro commentedon Sep 7, 2026
Slice 2 merged in #298 (
ccc61b0f6a50f17cdf159fa07b15c1d1e0209449). This deletes the expanded first-tree program stream on the eligible adoption wire path and uses a proof-bearing addressed run plus compact ACK, while preserving the expanded in-memory batch for repair/compatibility.Exact-head evidence (
8d834fbcbb0bd7095e85e0330dc256f569e345e2, native controlae58d5ab638f3e203a75fa0441087931cbd5773cdiffering by one early return):Full raw evidence and protocol:
docs/reports/lynx-issue287-program-compaction/README.md.#287 remains open. Next gates are explicit: repay the +12,008 B Web / +11,504 B Lynx temporary bundle debt, delete the remaining per-host native ownership transfer that leaves apply at 3.78 s, and collect same-window forced-GC retention through hand-over/update/unmount/close before rerunning ready gates.
Huxpro commentedon Sep 7, 2026
Ownership slice merged in #299.
Exact 1k Android mechanism A/B at commit
6993c08c476a33fe801ff8477644531ced295306:prepared.apply(): 4072 [4063–4098] ms -> 3 [3–3] msReport and raw evidence: https://github.com/Huxpro/octane/blob/new-lynx/docs/reports/lynx-issue287-program-ownership/README.md
#287 intentionally remains open. Remaining gates are forced-GC retention across hand-over/update/unmount/close and repayment of the temporary shipping bundle debt (+16,849 B Web / +15,411 B Lynx versus the slice-1 baseline).
Huxpro commentedon Sep 7, 2026
Final retention/size slice merged in #300.
Exact head
23cce7609e4c702dd0a29f614d77d31e24bf6834; merge commit168eaca0751e2002b087cab3192c542206c8066b; exact-head CI run 34144185577 passed every job, including the four Node 24 shards, browser/heavy integration, Lynx compatibility, typecheck, lint, publish validation, and provenance.Closure evidence:
218adcb5f37353a47b0cf3b1d42c724b477cfdeb5a60c79659dc29aa7b57a68e; Lynx2875ca60e84772d1b9223507bf25e081b27e96d0c2d5b843654e3e0371e93e62.prepared.apply()is 3 [3–3] ms with 69 commands and a 203 B compact reply; first Clear preserves exact 1,000 -> 0 state and the same 7,000 commands, with 290 [287–291] ms apply; teardown reports 0 live runs / 0 hosts.Full protocol, raw JSON, provenance, limitations, and reproduction commands: https://github.com/Huxpro/octane/blob/new-lynx/docs/reports/lynx-issue287-retention-size/README.md
All explicit #287 gates are closed; marking complete.