Skip to content

ci(console): 把 vitest.config.ts 纳入 tsc program,并把根 vitest 配置算进 turbo 的 cache key - #3513

Draft
yinlianghui wants to merge 3 commits into
mainfrom
claude/issue-3476-console-vitest-tsc
Draft

ci(console): 把 vitest.config.ts 纳入 tsc program,并把根 vitest 配置算进 turbo 的 cache key#3513
yinlianghui wants to merge 3 commits into
mainfrom
claude/issue-3476-console-vitest-tsc

Conversation

@yinlianghui

@yinlianghui yinlianghui commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Fixes #3476

两个文件、两个提交:

提交 文件 作用
342ca3d apps/console/tsconfig.node.json 只改 include —— 把 vitest.config.ts 纳入 program,删掉幽灵条目 vitest.setup.ts
b040f91 turbo.json 一行 —— 把 $TURBO_ROOT$/vitest.config.mts 加进 type-checkinputs

没有动任何编译选项:PR #3475 留下的 allowImportingTsExtensions + emitDeclarationOnly 已经把 .ts / .mts 显式扩展名这一关过掉了,实测无需追加(见下方「flag 组合」)。

关于 turbo.json(第二个提交)的范围说明
本 issue 派发时的文件面只有 apps/console/tsconfig.node.json。第一版 PR 因此刻意没改 turbo.json,只把实测到的缓存空洞记录成 #3514 并在报告里升级为待决问题(方案 A:并入本 PR / 方案 B:另行派发)。
PM 已裁决并明确放宽文件面,原文:

Option A, approved now —— the file fence is hereby WIDENED to include the one-line turbo.json change: add $TURBO_ROOT$/vitest.config.mts to the type-check task's inputs, symmetric with the existing $TURBO_ROOT$/scripts/vite-*.ts entry. Your reasoning is endorsed as-is: knowingly landing a half-armed gate is the exact failure class this repo has paid for three times, and the stale-green window of option B is avoidable for one line.」
故第二个提交在范围内。#3514 不关闭:PM 将其改写承载方案 C(把这类 inputs 从 tsconfig 的 include 推导出来、或加钉测试的长效解),本 PR 不动该 issue。

前提复核(先证伪,再动手)

issue 的两条论断都在 origin/main(f995a45)上重新量过,均成立:

论断 复核结果
apps/console/vitest.config.ts 不在任何 CI 会跑的 tsc program 里 ✅ 两个 console tsconfig 均为 0
tsconfig.node.json 的 include 列了不存在的 vitest.setup.ts ✅ 该文件在 apps/console/ 下从不存在
CI 跑的是 per-package 的 turbo run type-check,根 tsconfig.json 只是编辑器配置 ✅ 根 package.jsontype-check 就是 turbo run type-check,没有任何 script 跑根 tsconfig.json

补充一条 issue 没写、但顺手量到的:根 tsconfig.json 的 program 里其实apps/console/vitest.config.ts 的(includeapps,且它非 composite 所以不报 TS6307)—— 但既然没有任何 script 运行它,这只是编辑器里的绿,不构成门禁。issue 的判断没有被这一点推翻。

改动一:tsconfig.node.json 的 include

-  "include": ["vite.config.ts", "vitest.setup.ts", "../../scripts/vite-*.ts"]
+  "include": [
+    "vite.config.ts",
+    "vitest.config.ts",
+    "../../vitest.config.mts",
+    "../../scripts/vite-*.ts"
+  ]

为什么 ../../vitest.config.mts 也得进来

不是顺手扩大范围,是绕不过去:vitest.config.ts 导入它,而 composite 工程必须列出 program 里的每一个文件。只加 vitest.config.ts 的中间态实测:

vitest.config.ts(3,24): error TS6307: File '.../vitest.config.mts' is not listed within the
file list of project '.../apps/console/tsconfig.node.json'.

跟注释里 ../../scripts/vite-*.ts 是同一个形状、同一个理由,rootDir: "../.." 本来就是为它准备的。附带收益:根 Vitest 配置此前同样不在任何门禁 program 里,现在有了(下方有反向验证)。

随之而来的一条约束已写进注释:vitest.config.mts 里那句 @ts-expect-error(压制 plain-JS 的 vitest-invocation-guard.mjs 导入)在这里保持正确,仅仅因为本工程的 allowJs 是默认的 false。哪天有人把它打开,那条指令立刻变成 TS2578 —— 这不是假设,tsconfig.scripts.json 选了 allowJs: true 并为此付过 5 处的代价,而此刻 main 上正红着的 #3504 就是第 6 处

幽灵条目:选择删除,而不是改指

vitest.config.ts 真正用的 setup 文件是仓库根的 vitest.setup.dom.tsx。但它是以运行期路径字符串交给 Vitest 的,不是 import:

setupFiles: [path.resolve(import.meta.dirname, '../../vitest.setup.dom.tsx')],

所以本 program 与它之间没有任何类型边,把它类型检查一遍并不校验本工程持有的任何契约。改指的代价也实测了 —— 它会把整个 DOM 测试 setup 图拖进一个 Node 构建配置工程:

../../vitest.setup.dom.tsx(15,8): error TS6307: vitest.setup.base.ts is not listed ...
../../vitest.setup.dom.tsx(38,8): error TS2882: side-effect import of '@object-ui/components'
../../vitest.setup.dom.tsx(39,8): error TS2882: side-effect import of '@object-ui/fields'
../../vitest.setup.dom.tsx(40,8): error TS2882: side-effect import of '@object-ui/plugin-dashboard'
../../vitest.setup.dom.tsx(41,8): error TS2882: side-effect import of '@object-ui/plugin-grid'

要弄绿就得让这个「只为被类型检查而存在」的配置工程去依赖整个 workspace 构建图。它属于某个面向测试的 program,不属于这里。故:删掉。

(顺带记录:vitest.setup.dom.tsx / .base.ts / .dom-light.tsx 目前确实不在任何门禁 program 里 —— 已单独立为 #3515,observation 类,超出本 PR 文件面。)

改动二:turbo.json 的 cache key

       "inputs": [
         "$TURBO_DEFAULT$",
-        "$TURBO_ROOT$/scripts/vite-*.ts"
+        "$TURBO_ROOT$/scripts/vite-*.ts",
+        "$TURBO_ROOT$/vitest.config.mts"
       ]

改动一让 console 的 type-check 多读了一个仓库根文件,而 $TURBO_DEFAULT$ 只覆盖包目录内的文件、globalDependencies 未设置 —— 于是这个新增的 program 成员不进哈希,turbo 可以在它已经编译不过的情况下回放一条绿。已有的 $TURBO_ROOT$/scripts/vite-*.ts 正是为同一 program 的另一个根级文件加的,本行与之对称。

turbo.json 无注释先例(严格 JSON),故不加注释;理由写在 tsconfig 注释、commit message 与此处。

验证

覆盖面前后对照(issue 指定的那条命令)

$ cd apps/console && ../../node_modules/.bin/tsc -p tsconfig.node.json --noEmit --listFilesOnly \
    | grep -c 'apps/console/vitest.config.ts'
改动前: 0
改动后: 1

program 里的仓库文件(改动后,已滤掉 node_modules):

scripts/vite-crypto-stub.ts
scripts/vite-maplibre-worker.ts
apps/console/vite.config.ts
vitest.config.mts               ← 新增
apps/console/vitest.config.ts   ← 新增

反向验证 A:类型门真的能红(方向先预测后运行,两次都符合)

覆盖面这类改动,「文件名出现在列表里」不算证明 —— 证明是门禁真的能红。故种入真实类型错误,用 CI 的同一条 type-check 脚本跑两边:

种入位置 tsconfig 预测 实测
apps/console/vitest.config.tssetupFiles: [42, ...] origin/main 绿(错误不可见) ✅ exit 0,无输出
同上 本 PR 的 ✅ exit 1,vitest.config.ts(17,20): error TS2769 ... Type 'number' is not assignable to type 'string'
vitest.config.mtstestTimeout: 'fifteen-seconds' origin/main 绿 ✅ exit 0
同上 本 PR 的 ✅ exit 1,../../vitest.config.mts(114,5): error TS2769 ... Type 'string' is not assignable to type 'number'

反向验证 B:turbo 那一行真的在起作用(同一棵树、同一次会话内的 A/B)

先把缓存跑绿落盘,再在根 vitest.config.mts 种入同一个类型错误,只跑 console 这一个 filter:

type-check 的 inputs 预测 实测
旧(origin/main) cache HIT,回放绿 —— 即缺陷本身 cache hit, replaying logs 4214aa6ab3df0f18 / Tasks: 35 successful / FULL TURBO / exit 0
新(本 PR) cache MISS,重新执行并变红 cache miss, executing 648e8a0633f2bff7 / Failed: @object-ui/console#type-check / exit 1,输出 ../../vitest.config.mts(114,5): error TS2769

即:修之前 turbo 会把一条绿盖在编译不过的 program 上;修之后同样的改动立刻转红。

不只是本地现象,两条依据:

  1. .github/workflows/ci.ymlactions/cache 持久化 .turbo/cache,暖缓存会跨 run 携带这条陈旧的绿;
  2. 本容器里 turbo 把缓存解析到共享主 checkout/home/user/objectui/.turbo(git worktree 共用 common dir),所以旧哈希 4214aa6ab3df0f18 在我的 worktree 删除重建之后仍然命中 —— 陈旧的绿会在并行 agent 的多个 worktree 之间旅行。

两次种入均已还原,git status 只剩预期的改动文件。

门禁

命令 结果
pnpm --filter @object-ui/console type-check(= tsc --noEmit && tsc -b tsconfig.node.json --force) ✅ exit 0
turbo run type-check --concurrency=2(全仓,turbo.json 改后重跑) Tasks: 78 successful, 78 total,exit 0(36 cached / 42 重新执行 —— 改 turbo.json 令全局哈希失效,符合预期)
node scripts/check-type-check-coverage.mjs 43/45 via type-check ... exit 0
pnpm exec vitest run apps/console/ --maxWorkers=2(仓库根) Test Files 23 passed (23) / Tests 212 passed (212)
pnpm exec vitest list apps/console/(仓库根) ✅ exit 0,配置照常加载
node scripts/check-control-bytes.mjs OK (scanned 3686 tracked text file(s))
grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]' 自查两个被改文件 ✅ 无命中
turbo.json 严格 JSON 解析 ✅ OK
工作树 litter ✅ 无,声明产物仍全部落在 node_modules/.cache/tsc/console-node

flag 组合:实测「不需要改」

issue 备注提示可能要处理 allowImportingTsExtensions 的搭档问题。实测结论是 #3475 已经把这件事做完了:allowImportingTsExtensions: true + emitDeclarationOnly: true./vite.config.ts../../vitest.config.mts 两种显式扩展名一并成立,本 PR 一个编译选项都没动--noEmit 与本工程 emitDeclarationOnly 在 TS 6.0.3 下用于 --listFilesOnly 量测也不冲突(exit 0),故 issue 给的验证命令原样可用。

Type Check 会红,且不是本 PR 的锅

origin/main(f995a45)上 pnpm type-check:scripts 目前就是红的:

scripts/__tests__/check-doc-links.test.ts(7,1): error TS2578: Unused '@ts-expect-error' directive.

#3504,止血 PR #3505 仍是 draft、未合。本 PR 不碰 scripts/,两个被改文件都不在 tsconfig.scripts.json 的 program(scripts/**)里,不可能是成因。

⚠️ 副作用:该步骤在 job 早期就 exit 2,导致 CI 从未跑到 pnpm type-check —— 也就是说本 PR 自己那道门在 CI 上没被执行过,上表的绿是本地实测的。#3505 落地后需 update branch 复跑一次,让 CI 真正验证。

Changeset

未加。@object-ui/console 确实是发布包,但本次只改开发期 tsconfig 的 includeturbo.json(后者根本不是发布包),不进 dist/,对使用者零可见变化 —— 与 PR #3475 对同一文件的处理一致。changeset:check 两条守卫均绿。

关联


Generated by Claude Code

… include entry

`apps/console/vitest.config.ts` was in ZERO tsc programs. CI runs
`turbo run type-check` — per package — and neither console tsconfig
reached the file: `tsconfig.json` includes only `src`/`dev`/
`objectstack.config.ts`, and `tsconfig.node.json` listed only
`vite.config.ts` and a `vitest.setup.ts` that does not exist.

Add `vitest.config.ts` to `tsconfig.node.json`'s include. Its import of
`../../vitest.config.mts` has to be listed too — a composite project must
list every file in its program (TS6307) — which incidentally gives the
root Vitest config the gate it also lacked.

Drop the `vitest.setup.ts` entry rather than repoint it. A literal,
glob-less include entry matching nothing is silently ignored by tsc, so
it read as coverage that was never there. The setup file `vitest.config.ts`
really uses (repo-root `vitest.setup.dom.tsx`) is passed to Vitest as a
runtime path string, never imported, so this program has no type edge to
it; naming it here was measured red (one TS6307 + four TS2882).

No flag changes were needed: `allowImportingTsExtensions` +
`emitDeclarationOnly` from #3475 already cover the `.ts`/`.mts` spellings.

Refs #3476

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectui Ignored Ignored Aug 7, 2026 2:19am

Request Review

Copy link
Copy Markdown
Collaborator Author

两条超出本 PR 文件面的发现已单独立项(均未指派):

顺带在量测中确认(省得后人重查):七个包的 ./vitest.setup.ts 全部真实存在,没有第二处幽灵条目。


Generated by Claude Code


Generated by Claude Code

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Main entry (gzip) 28.1 KB 350 KB
Entry file index-eTZerxdB.js
Status PASS

📦 Bundle Size Report

Package Size Gzipped
app-shell (index.js) 8.66KB 3.13KB
app-shell (runtime-config.js) 7.42KB 2.32KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 7.57KB 2.97KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 1.17KB 0.53KB
auth (AuthProvider.js) 22.10KB 4.37KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.13KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.64KB 2.21KB
auth (SocialSignInButtons.js) 9.60KB 3.89KB
auth (UserMenu.js) 3.40KB 1.22KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 35.76KB 9.11KB
auth (createAuthenticatedFetch.js) 4.37KB 1.69KB
auth (index.js) 2.35KB 1.07KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 4.91KB 0.87KB
auth (useIsWorkspaceAdmin.js) 1.61KB 0.85KB
collaboration (CommentThread.js) 24.58KB 7.04KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.65KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 479.63KB 105.43KB
core (index.js) 2.47KB 0.91KB
create-plugin (index.js) 9.28KB 2.98KB
data-objectstack (index.js) 136.30KB 34.76KB
fields (index.js) 229.82KB 56.53KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.32KB 1.77KB
i18n (index.js) 2.65KB 1.06KB
i18n (pickLocalized.js) 1.70KB 0.83KB
i18n (provider.js) 9.48KB 3.27KB
i18n (useObjectLabel.js) 26.14KB 6.07KB
i18n (useSafeTranslation.js) 3.26KB 1.44KB
layout (index.js) 38.53KB 10.71KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.74KB
mobile (index.js) 1.50KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.71KB 0.42KB
mobile (useResponsiveConfig.js) 1.36KB 0.63KB
mobile (useSpecGesture.js) 4.05KB 1.53KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 8.75KB 3.06KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 3.67KB 1.12KB
permissions (evaluator.js) 4.41KB 1.44KB
permissions (index.js) 0.91KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.52KB
permissions (usePermissions.js) 1.55KB 0.71KB
plugin-ai (index.js) 15.71KB 3.79KB
plugin-calendar (index.js) 44.98KB 12.37KB
plugin-charts (index.js) 61.04KB 17.31KB
plugin-chatbot (index.js) 180.09KB 42.72KB
plugin-dashboard (index.js) 112.03KB 28.88KB
plugin-designer (index.js) 210.51KB 42.51KB
plugin-detail (index.js) 232.79KB 57.42KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 111.54KB 26.97KB
plugin-gantt (index.js) 162.55KB 39.57KB
plugin-grid (index.js) 185.25KB 49.08KB
plugin-kanban (index.js) 48.03KB 13.22KB
plugin-list (index.js) 104.72KB 25.36KB
plugin-map (index.js) 16.81KB 5.24KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 40.58KB 10.58KB
plugin-timeline (index.js) 25.76KB 7.33KB
plugin-tree (index.js) 8.50KB 2.88KB
plugin-view (index.js) 84.03KB 20.55KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.71KB 3.53KB
providers (index.js) 0.44KB 0.22KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.67KB 2.37KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 19.28KB 6.38KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 1.02KB 0.55KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 4.09KB 1.74KB
sdui-parser (index.js) 4.47KB 2.03KB
sdui-parser (parse.js) 10.04KB 2.82KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 4.69KB 1.48KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.87KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-retry.js) 4.32KB 2.02KB
types (index.js) 2.46KB 1.21KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 0.20KB 0.18KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.05KB 1.93KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 3.40KB 1.71KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

The previous commit makes apps/console's type-check program span a second
repo-root file (`vitest.config.mts`, pulled in because
`apps/console/vitest.config.ts` imports it and a composite project must
list every file in its program). turbo's `type-check` inputs did not hash
it: `$TURBO_DEFAULT$` only covers files inside the package directory, and
`globalDependencies` is unset.

Measured A/B on this branch, same tree, same plant (a real type error in
the root `vitest.config.mts`):

  old inputs -> cache hit, replaying logs 4214aa6ab3df0f18 -> exit 0
                (a green replayed over a program that does not compile)
  new inputs -> cache miss, executing 648e8a0633f2bff7 -> exit 1
                ../../vitest.config.mts(114,5): error TS2769

Not local-only: ci.yml persists .turbo/cache via actions/cache, and in
this container turbo resolves its cache to the shared checkout's .turbo,
so a stale green survives across worktrees too.

Symmetric with the `$TURBO_ROOT$/scripts/vite-*.ts` entry already present,
which exists for exactly this reason for the other root-level file in the
same program.

Refs #3476, #3514

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
@yinlianghui yinlianghui changed the title ci(console): 把 vitest.config.ts 纳入 tsc program,并删掉 include 里的幽灵条目 ci(console): 把 vitest.config.ts 纳入 tsc program,并把根 vitest 配置算进 turbo 的 cache key Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

更新(PM 裁决:方案 A,文件面已放宽) — 新增提交 b040f911e,turbo.json 一行,把 $TURBO_ROOT$/vitest.config.mts 加进 type-checkinputs。正文已相应改写(含 PM 原文引用)。

同一棵树、同一次会话内重新做了 A/B,方向先预测后运行,两条都符合:

type-check 的 inputs 预测 实测
cache HIT、回放绿(缺陷本身) cache hit, replaying logs 4214aa6ab3df0f18 / FULL TURBO / exit 0
cache MISS、重跑变红 cache miss, executing 648e8a0633f2bff7 / Failed: @object-ui/console#type-check / exit 1

另量到一条加强证据:本容器里 turbo 的缓存落在共享主 checkout/home/user/objectui/.turbo(git worktree 共用 common dir),所以旧哈希在我的 worktree 删除重建后仍然命中 —— 陈旧的绿会在并行 agent 的多个 worktree 之间旅行,不只是 CI 暖缓存的问题。这条留给 #3514 的方案 C 参考(按 PM 指示我不改动该 issue)。

全仓 turbo run type-check 改后重跑:Tasks: 78 successful, 78 total,exit 0。changeset 两条守卫、控制字符扫描、turbo.json 严格 JSON 解析均绿。种入的两处错误已还原。


Generated by Claude Code


Generated by Claude Code

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Main entry (gzip) 28.1 KB 350 KB
Entry file index-DEl-WrfW.js
Status PASS

📦 Bundle Size Report

Package Size Gzipped
app-shell (index.js) 8.66KB 3.13KB
app-shell (runtime-config.js) 7.42KB 2.32KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 7.57KB 2.97KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 1.17KB 0.53KB
auth (AuthProvider.js) 22.10KB 4.37KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.13KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.64KB 2.21KB
auth (SocialSignInButtons.js) 9.60KB 3.89KB
auth (UserMenu.js) 3.40KB 1.22KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 35.76KB 9.11KB
auth (createAuthenticatedFetch.js) 4.37KB 1.69KB
auth (index.js) 2.35KB 1.07KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 4.91KB 0.87KB
auth (useIsWorkspaceAdmin.js) 1.61KB 0.85KB
collaboration (CommentThread.js) 26.07KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.65KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 479.63KB 105.43KB
core (index.js) 2.47KB 0.91KB
create-plugin (index.js) 9.28KB 2.98KB
data-objectstack (index.js) 136.30KB 34.76KB
fields (index.js) 229.82KB 56.53KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.32KB 1.77KB
i18n (index.js) 2.65KB 1.06KB
i18n (pickLocalized.js) 1.70KB 0.83KB
i18n (provider.js) 9.48KB 3.27KB
i18n (useObjectLabel.js) 26.14KB 6.07KB
i18n (useSafeTranslation.js) 4.52KB 1.96KB
layout (index.js) 38.53KB 10.71KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.74KB
mobile (index.js) 1.50KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.71KB 0.42KB
mobile (useResponsiveConfig.js) 1.36KB 0.63KB
mobile (useSpecGesture.js) 4.05KB 1.53KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 8.75KB 3.06KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 3.67KB 1.12KB
permissions (evaluator.js) 4.41KB 1.44KB
permissions (index.js) 0.91KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.52KB
permissions (usePermissions.js) 1.55KB 0.71KB
plugin-ai (index.js) 15.71KB 3.79KB
plugin-calendar (index.js) 44.98KB 12.37KB
plugin-charts (index.js) 61.04KB 17.31KB
plugin-chatbot (index.js) 180.09KB 42.72KB
plugin-dashboard (index.js) 112.03KB 28.88KB
plugin-designer (index.js) 210.51KB 42.51KB
plugin-detail (index.js) 232.79KB 57.42KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 111.54KB 26.97KB
plugin-gantt (index.js) 162.55KB 39.57KB
plugin-grid (index.js) 185.25KB 49.08KB
plugin-kanban (index.js) 48.03KB 13.22KB
plugin-list (index.js) 104.72KB 25.36KB
plugin-map (index.js) 16.81KB 5.24KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 40.58KB 10.58KB
plugin-timeline (index.js) 25.76KB 7.33KB
plugin-tree (index.js) 8.50KB 2.88KB
plugin-view (index.js) 84.03KB 20.55KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.71KB 3.53KB
providers (index.js) 0.44KB 0.22KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.67KB 2.37KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 19.28KB 6.38KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 1.02KB 0.55KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 4.09KB 1.74KB
sdui-parser (index.js) 4.47KB 2.03KB
sdui-parser (parse.js) 10.04KB 2.82KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 4.69KB 1.48KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.87KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-retry.js) 4.32KB 2.02KB
types (index.js) 2.46KB 1.21KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 0.20KB 0.18KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.05KB 1.93KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 3.40KB 1.71KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

apps/console/vitest.config.ts is type-checked by nothing, and tsconfig.node.json's include lists a file that doesn't exist

2 participants