Skip to content

[chore] Flip the #25 build-output sentinel to a hard gate (--enforce) #100

Description

@Lion-1209

任务描述

#47 引入的 build-output sentinel 从 non-blocking(continue-on-error: true,失败时只警告)升级为硬 gate(--enforce,失败时 CI fail)。

具体改动(待 #47 合并后):

  • scripts/check-build-output.mjs 的 CI 调用从 node scripts/check-build-output.mjs 改为 node scripts/check-build-output.mjs --enforce
  • .github/workflows/test.yml 中该步骤去掉 continue-on-error: true
  • 更新步骤注释(当前注释里"Flip to --enforce ... for a hard gate"的指引),改为描述它是硬 gate

动机

#47 的 sentinel 刻意做成 non-blocking,是为了让它能独立于 #28 落地——在 #28 合并前,chunk 还是空的,sentinel 会(正确地)报警;如果当时就是硬 gate,这个 PR 自己就没法过 CI 了。

现在 #28 已经合并(#4f45875),chunk 已被填充,sentinel 在当前 main 上是绿的这个 non-blocking 的理由已经不存在了。把它升级为硬 gate,能让未来任何再次把 local-tui-app chunk tree-shake 成空壳的回归(#25 类型)在 CI 阶段就被直接拦截,而不是只在日志里留一条警告。

前置条件

验收标准

  • --enforce 下,空 chunk 触发 CI fail(已有测试覆盖该分支)
  • --enforce 下,正常 chunk 仍 pass
  • 三平台 CI 全绿(该步骤只在 Windows lane)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions