Commit 70a6df2
committed
test(objectql): update the two condition-gate pins fail loud invalidates (#4775)
`hook-binder.test.ts` pinned the OLD uncompilable behaviour and explicitly
accepted either outcome ("ignored at compile time (handler runs) or evaluated
false (skipped) … just assert we didn't crash"). That latitude was the defect:
"condition ignored" deleted the gate, so a hook declared to run conditionally
ran on every write. It now asserts the rejection, the `uncompilable` reason and
that the handler never ran.
`hook-metrics.test.ts` used a BARE `name == "skipme"` condition. Hook
conditions are `record`-scoped, so the bare identifier resolved to nothing and
the expression faulted on every call — the "skip" the test asserted came from
the old swallow (fault → warn → false), not from a condition that answered NO.
This is precisely the never-actually-enforced condition #4775 was expected to
flush out. Rewritten as `record.name == "skipme"`, which expresses the same
intent and is actually evaluated.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Br2xsJsczFsTR9bvbh2Ny1 parent dd7a961 commit 70a6df2
2 files changed
Lines changed: 28 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | | - | |
381 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
382 | 389 | | |
383 | 390 | | |
384 | 391 | | |
385 | 392 | | |
386 | 393 | | |
387 | 394 | | |
388 | 395 | | |
389 | | - | |
| 396 | + | |
390 | 397 | | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
396 | 408 | | |
397 | 409 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
86 | 92 | | |
87 | 93 | | |
88 | 94 | | |
| |||
0 commit comments