Commit 31064ca
* fix(lint): read the registry's own type for an injected column so a field-typed rule can judge created_at / updated_at (#16340)
The object graph recorded registry-injected system columns by NAME only, so a
path resolving to one came back `{ kind: 'ok', injected: true }` with no `meta`
and every rule asking a second question about the leaf had to stay silent.
Measured before the change on one dashboard widget over one object declaring
`close_date: date`: `close_date: 'last_30_days'` was refused while
`created_at: 'last_30_days'`, `created_at: { $eq: … }` and
`updated_at: { $in: [ … ] }` all passed lint and the runtime publish gate — and
the engine then refused each of them with INVALID_FILTER / 400 on first render.
`GraphObject.injected` becomes a `ReadonlyMap<string, GraphField>` carrying each
column's definition, DERIVED from `injectedSystemColumnDefs` (the same spec
tables `applySystemFields` spreads at registration) rather than transcribed, so
lint cannot drift from the registry that provisions the column. The
`filter-preset-comparand` oracle drops its `verdict.injected` bail: the marker
says who wrote the column, the ruling turns on what it is. `id` keeps an empty
slice — the driver provisions the primary key and no definition describes it.
Pins the AUTHOR-FACING message verbatim, not only the graph shape, and pins the
derivation against the spec table so a hand-copied type cannot pass.
Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH
Co-authored-by: Claude <noreply@anthropic.com>
* fix(lint): judge an injected column on the same axis as an authored one in the dotted-filter and include rules (#16340)
Two more consumers of a resolved leaf's `meta` inherit the registry type the
object graph now carries, which is why the fix went to the seam rather than
into `filter-preset-comparand`.
`list-view-field-dotted` refuses `created_at.x` (a `datetime` scalar has
nothing beneath it) and `owner_id.name` (a `lookup` stores an id, not an
embedded document) — both already refused at the door by
`assertFilterIsMaterializable` with the registry's field map in hand, so the
linter's silence was the miss. `dataset-include-unknown` drops its
`verdict.injected` bail, whose stated reason ("its type is registry-owned and
invisible here") this change makes false: `include: ['owner_id']` joins,
`include: ['created_at']` derives no join and is refused.
`id` falls through the untyped branch of all three rules — the driver
provisions the primary key and no definition table describes it.
Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH
Co-authored-by: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent ba9f029 commit 31064ca
10 files changed
Lines changed: 487 additions & 55 deletions
File tree
- .changeset
- packages/lint/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 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 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
101 | 158 | | |
102 | 159 | | |
103 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
43 | 44 | | |
44 | | - | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
48 | 69 | | |
49 | 70 | | |
50 | | - | |
| 71 | + | |
51 | 72 | | |
52 | 73 | | |
53 | 74 | | |
| |||
108 | 129 | | |
109 | 130 | | |
110 | 131 | | |
111 | | - | |
112 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
113 | 145 | | |
114 | 146 | | |
115 | 147 | | |
| |||
190 | 222 | | |
191 | 223 | | |
192 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
193 | 242 | | |
194 | 243 | | |
195 | 244 | | |
| |||
200 | 249 | | |
201 | 250 | | |
202 | 251 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
| 252 | + | |
208 | 253 | | |
209 | 254 | | |
210 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
211 | 266 | | |
212 | 267 | | |
213 | 268 | | |
| |||
228 | 283 | | |
229 | 284 | | |
230 | 285 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
237 | 301 | | |
238 | 302 | | |
239 | 303 | | |
| |||
296 | 360 | | |
297 | 361 | | |
298 | 362 | | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
303 | 370 | | |
304 | 371 | | |
305 | 372 | | |
| |||
320 | 387 | | |
321 | 388 | | |
322 | 389 | | |
323 | | - | |
| 390 | + | |
| 391 | + | |
324 | 392 | | |
325 | 393 | | |
326 | 394 | | |
| |||
0 commit comments