Repository navigation
Commit f120661
docs(spec): say what the optional master did to the cbp-master-detail-required-defaulted notes (#31055)
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoSzxEPRq7jQs3PC2g7nYmoh)_
Clause-②: no
Metadata-protocol: none
Fixes #30977
Claim: 6697140710 · Branch: `claude/project-thread-kujw5c`
## 维护者速读
- 改了什么:只改注释。协议 18 的转换 `cbp-master-detail-required-defaulted` 和构建器
`forceCbpMasterDetailRequired` 的说明里,还写着「显式 `required: false`
的主表会被构建器和解析拒绝」,现在改成按 #30940 之后的实际规则来写。
- 为什么改:#30940(#30905 裁决 A)落地后,`controlled_by_parent` 对象唯一的
`master_detail` 写 `required: false` 是合法的可选主表;旧注释会让下一个改这个转换的人按已经不存在的规则推理。
- 对作者的影响:没有。转换行为不变:省略 `required` 仍补成 `true`,显式 `required: false` 仍不转换。
- 风险与回滚:零运行时风险,无行为改动;`apply` 与 fixture 形状一字未动。回滚即撤本 PR。
- 不在范围:文档和技能里的同类说法归 #30907(卡 3/3),本 PR 不碰。
- 发布:注释不进发布内容,打 `skip-changeset`。
## Stale sentences found, and how each was resolved
| # | Where (on `origin/main` 81deb54) | Stale claim | Resolution |
|---|---|---|---|
| 1 |
`conversions/entries/18/cbp-master-detail-required-defaulted.ts:56-58` |
"An explicit `required: false` … The builder refuses it loudly … an
author the builder would have stopped" | Rewritten: on the only
`master_detail` it is the optional master (ADR-0055 §1 as amended,
#30905 ruling A), kept by the builder and admitted by the parse, so the
stored pass keeps it too; beside another `master_detail` the builder
still refuses it. |
| 2 | same file `:66-68` | "a live author still meets the parse's
refusal and its prescription" | Rewritten: a live author meets the
builder's force through `ObjectSchema.create()` and `os lint`'s
`relationship/master-detail-required` at `error`; a raw parse reads the
omitted key as the optional master (the field default writes `false`
first). |
| 3 | same file `:110` (fixture comment) | "refused by the builder, not
converted here" | Now "the optional master, kept as written; not
converted". Fixture shape untouched. |
| 4 | same file `:23-26` | "Ruling B made the parse refuse … without
exactly one `master_detail` declared `required: true`" | True as
history; kept, with one parenthesis noting ruling A's amendment and that
the omitted key this entry converts is unchanged by it. |
| 5 | `data/object.zod.ts` `forceCbpMasterDetailRequired` docblock,
closing paragraph | "the RULE — exactly one required `master_detail` …
so a raw parse of a `master_detail` without `required: true` is refused
rather than forced" | Rewritten: the rule includes the only
`master_detail` as the optional master, and a raw parse is never forced
(it reads an omitted `required` after its `false` default). The
paragraphs above it already carry #30940's "1 parent 022b4e7 commit f120661
2 files changed
Lines changed: 24 additions & 15 deletions
File tree
- packages/spec/src
- conversions/entries/18
- data
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
| |||
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
70 | 78 | | |
71 | 79 | | |
72 | 80 | | |
| |||
107 | 115 | | |
108 | 116 | | |
109 | 117 | | |
110 | | - | |
| 118 | + | |
111 | 119 | | |
112 | 120 | | |
113 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4492 | 4492 | | |
4493 | 4493 | | |
4494 | 4494 | | |
4495 | | - | |
4496 | | - | |
4497 | | - | |
4498 | | - | |
4499 | | - | |
4500 | | - | |
| 4495 | + | |
| 4496 | + | |
| 4497 | + | |
| 4498 | + | |
| 4499 | + | |
| 4500 | + | |
| 4501 | + | |
4501 | 4502 | | |
4502 | 4503 | | |
4503 | 4504 | | |
| |||
0 commit comments