Skip to content

Commit 21f39af

Browse files
committed
test(spec): the fourth data/ file group's test titles state each cited decision in words instead of a tracker number (stage 18)
The 17 test files directly under packages/spec/src/data/ that carry a tracker id, from filter.test.ts through object.test.ts, carry none in a test title. 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 <noreply@anthropic.com>
1 parent c9be1f1 commit 21f39af

17 files changed

Lines changed: 103 additions & 103 deletions

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ describe('ComparisonOperatorSchema', () => {
7474
// rather than an ISO refinement.
7575
// ==========================================================================
7676

77-
describe('string comparands (#5685)', () => {
77+
describe('string comparands — the ordering slots take a string, which is what the date macros emit', () => {
7878
const OPS = ['$gt', '$gte', '$lt', '$lte'] as const;
7979

8080
/** `resolveFilterTokens` returns `asYmd(...)` for every calendar-day token. */
@@ -163,7 +163,7 @@ describe('ComparisonOperatorSchema', () => {
163163
// `filter-comparand-shape.test.ts`.
164164
// ==========================================================================
165165

166-
describe('null comparand (#14080)', () => {
166+
describe('null comparand — refused in the four ordering slots, like a null list member', () => {
167167
const OPS = ['$gt', '$gte', '$lt', '$lte'] as const;
168168
const messagesOf = (result: { error?: { issues: Array<{ message: string }> } }): string =>
169169
(result.error?.issues ?? []).map((i) => i.message).join('\n');
@@ -194,7 +194,7 @@ describe('ComparisonOperatorSchema', () => {
194194
expect(nested.success).toBe(false);
195195
});
196196

197-
it('the null PREDICATES are untouched — $eq: null / $ne: null keep parsing (#5332)', () => {
197+
it('the null PREDICATES are untouched — $eq: null / $ne: null keep parsing', () => {
198198
expect(FieldOperatorsSchema.safeParse({ $eq: null }).success).toBe(true);
199199
expect(FieldOperatorsSchema.safeParse({ $ne: null }).success).toBe(true);
200200
// The normalized AST is a logical group at its root (a bare field
@@ -256,7 +256,7 @@ describe('SetOperatorSchema', () => {
256256
// on a missing prescription is not coverage of this ruling.
257257
// ==========================================================================
258258

259-
describe('$field members are refused (#7596)', () => {
259+
describe('$field members are refused', () => {
260260
it('refuses a $field member of $in, naming the index and the alternative', () => {
261261
const result = SetOperatorSchema.safeParse({ $in: ['won', { $field: 'budget' }] });
262262
expect(result.success).toBe(false);
@@ -295,7 +295,7 @@ describe('SetOperatorSchema', () => {
295295
expect(SetOperatorSchema.safeParse({ $in: [] }).success).toBe(true);
296296
});
297297

298-
it('refuses a null member of $in / $nin — ruled 2026-08-31 (#13357)', () => {
298+
it('refuses a null member of $in / $nin — ruled 2026-08-31', () => {
299299
for (const op of ['$in', '$nin'] as const) {
300300
const result = SetOperatorSchema.safeParse({ [op]: ['won', null] });
301301
expect(result.success, op).toBe(false);
@@ -361,7 +361,7 @@ describe('RangeOperatorSchema', () => {
361361
// parse verdicts on a declaration surface, not runtime refusals.)
362362
// ==========================================================================
363363

364-
describe('string endpoints (#6571)', () => {
364+
describe('string endpoints — `$between` takes the ISO and clock strings the platform produces', () => {
365365
/**
366366
* `resolveFilterTokens`' `walk` descends into arrays, and every branch of
367367
* the resolver returns a string, so a token range resolves to two strings:
@@ -469,7 +469,7 @@ describe('RangeOperatorSchema', () => {
469469
// was.
470470
// ==========================================================================
471471

472-
describe('$field endpoints are refused (#7596)', () => {
472+
describe('$field endpoints are refused', () => {
473473
it('refuses a $field LOWER bound, naming index 0 and the alternative', () => {
474474
const result = RangeOperatorSchema.safeParse({
475475
$between: [{ $field: 'a.min' }, '2026-12-31'],
@@ -546,7 +546,7 @@ describe('RangeOperatorSchema', () => {
546546
* always rejected both), and the pair above them is what moved — which is
547547
* exactly the evidence that the two faces now agree.
548548
*/
549-
it('the whole-filter face refuses these field conditions too — #7711 (was green pre-#7711)', () => {
549+
it('the whole-filter face refuses these field conditions too — green while the group branch was a non-strict catch-all', () => {
550550
const withReference = NormalizedFilterSchema.safeParse({
551551
$and: [{ amount: { $between: [{ $field: 'budget' }, 100] } }],
552552
});
@@ -573,7 +573,7 @@ describe('RangeOperatorSchema', () => {
573573
* is the SCALAR comparand, and it is also what the refusal above prescribes.
574574
* If this went red the refusal message would be sending authors nowhere.
575575
*/
576-
it('leaves the four ORDERING slots taking a reference — #5222, and the prescribed alternative', () => {
576+
it('leaves the four ORDERING slots taking a reference — a column-to-column comparison, and the prescribed alternative', () => {
577577
expect(ComparisonOperatorSchema.safeParse({ $gt: { $field: 'budget' } }).success).toBe(true);
578578
expect(FieldOperatorsSchema.safeParse({
579579
$gte: { $field: 'a.min' }, $lte: { $field: 'a.max' },
@@ -605,7 +605,7 @@ describe('RangeOperatorSchema', () => {
605605
// (`filter-comparand-shape.test.ts`).
606606
// ==========================================================================
607607

608-
describe('blank $between endpoints are refused (#18012)', () => {
608+
describe('blank $between endpoints are refused', () => {
609609
const issuesOf = (result: { error?: { issues: Array<{ path: PropertyKey[]; message: string }> } }) =>
610610
result.error?.issues ?? [];
611611

@@ -676,7 +676,7 @@ describe('RangeOperatorSchema', () => {
676676
* face about each slot, so both are refused on save, at the endpoint, in the
677677
* sentence the enforced operator slot prints for the same pair.
678678
*/
679-
it('is refused by FilterConditionSchema too, at the endpoint, in the operator slot\'s words (#20116)', () => {
679+
it('is refused by FilterConditionSchema too, at the endpoint, in the operator slot\'s words', () => {
680680
const blank = FilterConditionSchema.safeParse({ age: { $between: [18, ''] } });
681681
expect(blank.success).toBe(false);
682682
expect(issuesOf(blank).map((i) => i.path)).toEqual([['age', '$between', 1]]);
@@ -1069,7 +1069,7 @@ describe('TypeScript Type System', () => {
10691069
* (the second reads `undefined`, not `never`: the old guard's `never` meets
10701070
* the slot's own `?`, and an optional `never` IS `undefined`.)
10711071
*/
1072-
it('accepts an ISO string on a Date field and orders string fields (#5685)', () => {
1072+
it('accepts an ISO string on a Date field and orders string fields', () => {
10731073
interface Deal {
10741074
close_date: Date; // resolved date macro arrives as 'YYYY-MM-DD'
10751075
shift_start: string; // Field.time — 'HH:MM[:SS[.fff]]'
@@ -1098,7 +1098,7 @@ describe('TypeScript Type System', () => {
10981098
* recorded: the old guard's `never` meets the slot's own `?`, and an optional
10991099
* `never` IS `undefined`.)
11001100
*/
1101-
it('accepts a resolved macro range on a Date field and ranges string fields (#6571)', () => {
1101+
it('accepts a resolved macro range on a Date field and ranges string fields', () => {
11021102
interface Deal {
11031103
close_date: Date; // a resolved token range arrives as two 'YYYY-MM-DD'
11041104
shift_start: string; // Field.time — 'HH:MM[:SS[.fff]]'
@@ -1459,7 +1459,7 @@ describe('NormalizedFilterSchema', () => {
14591459
// as well: the catch-all returned `{}` for the member it admitted, so the
14601460
// parse output no longer carried the condition it was asked about.
14611461
// ==========================================================================
1462-
describe('#7711 — a member the field-condition branch refuses has nowhere to land', () => {
1462+
describe('a member the field-condition branch refuses has nowhere to land', () => {
14631463
/** The card's clean control: `$null` has never been anything but a boolean. */
14641464
it('rejects a $and member whose operator map FieldOperatorsSchema refuses', () => {
14651465
const result = NormalizedFilterSchema.safeParse({
@@ -1538,7 +1538,7 @@ describe('NormalizedFilterSchema', () => {
15381538
* the field-condition branch as an empty record, which is what lets the
15391539
* group branch be `.strict()` without touching any of them.
15401540
*/
1541-
it('leaves the #5322 empty-combinator identities accepted', () => {
1541+
it('leaves the empty-combinator identities accepted — each reduces to its boolean unit', () => {
15421542
for (const identity of [{}, { $and: [] }, { $or: [] }, { $or: [{}] }, { $not: {} }]) {
15431543
expect(NormalizedFilterSchema.safeParse(identity).success).toBe(true);
15441544
}
@@ -1848,7 +1848,7 @@ describe('VALID_AST_OPERATORS', () => {
18481848
// corpus and the memory evaluator's pins — not here.
18491849
// ============================================================================
18501850

1851-
describe('FieldReferenceSchema.addDays (#14104)', () => {
1851+
describe('FieldReferenceSchema.addDays — a whole-day offset on a reference, an integer or another column', () => {
18521852
const firstIssue = (result: { error?: { issues: Array<{ code: string; path: PropertyKey[]; message: string }> } }) =>
18531853
result.error?.issues[0];
18541854

@@ -1959,7 +1959,7 @@ describe('FieldReferenceSchema.addDays (#14104)', () => {
19591959
expect(firstIssue(enforced)?.message.startsWith('addDays must be an integer or a { "$field" } reference')).toBe(true);
19601960
});
19611961

1962-
it('adds no LIST position — a reference carrying addDays is refused where a bare one is (#7596)', () => {
1962+
it('adds no LIST position — a reference carrying addDays is refused where a bare one is', () => {
19631963
const result = SetOperatorSchema.safeParse({ $in: [{ $field: 'due_date', addDays: 1 }] });
19641964
expect(result.success).toBe(false);
19651965
expect(firstIssue(result)?.path).toEqual(['$in', 0]);
@@ -1995,7 +1995,7 @@ describe('FieldReferenceSchema.addDays (#14104)', () => {
19951995
* and refuses `.` and `/` alike, so a slash-separated or unbackticked
19961996
* respelling trips it too.
19971997
*/
1998-
describe('filter.zod.ts docblock @examples (#16923)', () => {
1998+
describe('filter.zod.ts docblock @examples — a `$field` comparand names a column of the same row', () => {
19991999
const HERE = dirname(fileURLToPath(import.meta.url));
20002000
const SOURCE = readFileSync(resolve(HERE, 'filter.zod.ts'), 'utf8');
20012001

‎packages/spec/src/data/form-delete-behavior-options.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const FORMS = [
175175

176176
// ────────────────────────────────────────────────────────────────────────────
177177

178-
describe('#11410 — `deleteBehavior` is never offered a value the schema refuses', () => {
178+
describe('`deleteBehavior` is never offered a value the schema refuses', () => {
179179
describe('the derived option source, which is why an explicit list is required', () => {
180180
it('offers all three values, and defaults to the one a master_detail refuses', () => {
181181
const node = derivedDeleteBehaviorNode();

‎packages/spec/src/data/form-return-type-options.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function formulaFieldWith(returnType: string): Record<string, unknown> {
144144

145145
// ────────────────────────────────────────────────────────────────────────────
146146

147-
describe('#19677 — `returnType` is never offered a value the schema refuses', () => {
147+
describe('`returnType` is never offered a value the schema refuses', () => {
148148
it('derives a non-empty closed member set from FieldSchema', () => {
149149
// The floor for every assertion below: an empty or unreadable derivation
150150
// would make the set-equality checks vacuously true.

‎packages/spec/src/data/hook-body.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe('HookBody', () => {
6262
// #4391. These assertions are what must go red if any of them comes back
6363
// WITHOUT an implementation behind it.
6464

65-
it('does not offer `crypto.hash` as a capability token (#4391)', () => {
65+
it('does not offer `crypto.hash` as a capability token', () => {
6666
expect(HookBodyCapability.options).toEqual([
6767
'api.read',
6868
'api.write',
@@ -73,7 +73,7 @@ describe('HookBody', () => {
7373
expect(HookBodyCapability.options).not.toContain('crypto.hash');
7474
});
7575

76-
it('rejects a body declaring `crypto.hash`, with the retirement prescription (#4391)', () => {
76+
it('rejects a body declaring `crypto.hash`, with the retirement prescription', () => {
7777
const r = ScriptBodySchema.safeParse({
7878
language: 'js',
7979
source: "ctx.input.fp = await ctx.crypto.hash('sha256', ctx.input.email);",
@@ -90,7 +90,7 @@ describe('HookBody', () => {
9090
expect(message).toMatch(/Delete the capability/s);
9191
});
9292

93-
it('still accepts `crypto.uuid` — the sibling that IS implemented (#4391)', () => {
93+
it('still accepts `crypto.uuid` — the sibling that IS implemented', () => {
9494
const r = ScriptBodySchema.safeParse({
9595
language: 'js',
9696
source: 'ctx.input.trace = ctx.crypto.randomUUID();',
@@ -99,7 +99,7 @@ describe('HookBody', () => {
9999
expect(r.success).toBe(true);
100100
});
101101

102-
it("gives an UNKNOWN token zod's own message, not the retirement one (#4391)", () => {
102+
it("gives an UNKNOWN token zod's own message, not the retirement one", () => {
103103
// Only the value that used to be legal gets "was removed" — telling the
104104
// author of a typo that their token was retired would misinform.
105105
const r = ScriptBodySchema.safeParse({

‎packages/spec/src/data/hook.test.ts‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe('HookEvent', () => {
3333
});
3434
});
3535

36-
describe('Removed non-dispatched events (#3195)', () => {
36+
describe('Removed non-dispatched events', () => {
3737
it('should reject per-method read and *Many events that the engine never dispatched', () => {
3838
// These were declared but never fired; the engine only ever triggers the
3939
// 8 events above. Removed rather than left as silent no-ops — read
@@ -349,7 +349,7 @@ describe('HookSchema', () => {
349349
// that the VALUE set is closed (a non-member is a VALUE error located at
350350
// `runAs`, never a top-level unrecognized key).
351351
// ---------------------------------------------------------------------------
352-
describe('runAs (#14010)', () => {
352+
describe('runAs — a hook may run as `system` or `user`, and inherits by default', () => {
353353
const base = {
354354
name: 'stamp_grade',
355355
object: 'account',
@@ -526,7 +526,7 @@ describe('HookContextSchema', () => {
526526
// it — a parsed context would lose the key and every guard downstream would
527527
// read undefined. The populate and sandbox halves are pinned where they can
528528
// execute (objectql's cascade suite; runtime's QuickJS integration pin).
529-
describe('Referential-Cleanup Marker (#13644)', () => {
529+
describe('Referential-Cleanup Marker — declared, and true only on a reference-cleanup write by the engine', () => {
530530
it('keeps referentialFieldClear through a parse, typed — the guard idiom evaluates on the parsed value', () => {
531531
const context = HookContextSchema.parse({
532532
object: 'note',
@@ -724,7 +724,7 @@ describe('HookContextSchema', () => {
724724
// #3280 made `organizationId` the blessed developer-facing name; the
725725
// `tenantId` alias was removed from this surface in v16 (#3290). A stray
726726
// `tenantId` key is now stripped by the schema rather than surfaced.
727-
it('exposes session.organizationId and no longer carries the removed tenantId alias (#3290)', () => {
727+
it('exposes session.organizationId and no longer carries the removed tenantId alias', () => {
728728
const context = HookContextSchema.parse({
729729
object: 'account',
730730
event: 'beforeInsert',
@@ -921,7 +921,7 @@ describe('HookSchema - condition property', () => {
921921
// defineHook factory (#4269)
922922
// ============================================================================
923923

924-
describe('defineHook (#4269)', () => {
924+
describe('defineHook — the authoring factory, so a hook is validated where it is written', () => {
925925
const config: Hook = {
926926
name: 'order_guard',
927927
object: 'order',
@@ -1003,7 +1003,7 @@ describe('defineHook (#4269)', () => {
10031003
* TS2578 "Unused '@ts-expect-error' directive" on the two directives below.
10041004
* Direction predicted before running it, and that is what it did.
10051005
*/
1006-
describe('session.roles retirement (#5050, ADR-0049)', () => {
1006+
describe('session.roles retirement (ADR-0049)', () => {
10071007
it('REJECTS an authored `roles`, with the prescription in the message', () => {
10081008
expect(() =>
10091009
HookContextSchema.parse({
@@ -1131,7 +1131,7 @@ describe('session.roles retirement (#5050, ADR-0049)', () => {
11311131
* `session.positions.includes(...)` as an access check is exactly what the
11321132
* `roles` tombstone above was written to stop.
11331133
*/
1134-
describe('session.positions / session.preserveAudit declaration (#5605)', () => {
1134+
describe('session.positions / session.preserveAudit declaration', () => {
11351135
it('PRESERVES `positions` through a parse instead of stripping it', () => {
11361136
const context = HookContextSchema.parse({
11371137
object: 'account',
@@ -1145,7 +1145,7 @@ describe('session.positions / session.preserveAudit declaration (#5605)', () =>
11451145
expect(context.session?.positions).toEqual(['sales_manager', 'org_admin']);
11461146
});
11471147

1148-
it('PRESERVES `preserveAudit` through a parse (#3493 has a live consumer)', () => {
1148+
it('PRESERVES `preserveAudit` through a parse (the opt-in a historical import uses to keep its audit stamps)', () => {
11491149
const context = HookContextSchema.parse({
11501150
object: 'account',
11511151
event: 'beforeInsert',
@@ -1283,7 +1283,7 @@ describe('session.positions / session.preserveAudit declaration (#5605)', () =>
12831283
* because a green companion test read as a pin is how #5605's third assertion
12841284
* nearly got over-credited.
12851285
*/
1286-
describe('HookContext.api typing (#5945)', () => {
1286+
describe('HookContext.api typing — the minimum scoped context the docs teach: `object()` and `transaction()`', () => {
12871287
/** Shaped like ObjectQL's `ScopedContext` — a live object, not authored data. */
12881288
const liveApi = {
12891289
object: (_name: string) => ({
@@ -1379,7 +1379,7 @@ describe('HookContext.api typing (#5945)', () => {
13791379
// old `timeout` is a retiredKey tombstone on this strict shape, so the
13801380
// rejection carries the RENAME (the prescription is the payload) rather than a
13811381
// bare unrecognized-key error, and the value survives at the same magnitude.
1382-
describe('hook.timeout → hook.timeoutMs (#14478, ADR-0087 `hook-timeout-to-timeout-ms`)', () => {
1382+
describe('hook.timeout → hook.timeoutMs (ADR-0087 `hook-timeout-to-timeout-ms`)', () => {
13831383
const base = { name: 'audit_order', object: 'order', events: ['afterInsert' as const], handler: 'auditOrder' };
13841384

13851385
it('REFUSES the retired `timeout` spelling with the rename in the message', () => {

‎packages/spec/src/data/import-coercion.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
} from './import-coercion';
2121
import { REFERENCE_VALUE_TYPES } from './field-value.zod';
2222

23-
describe('import boolean tokens (#4173)', () => {
23+
describe('import boolean tokens — one table for the server coercion and the Import Wizard preview', () => {
2424
it('both sets are non-empty and disjoint', () => {
2525
expect(IMPORT_BOOLEAN_TRUE_TOKENS.size).toBeGreaterThan(0);
2626
expect(IMPORT_BOOLEAN_FALSE_TOKENS.size).toBeGreaterThan(0);
@@ -45,7 +45,7 @@ describe('import boolean tokens (#4173)', () => {
4545
});
4646
});
4747

48-
describe('import reference types (#4173)', () => {
48+
describe('import reference types — exported from spec, not copied at each consumer', () => {
4949
it('is the reference value types plus the legacy generic spelling, exactly', () => {
5050
expect([...IMPORT_REFERENCE_TYPES].sort()).toEqual(
5151
[...REFERENCE_VALUE_TYPES, 'reference'].sort(),

‎packages/spec/src/data/import-mapping-target.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ describe('unknownImportMappingTargets', () => {
208208
)).toEqual([]);
209209
});
210210

211-
it('[#20149] is empty for a mapping that writes an address by its declared parts — every transform, split elements too', () => {
211+
it('is empty for a mapping that writes an address by its declared parts — every transform, split elements too', () => {
212212
expect(unknownImportMappingTargets(
213213
[
214214
{ source: 'Name', target: 'full_name' },
@@ -221,7 +221,7 @@ describe('unknownImportMappingTargets', () => {
221221
)).toEqual([]);
222222
});
223223

224-
it('[#20149] refuses a part of a field the same mapping also writes whole, naming where the whole value is written', () => {
224+
it('refuses a part of a field the same mapping also writes whole, naming where the whole value is written', () => {
225225
const misses = unknownImportMappingTargets(
226226
[
227227
{ source: 'Street', target: 'mailing_address.street' },

0 commit comments

Comments
 (0)