Commit 3ad5680
`reference` is required for `lookup` and `master_detail` only. Three surfaces
already agree on that and two docs pages disagreed with all three:
- `packages/spec/src/data/field.zod.ts:1064-1065` (the `reference` docblock)
names `lookup` and `master_detail` as the types the superRefine enforces it for.
- `packages/spec/src/data/field.zod.ts:1073` (`.describe()`) says "Target object
name (snake_case) for lookup/master_detail fields".
- `packages/lint/src/data-model-rules.ts:103` —
`RELATIONSHIP_TYPES = new Set(['lookup', 'master_detail'])`, consumed at :499
and :577 by `relationship/missing-reference`. `tree` is not in the set.
A reference-less `tree` is a shape the spec's own tests construct and assert
defined behaviour for — `field-value.test.ts:69` (`referenceTargetOf` returns
undefined) and `filter-dotted-head.test.ts:31` (still classified `relation`) —
so no gate rejects one and none should: the docs were asserting a requirement
nothing enforces. A default-self-reference reading is falsified too, by
`examples/app-showcase/src/data/objects/field-zoo.object.ts:108`, where a `tree`
field points at `showcase_category` rather than at its own object.
Two cells, both stating the same claim:
- `content/docs/deployment/troubleshooting.mdx:78` drops `tree` from the symptom
line. The Cause line at :80 stays true for the two remaining types.
- `content/docs/data-modeling/validation-rules.mdx:542` — the "Quick Validation
Summary" table's second column is `Required Props` (:517), and the `tree` row
listed `reference` there. It becomes an em dash, matching the `user` row beside
it, which is likewise a reference-carrying type with no required prop.
Claude-Session: https://claude.ai/code/session_017RbbUMnxkUnWhE4j94v8FE
Co-authored-by: Claude <noreply@anthropic.com>
1 parent a392dbf commit 3ad5680
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
542 | | - | |
| 542 | + | |
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
0 commit comments