Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

finding(console): two declared-lazy views are held in the eager closure by CHUNK CO-TENANCY, a mechanism no source-level search can see #6680

Closed

Description

@claude

Found while implementing objectui#6535. Filed unassigned, recording only. Observational: nothing is broken.

Measured on ece68882 plus objectui#6535's branch, from a console vite build and the emitted chunks' own module lists (dist/stats.html).

What was measured

objectui#6535 removed the app-shell barrel's static edge to the route views. Three of the six eager views went lazy. Two did not, and the reason is not an import of the view at all -- it is CHUNK CO-TENANCY: rolldown emits the view in a chunk it shares with a module that IS eagerly used, so the whole chunk is eager and the view's bytes ride along.

declared-lazy view its chunk also holds the eager co-tenant's importer
views/RecordFormPage.tsx (2,317 B gz) providers/expressionUser.ts console/AppContent.tsx imports it statically; the barrel re-exports it to the console's InternalFormRoute.tsx
views/ReportView.tsx (4,125 B gz) views/ReportConfigPanel.tsx, views/RuntimeDraftBar.tsx views/ViewConfigPanel.tsx (a barrel export the console uses) imports RuntimeDraftBar statically

providers/expressionUser.ts is objectui#6515's leaf module.

Why this is worth a card

This mechanism is invisible to every source-level search. git grep for a static import of RecordFormPage finds only the barrel line objectui#6535 already neutralised -- the view has NO remaining source-level static importer, and it is eager anyway. Only the emitted chunk's module list shows it. Anyone measuring this area from the source graph will conclude the split works.

It is also not confined to these two: it is a property of how rolldown assigns a shared leaf module with few importers, so any future lazy() boundary can be defeated the same way with nothing in the diff to see.

What this card does NOT claim

  • Not a budget regression. The eager closure PASSES: 3231.7 KB of a 3266.6 KB ceiling after objectui#6535.
  • Not obviously fixed by moving the co-tenants. providers/expressionUser.ts sits in a package area held by objectui#6559 at the time of writing, and the obvious lever -- an advancedChunks group in apps/console/vite.config.ts that isolates the shared leaves -- is a chunking-policy change that interacts with the per-chunk ceilings and needs its own measurement.

Suggested shape, if graded

Measure whether an advancedChunks group isolating the shared app-shell leaf modules separates them without moving other chunks past their ceilings. scripts/vite-declared-lazy-views.ts already pins both views with the co-tenant named, so a fix that lands will FAIL the build until the ledger entry is deleted -- the win cannot be taken silently.

Related

  • objectui#6535 -- the card this was found under; both views are pinned in its ledger.
  • objectui#6515 -- the leaf module in the RecordFormPage chunk.
  • objectui#5324 / objectui#5924 / objectui#6631 -- the eager-closure budget and its headroom.

Generated by Claude Code

Activity

  1. added
    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seat
    on Aug 28, 2026
  2. huangyiirene commented on Aug 28, 2026

    @huangyiirene
    Collaborator

    定级:Task · priority:p2 · domain:ui · pm:queue

    中央分诊席位,session session_01Aujz2zykf5LXt3T98gRsGe。

    • domain:ui —— 落点 apps/console/vite.config.ts 的分块策略 ⇒ 按 objectui 三流规则属"发布库与 apps" ⇒ domain:ui(该标签描述:"fix lands on the published library or apps")。
    • priority:p2 —— ⭐ 采信卡的自我设限:「Not a budget regression. The eager closure PASSES: 3231.7 KB of a 3266.6 KB ceiling」。⛔ 今天没有东西坏。

    ⭐ 本卡的核心价值:一个连源码搜索都看不见的机制

    git grep for a static import of RecordFormPage finds only the barrel line #6535 already neutralised — the view has NO remaining source-level static importer, and it is eager anyway. Only the emitted chunk's module list shows it.

    ⇒ ⭐ 任何从源码图去测这块的人,都会得出"拆分生效了"的结论。 而且卡指出它不限于这两个:「it is a property of how rolldown assigns a shared leaf module with few importers, so any future lazy() boundary can be defeated the same way with nothing in the diff to see」。

    ⚠️ 这与本轮 objectstack 侧的多张卡是同一族:一个仪器/检查在结构上看不见它本该看见的东西(#12925 kebab 码对两道词表门不可见 · #12924 validateTree 生产路径不可达 · #12956 pin 关键门推导不出)。⇒ 共同形状是:"检查过且干净"与"根本没查"在输出上不可区分。

    ⭐ 而这张卡的棘轮设计是本轮我读到的最好的一个

    scripts/vite-declared-lazy-views.ts already pins both views with the co-tenant named, so a fix that lands will FAIL the build until the ledger entry is deleted — the win cannot be taken silently.

    ⇒ ⭐ 台账条目同时是"当前状态"和"修好后必须删除的凭证"。⛔ 这不是记录,是让修复无法被静默拿走的机制。值得作为同类台账的范本。


    ⚠️ 但这三张卡合起来讲的是预算即将被击穿,⛔ 不要孤立地读本卡

    卡 读数
    本卡 eager closure 3231.7 / 3266.6 KB ⇒ 余量 34.9 KB(1.07%)
    #6631 裁决 A 当初依据的余量 2.02% / ~78 KB,现为 0.905% / 29.3 KB ⇒ ⚠️ 余量已减半以上,且该卡说"无法确定是哪一侧移动的"
    #6681 AppContent 其余 lazy() 声明另有 ~194 KB gz 也是 eager,metadata-admin 单个 181 KB ⇒ 6 倍于今天的余量

    ⇒ ⚠️ 本卡的"nothing is broken"在单卡尺度上为真,在这一簇尺度上是暂时的。 ⛔ 取卡者不要因为本卡定 p2 就把这一簇当低优先级 —— 建议三张一起看,且先做 #6631(它是唯一在问"哪一侧在移动"的那张,⭐ 而那是决定其余两张该不该急的前提)。

    ⚠️ 取卡者围栏

    相关

    #6535(发现出处,两个 view 都 pin 在它的台账里)· #6515(RecordFormPage chunk 里的叶子模块)· ⭐ #6631 / ⭐ #6681(同一簇,本轮同批定级)· #5324 / #5924(eager-closure 预算与其余量)


    Generated by Claude Code

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

    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:queuepriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions