Repository navigation
Commit 892eb66
docs(spec): key the fieldPatches example option by a value crm_account.industry stores (#28827)
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9Woe1WqkwqEbbQEviGw1m5U)_
Fixes #28803
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:`fieldPatches` 文档示例里的选项键从 `tech` 改成 `crm_account.industry` 真实存储的值
`technology`(`technology: { label: 'Tech' }`),覆盖 spec
描述、TSDoc、选项列表拒收文案、对象扩展指南和两份未发布的 changeset。
- 为什么改:原示例照抄会在 `os validate` 和安装时被拒(该字段没有 `tech` 这个选项),文档在教一个坏例子;技能包那份已在
#28795 修好,这里补齐其余几份。
- 风险与回滚:纯文案,schema 接受/拒收的结果不变;回滚即 revert 本 PR。
-
先看:`packages/spec/src/data/object.zod.ts`(三处示例文字)、`content/docs/data-modeling/object-extensions.mdx`、`content/docs/references/data/object.mdx`(重新生成的参考页)。
- 两分钟验证:`git grep -n "tech: {" -- packages/spec/src content/docs skills
.changeset ':!*.test.ts'`,预期没有任何输出。
- 需要你做的:无,席位落地。
## What changes
- `packages/spec/src/data/object.zod.ts`: the `fieldPatches`
`.describe()` example, the `ObjectExtensionSchema` TSDoc example, and
the refusal text for an option list under `options` now read `options: {
technology: { label: 'Tech' } }`. `crm_account.industry`
(`examples/app-crm/src/objects/account.object.ts`) stores `technology`,
`finance`, `healthcare`, `retail`, `other`; `tech` is none of them, so a
copy was refused with reason `option`.
- `content/docs/data-modeling/object-extensions.mdx`: the guide's
example, same re-key.
- `content/docs/references/data/object.mdx`: re-recorded by
`check:generated --fix` (only `check:docs` was stale).
- `.changeset/28565-field-patch-applied.md` and
`.changeset/28560-field-patch-slot.md`: both still unreleased (present
in `.changeset/` on `main` at 1617b7f, no Version Packages release has
consumed them), so their copies of the example are re-keyed too. The
28560 copy is a fifth copy the card did not list.
- `.changeset/28803-field-patches-example.md`: spec patch.
No forced test edits. Test fixtures that patch `tech`
(`field-customization.test.ts`, `field-patches-derived.test.ts`, and the
cli / metadata-core / objectql / cloud-connection field-patch tests)
build their own objects and do not pin the documented example text, so
they stay as they are.
## Tests
- `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2
src/data` and `pnpm --filter @objectstack/spec typecheck`: Test Files
154 passed (154), Tests 4756 passed, 1 todo; VERDICT command-exit 0.
- `pnpm --filter @objectstack/spec build && check:generated`: 1 of 14
stale (`check:docs`), fixed with `--fix`, then all up to date.
## Acceptance notes
- Prose only; no consumer package test is owed (no accept/reject result
changes).
- **Pending release notes corrected, so `Check Changeset` stays red by
design.** This PR edits two changesets it did not add, both still
pending (no Version Packages release has consumed them):
`.changeset/28565-field-patch-applied.md` (named by the card, its
example line) and `.changeset/28560-field-patch-slot.md` (a fifth copy
of the same example, not named by the card). In each, only the option
key and label inside the code example change, from `tech: { label:
'Technology' }` to `technology: { label: 'Tech' }`; no sentence about
behaviour changes. This is the DELIBERATE CORRECTION class
`check-empty-changeset.mjs` names: the gate stays red, `skip-changeset`
is not applied, and the correction needs a written confirmation on this
PR. Restoring either file from the base would republish an example that
`os validate` refuses.
- Merged `origin/main` at 663b7c0 with `scripts/pm/os-regen-merge.sh`
(#28791 had edited `object.zod.ts` and `object-extensions.mdx`); no
conflict, and `check:generated` reports all 14 artifacts up to date on
the merged head.
## Verification
All readings on head `0c29908fd8` (the merge of main).
<details><summary>spec tests and typecheck</summary>
`bash scripts/pm/os-verify-lock.sh -c 'pnpm --filter @objectstack/spec
test && pnpm --filter @objectstack/spec typecheck'`: Test Files 788
passed (788), Tests 23268 passed, 1 todo; `VERDICT command-exit 0`.
</details>
<details><summary>generated artifacts</summary>
Before the merge: `check:generated` found 1 of 14 stale (`check:docs`,
`content/docs/references/data/object.mdx`), fixed with `--fix`. After
the merge: `pnpm --filter @objectstack/spec build && pnpm --filter
@objectstack/spec check:generated`: all 14 generated artifacts up to
date; `VERDICT command-exit 0`.
</details>
<details><summary>derived gate list</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` listed 97 commands; each ran on this head
with its exit code recorded. 96 exit 0. `node
scripts/check-empty-changeset.mjs --base origin/main` exits 1 on the two
pending changesets above, as designed. Reconciliation: `97 derived, 97
run, 0 NOT-MEASURED, 0 UNRUN` (a derived zero, every line carries an
exit code). Seven gates first exited 3 (prerequisites: unbuilt packages,
shallow clone); after a full `turbo run build` and `git fetch
--unshallow` all seven exit 0. Local-only: `check-dev-prereqs` exit 0,
`check:skill-frame-freshness` exit 0.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmQfYHca8dfoXTJfeKp)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 839aae5 commit 892eb66
6 files changed
Lines changed: 18 additions & 8 deletions
File tree
- .changeset
- content/docs
- data-modeling
- references/data
- packages/spec/src/data
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
579 | | - | |
| 579 | + | |
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4835 | 4835 | | |
4836 | 4836 | | |
4837 | 4837 | | |
4838 | | - | |
| 4838 | + | |
4839 | 4839 | | |
4840 | 4840 | | |
4841 | 4841 | | |
| |||
4879 | 4879 | | |
4880 | 4880 | | |
4881 | 4881 | | |
4882 | | - | |
| 4882 | + | |
4883 | 4883 | | |
4884 | 4884 | | |
4885 | 4885 | | |
| |||
4964 | 4964 | | |
4965 | 4965 | | |
4966 | 4966 | | |
4967 | | - | |
4968 | | - | |
| 4967 | + | |
| 4968 | + | |
4969 | 4969 | | |
4970 | 4970 | | |
4971 | 4971 | | |
| |||
0 commit comments