Commit 22c0279
docs(spec,rest): anchor record-validator citations by symbol, not line (#16956)
* docs(spec,rest): anchor record-validator citations by symbol, not line
Seven prose/comment citations of
`packages/objectql/src/validation/record-validator.ts` pointed at line
numbers that no longer resolve: the file has moved under them, and a
`path:NNN` anchor rots silently because the line it lands on still looks
like plausible code.
Re-anchor each on something that cannot rot without saying so — the
enclosing symbol `validateOne`, plus the verbatim snippet where one is
load-bearing:
- `packages/spec/src/kernel/functional-completeness.ts` (3 sites): the
`select`/`radio` rule and the `multiselect` NON-rule now cite
`validateOne` and quote `allowed.length > 0 && !allowed.includes(…)`
and `// free-form (tags without options)` verbatim.
- `packages/spec/src/kernel/functional-completeness.test.ts` (2 sites):
same two anchors on the pinned NON-rule's comment.
- `packages/rest/src/rest-hook-script-fault-envelope.test.ts` (2 sites):
the text-coercion citation now names `validateOne` and its
bounded-string branch (`BOUNDED_STRING_FIELD_TYPES.has(t)`, of which
`text` is a member) and quotes the coercion line verbatim.
Comments only. No rule, assertion, accept set or runtime behaviour moves;
the quoted runtime text is unchanged and still present exactly once each.
`record-validator.ts` itself is not touched.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016N6xmWt5hYm94ffVEwGH8x
* chore(changeset): patch @objectstack/spec for the re-anchored doc block
The functional-completeness module doc is emitted verbatim into
`packages/spec/dist/kernel/index.d.ts`, which `files[]` publishes, so the
citation text that moved ships to consumers. Half 1 of the published-text
test says no (the source path is not in `files[]` and is not a
`*.zod.ts`); half 2 says yes, measured on a fresh build. `@objectstack/rest`
answers no on both halves — the changed file is a `.test.ts`, and its text
is absent from `packages/rest/dist` while a positive control from the same
file's module is present.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016N6xmWt5hYm94ffVEwGH8x
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 07c56b5 commit 22c0279
4 files changed
Lines changed: 34 additions & 18 deletions
File tree
- .changeset
- packages
- rest/src
- spec/src/kernel
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | | - | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
398 | 400 | | |
399 | 401 | | |
400 | 402 | | |
401 | | - | |
402 | | - | |
| 403 | + | |
| 404 | + | |
403 | 405 | | |
404 | 406 | | |
405 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
108 | | - | |
109 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
| |||
0 commit comments