Commit 02042be
`MISSING_REQUIRED_FIELD` is documented as HTTP 400 carrying `fields[]`
(`error-handling.mdx`, `error-catalog.mdx`), but `assertControlledByParentWrite`
answers `422 MISSING_REQUIRED_FIELD` with no `fields[]` on four declarable
shapes, plus a stored-row case on a different path. Documents the exception
where it exists rather than moving the wire.
Measured on this branch's base rather than taken from the card:
- `resolveCbpRelation` sets `omissionRefusedByValidation` to
`type === 'master_detail' && required && !readonly && !system`, so only
that shape hands over to validation's `400 VALIDATION_FAILED`.
- The four surviving shapes are pinned by
`controlled-by-parent-sharing.test.ts` (`err.status`/`statusCode` 422).
- `MasterReferenceMissingError` declares `code`/`status`/`statusCode`;
`mapDataError`'s 4xx passthrough emits `{ error, code, object }`, and
`fields[]` is emitted only for the `VALIDATION_FAILED` duck-type — so the
absent `fields[]` is confirmed at the door, not assumed.
One claim from the card and the #8879 changeset is deliberately NOT repeated:
that a publish-time lint bounds these shapes. #8772 is still open and
`relationship/master-detail-required` is `severity: 'warning'`, with no rule
covering the `readonly`/`system`/fallback-`lookup` shapes — so the docs say
these shapes are authorable today. Filed as #8959.
No runtime change: the refusal is correct (an unconditional hand-over was
measured fail-open) and direction 2 was declined by the maintainer ruling.
Claude-Session: https://claude.ai/code/session_011RB4waLuNbdruCo6X9oobm
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 90197e1 commit 02042be
2 files changed
Lines changed: 82 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
92 | 131 | | |
93 | 132 | | |
94 | 133 | | |
| |||
632 | 671 | | |
633 | 672 | | |
634 | 673 | | |
| 674 | + | |
635 | 675 | | |
636 | 676 | | |
637 | 677 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
265 | 304 | | |
266 | 305 | | |
267 | 306 | | |
| |||
0 commit comments