Commit 86c75f4
docs(formula): state the false-negative side of firstUndeclaredReference (#16808)
`firstUndeclaredReference` documented only which error it cannot make
("Acts ONLY on cel-js's `Unknown variable: X` fault, so it cannot
false-positive"). That sentence is true; a contract that declares only
that reads as making neither error. The checker returns exactly one
error, so a first error of another class leaves every undeclared
reference behind it unjudged and the helper answers `null` -- the same
value that means "every reference is rooted".
The amendment states the masking is positional rather than name-keyed,
that `celEngine.compile()` is not a gate against it (it type-checks in
the permissive env, where the roots this env declares `map` are `dyn`),
which two error classes reach that first slot from authored input, and
why widening the regex is the false positive the narrowing buys off.
`flow-variable-scope` carries the same correction from the consumer
side: its "known, deliberate blind spot" note bounded the under-report
to a variable named after a SCOPE_ROOTS member, and measured, that bound
does not hold -- such a name in an operand position terminates the
discovery loop on iteration 0 and every shadow in the source is lost.
Comment-only; no behaviour changes. The formula block is JSDoc on a
published export, so it is emitted into dist/index.d.ts.
Claude-Session: https://claude.ai/code/session_01ADLdAs2pVcH17h9tZKWMBg
Co-authored-by: Claude <noreply@anthropic.com>1 parent 7f96e14 commit 86c75f4
3 files changed
Lines changed: 78 additions & 0 deletions
File tree
- .changeset
- packages
- formula/src
- lint/src
Lines changed: 19 additions & 0 deletions
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
184 | 226 | | |
185 | 227 | | |
186 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
269 | 286 | | |
270 | 287 | | |
271 | 288 | | |
| |||
0 commit comments