Skip to content

Commit c28172b

Browse files
committed
fix(spec): the null ordering-comparand refusal and the vocabulary assertion name only faces that exist
The schema-door refusal for a null $gt/$gte/$lt/$lte comparand gave, as its example of the evaluation faces disagreeing, driver-memory's reference matcher, which has been deleted. The parenthesis now names two faces that exist and were measured to disagree: driver-memory's query path admits a stored-null row for {"$gte": null}; driver-sql compares against SQL NULL and admits no row. The first sentence, the prescription and the ruling sentence are unchanged. The filter-operator vocabulary assertion message no longer lists the deleted reference matcher among driver-memory's faces. Claude-Session: https://claude.ai/code/session_01YDt3PzwfrkuFzUBF89WPmM Co-authored-by: Claude <noreply@anthropic.com>
1 parent ecb6ca0 commit c28172b

3 files changed

Lines changed: 25 additions & 4 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
fix(spec): the null ordering-comparand refusal names only evaluation faces that exist
6+
7+
Clause-②: no
8+
9+
`FieldOperatorsSchema` and `ComparisonOperatorSchema` refuse a `null` comparand of `$gt` / `$gte` /
10+
`$lt` / `$lte` with a pointed message. Its example of the evaluation faces disagreeing named
11+
driver-memory's reference matcher, which has been deleted, so an author or agent reading the
12+
refusal went looking for a face that no longer exists. The example now names two faces that exist
13+
and were measured to disagree: driver-memory's query path reads a stored `null` as equal to the
14+
comparand, so `{"$gte": null}` admits that row, while driver-sql compares against SQL `NULL` and
15+
admits no row.
16+
17+
Text only: the first sentence (`null is not a valid $gt comparand.` and its siblings), the prescription
18+
(`{"$eq": null}` / `{"$ne": null}`) and the ruling sentence are unchanged, and the schemas accept
19+
and refuse exactly the same filters. A client or log filter that matches the old parenthesis needs
20+
the new spelling.

‎packages/spec/src/data/filter-operator-vocabulary.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ describe('the declaration surface and the enforcement surface', () => {
8383
+ 'so declaring ahead of the arms is the correct staging. To stage one: declare it in '
8484
+ 'FieldOperatorsSchema, add it to the array THIS assertion compares against, and note on '
8585
+ 'FILTER_OPERATORS which issue implements it. To clear one: implement it on EVERY face '
86-
+ 'in ONE PR — spec word list, driver-memory (query path, reference matcher, analytics '
87-
+ 'face), driver-mongodb, service-analytics (3 compilers), objectql `having`, formula — '
86+
+ 'in ONE PR — spec word list, driver-memory (query path, analytics face), '
87+
+ 'driver-mongodb, service-analytics (3 compilers), objectql `having`, formula — '
8888
+ 'then empty this list. #6520 is the worked example of the clearing direction.',
8989
).toEqual(STAGED_AHEAD_OF_BACKENDS);
9090
});

‎packages/spec/src/data/filter.zod.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,9 @@ const ORDERING_COMPARAND_DESCRIPTION =
466466
function nullOrderingComparandMessage(op: string): string {
467467
return (
468468
`null is not a valid ${op} comparand. null is not ordered, and no two evaluation faces `
469-
+ 'agree on what an ordering against it matches (driver-memory\'s live path reads two '
470-
+ 'absences as equal; its reference matcher compares through JS coercion). State absence '
469+
+ 'agree on what an ordering against it matches (driver-memory\'s query path reads a '
470+
+ 'stored null as equal to it, so {"$gte": null} admits that row; driver-sql compares '
471+
+ 'against SQL NULL and admits no row). State absence '
471472
+ 'with the null predicate instead: {"$eq": null} is "has no value", {"$ne": null} is '
472473
+ '"has a value". Ruled 2026-09-01: a null ordering comparand is refused at the validation '
473474
+ 'entrance.'

0 commit comments

Comments
 (0)