docs(spec): align GroupingConfig.fields & NotifyConfig sourceObject/sourceId describes with the measured acceptance face (#7084, #7085) - #7111
Conversation
…/sourceId describes with the measured acceptance face - GroupingConfigSchema.fields: drop the '(supports up to 3 levels)' claim — the gate is .min(1) with no upper bound and the grid renderer recurses over all configured levels; state the shape instead (array order = nesting order, first entry outermost, at least one field). Fixes #7084. - NotifyConfigSchema.sourceObject/sourceId: replace 'Requires ...' with the module JSDoc's recorded tolerance — the pair only takes effect together; a half-specified click-through target is dropped at execute time, so the inbox never renders a dead link. Fixes #7085. - Pin tests for both describes (non-empty arm first so the negative arms are non-vacuous); regenerated the two reference pages; changeset (patch). Acceptance face unchanged: check:authorable-surface and check:api-surface green with zero diff on authorable-surface/**, json-schema.manifest/**, authorable-defaults/, authorable-surface.base.json, api-surface/**. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ffcE95NaMJcL9XJ9VDYgk
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckThis PR changes 1 package(s): 106 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
⛔ 7 release-owned page(s) also reference the affected code. These are read-only:
|
Fixes #7084
Fixes #7085
按 #7084 / #7085 两条 16:24Z 分诊结论打包的 axis-① describe 对齐卡(#6918 逐项清单评审模式):两处均为纯文案对齐,验收面逐字节不变(
domain:spec-surface),不加任何 bound、不加 refine。Item 1 — #7084
GroupingConfigSchema.fieldsFields to group by (supports up to 3 levels)Fields to group by, in nesting order — the first entry is the outermost group and each later entry nests one level deeper (at least one field)逐项核对:
f5a9bc2f3复核:packages/spec/src/ui/view.zod.ts:562,.min(1)无上界,原句仍在。[too_small]、未知键 rejected[unrecognized_keys](双侧对照),1/3/4/5/10/50 层全部 ACCEPTED。.min(1)一致)。origin/main=65bb513,只读):packages/plugin-grid/src/useGroupedData.tsbuildLevel唯一停止条件是depth >= fields.length,递归条件depth + 1 < fields.length,无 slice、无深度上限 —— 渲染器渲染全部配置层级,数组下标即嵌套深度。content/docs/references/ui/view.mdx:343(本 PR 一并再生);无手写文档副本。objectui 侧无 grouping 相关 "3 levels" 主张(CONTRIBUTING.md 的 "max 3 levels" 是代码嵌套风格规则,无关)。另测得:objectui 的编辑器grouping-editor.tsx默认maxLevels = 3(ViewSettingsPopover.tsx:203传maxLevels={3})—— 这是 authoring UI 的加号按钮上限,不是接受面或渲染上限;新文案对此不作任何主张,已记入报告。view.test.ts,GroupingConfigSchema.fields describes "(supports up to 3 levels)" but the gate is .min(1) with no upper bound — 50 levels parse green #7084 用例):非空 arm 在前;/nesting order/、/outermost/、/at least one/ 语义 arm;负向 arm 断言不得回归固定计数(\bup to \d+\b、\b\d+\s+levels?\b、max N三种拼法)。Item 2 — #7085
NotifyConfigSchema.sourceObject/sourceId… (writes sys_notification.source_object). Requires sourceId./… (writes sys_notification.source_id). Requires sourceObject.… Only takes effect together with sourceId — a half-specified click-through target is dropped at execute time, so the inbox never renders a dead link.(sourceId 侧对称)逐项核对:
f5a9bc2f3复核:io-node-config.zod.ts:163/:166仍是 "Requires …";同文件模块 JSDoc(:133-136)与NOTIFY_KEY_GUIDANCE(:114)记录的真实契约是"成对才生效、半对在执行期被丢弃、schema 有意不 refine"。[unrecognized_keys]、sourceObject-only ACCEPTED、sourceId-only ACCEPTED。ExecutionContextSchema.preserveAudit无.describe()—— 生成的 reference 行描述为空(#6827 刻意划出的那半) #6881)。safeParse(...).success === true活体钉住。io-node-config.test.ts,NotifyConfigSchema sourceObject/sourceId describes say "Requires ..." while the schema deliberately accepts the half pair (executor drops it silently) #7085 用例):非空 arm 在前;/only takes effect together/、包含对侧键名、/dropped at execute time/ 语义 arm;负向 armnot.toMatch(/\brequire[sd]?\b/i)。反向验证(方向先于运行预测,#6918 模板)
git checkout origin/main --恢复两个 zod 旧文案,pin 不动)→ 预测:两条 pin 各自 RED → 实测 RED:item 1 首个失败 arm/nesting order/i,item 2 首个失败 arm/only takes effect together/i;其余 236/238 用例保持绿。.describe(''))→ 预测:恰经非空 arm RED(负向 arm 对''空洞通过)→ 实测 RED,失败信息即非空 arm 自带标签:fields .describe() must not be empty、sourceObject .describe() must not be empty。aria墓碑不再指向同一大版本里已退休的落点 (#6756) #6854,字面量 +toMatch两种拼法检索):此前无任何针对这两段 describe 的既有 pin,新增即全部覆盖。Lane admission(验收面逐字节不变)
pnpm --filter @objectstack/spec build && check:generated:check:authorable-surface(含authorable-surface/**、authorable-defaults/、.base.json、JSON schemas)与check:api-surface(api-surface/**)全绿零 diff;两段 describe 字符串本就不落入上述任何验收工件(grep 验证)。git status 亦仅四个源/测试文件 + 两个再生 mdx + changeset。生成物
恰好两个引用页变更(与预期一致,生成器输出直接提交,未手改):
content/docs/references/ui/view.mdx(1 行)content/docs/references/automation/io-node-config.mdx(2 行)未触碰
content/docs/releases/。验证汇总
pnpm --filter @objectstack/spec test:355 files / 9273 passed(含 2 条新 pin)。pnpm --filter @objectstack/spec typecheck:绿。pnpm --filter @objectstack/spec check:generated:11/11 up to date(含check:docs、check:test-typecheck)。test-typecheck-debt.json前后不变:src/ui/view.test.ts: 8(新 pin 曾引入第 9 个 tsc error,已通过收窄类型断言修复回 8,而非改账本);io-node-config.test.ts不在账本(0 错误)且保持 0。node scripts/check-nul-bytes.mjs:OK。.changeset/grouping-notify-describe-align.md(@objectstack/spec: patch,非 breaking,无需 ADR-0087 标记)。界外发现(不在本 PR 修)
packages/services/service-automation/src/builtin/notify-node.ts:166/:170携带同样的 "Requires sourceId." / "Requires sourceObject." 文案(表单面,io-node-form-zod-ledger.test.ts只对账键集不对账 description,故与本修不冲突)—— 已按 Prime Directive chore: version packages #10 另行建档,不在本卡范围。🤖 Generated with Claude Code
https://claude.ai/code/session_018ffcE95NaMJcL9XJ9VDYgk
Generated by Claude Code