Uh oh!
There was an error while loading. Please reload this page.
chore(scripts): 删除死入口 start-app.mjs,并修正 MetadataLoader 的过期注释 - #3591
Merged
Conversation
…omment scripts/start-app.mjs could not be run successfully by anyone. Four independent proofs, all re-measured against origin/main before deleting: 1. No npm script wires it. The only occurrence of "start:app" in the whole repo is inside the file itself, line 12, in its own usage comment. 2. Its default target does not exist: examples/dashboard is absent (examples/ holds byo-backend-console, console-starter, hello-world, schema-catalog). 3. No directory in the repo has the shape it links in. It expects app.json plus page JSON files; git ls-files finds no tracked app.json anywhere, and no tracked pages JSON at all. 4. packages/runner/src/lib/MetadataLoader.ts cited 'pnpm dev:crm', which is not a script in this repo (it belongs to the objectstack repo). Per enforce-or-remove: an entry point that cannot work is a debugging tax on every future agent. If a tool to populate src/app-data is wanted later, it is cheaper written from the real requirement than repaired from this. The MetadataLoader comment now describes what LocalBundleLoader actually does - reads a gitignored, absent-by-default directory, so its globs compile to an empty map - instead of naming a script that does not exist. Comment only; zero behavior change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
yinlianghui
marked this pull request as ready for review
August 7, 2026 14:58
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#3579
按 issue 的 enforce-or-remove 裁定执行移除。
scripts/start-app.mjs是一段任何人都跑不成功的工具代码:它把某个应用目录软链到packages/runner/src/app-data,再起 runner 的 dev server —— 但四个环节全断。删除前对
origin/main复测的四重死证issue 是线索不是规格,main 移动快,所以四条都在这个分支的基线(
6d762da7a)上重新实测了一遍,全部仍然成立:rg下来,start:app这个字符串只在被删文件自己的第 12 行注释里出现过一次(它自称的调用方式)。根package.json的 55 个 script 里没有它,.github/、turbo.json、文档里也没有任何地方引用start-app。也就是说这个入口只在它自己的注释里存在。args[0] || 'examples/dashboard',而examples/下只有byo-backend-console、console-starter、hello-world、schema-catalog、README.md。不传参跑 →App directory not found。app.json+ 页面 JSON 的形状。这次把搜索从examples/放宽到全仓 tracked 文件:git ls-files匹配app.json的结果是零,匹配pages/下 JSON 的结果也是零。仓库里根本没有这个形状的目录。MetadataLoader.ts:18指向另一个不存在的脚本。 原注释写Used during local development via 'pnpm dev:crm',但本仓没有dev:crm(全仓package.json里查无此 script,它是 objectstack 仓的)。顺带确认:
packages/runner/src/app-data在packages/runner/.gitignore第 1 行被忽略,干净 checkout 下不存在 —— 这正是三个 glob 编译成空 map、runner 缺省模式加载不到任何东西的原因。另外核查:
scripts/__tests__/下没有任何测试引用该脚本,所以没有测试需要一并处置。改了什么
scripts/start-app.mjs(48 行)。packages/runner/src/lib/MetadataLoader.ts的类文档注释:把"通过某个不存在的脚本使用"换成如实描述 ——LocalBundleLoader读的是构建期打包进来的packages/runner/src/app-data/,而该目录被 gitignore 且缺省不存在,所以 glob 编译成空 map、每次 load 都返回 null,除非有人去填,而本仓现在没有任何脚本会去填;要从 API 取同样的元数据请用NetworkLoader。纯注释,零行为变更。注释里刻意没有写出带两个星号的 glob 字面量 —— 那个序列会在块注释里提前闭合注释(
tsconfig.scripts.json的抬头记过这个坑,它就是这么踩过一次的)。验证(先预测,再运行)
删除类改动没有红转绿的方向可言 —— 证据就是上面四条复测的死证,加上删除后每一道 gate 依然全绿。所以每条都先写下预期再跑:
pnpm exec vitest run scripts/ --maxWorkers=216 passed / 275 passed,删除后16 passed / 275 passed—— delta 0 ✅pnpm type-check:scriptsnode scripts/check-control-bytes.mjsOK (scanned 3635 tracked text file(s))✅pnpm --filter @object-ui/runner type-checkpnpm --filter @object-ui/runner test2 passed / 9 passed✅delta 0 的预测有依据而非乐观:
scripts-type-check.test.ts走盘时按/\.tsx?$/过滤,.mjs根本不在它的计数里;scripts/__tests__/下也没有别的测试枚举.mjs。一处需要说明的假红:runner 的 type-check 第一次跑出 17 个错(
Cannot find module '@object-ui/types'等,其中一条正好落在我改的MetadataLoader.ts第 9 行,看起来像是我改坏了 import)。那是新 worktree 里依赖没构建造成的,不是本次改动 —— 第 9 行的 import 我一个字没动。pnpm --filter '@object-ui/runner^...' build之后重跑即 exit 0。备注
content/docs/releases/。dev:crm现在全仓只剩AGENTS.md:248一处,而那里明确写着"framework 仓:PORT=3000 pnpm dev:crm" —— 归属正确,不需要改。Generated by Claude Code