Skip to content

Commit edb3e2d

Browse files
committed
test(driver-memory): move the cube face's conformance pins to its widened vocabulary
The claim's surface gained this file (amendment 5911719808) for exactly this change. Three pins encoded the cube face's vocabulary and shape from before the ruled widening; each is re-spelled, none removed: - every $not case must still refuse; the $or cases moved to the answered column, which the file's case-by-case invariant holds to find()'s rows; - $null joins the declared-operator probe roster; - the $notContains pipeline dump shows the lowering's NULL escape. Claude-Session: https://claude.ai/code/session_01XY5uCwTjZj7884yYtyur4H Co-authored-by: Claude <noreply@anthropic.com>
1 parent 92a449c commit edb3e2d

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

‎packages/drivers/driver-memory/src/memory-driver-filter-logic-conformance.test.ts‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ describe('[#5345] MemoryAnalyticsService — the same table, through the THIRD f
264264
* ends: at least one case must be genuinely answered, and the shapes the cube
265265
* pipeline cannot express must be the ones refused.
266266
*/
267-
it('at least one case is answered, and every combinator case is refused rather than dropped', async () => {
267+
it('at least one case is answered, and every $not case is refused rather than dropped', async () => {
268268
const answered: string[] = [];
269269
const refused: string[] = [];
270270
for (const c of FILTER_LOGIC_CASES) {
@@ -274,10 +274,13 @@ describe('[#5345] MemoryAnalyticsService — the same table, through the THIRD f
274274
expect(refused.length, 'nothing was refused — the silent drop is back').toBeGreaterThan(0);
275275
// Every case whose filter mentions a combinator this face cannot lower must
276276
// be in the refused column, by name — not merely "some things were refused".
277-
const uncompilable = FILTER_LOGIC_CASES.filter((c) => /"\$(or|not)"/.test(JSON.stringify(c.filter)));
277+
// [ADR-0053 D-D1, amended — #5930 step 3] `$or` left this set: the face
278+
// compiles it now (the shared lowering emits it), so its cases moved to the
279+
// agreeing column, which the case-by-case invariant above holds them to.
280+
const uncompilable = FILTER_LOGIC_CASES.filter((c) => /"\$not"/.test(JSON.stringify(c.filter)));
278281
expect(uncompilable.length).toBeGreaterThan(0);
279282
for (const c of uncompilable) {
280-
expect(refused, `${c.name}: a $or/$not case must refuse, never answer`).toContain(c.name);
283+
expect(refused, `${c.name}: a $not case must refuse, never answer`).toContain(c.name);
281284
}
282285
});
283286
});
@@ -646,6 +649,8 @@ const DECLARED_OPERATOR_PROBES: Record<string, FilterCondition> = {
646649
// this block's own header warns against.
647650
$icontains: { name: { $icontains: 'BET' } } as FilterCondition,
648651
$exists: { closed_at: { $exists: false } } as FilterCondition,
652+
// [ADR-0053 D-D1, amended — #5930 step 3] `$null` joined the face's table.
653+
$null: { closed_at: { $null: true } } as FilterCondition,
649654
};
650655

651656
describe('[#5374] operator semantics — the analytics face against the live query path', () => {
@@ -815,7 +820,9 @@ describe('[#5374] operator semantics — the analytics face against the live que
815820
// classes rather than an `i` — this is what #6520 compiled, made visible.
816821
['$icontains', { name: { $icontains: 'BET' } } as FilterCondition, '{"name":{"$regex":"/[Bb][Ee][Tt]/"}}'],
817822
// The negation still wraps a pattern, and now the pattern is legible.
818-
['$notContains', { name: { $notContains: 'et' } } as FilterCondition, '{"name":{"$not":{"$regex":"/et/"}}}'],
823+
// [ADR-0053 D-D1, amended — #5930 step 3] …inside the shared lowering's NULL
824+
// escape, which the face's door now applies before it compiles.
825+
['$notContains', { name: { $notContains: 'et' } } as FilterCondition, '{"$and":[{"$or":[{"name":{"$eq":null}},{"name":{"$not":{"$regex":"/et/"}}}]}]}'],
819826
// A comparand carrying a regex metacharacter shows its ESCAPE. `a.p` is a
820827
// literal here, not "any character between a and p" (#5567's direction), and
821828
// the dump is the only place an author can see which of the two ran.

0 commit comments

Comments
 (0)