Skip to content

[17.0-rc2验收] objectstack.config.ts 的 engines.protocol 仍是 ^17.0.0-rc.1,与 objectstack.manifest.json(rc.2)及 build 产物不一致 #728

Description

@yinlianghui

现象

同一个应用的两处协议/规格声明互相打架,pnpm build 出的产物 dist/objectstack.json 携带的是旧值 rc.1:

来源 字段
objectstack.config.ts:45(驱动 build 产物) manifest.engines.protocol ^17.0.0-rc.1
objectstack.manifest.json:4-6(marketplace 模板清单) specVersion / engines.protocol ^17.0.0-rc.2
dist/objectstack.jsonmanifest.engines.protocol (build 产物) ^17.0.0-rc.1
package.json @objectstack/* 依赖 17.0.0-rc.2

objectstack.config.ts:38-44 自己的注释写着:「Bump together with specVersion on every platform upgrade (docs/MAINTENANCE.md §3)」。rc.2 升级(commit 5a11631 "upgrade ObjectStack to 17.0.0-rc.2")把 objectstack.manifest.json 与依赖都抬到了 rc.2,但漏抬了 objectstack.config.tsengines.protocol

复现步骤

cd /home/user/hotcrm
pnpm build
python3 -c "import json; print(json.load(open('dist/objectstack.json'))['manifest']['engines'])"
# => {'protocol': '^17.0.0-rc.1'}
python3 -c "import json; d=json.load(open('objectstack.manifest.json')); print(d['specVersion'], d['engines'])"
# => ^17.0.0-rc.2 {'protocol': '^17.0.0-rc.2'}
grep -n 'protocol' objectstack.config.ts
# => 45:    engines: { protocol: '^17.0.0-rc.1' },

期望 vs 实际

  • 期望:objectstack.config.tsengines.protocolobjectstack.manifest.jsonspecVersion/engines.protocol 对齐到 ^17.0.0-rc.2,产物据此声明 rc.2。
  • 实际:config/产物仍声明 rc.1,与模板清单不一致。

影响与严重度

objectstack.config.ts:38-40 注释,协议握手只看 major(runtime 换 major 才 OS_PROTOCOL_INCOMPATIBLE),两处都是 major 17,故当前无功能性阻断 —— 定 p2。但这是随发布产物一起对外分发的一处元数据不一致,且违反了该文件自身的维护约束(specVersion 与 engines 同抬),pnpm buildpublish:marketplace:dry-run 都不校验二者一致(dry-run 实测通过、未告警),会一路滑到已发布 artifact。

证据

  • pnpm build 摘要:Data: 17 Objects 344 Fields … Artifact: dist/objectstack.json (1869.7 KB),产物 manifest.engines.protocol = ^17.0.0-rc.1
  • DRY_RUN=1 node scripts/publish-marketplace.mjs EXIT=0,发布 version 2.2.2,无一致性告警。

落点分析

HotCRM 侧元数据。修点:objectstack.config.ts:45 engines: { protocol: '^17.0.0-rc.2' }(与 objectstack.manifest.json 对齐)。可选加固:给 test/ 或 build 加一条 config.engines.protocol == manifest.specVersion 的一致性断言,把「同抬」从约定升级为门禁。

环境

hotcrm@0899b4f + @objectstack 17.0.0-rc.2

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingmetadataDeclarative metadata — schema, security posture, UI surfacespm:dispatchedDispatched to a dev agent by /pm-dispatchprio:p2Triaged backlog — no near-term schedule

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions