fix(metadata,docs): align the protocol declaration and the inventory counts with the stack (#728 #729) - #1010
Merged
Conversation
…counts with the stack (#728 #729) `objectstack.config.ts` declared `engines.protocol: "^17.0.0-rc.1"` while `objectstack.manifest.json` and the `@objectstack/*` dependency line had both moved to `17.0.0-rc.3`. Two consecutive platform upgrades bumped the manifest and the dependencies and left the config behind, so `dist/objectstack.json` advertised a protocol the app was not authored against. Only the major participates in the handshake, so nothing failed — which is why it survived two releases. The README banner, the "What you get" table, the fork guide and the docs overview still advertised 15 objects / 23 flows / 4 dashboards. Measured on this tree: 17 objects, 24 flows, 5 dashboards, 9 datasets. `crm_event` and `crm_event_attendee` join the README object table; the getting-started page, a generation further behind at 13 objects, is brought along. Every affected page is updated in all three locale faces. `whats-new` keeps its numbers — it is a dated record of what v1.0 shipped, not a claim about today. `actions` is deliberately left alone: the docs say 13 and the stack registers 26, and the two count different things (an action bound to five objects registers five times). Which number a reader should be told is a product call. Both classes are now gated in `test/docs-drift.test.ts`. One rule holds the config, the template manifest and the installed `@objectstack/spec` to a single protocol version. The other compares every count a doc states — English and Chinese spellings alike — against counts read from the registered stack at test time, never against a number written into the test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Aug 6, 2026
yinlianghui
marked this pull request as ready for review
August 7, 2026 02:05
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 free
to 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 #728
Fixes #729
并单处理(修复线 R39)。两单同族:rc.2 验收时点记录的「版本/数量宣称漂移」。文件面不相交,一个改 config、一个改 README 与文档面。
两单的 premise 都在 fresh
origin/main(acc37e65,平台依赖已由 #901 / PR #910 升至17.0.0-rc.3)上重新实测后 仍然成立 —— 而且 #728 的漂移在这期间还扩大了。#728 —
engines.protocol与 manifest/依赖不一致现值实测
objectstack.config.ts:45manifest.engines.protocol^17.0.0-rc.1^17.0.0-rc.1(未动)objectstack.manifest.jsonspecVersion/engines.protocol^17.0.0-rc.2^17.0.0-rc.3package.json@objectstack/*17.0.0-rc.217.0.0-rc.3dist/objectstack.jsonmanifest.engines.protocol^17.0.0-rc.1^17.0.0-rc.1结论:premise 成立。#910 升级时抬了 manifest 与依赖、再一次漏抬了
objectstack.config.ts—— 也就是说这一处连续两次平台升级都被落下,差距从「rc.1 vs rc.2」扩大到「rc.1 vs rc.3」。协议握手只看 major,两边都是 17,所以从来没有报错,这正是它能连过两个发布的原因;但它是随产物分发给客户的元数据。改动
objectstack.config.ts的engines.protocol改为^17.0.0-rc.3,与 template manifest 及已安装依赖对齐。修后重跑 issue 给出的复现命令,产物manifest.engines.protocol=^17.0.0-rc.3。#729 — 对象/flow 数量宣称仍是旧值
现值实测(一切以 rc.3 fresh main 为准,不沿用 issue 的数字)
口径说明:以 注册进
objectstack.config.ts的元数据为准,与pnpm build摘要及dist/objectstack.json三者一致。对象按src/objects/index.ts导出计(17,与 17 个*.object.ts文件一一对应);flow 按allFlows数组计(24),不是按文件数计 ——src/flows/只有 21 个.flow.ts,其中case-escalation、case-actions、opportunity-approval三个文件各导出 2 个 flow。pnpm build摘要:Data: 17 Objects 344 Fields / UI: … 5 Dashboards … / Logic: 24 Flows,产物objects=17、flows=24、dashboards=5、datasets=9。getting-started面上是 13)改动(逐处,含多语言面)
README.md:banner(L8)、「What you get」标题(L48)、对象表补crm_event/crm_event_attendee、汇总句(L60)、仓库结构树的三条计数注释。content/docs/marketplace/fork-hotcrm.mdx+.zh-Hans+.zh-Hant:15 → 17。content/docs/index.mdx+.zh-Hans+.zh-Hant:4 → 5 个仪表盘,并把第五个Sales Activity写进括号里的清单。content/docs/getting-started/introduction.mdx+.zh-Hans+.zh-Hant:13 → 17。这一处 issue 的落点分析未列出,是本次全面搜数量宣称时发现的,比其余各处还旧一代,属同一 drift 面,一并修掉。仪表盘计数:issue 建议让 #672 / #610 那条线一并修以免抢改同文件。核对后两单均已 closed(#672 completed、#610 completed),而
index.mdx:69与 README 仍是 4 —— 交接对象已不存在,且这两行正是本单必须改的同一行,故本单接手。刻意不改的两处
content/docs/whats-new.mdx(及两个中文面)的「15 business objects」:该页是带版本号的发布记录(## v1.0/## v5.0),这句在「### What's in v1.0」小节内,陈述的是 v1.0 当时发了什么,不是对今天的宣称。同一份文件在test/docs-drift.test.ts的 Docs drift (round 2 leftovers): ~39 product pages still name "Sales/Service Copilot" as a persona; config comment and RELEASE_STRATEGY.md still stale #612 人格化守卫里也正是以「the v1.0 release record」为由豁免的,本次守卫沿用同一豁免与同一理由。13 actions:产物注册 26,两者口径不同(一个 action 绑 5 个对象就注册 5 次),该给读者看哪一个是产品口径决策 —— issue 自身也只提示未断言。本 PR 不选边,守卫也不覆盖该数字,并在守卫注释里写明这是刻意留白而非遗漏。另见下方范围外发现。防再犯守卫
沿
test/docs-drift.test.ts中 #1001 版本漂移断言的既有形态(含它的 vacuity guard 与「豁免必须仍然活着」两条纪律),新增两个 describe 块:1.
one protocol version, declared in three files (#728)—— 把objectstack.config.ts里那句「Bump together withspecVersion」的注释从约定升级为门禁。四条断言:三处声明可读(vacuity)、config ↔ template manifest 一致、template manifest 自身两个字段一致、以及声明的版本 ==package.json实际安装的@objectstack/spec(AGENTS.md §Dependencies 的要求)。最后一条是真正有牙的一条:它对 rc.2 和 rc.3 两次升级都会当场变红。2.
product docs state the metadata counts the stack registers (#729)—— 扫README.md与content/docs/**/*.mdx全量,把每一处数量宣称与测试时从注册 stack 现读的计数比对。期望值不写进测试文件:写死就是把同一个手工维护的数字搬了个家,下一个对象一加就同样过期,守卫也跟着一起死。中英文拼法各一条 pattern(17 business objects/17 个业务对象/17 個業務物件/17 objects across/data model (17 objects)/semantic layer (9)…),只读英文就只守住了三分之一的面(#725 在磁贴规则上教过这一课)。三条 vacuity guard:每个 kind 都注册到了非零计数、每个 kind 都至少被某处文档宣称到(改写措辞会当场变红,而不是静默失守)、以及每条豁免都仍然指向一段真实存在的宣称。反证(先定方向,再实测)
五处逐一临时改错,每处的预期方向都是 改前红/改后绿,五处实测方向与预期一致:
^17.0.0-rc.1objectstack.config.ts declares ^17.0.0-rc.1, objectstack.manifest.json declares ^17.0.0-rc.3README.md:48 says "15 business objects", the stack registers 17 objectscontent/docs/marketplace/fork-hotcrm.zh-Hant.mdx:77 says "15 個物件"—— 证明 CJK pattern 是活的而非装饰no doc states a count for: datasets—— 证明改写措辞不能静默让规则失效whats-new.mdx里的计数HISTORICAL exempts pages that no longer state any count—— 证明豁免不会比它所豁免的文本活得更久C 与 D 两条第一次跑时因还原方式失误(用了
git checkout把本次真实修改一并回退)导致输出被 README 的噪声淹没、结论不成立,已单独重跑并取得上表中的干净证据。验证
六门自检全绿(均在 fresh worktree、依赖已构建的前提下跑):
pnpm validate17 Objects / 5 Dashboards / 24 Flowspnpm typecheckpnpm lintpnpm hygiene✓ source hygiene clean(含控制字节扫描)pnpm buildmanifest.engines.protocol=^17.0.0-rc.3,objects/flows/dashboards/datasets= 17/24/5/9pnpm testdocs-drift.test.ts65 passedpnpm test输出里若干✗ source hygiene failed …行是test/source-hygiene-scan-surface.test.ts故意打坏扫描器后对其报错文案的断言(负向路径的 stdout),不是失败项 —— 该文件本身 passed。另按字节纪律对全部改动文件自查了网关扫不到的控制字节:
grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]'无命中。changeset:
.changeset/version-and-count-claims-match-the-stack.md(patch,一份覆盖两单)。Generated by Claude Code