From 2ceeffd7e74fd829d2f603b30ccdb45eee466fde Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 5 Oct 2026 08:20:02 +0000 Subject: [PATCH] test(spec): the third data/ file group's test titles state each cited decision in words instead of a tracker number (stage 17) The 20 test files directly under packages/spec/src/data/, from filter-comparand-type.test.ts through filter-view-operator-parity.test.ts, carry no tracker id in a test title or declared test string. Each id became a statement, in words, of what its record decided, or was dropped where the title already said it. Text only: no assertion, identifier, code comment or non-test file moves. Claude-Session: https://claude.ai/code/session_01T9u38rswFp5Rw8DswRUReJ Co-authored-by: Claude --- .../src/data/filter-comparand-type.test.ts | 18 +++++----- ...ilter-cross-field-comparison-class.test.ts | 8 ++--- .../spec/src/data/filter-dotted-head.test.ts | 4 +-- .../src/data/filter-empty-operator.test.ts | 10 +++--- .../filter-equality-array-schema-door.test.ts | 10 +++--- .../filter-field-reference-lowering.test.ts | 2 +- .../data/filter-icontains-parse-door.test.ts | 6 ++-- .../src/data/filter-like-code-point.test.ts | 6 ++-- .../src/data/filter-like-nul-pattern.test.ts | 2 +- .../data/filter-like-wire-lowering.test.ts | 6 ++-- .../spec/src/data/filter-lowering.test.ts | 12 +++---- .../data/filter-ne-array-schema-door.test.ts | 10 +++--- ...ter-number-comparand-declared-type.test.ts | 34 +++++++++---------- .../data/filter-operator-vocabulary.test.ts | 6 ++-- .../src/data/filter-preset-comparand.test.ts | 4 +-- .../data/filter-save-door-face-parity.test.ts | 28 +++++++-------- .../src/data/filter-text-comparand.test.ts | 6 ++-- .../src/data/filter-text-conformance.test.ts | 4 +-- ...filter-text-operator-declared-type.test.ts | 12 +++---- .../data/filter-view-operator-parity.test.ts | 4 +-- 20 files changed, 96 insertions(+), 96 deletions(-) diff --git a/packages/spec/src/data/filter-comparand-type.test.ts b/packages/spec/src/data/filter-comparand-type.test.ts index 84121f28f35..36aae6935c8 100644 --- a/packages/spec/src/data/filter-comparand-type.test.ts +++ b/packages/spec/src/data/filter-comparand-type.test.ts @@ -38,7 +38,7 @@ class Money { constructor(readonly v: number) {} } -describe('the accepted set (#7872 ruling)', () => { +describe('the accepted set — one set, defined at the shared door for every driver', () => { it('is exactly the measured superset — string | number | bigint | boolean | null | Date', () => { expect([...ACCEPTED_FILTER_COMPARAND_TYPES]).toEqual([ 'string', 'number', 'bigint', 'boolean', 'null', 'Date', @@ -118,7 +118,7 @@ describe('refusals — the measured divergence rows die at the door', () => { expect(err?.message).toContain('where.qty'); }); - it.each(refused)('refuses %s as an $in member — each member is a comparand in its own right (#5234)', (_name, value) => { + it.each(refused)('refuses %s as an $in member — each member is a comparand in its own right', (_name, value) => { const err = refusalOf(() => normalizeFilterComparandTypes({ qty: { $in: [100, value] } })); expect(err?.code).toBe('INVALID_FILTER'); expect(err?.message).toContain('where.qty.$in[1]'); @@ -131,7 +131,7 @@ describe('refusals — the measured divergence rows die at the door', () => { expect(err?.message).toMatch(/omit/); }); - it('the undefined prescription is position-safe: it names the null predicate by its ruled spellings, at every position it is emitted at (#14426)', () => { + it('the undefined prescription is position-safe: it names the null predicate by its ruled spellings, at every position it is emitted at', () => { // "Write null for the null predicate" was position-agnostic advice: followed // at `$gt: undefined` it produced `$gt: null`, refused one door over since // the 2026-09-01 ruling; at an `$in` member it produced `$in: [null]`, @@ -183,7 +183,7 @@ describe('refusals — the measured divergence rows die at the door', () => { }); }); -describe('bigint — accepted, and NARROWED copy-on-write (#7872; the memory crash cell dies here)', () => { +describe('bigint — accepted, and NARROWED copy-on-write (the memory crash cell dies here)', () => { it('narrows an exact-range bigint to its number, without touching the caller’s object', () => { const original = { qty: { $eq: BigInt(100) } }; const out = normalizeFilterComparandTypes(original); @@ -222,7 +222,7 @@ describe('bigint — accepted, and NARROWED copy-on-write (#7872; the memory cra }); describe('boundaries the door deliberately does not cross', () => { - it('leaves a FieldReference alone at every position — #5222/scalar comparison/#7597 own its fate', () => { + it('leaves a FieldReference alone at every position — cross-field push-down, scalar comparison and the `$eq` lowering own its fate', () => { for (const filter of [ { amount: { $gt: { $field: 'budget' } } }, { amount: { $eq: { $field: 'budget' } } }, @@ -233,7 +233,7 @@ describe('boundaries the door deliberately does not cross', () => { } }); - it('does not descend into a no-$-key plain object — nested-relation / deep-equality structure (#5869 boundary)', () => { + it('does not descend into a no-$-key plain object — nested-relation / deep-equality structure', () => { const filter = { author: { name: 'x' } }; expect(normalizeFilterComparandTypes(filter)).toBe(filter); }); @@ -252,18 +252,18 @@ describe('boundaries the door deliberately does not cross', () => { expect(normalizeFilterComparandTypes(retired)).toBe(retired); }); - it('does not judge a non-array list-operator comparand — that SHAPE belongs to the engine’s #5869 gate', () => { + it('does not judge a non-array list-operator comparand — that SHAPE is refused 400 by the engine’s shape gate', () => { const filter = { stage: { $in: 'won' } }; expect(normalizeFilterComparandTypes(filter)).toBe(filter); }); - it('keeps the zero-operator constraint for the driver refusal that names it (#5240)', () => { + it('keeps the zero-operator constraint for the driver refusal that names it', () => { const filter = { qty: {} }; expect(normalizeFilterComparandTypes(filter)).toBe(filter); }); }); -describe('parseFilterAST is the compile face that runs the door (#7872)', () => { +describe('parseFilterAST is the compile face that runs the door', () => { it('judges the OBJECT passthrough — the form that used to leave unexamined', () => { const err = refusalOf(() => parseFilterAST({ qty: { $eq: Symbol('x') } })); expect(err?.code).toBe('INVALID_FILTER'); diff --git a/packages/spec/src/data/filter-cross-field-comparison-class.test.ts b/packages/spec/src/data/filter-cross-field-comparison-class.test.ts index 00d5acb797b..f841e06256f 100644 --- a/packages/spec/src/data/filter-cross-field-comparison-class.test.ts +++ b/packages/spec/src/data/filter-cross-field-comparison-class.test.ts @@ -41,7 +41,7 @@ const union = (...sets: ReadonlySet[]) => new Set(sets.flatMap((s) => [. const cls = (c: string): CrossFieldColumnVerdict => ({ kind: 'class', class: c } as CrossFieldColumnVerdict); const none = (r: string): CrossFieldColumnVerdict => ({ kind: 'no-class', reason: r } as CrossFieldColumnVerdict); -describe('[#20347] the class table', () => { +describe('the class table — one classification, read by every judge', () => { it('classifies every FieldType member exactly once — rows pairwise disjoint, union exactly FieldType', () => { const seen = new Map(); for (const row of CROSS_FIELD_COMPARISON_TYPE_CLASSES) { @@ -107,7 +107,7 @@ describe('[#20347] the class table', () => { }); }); -describe('[#20347] crossFieldColumnVerdict — one declared column', () => { +describe('crossFieldColumnVerdict — one declared column', () => { it('answers each FieldType member its row\'s verdict when declared single-valued', () => { for (const row of CROSS_FIELD_COMPARISON_TYPE_CLASSES) { for (const type of row.types) { @@ -140,7 +140,7 @@ describe('[#20347] crossFieldColumnVerdict — one declared column', () => { }); }); -describe('[#20347] crossFieldComparisonVerdict — the measured cells', () => { +describe('crossFieldComparisonVerdict — the measured cells', () => { it('text vs number is cross-class, in both orders', () => { expect(crossFieldComparisonVerdict({ type: 'text' }, { type: 'number' })) .toEqual({ verdict: 'cross-class', left: 'text', right: 'numeric' }); @@ -183,7 +183,7 @@ describe('[#20347] crossFieldComparisonVerdict — the measured cells', () => { }); }); -describe('[#20347] crossFieldComparisonVerdict — every pair of declared columns', () => { +describe('crossFieldComparisonVerdict — every pair of declared columns', () => { // Every FieldType member single-valued, plus every multi-capable member // flagged `multiple: true`. const columns = [ diff --git a/packages/spec/src/data/filter-dotted-head.test.ts b/packages/spec/src/data/filter-dotted-head.test.ts index 385218363b1..67d431e0562 100644 --- a/packages/spec/src/data/filter-dotted-head.test.ts +++ b/packages/spec/src/data/filter-dotted-head.test.ts @@ -21,7 +21,7 @@ import { SEARCH_VIRTUAL_TYPES } from './search-fields'; // DELIBERATELY unjudged (structured/JSON — live on two of three backends, the // carve-out the maintainer ruling names with a ⛔). // --------------------------------------------------------------------------- -describe('[#8371] classifyDottedFilterHead — the FILTER axis dotted verdict', () => { +describe('classifyDottedFilterHead — the FILTER axis dotted verdict, by the type of the head segment', () => { it('a relation head is refused: the stored value is a scalar id, not an embedded document', () => { expect(classifyDottedFilterHead({ type: 'lookup' })).toBe('relation'); expect(classifyDottedFilterHead({ type: 'master_detail' })).toBe('relation'); @@ -37,7 +37,7 @@ describe('[#8371] classifyDottedFilterHead — the FILTER axis dotted verdict', } }); - it('a virtual head is refused: the #8296 verdict finally reaching the dotted spelling', () => { + it('a virtual head is refused: the unmaterializable-field verdict finally reaching the dotted spelling', () => { for (const type of SEARCH_VIRTUAL_TYPES) { expect(classifyDottedFilterHead({ type }), `'${type}' must classify as virtual`).toBe('virtual'); } diff --git a/packages/spec/src/data/filter-empty-operator.test.ts b/packages/spec/src/data/filter-empty-operator.test.ts index a3f6ea4c517..9759109fffa 100644 --- a/packages/spec/src/data/filter-empty-operator.test.ts +++ b/packages/spec/src/data/filter-empty-operator.test.ts @@ -82,7 +82,7 @@ function descriptionOf(shape: Record, key: string): string | un // §1 The description IS the ruled table // --------------------------------------------------------------------------- -describe('#20311 §1 — the $empty description is the ruled per-type table', () => { +describe('§1 — the $empty description is the ruled per-type table', () => { /** The ruled table, verbatim as the operator describes it. */ const RULED_TABLE = 'Is-empty check by the field\'s DECLARED type. `true` matches rows whose field is empty, ' @@ -118,7 +118,7 @@ describe('#20311 §1 — the $empty description is the ruled per-type table', () // §2 The schema door: $empty parses; the empty list is still refused // --------------------------------------------------------------------------- -describe('#20311 §2 — { tags: { $empty: true } } parses; { tags: [] } is still refused', () => { +describe('§2 — { tags: { $empty: true } } parses; { tags: [] } is still refused', () => { it('the enforced operator slot keeps a boolean $empty rather than stripping it', () => { // An undeclared key on this non-strict object is STRIPPED on parse; a // declared one survives. `toEqual` holding both values is the difference. @@ -145,7 +145,7 @@ describe('#20311 §2 — { tags: { $empty: true } } parses; { tags: [] } is stil expect(NormalizedFilterSchema.safeParse({ $and: [{ tags: { $empty: 'yes' } }] }).success).toBe(false); }); - it('the empty list stays refused in the equality slot — ruling 乙 on #19757 is untouched', () => { + it('the empty list stays refused in the equality slot — the ruled refusal of an array there is untouched', () => { for (const [where, path] of [ [{ tags: [] }, 'tags'], [{ tags: { $eq: [] } }, 'tags.$eq'], @@ -178,7 +178,7 @@ describe('#20311 §2 — { tags: { $empty: true } } parses; { tags: [] } is stil // §3 The expansion: three arms for the three field kinds, and the value test // --------------------------------------------------------------------------- -describe('#20311 §3 — expandEmptyOperator answers the ruled arm per field definition', () => { +describe('§3 — expandEmptyOperator answers the ruled arm per field definition', () => { it('is published on the data entry — the one function every compile surface imports', () => { expect(dataBarrel.expandEmptyOperator).toBe(expandEmptyOperator); expect(dataBarrel.isEmptyFilterValue).toBe(isEmptyFilterValue); @@ -249,7 +249,7 @@ describe('#20311 §3 — expandEmptyOperator answers the ruled arm per field def // §4 The flip: in FILTER_OPERATORS, and the view operators lower to it // --------------------------------------------------------------------------- -describe('#20446 §4 — $empty is IN FILTER_OPERATORS and is_empty / is_not_empty lower to it', () => { +describe('§4 — $empty is IN FILTER_OPERATORS and is_empty / is_not_empty lower to it', () => { it('is in FILTER_OPERATORS, beside the other value-presence flags', () => { // Inverted from #20311's staging pin (the maintainer's amendment, record // 5868169573): every compile face answers `$empty` now (#20444, #20445), diff --git a/packages/spec/src/data/filter-equality-array-schema-door.test.ts b/packages/spec/src/data/filter-equality-array-schema-door.test.ts index b7b3c44dc83..ef7af9b3252 100644 --- a/packages/spec/src/data/filter-equality-array-schema-door.test.ts +++ b/packages/spec/src/data/filter-equality-array-schema-door.test.ts @@ -87,7 +87,7 @@ const REFUSED: ReadonlyArray { +describe('§1 — FilterConditionSchema refuses an array in the equality slot', () => { it.each(REFUSED)('refuses %s', (_label, where, issuePath) => { const issue = issueAt(FilterConditionSchema.safeParse(where), issuePath); expect(issue.message).toMatch(/requires a single comparable value, but received an array/); @@ -104,7 +104,7 @@ describe('#19889 §1 — FilterConditionSchema refuses an array in the equality // §2 FieldOperatorsSchema.$eq refuses — the enforced copy and the documented one // --------------------------------------------------------------------------- -describe('#19889 §2 — the $eq operator slot refuses an array', () => { +describe('§2 — the $eq operator slot refuses an array', () => { it.each([ ['FieldOperatorsSchema (the enforced copy)', FieldOperatorsSchema], ['EqualityOperatorSchema (the documentation copy)', EqualityOperatorSchema], @@ -125,7 +125,7 @@ describe('#19889 §2 — the $eq operator slot refuses an array', () => { // §3 The parse-door message IS the compile-face message // --------------------------------------------------------------------------- -describe('#19889 §3 — one text, two doors', () => { +describe('§3 — one text, two doors', () => { it.each(REFUSED)('%s — the schema door prints the face\'s sentence', (_label, where, issuePath, facePath) => { const face = faceRefusal(where); // The face is the ADR-0112 class-1 refusal it has been since #19757. @@ -174,7 +174,7 @@ describe('#19889 §3 — one text, two doors', () => { // §4 CONTROLS — both doors accept, so the arm is exactly the face's // --------------------------------------------------------------------------- -describe('#19889 §4 — what stays accepted, at BOTH doors', () => { +describe('§4 — what stays accepted, at BOTH doors', () => { const day = new Date('2026-07-01T00:00:00.000Z'); it.each([ ['a string', { stage: 'won' }], @@ -244,7 +244,7 @@ describe('#19889 §4 — what stays accepted, at BOTH doors', () => { // §5 The stored carriers refuse on save, naming the path // --------------------------------------------------------------------------- -describe('#19889 §5 — a stored filter carrier refuses the shape on save', () => { +describe('§5 — a stored filter carrier refuses the shape on save', () => { const dataset = (extra: Record) => ({ name: 'deals_ds', label: 'Deals', diff --git a/packages/spec/src/data/filter-field-reference-lowering.test.ts b/packages/spec/src/data/filter-field-reference-lowering.test.ts index 037f4101b1c..9b7cc0ae857 100644 --- a/packages/spec/src/data/filter-field-reference-lowering.test.ts +++ b/packages/spec/src/data/filter-field-reference-lowering.test.ts @@ -53,7 +53,7 @@ const EQUALITY_SPELLINGS = ['=', '==', 'equals', 'eq'] as const; const REF = { $field: 'budget' } as const; -describe('[#7597] equality triples with a `{ $field }` comparand', () => { +describe('equality triples with a `{ $field }` comparand — lowered to `$eq`, never a bare field spec', () => { // ── The fix ─────────────────────────────────────────────────────────────── for (const op of EQUALITY_SPELLINGS) { diff --git a/packages/spec/src/data/filter-icontains-parse-door.test.ts b/packages/spec/src/data/filter-icontains-parse-door.test.ts index 65e9a38d956..d10a850e832 100644 --- a/packages/spec/src/data/filter-icontains-parse-door.test.ts +++ b/packages/spec/src/data/filter-icontains-parse-door.test.ts @@ -80,7 +80,7 @@ function issueAt( // §1 the `$` dialect door — FilterConditionSchema // --------------------------------------------------------------------------- -describe('#19514 §1 — the $ dialect refuses what the table declares refused', () => { +describe('§1 — the $ dialect refuses what the table declares refused', () => { it.each([ ['the EMPTY comparand', '', 'EMPTY STRING'], ['a NUMBER comparand', 42, 'not a string'], @@ -156,7 +156,7 @@ describe('#19514 §1 — the $ dialect refuses what the table declares refused', // §2 the infix/view dialect door — ViewFilterRuleSchema // --------------------------------------------------------------------------- -describe('#19514 §2 — the view vocabulary refuses the same two comparands', () => { +describe('§2 — the view vocabulary refuses the same two comparands', () => { const rule = (value?: unknown) => ViewFilterRuleSchema.safeParse( value === undefined @@ -241,7 +241,7 @@ describe('#19514 §2 — the view vocabulary refuses the same two comparands', ( // §3 both doors are DRIVEN BY the table, not by a copy of it // --------------------------------------------------------------------------- -describe('#19514 §3 — a row added to FILTER_TEXT_CASES reaches both doors', () => { +describe('§3 — a row added to FILTER_TEXT_CASES reaches both doors', () => { it('the table still carries rows for this operator, so this suite is not vacuous', () => { expect(TABLE_ROWS.length).toBeGreaterThan(0); }); diff --git a/packages/spec/src/data/filter-like-code-point.test.ts b/packages/spec/src/data/filter-like-code-point.test.ts index 5a3e49d08cc..fa7ef86330d 100644 --- a/packages/spec/src/data/filter-like-code-point.test.ts +++ b/packages/spec/src/data/filter-like-code-point.test.ts @@ -57,7 +57,7 @@ const FAMILY: ReadonlyArray boolean): string[] => Object.entries(ROWS).filter(([, v]) => match(v)).map(([label]) => label).sort(); -describe('[#20143] matchesLikePattern — `_` is one code point', () => { +describe('matchesLikePattern — `_` is one code point', () => { for (const [op, pattern, codePoint] of FAMILY) { it(`${op} ${JSON.stringify(pattern)} answers the code-point rows`, () => { expect(answer((v) => matchesLikePattern(v, pattern, op === '$ilike'))).toEqual([...codePoint]); @@ -90,7 +90,7 @@ describe('[#20143] matchesLikePattern — `_` is one code point', () => { }); }); -describe('[#20143] likePatternToRegExp — the one compilation', () => { +describe('likePatternToRegExp — the one compilation', () => { it('carries the `u` flag and nothing else (no `i`: the $ilike fold is in the source)', () => { expect(likePatternToRegExp('a_b').flags).toBe('u'); expect(likePatternToRegExp('a_b', true).flags).toBe('u'); @@ -111,7 +111,7 @@ describe('[#20143] likePatternToRegExp — the one compilation', () => { }); }); -describe('[#20143] every ASCII punctuation character is `u`-legal, bare and escaped', () => { +describe('every ASCII punctuation character is `u`-legal, bare and escaped', () => { /** Printable ASCII that is neither a letter nor a digit, space included: 33 characters. */ const PUNCTUATION = Array.from({ length: 0x7f - 0x20 }, (_, i) => String.fromCharCode(0x20 + i)) .filter((c) => !/[A-Za-z0-9]/.test(c)); diff --git a/packages/spec/src/data/filter-like-nul-pattern.test.ts b/packages/spec/src/data/filter-like-nul-pattern.test.ts index b4db2016630..4e16931f5bb 100644 --- a/packages/spec/src/data/filter-like-nul-pattern.test.ts +++ b/packages/spec/src/data/filter-like-nul-pattern.test.ts @@ -22,7 +22,7 @@ import { const NUL = String.fromCharCode(0x00); -describe('[#20041] hasNulInLikePattern', () => { +describe('hasNulInLikePattern — one predicate, so every door refuses a pattern holding U+0000', () => { it('finds U+0000 at the start, in the middle, at the end, and alone', () => { expect(hasNulInLikePattern(NUL + '%')).toBe(true); expect(hasNulInLikePattern('a' + NUL + 'b')).toBe(true); diff --git a/packages/spec/src/data/filter-like-wire-lowering.test.ts b/packages/spec/src/data/filter-like-wire-lowering.test.ts index 0b01eaff3b2..77c5bc6e38a 100644 --- a/packages/spec/src/data/filter-like-wire-lowering.test.ts +++ b/packages/spec/src/data/filter-like-wire-lowering.test.ts @@ -48,7 +48,7 @@ import { matchesLikePattern, } from './filter.zod'; -describe('[#7536] the wire lowering of `like` / `ilike`', () => { +describe('the wire lowering of `like` / `ilike` — its own operator, never folded onto `$contains`', () => { // ── The card's repro table, as pins ─────────────────────────────────────── it('keeps a wildcard pattern INTACT — the `%` is the caller\'s, not a literal', () => { @@ -153,7 +153,7 @@ describe('[#7536] the wire lowering of `like` / `ilike`', () => { }); }); -describe('[#7536] the `$like` pattern language', () => { +describe('the `$like` pattern language', () => { // One definition, shared by every face — so these cases are the contract the // SQL emitters and the JS evaluator are BOTH held to. @@ -220,7 +220,7 @@ describe('[#7536] the `$like` pattern language', () => { }); }); -describe('[#7536] the LIKE → GLOB translation the SQLite dialects need', () => { +describe('the LIKE → GLOB translation the SQLite dialects need', () => { // SQLite's `LIKE` folds ASCII case and cannot be told not to per statement, // so a case-exact pattern match has to use `GLOB` — which speaks a DIFFERENT // pattern language. These cases are what stops the two from being confused. diff --git a/packages/spec/src/data/filter-lowering.test.ts b/packages/spec/src/data/filter-lowering.test.ts index 9be3b3bcea4..ed74bb5583c 100644 --- a/packages/spec/src/data/filter-lowering.test.ts +++ b/packages/spec/src/data/filter-lowering.test.ts @@ -78,11 +78,11 @@ const SCOPE_ROWS: readonly Row[] = [ /** Rule 3 — NULL polarity, leaf by leaf, exactly as the four hand copies compile it. */ const NULL_ROWS: readonly Row[] = [ - { name: '$ne a value: a row with no value satisfies it (#5298)', + { name: '$ne a value: a row with no value satisfies it', input: { stage: { $ne: 'won' } }, output: { $and: [{ $or: [{ stage: { $null: true } }, { stage: { $ne: 'won' } }] }] } }, - { name: '$nin: a row with no value satisfies it (#5298)', + { name: '$nin: a row with no value satisfies it', input: { stage: { $nin: ['won'] } }, output: { $and: [{ $or: [{ stage: { $null: true } }, { stage: { $nin: ['won'] } }] }] } }, - { name: '$notContains: a row with no value satisfies it (#5298)', + { name: '$notContains: a row with no value satisfies it', input: { name: { $notContains: 'x' } }, output: { $and: [{ $or: [{ name: { $null: true } }, { name: { $notContains: 'x' } }] }] } }, { name: '$ne: null is the total IS NOT NULL and is left alone', input: { stage: { $ne: null } }, output: { stage: { $ne: null } } }, @@ -90,9 +90,9 @@ const NULL_ROWS: readonly Row[] = [ input: { a: { $ne: { $field: 'b' } } }, output: { a: { $ne: { $field: 'b' } } } }, { name: 'only the negative operator moves; its siblings stay under the key', input: { amount: { $gt: 1, $ne: 5 } }, output: { amount: { $gt: 1 }, $and: [{ $or: [{ amount: { $null: true } }, { amount: { $ne: 5 } }] }] } }, - { name: '$not over a positive leaf requires a value (#5146)', + { name: '$not over a positive leaf requires a value', input: { $not: { stage: 'won' } }, output: { $not: { $and: [{ stage: { $null: false } }, { stage: 'won' }] } } }, - { name: '$not over a negative leaf keeps the NULL escape (#5146)', + { name: '$not over a negative leaf keeps the NULL escape', input: { $not: { stage: { $ne: 'won' } } }, output: { $not: { $and: [{ $or: [{ stage: { $null: true } }, { stage: { $ne: 'won' } }] }] } } }, { name: '$not over a total leaf is left alone', input: { $not: { stage: { $null: true } } }, output: { $not: { stage: { $null: true } } } }, @@ -231,7 +231,7 @@ describe('lowerFilterCondition — copy-on-write, provenance, non-nodes', () => expect(lowered.$or[0]).toBe(untouched); }); - it('carries the provenance mark of every node it replaces (#8220)', () => { + it('carries the provenance mark of every node it replaces', () => { const author = markFilterSubtreeProvenance({ at: { $lte: '2026-07-28' } }, 'author'); const policy = markFilterSubtreeProvenance({ stage: { $ne: 'won' } }, 'policy'); const lowered = lowerFilterCondition({ $and: [author, policy] }, TYPED) as { $and: unknown[] }; diff --git a/packages/spec/src/data/filter-ne-array-schema-door.test.ts b/packages/spec/src/data/filter-ne-array-schema-door.test.ts index 9c327d38545..3ce65a53490 100644 --- a/packages/spec/src/data/filter-ne-array-schema-door.test.ts +++ b/packages/spec/src/data/filter-ne-array-schema-door.test.ts @@ -82,7 +82,7 @@ const SLOTS = [ // §1 The $ne operator slot refuses an array — both copies, one factory // --------------------------------------------------------------------------- -describe('#19886 §1 — the $ne operator slot refuses an array', () => { +describe('§1 — the $ne operator slot refuses an array', () => { for (const [label, schema] of SLOTS) { it(`${label} refuses $ne: [...] at $ne — issue code, path and the prescription`, () => { const issue = issueAt(schema.safeParse({ $ne: ['won', 'lost'] }), '$ne'); @@ -125,7 +125,7 @@ describe('#19886 §1 — the $ne operator slot refuses an array', () => { // §2 The face refuses the same shape — the compile half of the ruling // --------------------------------------------------------------------------- -describe('#19886 §2 — the shared face refuses $ne: [...] with the ADR-0112 envelope', () => { +describe('§2 — the shared face refuses $ne: [...] with the ADR-0112 envelope', () => { it.each([ ['top level', { stage: { $ne: ['won', 'lost'] } }, 'where.stage.$ne'], ['EMPTY', { stage: { $ne: [] } }, 'where.stage.$ne'], @@ -144,7 +144,7 @@ describe('#19886 §2 — the shared face refuses $ne: [...] with the ADR-0112 en // §3 One remedy text, two doors // --------------------------------------------------------------------------- -describe('#19886 §3 — one text, two doors', () => { +describe('§3 — one text, two doors', () => { it.each([ ['two members', ['won', 'lost']], ['one member', ['won']], @@ -203,7 +203,7 @@ describe('#19886 §3 — one text, two doors', () => { // §4 CONTROLS — both doors accept, and keep, every non-array $ne comparand // --------------------------------------------------------------------------- -describe('#19886 §4 — what stays accepted, at BOTH doors', () => { +describe('§4 — what stays accepted, at BOTH doors', () => { const day = new Date('2026-07-01T00:00:00.000Z'); it.each([ ['a string', 'won'], @@ -240,7 +240,7 @@ describe('#19886 §4 — what stays accepted, at BOTH doors', () => { // §5 The stored-filter carrier walk — refused on save since #20116 // --------------------------------------------------------------------------- -describe('#19886 §5 — the stored-filter carrier walk refuses $ne: [...] too (#20116)', () => { +describe('§5 — the stored-filter carrier walk refuses $ne: [...] on save too', () => { // This section held an `it.todo`: ruling A named the face and // `FieldOperatorsSchema.$ne`, not `FilterConditionSchema`'s carrier walk, so // every stored carrier still saved the shape and the face refused it at query diff --git a/packages/spec/src/data/filter-number-comparand-declared-type.test.ts b/packages/spec/src/data/filter-number-comparand-declared-type.test.ts index 1a65829f904..0c921065ca4 100644 --- a/packages/spec/src/data/filter-number-comparand-declared-type.test.ts +++ b/packages/spec/src/data/filter-number-comparand-declared-type.test.ts @@ -56,7 +56,7 @@ const sorted = (s: Iterable) => [...s].sort(); // ── The grammar ────────────────────────────────────────────────────────────── -describe('[#20336] the numeric grammar', () => { +describe('the numeric grammar — a JSON number literal naming a finite double', () => { it('admits exactly the case table\'s admitted rows, each at its value, and refuses the rest with their form', () => { for (const row of NUMERIC_STRING_GRAMMAR_CASES) { const reading = readNumericString(row.input); @@ -128,7 +128,7 @@ describe('[#20336] the numeric grammar', () => { // ── Which fields ───────────────────────────────────────────────────────────── -describe('[#20336] the judged fields', () => { +describe('the judged fields', () => { it('are NUMERIC_VALUE_TYPES itself, by identity — nothing re-listed', () => { expect(NUMBER_COMPARAND_DOOR_JUDGED_TYPES).toBe(NUMERIC_VALUE_TYPES); }); @@ -159,7 +159,7 @@ describe('[#20336] the judged fields', () => { // ── Which positions ────────────────────────────────────────────────────────── -describe('[#20336] the judged positions', () => { +describe('the judged positions', () => { it('partition FieldOperatorsSchema\'s keys with the text operators and the three flag operators', () => { const judged = [...NUMBER_COMPARAND_DOOR_SCALAR_OPERATORS, ...NUMBER_COMPARAND_DOOR_LIST_OPERATORS]; // [#20311] `$empty` is a boolean flag like `$null` / `$exists`, not a value of the field. @@ -171,7 +171,7 @@ describe('[#20336] the judged positions', () => { // ── The verdict ────────────────────────────────────────────────────────────── -describe('[#20336] numberComparandDoorVerdict', () => { +describe('numberComparandDoorVerdict — a numeric string narrows to its number, a non-numeric one is refused', () => { it('refuses a non-numeric string on a number field with the INVALID_FILTER / 400 envelope and its form', () => { expect(numberComparandDoorVerdict({ type: 'number' }, 'abc')).toEqual({ verdict: 'door-refusal', form: 'not-a-number', code: 'INVALID_FILTER', status: 400, @@ -184,7 +184,7 @@ describe('[#20336] numberComparandDoorVerdict', () => { expect(numberComparandDoorVerdict({ type: 'formula', returnType: 'number' }, '1e3')).toEqual({ verdict: 'narrows', value: 1000 }); }); - it('[#20502] refuses a boolean, a Date and an array on a number field with the INVALID_FILTER / 400 envelope and its form', () => { + it('refuses a boolean, a Date and an array on a number field with the INVALID_FILTER / 400 envelope and its form', () => { const refused: ReadonlyArray = [ [true, 'boolean'], [false, 'boolean'], [new Date(0), 'date'], [new Date(Number.NaN), 'date'], @@ -202,7 +202,7 @@ describe('[#20336] numberComparandDoorVerdict', () => { expect(sorted(new Set(refused.map(([, form]) => form)))).toEqual(sorted(NON_NUMERIC_VALUE_FORMS)); }); - it('[#20502] passes a number, a bigint and null, and leaves every value outside the accepted comparand types to the comparand-type door', () => { + it('passes a number, a bigint and null, and leaves every value outside the accepted comparand types to the comparand-type door', () => { const passes: readonly unknown[] = [ 12, 0, -1.5, 1e21, 10n, null, // Outside the comparand-type door's accepted set — refused THERE, on every field. @@ -219,7 +219,7 @@ describe('[#20336] numberComparandDoorVerdict', () => { } }); - it('[#20502] a boolean or a Date on a field that is NOT numeric is not this door\'s subject', () => { + it('a boolean or a Date on a field that is NOT numeric is not this door\'s subject', () => { for (const t of [...BOOLEAN_VALUE_TYPES, ...CALENDAR_DATE_TYPES, ...INSTANT_TYPES, ...STRING_VALUE_TYPES]) { for (const v of [true, new Date(0), [1]]) { expect(numberComparandDoorVerdict({ type: t }, v), `${t} · ${String(v)}`).toEqual({ verdict: 'passes' }); @@ -240,7 +240,7 @@ describe('[#20336] numberComparandDoorVerdict', () => { // ── The words ──────────────────────────────────────────────────────────────── -describe('[#20336] numberComparandRefusalMessage', () => { +describe('numberComparandRefusalMessage', () => { const site = { field: 'amount', declaredType: 'number', path: 'where.amount.$gt', value: 'abc', form: 'not-a-number' as const, }; @@ -267,7 +267,7 @@ describe('[#20336] numberComparandRefusalMessage', () => { for (const m of messages) expect(m).not.toMatch(/#\d/); }); - it('[#20502] names a Date AS a Date — its JSON form is a quoted string, which would read as the string the grammar refuses', () => { + it('names a Date AS a Date — its JSON form is a quoted string, which would read as the string the grammar refuses', () => { const at = new Date(Date.UTC(2026, 0, 1)); const message = numberComparandRefusalMessage({ ...site, value: at, form: 'date' }, "find('deal')"); expect(message.startsWith( @@ -305,7 +305,7 @@ describe('[#20336] numberComparandRefusalMessage', () => { }); // [#20510] `having`'s site kind, and the driver-bound PostgreSQL clause. - describe('[#20510] `aggregated` and `boundByDriver`', () => { + describe('`aggregated` and `boundByDriver` — the refusal says only what is true at its position', () => { const havingSite = { field: 'total', declaredType: 'number', path: 'having.total.$gt', value: 'abc', form: 'not-a-number' as const, aggregated: true as const, boundByDriver: false as const, @@ -352,7 +352,7 @@ describe('[#20336] numberComparandRefusalMessage', () => { } }); - it('[#20510] the pre-existing `where` message is unchanged, byte for byte', () => { + it('the pre-existing `where` message is unchanged, byte for byte', () => { const at = new Date(Date.UTC(2026, 0, 1)); expect(numberComparandRefusalMessage(site, "find('deal')")).toBe( "find('deal'): filter on 'amount' compares a declared number field against \"abc\" at where.amount.$gt, " @@ -379,7 +379,7 @@ describe('[#20336] numberComparandRefusalMessage', () => { // ── The fixture ────────────────────────────────────────────────────────────── -describe('[#20336] the fixture', () => { +describe('the fixture', () => { it('carries one field per FieldType member (f_), four typed formulas and one untyped', () => { const names = NUMBER_COMPARAND_DOOR_FIXTURE_FIELDS.map((f) => f.name); expect(new Set(names).size).toBe(names.length); @@ -427,7 +427,7 @@ function comparandAt(c: NumberComparandDoorCase, filter: Record return m[2] === undefined ? at : (at as unknown[])[Number(m[2])]; } -describe('[#20336] NUMBER_COMPARAND_DOOR_CASES', () => { +describe('NUMBER_COMPARAND_DOOR_CASES', () => { it('has unique case names — they are used as test names', () => { const names = NUMBER_COMPARAND_DOOR_CASES.map((c) => c.name); expect(new Set(names).size).toBe(names.length); @@ -448,7 +448,7 @@ describe('[#20336] NUMBER_COMPARAND_DOOR_CASES', () => { } }); - it('[#20502] the flag operators pass their boolean — the door never judges $null / $exists / $empty, whatever the verdict says of a boolean', () => { + it('the flag operators pass their boolean — the door never judges $null / $exists / $empty, whatever the verdict says of a boolean', () => { const flags = NUMBER_COMPARAND_DOOR_CASES.filter((c) => /\.\$(?:null|exists|empty)$/.test(c.position)); expect(sorted(flags.map((c) => c.position))).toEqual(['f_number.$empty', 'f_number.$exists', 'f_number.$null']); for (const c of flags) { @@ -491,7 +491,7 @@ describe('[#20336] NUMBER_COMPARAND_DOOR_CASES', () => { } }); - it('[#20502] refuses false at $gt on every judged field, and true and a Date at every judged position on f_number', () => { + it('refuses false at $gt on every judged field, and true and a Date at every judged position on f_number', () => { const value = NUMBER_COMPARAND_DOOR_CASES.filter((c) => c.name.startsWith('[value]')); const judgedFields = NUMBER_COMPARAND_DOOR_FIXTURE_FIELDS.filter((f) => numberComparandFieldVerdict(f) === 'judged'); const falseAtGt = value.filter((c) => c.comparand === false); @@ -510,14 +510,14 @@ describe('[#20336] NUMBER_COMPARAND_DOOR_CASES', () => { } }); - it('[#20502] the non-string rows that PASS: the null test, and a boolean or a Date on a field class that holds one', () => { + it('the non-string rows that PASS: the null test, and a boolean or a Date on a field class that holds one', () => { const passing = NUMBER_COMPARAND_DOOR_CASES.filter((c) => c.name.startsWith('[value]') && c.verdict === 'passes'); expect(passing.map((c) => [c.position, c.comparand instanceof Date ? 'Date' : c.comparand])).toEqual([ ['f_number', null], ['f_number.$ne', null], ['f_boolean.$eq', true], ['f_datetime.$gt', 'Date'], ]); }); - it('[#20502] the refused forms: every string form and every value form is in the table', () => { + it('the refused forms: every string form and every value form is in the table', () => { const forms = new Set(NUMBER_COMPARAND_DOOR_CASES.filter(isRefusal).map((c) => c.form)); expect(sorted(forms)).toEqual(sorted([...NON_NUMERIC_STRING_FORMS, ...NON_NUMERIC_VALUE_FORMS])); }); diff --git a/packages/spec/src/data/filter-operator-vocabulary.test.ts b/packages/spec/src/data/filter-operator-vocabulary.test.ts index c68a6bcfefb..3e1a627ccd5 100644 --- a/packages/spec/src/data/filter-operator-vocabulary.test.ts +++ b/packages/spec/src/data/filter-operator-vocabulary.test.ts @@ -79,14 +79,14 @@ describe('the declaration surface and the enforcement surface', () => { 'FieldOperatorsSchema declares an operator FILTER_OPERATORS does not enforce, and nothing ' + 'records the staging. That is legal but never silent: an operator in FILTER_OPERATORS ' + 'with no backend arm makes driver-memory accept it and silently DROP the predicate ' - + '(measured, #5701 — a dropped predicate WIDENS, which on an RLS read scope is #3948), ' + + '(measured when $icontains was staged — a dropped predicate WIDENS, which on an RLS read scope is an unauthorized read), ' + 'so declaring ahead of the arms is the correct staging. To stage one: declare it in ' + 'FieldOperatorsSchema, add it to the array THIS assertion compares against, and note on ' + 'FILTER_OPERATORS which issue implements it. To clear one: implement it on EVERY face ' + 'in ONE PR — spec word list, driver-memory (query path, analytics face), driver-sql, ' + 'driver-turso (remote transport), driver-mongodb, service-analytics (3 compilers), ' + 'objectql `having`, formula — ' - + 'then empty this list. #6520 is the worked example of the clearing direction.', + + 'then empty this list. Admitting $icontains with an arm on every JS face, in one PR, is the worked example of the clearing direction.', ).toEqual(STAGED_AHEAD_OF_BACKENDS); }); @@ -118,7 +118,7 @@ describe('the declaration surface and the enforcement surface', () => { describe('RETIRED_FILTER_OPERATORS', () => { const entries = Object.entries(RETIRED_FILTER_OPERATORS); - it('covers the operators #4706 retired', () => { + it('covers the operators retired when `$icontains` replaced `$regex`', () => { expect(Object.keys(RETIRED_FILTER_OPERATORS).sort()).toEqual(['$options', '$regex']); }); diff --git a/packages/spec/src/data/filter-preset-comparand.test.ts b/packages/spec/src/data/filter-preset-comparand.test.ts index d03c2c1ba66..a14f68df0cd 100644 --- a/packages/spec/src/data/filter-preset-comparand.test.ts +++ b/packages/spec/src/data/filter-preset-comparand.test.ts @@ -28,7 +28,7 @@ function refusal(input: unknown) { return r.success ? null : r.error.issues; } -describe('[#8793] FilterConditionSchema — bare preset names in ordering comparands', () => { +describe('FilterConditionSchema — a bare preset name in an ordering comparand is refused at publish', () => { it('refuses every declared preset under every ordering operator, with code + path + prescription', () => { for (const preset of DATE_RANGE_PRESETS) { for (const op of ['$gt', '$gte', '$lt', '$lte'] as const) { @@ -112,7 +112,7 @@ describe('[#8793] FilterConditionSchema — bare preset names in ordering compar }); }); -describe('[#8793] the refusal reaches the authored surfaces that embed FilterConditionSchema', () => { +describe('the refusal reaches the authored surfaces that embed FilterConditionSchema', () => { const widget = (filter: unknown) => ({ name: 'sales', label: 'Sales', diff --git a/packages/spec/src/data/filter-save-door-face-parity.test.ts b/packages/spec/src/data/filter-save-door-face-parity.test.ts index fe3efaaca26..45f0fa245c3 100644 --- a/packages/spec/src/data/filter-save-door-face-parity.test.ts +++ b/packages/spec/src/data/filter-save-door-face-parity.test.ts @@ -206,7 +206,7 @@ const POSITIONS: ReadonlyArray ({ $not: e }), '$not.f'], ]; -describe('#20116 §1 — the enumeration: the save door refuses exactly what the query faces refuse', () => { +describe('§1 — the enumeration: the save door refuses exactly what the query faces refuse', () => { it('the table is derived, not hand-listed, and covers every arm the faces and the flag rule judge', () => { // The vocabulary is the enforced copy's, so a new operator joins the table. expect(OPERATORS).toEqual(expect.arrayContaining(['$eq', '$ne', '$gt', '$in', '$nin', '$between', '$null', '$exists'])); @@ -284,7 +284,7 @@ describe('#20116 §1 — the enumeration: the save door refuses exactly what the // §2 The envelope and the words, per arm // --------------------------------------------------------------------------- -describe('#20116 §2 — each refusal: issue code, path and the prescription', () => { +describe('§2 — each refusal: issue code, path and the prescription', () => { /** The face's message for `where`, with its ` at .` location replaced by `.`. */ function faceSentenceWithoutLocation(where: unknown, facePath: string): string { const face = faceRefusal(where); @@ -305,13 +305,13 @@ describe('#20116 §2 — each refusal: issue code, path and the prescription', ( ['a three-bound $between', { amount: { $between: [1, 2, 3] } }, 'amount.$between', 'where.amount.$between'], ['a $ne list — the appended member', { stage: { $ne: ['won', 'lost'] } }, 'stage.$ne', 'where.stage.$ne'], ['an empty $ne list', { stage: { $ne: [] } }, 'stage.$ne', 'where.stage.$ne'], - ['an implicit list (#19889, unchanged)', { stage: ['won'] }, 'stage', 'where.stage'], - ['a $eq list (#19889, unchanged)', { stage: { $eq: ['won'] } }, 'stage.$eq', 'where.stage.$eq'], + ['an implicit list (an equality-slot refusal, unchanged)', { stage: ['won'] }, 'stage', 'where.stage'], + ['a $eq list (an equality-slot refusal, unchanged)', { stage: { $eq: ['won'] } }, 'stage.$eq', 'where.stage.$eq'], // [#21448] A list at every other scalar operator: ordering, text and flag. - ['a $gt list (#21448)', { amount: { $gt: [10, 99] } }, 'amount.$gt', 'where.amount.$gt'], - ['an empty $lte list (#21448)', { amount: { $lte: [] } }, 'amount.$lte', 'where.amount.$lte'], - ['a $contains list (#21448)', { stage: { $contains: ['won', 'lost'] } }, 'stage.$contains', 'where.stage.$contains'], - ['a $null list — a flag (#21448)', { stage: { $null: [true] } }, 'stage.$null', 'where.stage.$null'], + ['a $gt list', { amount: { $gt: [10, 99] } }, 'amount.$gt', 'where.amount.$gt'], + ['an empty $lte list', { amount: { $lte: [] } }, 'amount.$lte', 'where.amount.$lte'], + ['a $contains list', { stage: { $contains: ['won', 'lost'] } }, 'stage.$contains', 'where.stage.$contains'], + ['a $null list — a flag', { stage: { $null: [true] } }, 'stage.$null', 'where.stage.$null'], ])('%s — the face\'s sentence, less its location', (_label, where, issuePath, facePath) => { const issue = issueAt(FilterConditionSchema.safeParse(where), issuePath); expect(issue.code).toBe('custom'); @@ -420,7 +420,7 @@ describe('#20116 §2 — each refusal: issue code, path and the prescription', ( // §3 The stored carriers refuse on save, at their own paths // --------------------------------------------------------------------------- -describe('#20116 §3 — the stored carriers', () => { +describe('§3 — the stored carriers', () => { const dataset = (extra: Record) => ({ name: 'deals_ds', label: 'Deals', @@ -486,7 +486,7 @@ describe('#20116 §3 — the stored carriers', () => { // §4 CONTROLS — what the face judges but passes stays accepted at BOTH doors // --------------------------------------------------------------------------- -describe('#20116 §4 — what stays accepted, at both doors', () => { +describe('§4 — what stays accepted, at both doors', () => { it.each([ ['$null: true', { stage: { $null: true } }], ['$null: false', { stage: { $null: false } }], @@ -546,7 +546,7 @@ describe('#20116 §4 — what stays accepted, at both doors', () => { // §5 Inside a nested relation, the ANALYTICS carriers answer as the analytics door // --------------------------------------------------------------------------- -describe('#20116 §5 — inside a nested relation, the analytics carriers refuse what the analytics door refuses', () => { +describe('§5 — inside a nested relation, the analytics carriers refuse what the analytics door refuses', () => { // The analytics `where` door flattens a nested relation to dotted members and // hands each entry to the same query faces it hands a top-level entry. The // analytics carriers' own walk (`refuseNestedRelationComparands`, #20207's, @@ -697,7 +697,7 @@ describe('#20116 §5 — inside a nested relation, the analytics carriers refuse // §6 The comparand-TYPE face: its words, its own table, one issue per slot // --------------------------------------------------------------------------- -describe('#20116 §6 — the comparand-TYPE face at the save door', () => { +describe('§6 — the comparand-TYPE face at the save door', () => { /** The type face's message for `where`, with its ` at ` location clause removed. */ function typeFaceSentenceWithoutLocation(where: unknown, facePath: string): string { const face = typeFaceRefusal(where); @@ -740,7 +740,7 @@ describe('#20116 §6 — the comparand-TYPE face at the save door', () => { ['$null: a plain object — the type face\'s refusal, not the flag rule\'s', { stage: { $null: { a: 1 } } }, 'stage.$null', /^Filter comparand is a plain object/], ['$exists: undefined — the type face\'s refusal', { stage: { $exists: undefined } }, 'stage.$exists', /^Filter comparand is undefined\./], ['$null: a bigint within 2^53 — the type face passes it, the flag rule refuses it', { stage: { $null: 5n } }, 'stage.$null', /^Operator "\$null" on field "stage" requires a boolean comparand/], - ['$icontains: a Map — the type face\'s refusal, and the #19514 text arm stays silent', { name: { $icontains: new Map() } }, 'name.$icontains', /^Filter comparand is a Map instance/], + ['$icontains: a Map — the type face\'s refusal, and the text-comparand arm stays silent', { name: { $icontains: new Map() } }, 'name.$icontains', /^Filter comparand is a Map instance/], ['$between: [undefined, 5] — the shape face\'s blank endpoint answers first', { amount: { $between: [undefined, 5] } }, 'amount.$between.0', /^A blank value is not a valid \$between endpoint/], ] as const)('one slot, one issue, in the query doors\' order — %s', (_label, where, issuePath, head) => { const result = FilterConditionSchema.safeParse(where); @@ -792,7 +792,7 @@ describe('#20116 §6 — the comparand-TYPE face at the save door', () => { // §7 Adopting the analytics carrier moves no published byte // --------------------------------------------------------------------------- -describe('#20116 §7 — the analytics carrier filter publishes exactly the bare condition', () => { +describe('§7 — the analytics carrier filter publishes exactly the bare condition', () => { it('its JSON Schema projection is the optional FilterCondition\'s, byte for byte — the walk is a dropped refinement', () => { // Why moving the dataset carriers' declaration into its own module, and // making the dashboard widget's filter a carrier, changes no published diff --git a/packages/spec/src/data/filter-text-comparand.test.ts b/packages/spec/src/data/filter-text-comparand.test.ts index 04006c58187..6a111a4ed23 100644 --- a/packages/spec/src/data/filter-text-comparand.test.ts +++ b/packages/spec/src/data/filter-text-comparand.test.ts @@ -48,7 +48,7 @@ const isTheOperator = (operator: string) => operator === '$icontains' || operato // 1. The predicate answers EXACTLY the two declared REJECTION rows // --------------------------------------------------------------------------- -describe('#18113 — isRefusedTextComparand, driven through every FILTER_TEXT_CASES case', () => { +describe('isRefusedTextComparand — the one predicate every face reads, driven through every FILTER_TEXT_CASES case', () => { it('the table still carries both verdicts, so this suite is not vacuous', () => { expect(FILTER_TEXT_CASES.filter(isRejection).length).toBeGreaterThan(0); expect(FILTER_TEXT_CASES.filter((c) => !isRejection(c)).length).toBeGreaterThan(0); @@ -120,7 +120,7 @@ describe('#18113 — isRefusedTextComparand, driven through every FILTER_TEXT_CA // 2. The reason names each row's `mustMention` tokens, per ARRIVING spelling // --------------------------------------------------------------------------- -describe('#18113 — textComparandRefusalReason names what the row requires', () => { +describe('textComparandRefusalReason names what the row requires', () => { const rows = FILTER_TEXT_CASES.filter( (c): c is FilterTextRejectionCase => isRejection(c) && comparands(c).some(({ operator }) => isTheOperator(operator)), @@ -215,7 +215,7 @@ describe('#18113 — textComparandRefusalReason names what the row requires', () // 3. Reachability — the ruling's unblock criterion is an EXPORT, not a merge // --------------------------------------------------------------------------- -describe('#18113 — both names reach the data entry', () => { +describe('both names reach the data entry', () => { it('are re-exported from the barrel a consumer imports', () => { // objectui#9048 is `pm:blocked` until the INSTALLED `@objectstack/spec` // exports these. A module nothing re-exports satisfies the card's letter diff --git a/packages/spec/src/data/filter-text-conformance.test.ts b/packages/spec/src/data/filter-text-conformance.test.ts index 217a3c479e7..8ca5f451ae6 100644 --- a/packages/spec/src/data/filter-text-conformance.test.ts +++ b/packages/spec/src/data/filter-text-conformance.test.ts @@ -118,7 +118,7 @@ describe('FILTER_TEXT_CASES against the declared semantics', () => { expect(referenceIds(caseLower, asciiFold)).toEqual(['4']); }); - it('the non-string cases discriminate — a COERCING evaluator FAILS exactly them (#14079)', () => { + it('the non-string cases discriminate — a COERCING evaluator FAILS exactly them', () => { // The #14079 pin, proved non-vacuous the same way as the two above: an // evaluator that stringifies the stored number before matching must answer // a DIFFERENT row set on every case over the non-string column and the @@ -159,7 +159,7 @@ describe('FILTER_TEXT_CASES against the declared semantics', () => { const contains = rowsCases.find((c) => c.name.startsWith('$contains is case-SENSITIVE — a lower-case'))!; expect(contains.expected).toEqual(['2']); const folding = FILTER_TEXT_ROWS.filter((r) => asciiFold(r.name).includes(asciiFold('acme'))).map((r) => r.id); - expect(folding, 'a case-folding $contains returns both — that is the answer #4706 Q2 rejected').toEqual(['1', '2']); + expect(folding, 'a case-folding $contains returns both — the answer ruled out when $contains was declared case-sensitive').toEqual(['1', '2']); }); }); diff --git a/packages/spec/src/data/filter-text-operator-declared-type.test.ts b/packages/spec/src/data/filter-text-operator-declared-type.test.ts index 283b14d2fd7..c549a428bf8 100644 --- a/packages/spec/src/data/filter-text-operator-declared-type.test.ts +++ b/packages/spec/src/data/filter-text-operator-declared-type.test.ts @@ -49,7 +49,7 @@ const union = (...sets: ReadonlySet[]) => new Set(sets.flatMap((s) => [. // ── H5: the operators are the ruling's list AND the schema's key set ──────── -describe('[#15661] the judged operators', () => { +describe('the judged operators', () => { it('are the seven the ruling names, verbatim', () => { expect([...TEXT_FILTER_OPERATORS]).toEqual([ '$contains', '$notContains', '$startsWith', '$endsWith', '$icontains', '$like', '$ilike', @@ -73,7 +73,7 @@ describe('[#15661] the judged operators', () => { // ── H1: the refused set is the union of the six exports; nothing minted ───── -describe('[#15661] the refused set', () => { +describe('the refused set', () => { it('equals the union of the six sets the ruling names — by set equality against the imports', () => { expect(sorted(TEXT_OPERATOR_DOOR_REFUSED_TYPES)).toEqual(sorted(union( NUMERIC_VALUE_TYPES, @@ -125,7 +125,7 @@ describe('[#15661] the refused set', () => { // ── H1: the census — every FieldType member exactly once across the rows ──── -describe('[#15661] the class table is a census of FieldType', () => { +describe('the class table is a census of FieldType', () => { it('every FieldType member appears in exactly one class row — none absent, none judged twice', () => { const seen = new Map(); for (const row of TEXT_OPERATOR_DOOR_TYPE_CLASSES) { @@ -181,7 +181,7 @@ describe('[#15661] the class table is a census of FieldType', () => { // ── The verdict ────────────────────────────────────────────────────────────── -describe('[#15661] textOperatorDoorVerdict', () => { +describe('textOperatorDoorVerdict — a text operator over a type that never stores a string is refused', () => { it('refuses every member of the refused set and passes every member of the passing set', () => { for (const t of TEXT_OPERATOR_DOOR_REFUSED_TYPES) expect(textOperatorDoorVerdict({ type: t }), t).toBe('door-refusal'); for (const t of TEXT_OPERATOR_DOOR_PASSING_TYPES) expect(textOperatorDoorVerdict({ type: t }), t).toBe('passes'); @@ -211,7 +211,7 @@ describe('[#15661] textOperatorDoorVerdict', () => { // ── The fixture ────────────────────────────────────────────────────────────── -describe('[#15661] the fixture', () => { +describe('the fixture', () => { it('carries one field per FieldType member (f_), four typed formulas and one untyped', () => { const names = TEXT_OPERATOR_DOOR_FIXTURE_FIELDS.map((f) => f.name); expect(new Set(names).size).toBe(names.length); @@ -242,7 +242,7 @@ describe('[#15661] the fixture', () => { const isRefusal = (c: TextOperatorDoorCase): c is TextOperatorDoorRefusalCase => c.verdict === 'door-refusal'; const fieldOf = (c: TextOperatorDoorCase) => TEXT_OPERATOR_DOOR_FIXTURE_FIELDS.find((f) => f.name === c.field)!; -describe('[#15661] TEXT_OPERATOR_DOOR_CASES', () => { +describe('TEXT_OPERATOR_DOOR_CASES', () => { it('covers every fixture field × every operator, plus a dotted path into every structured-JSON field', () => { const jsonFields = TEXT_OPERATOR_DOOR_FIXTURE_FIELDS.filter((f) => STRUCTURED_JSON_TYPES.has(f.type)).length; expect(TEXT_OPERATOR_DOOR_CASES).toHaveLength( diff --git a/packages/spec/src/data/filter-view-operator-parity.test.ts b/packages/spec/src/data/filter-view-operator-parity.test.ts index fe80ff611bf..9b39fcb37ed 100644 --- a/packages/spec/src/data/filter-view-operator-parity.test.ts +++ b/packages/spec/src/data/filter-view-operator-parity.test.ts @@ -148,7 +148,7 @@ describe('every view filter operator has an AST lowering', () => { }); }); -describe('[#8934] icontains joins both remaining vocabularies', () => { +describe('icontains joins both remaining vocabularies', () => { // `$icontains` was executable on every driver and evaluation face // (#5702/#6520) while being AUTHORABLE from exactly one of the three filter // dialects. This block pins the closing of that gap: the view vocabulary and @@ -190,7 +190,7 @@ describe('[#8934] icontains joins both remaining vocabularies', () => { expect(icontains).not.toEqual(ilike); }); - it('does NOT collapse onto contains — case sensitivity is contract (#5701)', () => { + it('does NOT collapse onto contains — case sensitivity is contract', () => { const icontains = parseFilterAST(['name', 'icontains', 'Acme']); const contains = parseFilterAST(['name', 'contains', 'Acme']); expect(icontains).not.toEqual(contains);