Skip to content

fix(cli,create-plugin): 删掉两包 files 里声明的 templates —— 该目录从未存在过 (#3665) - #3687

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-3665-remove-templates-entries
Aug 7, 2026
Merged

fix(cli,create-plugin): 删掉两包 files 里声明的 templates —— 该目录从未存在过 (#3665)#3687
yinlianghui merged 1 commit into
mainfrom
claude/issue-3665-remove-templates-entries

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Fixes #3665

问题

@object-ui/cli@object-ui/create-pluginpackage.json 都在 files 里点名要打包 templates,而两个目录都不存在,也从未存在过。npm 对 files 里缺失的条目静默跳过 —— 不报错、不警告、退出码 0 —— 所以发布出去的 tarball 效果上是对的,失真的只有 manifest 本身:它声明要打包一个不存在、也永远不会存在的目录。这是 #3647(plugin-tree 声明 LICENSE 而文件不存在)的同一机制,方向相反 —— 那次的正确修法是补文件,这次是删声明。

前提复核(在 origin/main @ d2fd044 上实测,先证后改)

事实 命令 结果
两处 files 确实含 templates 读 package.json 两包均为 dist, templates, README.md, CHANGELOG.md, LICENSE
磁盘不存在 ls packages/{cli,create-plugin}/ 无 templates 目录
git 历史从未有过 git log --all --diff-filter=A -- 'packages/cli/templates/**' 'packages/create-plugin/templates/**' 空输出
未被 git-ignore(不是构建产物豁免) git check-ignore -v 两路径 exit 1(未命中任何规则)
构建不会生成 两包 tsup.config.ts 只声明 entry + dts,产物只进 dist/
cli 模板已内联 src/commands/init.ts:17 const templates = { 对象字面量,由 :381 取用
create-plugin 的 templateDir 是死变量 全包 grep templateDir 只有 src/index.ts:115 一处,即其赋值本身

issue 正文的三条佐证全部复现,前提成立。

改动(4 个文件)

  1. packages/cli/package.json —— 删 files 里的 "templates" 一行。
  2. packages/create-plugin/package.json —— 同上。
  3. packages/create-plugin/src/index.ts —— 删死变量 templateDir,以及唯一存在意义就是算它fileURLToPath import + __filename + __dirname 三行。
  4. scripts/__tests__/package-files-exist.test.ts —— 清空 KNOWN_MISSING 的两条(test(scripts): 补门禁——package.json files 声明的条目必须在磁盘真实存在 (#3663) #3667 为本单挂的账)。

关于 index.ts:201 残留的那个 __dirname

删完之后文件里仍能 grep 到一个 __dirname:

201:      entry: path.resolve(__dirname, 'src/index.tsx'),

不是漏网的引用 —— 它落在 const viteConfig = 开头的模板字符串内部,是要被逐字写进脚手架产物 vite.config.ts 的字面文本(该行没有 ${...} 插值,${pascalCaseName} 才是插值)。它指的是被生成的那个插件包自己的 __dirname,与本模块无关。下面的构建产物 diff 是这一判断的机械佐证。

顺序验收:棘轮双向性的现场演示(先写下预测,再跑)

#3667 的逆向验证 C 钉住过一个反直觉方向:修好一个缺陷会让套件转红,直到基线里那一行也被删掉。本单正是被那半边棘轮逼出来的,所以分两步跑,两步输出都在这里。

第 (a) 步 —— 只删两个 package.jsontemplates 行,不动 KNOWN_MISSING

预测(动手前写下): 1 failed | 4 passed;红的是 the objectui#3647 baseline only shrinks,报陈旧并逐条点名;存在性断言保持绿(条目已不在 files 里,无可校验)。

实测 —— 命中:

 ❯ |unit| scripts/__tests__/package-files-exist.test.ts (5 tests | 1 failed) 13ms
     × the objectui#3647 baseline only shrinks 8ms

AssertionError: A KNOWN_MISSING entry is stale — the path now resolves, so the defect is fixed.
Delete its line from KNOWN_MISSING in this file to bank the progress.

packages/cli/templates (objectui#3665)
packages/create-plugin/templates (objectui#3665): expected [ 'packages/cli/templates', …(1) ] to deeply equal []

 Test Files  1 failed (1)
      Tests  1 failed | 4 passed (5)

第 (b) 步 —— 清空 KNOWN_MISSING

预测: 5 条全绿。

实测 —— 命中:

 Test Files  1 passed (1)
      Tests  5 passed (5)

一处必须写明的方向差异(否则下一个读者会被消息误导)

#3667 的 C 方向是把路径建出来让它 resolve;本单走的是另一条路径 —— 把声明删掉,于是该条目根本不再进入 declared,自然不在 stillMissing 里。终态判定相同(stale),但失败消息首行写死的是 the path now resolves —— 而此刻 packages/cli/templates 并没有 resolve,它依然不存在,只是不再被声明。补救指令(「删掉 KNOWN_MISSING 里那一行」)在两条路径下都正确,所以不会把人引向错误动作,但归因句与现场不符。已另行开单 #3674 记录(观察类,finding 标签);修它要改该文件的断言消息,超出本单文件面,故本 PR 不动。

零行为佐证一:npm pack --dry-run 受控 A/B

⚠️ 先说一次方法论上的自我纠正,免得清单读起来有歧义:最初的对照是「改前(未构建 worktree)vs 改后」,而中途为跑 cli 的 type-check 构建了依赖、cli 自己的测试又生成了 dist/,于是「改后」清单凭空多出 7 个 dist 文件 —— 那个差异来自构建,不来自本改动,该对照已作废。下面是重做的版本:同一棵已构建的树上,只把那一行加回去、再删掉,其余一切不动。

@object-ui/cli —— 带 templates 行 / 不带,清单逐字节相同,均 12 个文件:

Tarball Contents
32.5kB CHANGELOG.md
1.1kB LICENSE
3.4kB README.md
48.7kB dist/chunk-EV2DCI7W.js
74.4kB dist/chunk-EV2DCI7W.js.map
20B dist/cli.d.ts
42.6kB dist/cli.js
85.0kB dist/cli.js.map
685B dist/index.d.ts
116B dist/index.js
71B dist/index.js.map
1.8kB package.json

@object-ui/create-plugin —— 带 / 不带,同样相同,均 6 个文件:

Tarball Contents
6.4kB CHANGELOG.md
1.1kB LICENSE
2.3kB README.md
20B dist/index.d.ts
9.3kB dist/index.js
1.4kB package.json

templates 本来就打不进 tarball(npm 静默跳过),删掉声明对发布物的影响精确为零。

零行为佐证二:构建产物 diff(证明死变量删除对脚手架产物无影响)

create-plugin 没有测试文件,所以改用更硬的证据:把 git show HEAD 的旧源码与新源码分别 tsup 构建,diff 两份 dist/index.js全部差异恰好是被删的两处,一行不多:

 import prompts from "prompts";
 import * as path from "path";
 import fs from "fs-extra";
-import { fileURLToPath } from "url";
-var __filename = fileURLToPath(import.meta.url);
-var __dirname = path.dirname(__filename);
 var program = new Command();
@@
   fs.mkdirpSync(targetDir);
   fs.mkdirpSync(path.join(targetDir, "src"));
-  const templateDir = path.join(__dirname, "..", "templates", "plugin");
   const vars = {

产物里没有任何其他行发生变化 —— 包括那段生成 vite.config.ts 的模板字符串,它里面的 __dirname 原样保留,证实了上面「那是字面文本、不是引用」的判断。脚手架生成什么,一个字节都没变。

验证

$ pnpm exec vitest run scripts/__tests__/ --maxWorkers=2        # 全量 scripts 门禁套件
 Test Files  17 passed (17)
      Tests  305 passed (305)

$ pnpm exec vitest run packages/cli/ --maxWorkers=2
 Test Files  2 passed (2)
      Tests  38 passed (38)

$ pnpm --workspace-concurrency=2 --filter @object-ui/create-plugin type-check    # tsc --noEmit
 exit 0
$ pnpm --workspace-concurrency=2 --filter @object-ui/create-plugin lint          # eslint .
 exit 0

$ pnpm --workspace-concurrency=2 --filter @object-ui/cli type-check
 exit 0

$ pnpm type-check:scripts
 exit 0
$ npx eslint scripts/__tests__/package-files-exist.test.ts
 exit 0

$ node scripts/check-control-bytes.mjs
 ✅  check-control-bytes: OK (scanned 3672 tracked text file(s); skipped 85 binary).

@object-ui/cli 的 type-check 第一次是红的,报 Cannot find module '@object-ui/types/zod' —— 这是全新 worktree 的陈旧产物陷阱(AGENTS.md §9 的同族),不是本改动。先跑 pnpm --workspace-concurrency=2 --filter '@object-ui/cli^...' build 把依赖构建出来后即转绿,如上。记在这里是因为它读起来非常像「你的改动弄坏了一个 import」。

另:除 check-control-bytes 外,对 4 个改动文件另做了一次超出门禁扫描面的自查 —— grep -naP\x00-\x08 / \x0b / \x0c / \x0e-\x1f 无命中,并逐码点统计零宽与不可见字符(U+200B / U+FEFF / U+2028 等)计数均为 0。

文件面披露:改了 KNOWN_MISSING 上方的一段文档注释

派发的文件面是「清空 KNOWN_MISSING 两条,该文件其余断言一行不动」。我没有动任何断言,但改写了 KNOWN_MISSING 上方文档注释的最后一段,理由需要摆明:

那一段以现在时逐条描述我正要删掉的两个条目(Both current entries are vestigial declarations, measured on main@dae1ac41e: neither templates directory exists...)。map 清空后这段话会变成一份「描述两个并不存在的条目」的声明 —— 与本 PR 正在消除的失真完全同一类,只是从 package.json 搬到了注释里。

改写只做两件事:把已死的现在时描述换成历史记录,并补记「删声明与建文件同样使基线条目退休」(即上面那处方向差异)。ratchet 机理与修复指引两段原文一字未动,其下所有断言与逻辑一字未动。此项已向 PM 报备并获预先接受;若判定越界,单独回退这一段即可,不影响其余三个文件。

关于 changeset:判定为不加

#3662 确立的判断框架:

  1. 仓规明文:AGENTS.md 第 151 行 —— 功能改进(feature)需写 changeset,纯缺陷修复不需要。本 PR 是 manifest 失真订正加死代码清除。
  2. 用户可见变化精确为零:上面两份受控 A/B 证明两个包的 tarball 清单逐文件相同,构建产物 diff 证明脚手架行为字节不变。这比 fix(plugin-tree): 补上 package.json files 已声明、但仓库里不存在的 LICENSE (#3647) #3662 的处境更弱 —— 那个 PR 确实改变了 tarball 内容(往里加了一份 LICENSE),尚且判定不加 changeset。
  3. 代价不成比例:.changeset/config.json 把 39 个包放在同一个 fixed 组,为一条 manifest 订正会把整组推一个版本。

🤖 Generated with Claude Code

https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt


Generated by Claude Code

…age has ever had (#3665)

`@object-ui/cli` and `@object-ui/create-plugin` both list `templates` in
package.json `files`, but neither directory exists on disk and neither has
ever existed anywhere in this repo's git history. Both packages inline their
templates instead: the cli as an object literal in `src/commands/init.ts`,
create-plugin by constructing the generated package.json field by field in
code. npm skips a missing `files` entry silently, so the published tarballs
were already correct — only the manifests said otherwise.

Also removes create-plugin's write-only `templateDir` and the
`fileURLToPath`/`__filename`/`__dirname` chain that existed solely to compute
it. The `__dirname` that remains at src/index.ts:201 is literal text inside
the generated vite.config.ts template string, not a reference to the module's.

Clears both `KNOWN_MISSING` entries from the objectui#3663 ratchet, which the
deletions turn stale. Deleting a declaration retires a baseline line exactly
as creating the file would; the doc comment above the map now records both
routes.

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 9:29pm

Request Review

@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-eEqlis5G.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) 480.72KB 105.64KB
core (index.js) 2.96KB 1.13KB
create-plugin (index.js) 9.08KB 2.92KB
data-objectstack (index.js) 137.51KB 35.11KB
fields (index.js) 230.87KB 56.83KB
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.32KB 1.64KB
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) 115.50KB 29.96KB
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) 112.10KB 27.10KB
plugin-gantt (index.js) 162.55KB 39.57KB
plugin-grid (index.js) 186.61KB 49.34KB
plugin-kanban (index.js) 48.30KB 13.28KB
plugin-list (index.js) 105.12KB 25.48KB
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.71KB 1.34KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
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

@yinlianghui
yinlianghui marked this pull request as ready for review August 7, 2026 21:31
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 7, 2026
Merged via the queue into main with commit dcff16e Aug 7, 2026
18 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-3665-remove-templates-entries branch August 7, 2026 21:32
yinlianghui pushed a commit that referenced this pull request Aug 7, 2026
PM 分诊裁定把 #3702 并入本 PR。@object-ui/console(apps/console)与 #3696 的
两个包是同一个缺陷:非 private、声明 "license": "MIT"、无许可证文本,而它确是
发布物(publishConfig.access: public、版本 17.3.0 同线、在 changeset fixed 组、
有 prepublishOnly)。之前它超出 #3696 的文件面,故只挂账不修。

改动两处:

1. apps/console/LICENSE —— 仓根 LICENSE 的逐字节副本,blob 同为
   cf2ca28。未动 files 字段(npm 恒定收录
   LICENSE),npm pack --dry-run 清单 3 → 4 个文件,LICENSE 出现。

2. KNOWN_LICENSE_TEXT_MISSING 清空。删除前先跑了一次套件让棘轮报陈旧,
   逐条成因命中第一条(唯一意味着许可证真被补上的那条):

     apps/console (objectui#3702) — it now ships license text (LICENSE)

   删除后 11 passed。

同时:

- 基线上方的文档注释从「现在时描述一个条目」改写为历史记录。留着不动就会变成
  一份描述并不存在的条目的声明 —— 与本 PR 正在消除的失真同类,只是搬进了注释
  (#3687 的同一处理)。棘轮机理段原文未动。
- 点名钉扎从两个包扩到三个,各带自己的 issue 号。这条比通用断言强:它不能靠
  往基线里加一行来满足。删掉 apps/console/LICENSE 实测 2 红(通用断言 + 钉扎),
  证明修完之后留下的是覆盖,不是沉默。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Aug 10, 2026
…禁封死该类 (objectstack-ai#3696, objectstack-ai#3702) (objectstack-ai#3703)

* fix(react-runtime,sdui-parser): 补上两包声明了 MIT 却从未随包发布的许可证文本 (objectstack-ai#3696)

两个包的 package.json 都写着 "license": "MIT",但仓库里没有对应的许可证文本,
所以每一个已发布的 tarball 都不含 MIT 要求随分发附带的许可证与版权声明。

这不是 files 声明问题:npm 有一份无视 files 恒定打包的清单(package.json、
README、LICENSE/LICENCE、COPYING、main 指向的文件),files: ["dist"] 并不会
把 LICENSE 排除在外。缺失的原因是磁盘上根本没有该文件,所以修法是补文件,
不是改 files —— 本 PR 未动任何 package.json。

两份 LICENSE 均为仓根 LICENSE 的逐字节副本,blob 与另外 37 份同为
cf2ca28。

同时给 package-files-exist 门禁加一道独立断言块:凡非 private 且声明了
license 字段的包,必须有许可证文本。判据从工作区扫描派生,不是硬编码包名单,
所以第 40 个包加进来的当天就被覆盖 —— objectstack-ai#3647objectstack-ai#3696 连着两次都是靠人肉逐包
普查才发现的。

该门禁同时点名了 apps/console(@object-ui/console,publishConfig.access:
public,同一缺陷),它超出本单文件面,已挂 objectstack-ai#3702 并写进双向 ratchet 基线。

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

* docs(scripts): 去掉门禁注释里一个不存在的 issue 交叉引用 (objectstack-ai#3696)

新块的注释里写了 "objectui#4984",但 objectui 的编号目前在 3700 一带,
该号不存在 —— 那是另一个仓的同族教训被误标成了本仓引用。悬空引用比没有引用
更坏:读者会去查一个查不到的单子。改为直接把道理写清楚(谓词的两肢今天在树上
没有标本,无人行经的逻辑可以被后来的改动反转而不转红),不再冒充交叉引用。

纯注释改动,断言与逻辑一字未动;11 passed 不变。

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

* test(scripts): license 棘轮的陈旧成因也按 objectstack-ai#3701 的约定分句上报 (objectstack-ai#3696)

objectstack-ai#3701(修 objectstack-ai#3674)刚在同一文件里立了个约定:棘轮报陈旧时,成因要**逐条实测
上报**,不能由消息硬编码假定 —— 因为「离开基线」有多条路径,只有其中一条
意味着缺陷真被修好了,把假定写死会把读者引去核对一个并不成立的事实。

本 PR 的 license 棘轮有同样的结构,原消息虽然用的是「或」式并列(没有 objectstack-ai#3674
那个断言错成因的毛病),但仍是让读者自己猜是哪一条。改成与 objectstack-ai#3701 同形的
逐条成因,四条路径各自实测:

  1. 现在有许可证文本了(并列出文件名)—— 只有这条意味着许可证真被补上
  2. 改成了 private,不再分发,自然不欠
  3. 不再声明 license 字段,没有主张要兑现
  4. 该路径下已没有包(移走/删除,或这个基线键从来就没匹配上)

四条分支逐一实测,均按预测点名(证据见 PR 正文)。

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

* fix(console): 补上 @object-ui/console 的许可证文本并把基线清空 (objectstack-ai#3702)

PM 分诊裁定把 objectstack-ai#3702 并入本 PR。@object-ui/console(apps/console)与 objectstack-ai#3696 的
两个包是同一个缺陷:非 private、声明 "license": "MIT"、无许可证文本,而它确是
发布物(publishConfig.access: public、版本 17.3.0 同线、在 changeset fixed 组、
有 prepublishOnly)。之前它超出 objectstack-ai#3696 的文件面,故只挂账不修。

改动两处:

1. apps/console/LICENSE —— 仓根 LICENSE 的逐字节副本,blob 同为
   cf2ca28。未动 files 字段(npm 恒定收录
   LICENSE),npm pack --dry-run 清单 3 → 4 个文件,LICENSE 出现。

2. KNOWN_LICENSE_TEXT_MISSING 清空。删除前先跑了一次套件让棘轮报陈旧,
   逐条成因命中第一条(唯一意味着许可证真被补上的那条):

     apps/console (objectui#3702) — it now ships license text (LICENSE)

   删除后 11 passed。

同时:

- 基线上方的文档注释从「现在时描述一个条目」改写为历史记录。留着不动就会变成
  一份描述并不存在的条目的声明 —— 与本 PR 正在消除的失真同类,只是搬进了注释
  (objectstack-ai#3687 的同一处理)。棘轮机理段原文未动。
- 点名钉扎从两个包扩到三个,各带自己的 issue 号。这条比通用断言强:它不能靠
  往基线里加一行来满足。删掉 apps/console/LICENSE 实测 2 红(通用断言 + 钉扎),
  证明修完之后留下的是覆盖,不是沉默。

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@object-ui/cli 与 @object-ui/create-plugin 的 files 声明了 templates,但该目录从未在仓库里存在过——#3647 的同类残留声明

2 participants