From 21f39afe57f3bf38fc7c8ae3a8e22a2b800cddbc Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 5 Oct 2026 10:56:29 +0000 Subject: [PATCH] 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 --- packages/spec/src/data/filter.test.ts | 36 +++++----- .../data/form-delete-behavior-options.test.ts | 2 +- .../src/data/form-return-type-options.test.ts | 2 +- packages/spec/src/data/hook-body.test.ts | 8 +-- packages/spec/src/data/hook.test.ts | 20 +++--- .../spec/src/data/import-coercion.test.ts | 4 +- .../src/data/import-mapping-target.test.ts | 4 +- .../injected-system-column-provenance.test.ts | 4 +- .../src/data/injected-system-columns.test.ts | 2 +- ...grid-column-currency-scale-refused.test.ts | 10 +-- .../src/data/inline-related-columns.test.ts | 6 +- .../src/data/managed-api-affordance.test.ts | 4 +- .../spec/src/data/masked-field-types.test.ts | 2 +- .../numeric-column-representation.test.ts | 2 +- .../spec/src/data/object-image-field.test.ts | 2 +- .../data/object-strictness-batch20.test.ts | 26 +++---- packages/spec/src/data/object.test.ts | 72 +++++++++---------- 17 files changed, 103 insertions(+), 103 deletions(-) diff --git a/packages/spec/src/data/filter.test.ts b/packages/spec/src/data/filter.test.ts index 5dd40a1afe7..d356b1d391f 100644 --- a/packages/spec/src/data/filter.test.ts +++ b/packages/spec/src/data/filter.test.ts @@ -74,7 +74,7 @@ describe('ComparisonOperatorSchema', () => { // rather than an ISO refinement. // ========================================================================== - describe('string comparands (#5685)', () => { + describe('string comparands — the ordering slots take a string, which is what the date macros emit', () => { const OPS = ['$gt', '$gte', '$lt', '$lte'] as const; /** `resolveFilterTokens` returns `asYmd(...)` for every calendar-day token. */ @@ -163,7 +163,7 @@ describe('ComparisonOperatorSchema', () => { // `filter-comparand-shape.test.ts`. // ========================================================================== - describe('null comparand (#14080)', () => { + describe('null comparand — refused in the four ordering slots, like a null list member', () => { const OPS = ['$gt', '$gte', '$lt', '$lte'] as const; const messagesOf = (result: { error?: { issues: Array<{ message: string }> } }): string => (result.error?.issues ?? []).map((i) => i.message).join('\n'); @@ -194,7 +194,7 @@ describe('ComparisonOperatorSchema', () => { expect(nested.success).toBe(false); }); - it('the null PREDICATES are untouched — $eq: null / $ne: null keep parsing (#5332)', () => { + it('the null PREDICATES are untouched — $eq: null / $ne: null keep parsing', () => { expect(FieldOperatorsSchema.safeParse({ $eq: null }).success).toBe(true); expect(FieldOperatorsSchema.safeParse({ $ne: null }).success).toBe(true); // The normalized AST is a logical group at its root (a bare field @@ -256,7 +256,7 @@ describe('SetOperatorSchema', () => { // on a missing prescription is not coverage of this ruling. // ========================================================================== - describe('$field members are refused (#7596)', () => { + describe('$field members are refused', () => { it('refuses a $field member of $in, naming the index and the alternative', () => { const result = SetOperatorSchema.safeParse({ $in: ['won', { $field: 'budget' }] }); expect(result.success).toBe(false); @@ -295,7 +295,7 @@ describe('SetOperatorSchema', () => { expect(SetOperatorSchema.safeParse({ $in: [] }).success).toBe(true); }); - it('refuses a null member of $in / $nin — ruled 2026-08-31 (#13357)', () => { + it('refuses a null member of $in / $nin — ruled 2026-08-31', () => { for (const op of ['$in', '$nin'] as const) { const result = SetOperatorSchema.safeParse({ [op]: ['won', null] }); expect(result.success, op).toBe(false); @@ -361,7 +361,7 @@ describe('RangeOperatorSchema', () => { // parse verdicts on a declaration surface, not runtime refusals.) // ========================================================================== - describe('string endpoints (#6571)', () => { + describe('string endpoints — `$between` takes the ISO and clock strings the platform produces', () => { /** * `resolveFilterTokens`' `walk` descends into arrays, and every branch of * the resolver returns a string, so a token range resolves to two strings: @@ -469,7 +469,7 @@ describe('RangeOperatorSchema', () => { // was. // ========================================================================== - describe('$field endpoints are refused (#7596)', () => { + describe('$field endpoints are refused', () => { it('refuses a $field LOWER bound, naming index 0 and the alternative', () => { const result = RangeOperatorSchema.safeParse({ $between: [{ $field: 'a.min' }, '2026-12-31'], @@ -546,7 +546,7 @@ describe('RangeOperatorSchema', () => { * always rejected both), and the pair above them is what moved — which is * exactly the evidence that the two faces now agree. */ - it('the whole-filter face refuses these field conditions too — #7711 (was green pre-#7711)', () => { + it('the whole-filter face refuses these field conditions too — green while the group branch was a non-strict catch-all', () => { const withReference = NormalizedFilterSchema.safeParse({ $and: [{ amount: { $between: [{ $field: 'budget' }, 100] } }], }); @@ -573,7 +573,7 @@ describe('RangeOperatorSchema', () => { * is the SCALAR comparand, and it is also what the refusal above prescribes. * If this went red the refusal message would be sending authors nowhere. */ - it('leaves the four ORDERING slots taking a reference — #5222, and the prescribed alternative', () => { + it('leaves the four ORDERING slots taking a reference — a column-to-column comparison, and the prescribed alternative', () => { expect(ComparisonOperatorSchema.safeParse({ $gt: { $field: 'budget' } }).success).toBe(true); expect(FieldOperatorsSchema.safeParse({ $gte: { $field: 'a.min' }, $lte: { $field: 'a.max' }, @@ -605,7 +605,7 @@ describe('RangeOperatorSchema', () => { // (`filter-comparand-shape.test.ts`). // ========================================================================== - describe('blank $between endpoints are refused (#18012)', () => { + describe('blank $between endpoints are refused', () => { const issuesOf = (result: { error?: { issues: Array<{ path: PropertyKey[]; message: string }> } }) => result.error?.issues ?? []; @@ -676,7 +676,7 @@ describe('RangeOperatorSchema', () => { * face about each slot, so both are refused on save, at the endpoint, in the * sentence the enforced operator slot prints for the same pair. */ - it('is refused by FilterConditionSchema too, at the endpoint, in the operator slot\'s words (#20116)', () => { + it('is refused by FilterConditionSchema too, at the endpoint, in the operator slot\'s words', () => { const blank = FilterConditionSchema.safeParse({ age: { $between: [18, ''] } }); expect(blank.success).toBe(false); expect(issuesOf(blank).map((i) => i.path)).toEqual([['age', '$between', 1]]); @@ -1069,7 +1069,7 @@ describe('TypeScript Type System', () => { * (the second reads `undefined`, not `never`: the old guard's `never` meets * the slot's own `?`, and an optional `never` IS `undefined`.) */ - it('accepts an ISO string on a Date field and orders string fields (#5685)', () => { + it('accepts an ISO string on a Date field and orders string fields', () => { interface Deal { close_date: Date; // resolved date macro arrives as 'YYYY-MM-DD' shift_start: string; // Field.time — 'HH:MM[:SS[.fff]]' @@ -1098,7 +1098,7 @@ describe('TypeScript Type System', () => { * recorded: the old guard's `never` meets the slot's own `?`, and an optional * `never` IS `undefined`.) */ - it('accepts a resolved macro range on a Date field and ranges string fields (#6571)', () => { + it('accepts a resolved macro range on a Date field and ranges string fields', () => { interface Deal { close_date: Date; // a resolved token range arrives as two 'YYYY-MM-DD' shift_start: string; // Field.time — 'HH:MM[:SS[.fff]]' @@ -1459,7 +1459,7 @@ describe('NormalizedFilterSchema', () => { // as well: the catch-all returned `{}` for the member it admitted, so the // parse output no longer carried the condition it was asked about. // ========================================================================== - describe('#7711 — a member the field-condition branch refuses has nowhere to land', () => { + describe('a member the field-condition branch refuses has nowhere to land', () => { /** The card's clean control: `$null` has never been anything but a boolean. */ it('rejects a $and member whose operator map FieldOperatorsSchema refuses', () => { const result = NormalizedFilterSchema.safeParse({ @@ -1538,7 +1538,7 @@ describe('NormalizedFilterSchema', () => { * the field-condition branch as an empty record, which is what lets the * group branch be `.strict()` without touching any of them. */ - it('leaves the #5322 empty-combinator identities accepted', () => { + it('leaves the empty-combinator identities accepted — each reduces to its boolean unit', () => { for (const identity of [{}, { $and: [] }, { $or: [] }, { $or: [{}] }, { $not: {} }]) { expect(NormalizedFilterSchema.safeParse(identity).success).toBe(true); } @@ -1848,7 +1848,7 @@ describe('VALID_AST_OPERATORS', () => { // corpus and the memory evaluator's pins — not here. // ============================================================================ -describe('FieldReferenceSchema.addDays (#14104)', () => { +describe('FieldReferenceSchema.addDays — a whole-day offset on a reference, an integer or another column', () => { const firstIssue = (result: { error?: { issues: Array<{ code: string; path: PropertyKey[]; message: string }> } }) => result.error?.issues[0]; @@ -1959,7 +1959,7 @@ describe('FieldReferenceSchema.addDays (#14104)', () => { expect(firstIssue(enforced)?.message.startsWith('addDays must be an integer or a { "$field" } reference')).toBe(true); }); - it('adds no LIST position — a reference carrying addDays is refused where a bare one is (#7596)', () => { + it('adds no LIST position — a reference carrying addDays is refused where a bare one is', () => { const result = SetOperatorSchema.safeParse({ $in: [{ $field: 'due_date', addDays: 1 }] }); expect(result.success).toBe(false); expect(firstIssue(result)?.path).toEqual(['$in', 0]); @@ -1995,7 +1995,7 @@ describe('FieldReferenceSchema.addDays (#14104)', () => { * and refuses `.` and `/` alike, so a slash-separated or unbackticked * respelling trips it too. */ -describe('filter.zod.ts docblock @examples (#16923)', () => { +describe('filter.zod.ts docblock @examples — a `$field` comparand names a column of the same row', () => { const HERE = dirname(fileURLToPath(import.meta.url)); const SOURCE = readFileSync(resolve(HERE, 'filter.zod.ts'), 'utf8'); diff --git a/packages/spec/src/data/form-delete-behavior-options.test.ts b/packages/spec/src/data/form-delete-behavior-options.test.ts index 20b55b64c26..c4a5039b58f 100644 --- a/packages/spec/src/data/form-delete-behavior-options.test.ts +++ b/packages/spec/src/data/form-delete-behavior-options.test.ts @@ -175,7 +175,7 @@ const FORMS = [ // ──────────────────────────────────────────────────────────────────────────── -describe('#11410 — `deleteBehavior` is never offered a value the schema refuses', () => { +describe('`deleteBehavior` is never offered a value the schema refuses', () => { describe('the derived option source, which is why an explicit list is required', () => { it('offers all three values, and defaults to the one a master_detail refuses', () => { const node = derivedDeleteBehaviorNode(); diff --git a/packages/spec/src/data/form-return-type-options.test.ts b/packages/spec/src/data/form-return-type-options.test.ts index 666732761cd..7711e01bfac 100644 --- a/packages/spec/src/data/form-return-type-options.test.ts +++ b/packages/spec/src/data/form-return-type-options.test.ts @@ -144,7 +144,7 @@ function formulaFieldWith(returnType: string): Record { // ──────────────────────────────────────────────────────────────────────────── -describe('#19677 — `returnType` is never offered a value the schema refuses', () => { +describe('`returnType` is never offered a value the schema refuses', () => { it('derives a non-empty closed member set from FieldSchema', () => { // The floor for every assertion below: an empty or unreadable derivation // would make the set-equality checks vacuously true. diff --git a/packages/spec/src/data/hook-body.test.ts b/packages/spec/src/data/hook-body.test.ts index 83c117a2e11..89309fe281a 100644 --- a/packages/spec/src/data/hook-body.test.ts +++ b/packages/spec/src/data/hook-body.test.ts @@ -62,7 +62,7 @@ describe('HookBody', () => { // #4391. These assertions are what must go red if any of them comes back // WITHOUT an implementation behind it. - it('does not offer `crypto.hash` as a capability token (#4391)', () => { + it('does not offer `crypto.hash` as a capability token', () => { expect(HookBodyCapability.options).toEqual([ 'api.read', 'api.write', @@ -73,7 +73,7 @@ describe('HookBody', () => { expect(HookBodyCapability.options).not.toContain('crypto.hash'); }); - it('rejects a body declaring `crypto.hash`, with the retirement prescription (#4391)', () => { + it('rejects a body declaring `crypto.hash`, with the retirement prescription', () => { const r = ScriptBodySchema.safeParse({ language: 'js', source: "ctx.input.fp = await ctx.crypto.hash('sha256', ctx.input.email);", @@ -90,7 +90,7 @@ describe('HookBody', () => { expect(message).toMatch(/Delete the capability/s); }); - it('still accepts `crypto.uuid` — the sibling that IS implemented (#4391)', () => { + it('still accepts `crypto.uuid` — the sibling that IS implemented', () => { const r = ScriptBodySchema.safeParse({ language: 'js', source: 'ctx.input.trace = ctx.crypto.randomUUID();', @@ -99,7 +99,7 @@ describe('HookBody', () => { expect(r.success).toBe(true); }); - it("gives an UNKNOWN token zod's own message, not the retirement one (#4391)", () => { + it("gives an UNKNOWN token zod's own message, not the retirement one", () => { // Only the value that used to be legal gets "was removed" — telling the // author of a typo that their token was retired would misinform. const r = ScriptBodySchema.safeParse({ diff --git a/packages/spec/src/data/hook.test.ts b/packages/spec/src/data/hook.test.ts index 6a6e0f9c3f5..1996e245073 100644 --- a/packages/spec/src/data/hook.test.ts +++ b/packages/spec/src/data/hook.test.ts @@ -33,7 +33,7 @@ describe('HookEvent', () => { }); }); - describe('Removed non-dispatched events (#3195)', () => { + describe('Removed non-dispatched events', () => { it('should reject per-method read and *Many events that the engine never dispatched', () => { // These were declared but never fired; the engine only ever triggers the // 8 events above. Removed rather than left as silent no-ops — read @@ -349,7 +349,7 @@ describe('HookSchema', () => { // that the VALUE set is closed (a non-member is a VALUE error located at // `runAs`, never a top-level unrecognized key). // --------------------------------------------------------------------------- - describe('runAs (#14010)', () => { + describe('runAs — a hook may run as `system` or `user`, and inherits by default', () => { const base = { name: 'stamp_grade', object: 'account', @@ -526,7 +526,7 @@ describe('HookContextSchema', () => { // it — a parsed context would lose the key and every guard downstream would // read undefined. The populate and sandbox halves are pinned where they can // execute (objectql's cascade suite; runtime's QuickJS integration pin). - describe('Referential-Cleanup Marker (#13644)', () => { + describe('Referential-Cleanup Marker — declared, and true only on a reference-cleanup write by the engine', () => { it('keeps referentialFieldClear through a parse, typed — the guard idiom evaluates on the parsed value', () => { const context = HookContextSchema.parse({ object: 'note', @@ -724,7 +724,7 @@ describe('HookContextSchema', () => { // #3280 made `organizationId` the blessed developer-facing name; the // `tenantId` alias was removed from this surface in v16 (#3290). A stray // `tenantId` key is now stripped by the schema rather than surfaced. - it('exposes session.organizationId and no longer carries the removed tenantId alias (#3290)', () => { + it('exposes session.organizationId and no longer carries the removed tenantId alias', () => { const context = HookContextSchema.parse({ object: 'account', event: 'beforeInsert', @@ -921,7 +921,7 @@ describe('HookSchema - condition property', () => { // defineHook factory (#4269) // ============================================================================ -describe('defineHook (#4269)', () => { +describe('defineHook — the authoring factory, so a hook is validated where it is written', () => { const config: Hook = { name: 'order_guard', object: 'order', @@ -1003,7 +1003,7 @@ describe('defineHook (#4269)', () => { * TS2578 "Unused '@ts-expect-error' directive" on the two directives below. * Direction predicted before running it, and that is what it did. */ -describe('session.roles retirement (#5050, ADR-0049)', () => { +describe('session.roles retirement (ADR-0049)', () => { it('REJECTS an authored `roles`, with the prescription in the message', () => { expect(() => HookContextSchema.parse({ @@ -1131,7 +1131,7 @@ describe('session.roles retirement (#5050, ADR-0049)', () => { * `session.positions.includes(...)` as an access check is exactly what the * `roles` tombstone above was written to stop. */ -describe('session.positions / session.preserveAudit declaration (#5605)', () => { +describe('session.positions / session.preserveAudit declaration', () => { it('PRESERVES `positions` through a parse instead of stripping it', () => { const context = HookContextSchema.parse({ object: 'account', @@ -1145,7 +1145,7 @@ describe('session.positions / session.preserveAudit declaration (#5605)', () => expect(context.session?.positions).toEqual(['sales_manager', 'org_admin']); }); - it('PRESERVES `preserveAudit` through a parse (#3493 has a live consumer)', () => { + it('PRESERVES `preserveAudit` through a parse (the opt-in a historical import uses to keep its audit stamps)', () => { const context = HookContextSchema.parse({ object: 'account', event: 'beforeInsert', @@ -1283,7 +1283,7 @@ describe('session.positions / session.preserveAudit declaration (#5605)', () => * because a green companion test read as a pin is how #5605's third assertion * nearly got over-credited. */ -describe('HookContext.api typing (#5945)', () => { +describe('HookContext.api typing — the minimum scoped context the docs teach: `object()` and `transaction()`', () => { /** Shaped like ObjectQL's `ScopedContext` — a live object, not authored data. */ const liveApi = { object: (_name: string) => ({ @@ -1379,7 +1379,7 @@ describe('HookContext.api typing (#5945)', () => { // old `timeout` is a retiredKey tombstone on this strict shape, so the // rejection carries the RENAME (the prescription is the payload) rather than a // bare unrecognized-key error, and the value survives at the same magnitude. -describe('hook.timeout → hook.timeoutMs (#14478, ADR-0087 `hook-timeout-to-timeout-ms`)', () => { +describe('hook.timeout → hook.timeoutMs (ADR-0087 `hook-timeout-to-timeout-ms`)', () => { const base = { name: 'audit_order', object: 'order', events: ['afterInsert' as const], handler: 'auditOrder' }; it('REFUSES the retired `timeout` spelling with the rename in the message', () => { diff --git a/packages/spec/src/data/import-coercion.test.ts b/packages/spec/src/data/import-coercion.test.ts index 726b824b713..4a788fe3751 100644 --- a/packages/spec/src/data/import-coercion.test.ts +++ b/packages/spec/src/data/import-coercion.test.ts @@ -20,7 +20,7 @@ import { } from './import-coercion'; import { REFERENCE_VALUE_TYPES } from './field-value.zod'; -describe('import boolean tokens (#4173)', () => { +describe('import boolean tokens — one table for the server coercion and the Import Wizard preview', () => { it('both sets are non-empty and disjoint', () => { expect(IMPORT_BOOLEAN_TRUE_TOKENS.size).toBeGreaterThan(0); expect(IMPORT_BOOLEAN_FALSE_TOKENS.size).toBeGreaterThan(0); @@ -45,7 +45,7 @@ describe('import boolean tokens (#4173)', () => { }); }); -describe('import reference types (#4173)', () => { +describe('import reference types — exported from spec, not copied at each consumer', () => { it('is the reference value types plus the legacy generic spelling, exactly', () => { expect([...IMPORT_REFERENCE_TYPES].sort()).toEqual( [...REFERENCE_VALUE_TYPES, 'reference'].sort(), diff --git a/packages/spec/src/data/import-mapping-target.test.ts b/packages/spec/src/data/import-mapping-target.test.ts index 86200e37b71..aed8d7d5921 100644 --- a/packages/spec/src/data/import-mapping-target.test.ts +++ b/packages/spec/src/data/import-mapping-target.test.ts @@ -208,7 +208,7 @@ describe('unknownImportMappingTargets', () => { )).toEqual([]); }); - it('[#20149] is empty for a mapping that writes an address by its declared parts — every transform, split elements too', () => { + it('is empty for a mapping that writes an address by its declared parts — every transform, split elements too', () => { expect(unknownImportMappingTargets( [ { source: 'Name', target: 'full_name' }, @@ -221,7 +221,7 @@ describe('unknownImportMappingTargets', () => { )).toEqual([]); }); - it('[#20149] refuses a part of a field the same mapping also writes whole, naming where the whole value is written', () => { + it('refuses a part of a field the same mapping also writes whole, naming where the whole value is written', () => { const misses = unknownImportMappingTargets( [ { source: 'Street', target: 'mailing_address.street' }, diff --git a/packages/spec/src/data/injected-system-column-provenance.test.ts b/packages/spec/src/data/injected-system-column-provenance.test.ts index dd546ce15fc..fa86236158a 100644 --- a/packages/spec/src/data/injected-system-column-provenance.test.ts +++ b/packages/spec/src/data/injected-system-column-provenance.test.ts @@ -50,7 +50,7 @@ const local = () => ({ fields: { email: { type: 'text', label: 'Email' } }, }); -describe('[#8116] provenance derivation at its spec home', () => { +describe('provenance derivation at its spec home — where the author-time linter can reach it', () => { it('marks all seven anchors unprovisioned on an external object, none on the local twin', () => { expect(unprovisionedInjectedColumns(external()).sort()).toEqual([...SEVEN_ANCHORS].sort()); expect(unprovisionedInjectedColumns(local())).toEqual([]); @@ -93,7 +93,7 @@ describe('[#8116] provenance derivation at its spec home', () => { expect(platformProvisionsStorage(undefined)).toBe(true); }); - it('isInjectedColumnDefinition (newly public, #8116) reproduces the strip/provenance identity verdict', () => { + it('isInjectedColumnDefinition (newly public) reproduces the strip/provenance identity verdict', () => { // Byte-identical copy of a table ⇒ the platform's anchor. expect(isInjectedColumnDefinition({ ...OWNER_FIELD_DEF }, OWNER_FIELD_DEF)).toBe(true); // Any mismatch — extra key, changed value, unrecognisable shape ⇒ the diff --git a/packages/spec/src/data/injected-system-columns.test.ts b/packages/spec/src/data/injected-system-columns.test.ts index d8055c3800c..8f1ec718386 100644 --- a/packages/spec/src/data/injected-system-columns.test.ts +++ b/packages/spec/src/data/injected-system-columns.test.ts @@ -14,7 +14,7 @@ import { resolveInjectedSystemColumns } from './injected-system-columns'; // — because only that package can import both; this file pins the derivation's // own contract, which is what author-time consumers read. // --------------------------------------------------------------------------- -describe('resolveInjectedSystemColumns (#5378)', () => { +describe('resolveInjectedSystemColumns — the injected columns, so author-time validation resolves them too', () => { const business = { name: 'crm_contact', fields: { name: { type: 'text' } } }; it('gives a default business object every system column', () => { diff --git a/packages/spec/src/data/inline-grid-column-currency-scale-refused.test.ts b/packages/spec/src/data/inline-grid-column-currency-scale-refused.test.ts index 6424e7799ef..3470f40fc14 100644 --- a/packages/spec/src/data/inline-grid-column-currency-scale-refused.test.ts +++ b/packages/spec/src/data/inline-grid-column-currency-scale-refused.test.ts @@ -74,7 +74,7 @@ function expectRuledRemedy(message: string): void { expect(message).not.toMatch(/currencyConfig|precision/); } -describe('#20045 — `scale` on a currency inline grid column is refused at parse', () => { +describe('`scale` on a currency inline grid column is refused at parse', () => { it('refuses the card\'s repro (computed currency column, `scale: 4`), located at the column\'s `scale`, with the ruled remedy', () => { const result = parseColumns([ { name: 'quantity' }, @@ -126,7 +126,7 @@ describe('#20045 — `scale` on a currency inline grid column is refused at pars }); }); -describe('#20045 — CONTROLS: what the refusal must leave alone', () => { +describe('CONTROLS: what the refusal must leave alone', () => { it('`scale` on a `number` column parses, computed or not, and keeps its value', () => { for (const computed of [{}, { computed: true, expr: 'quantity * unit_price' }]) { const result = parseColumns([{ name: 'weight', type: 'number', ...computed, scale: 3 }]); @@ -169,7 +169,7 @@ describe('#20045 — CONTROLS: what the refusal must leave alone', () => { }); }); -describe('#20045 — SHAPE PARITY with the currency FIELD refusal (ruling B carried, not reworded)', () => { +describe('SHAPE PARITY with the currency FIELD refusal (its ruled text carried, not reworded)', () => { it('both refusals open with the same sentence, subject swapped, and share the minor-unit clause', () => { const field = FieldSchema.safeParse({ name: 'amount', label: 'Amount', type: 'currency', scale: 2 }) as Result; const column = parseColumns([{ name: 'amount', type: 'currency', scale: 2 }]); @@ -185,7 +185,7 @@ describe('#20045 — SHAPE PARITY with the currency FIELD refusal (ruling B carr }); }); -describe('#20045 — the column describes', () => { +describe('the column describes', () => { const shape = InlineGridColumnSchema.shape as Record; it('`prefix` replaces the resolved currency symbol and promises no default', () => { @@ -202,7 +202,7 @@ describe('#20045 — the column describes', () => { }); }); -describe('#20045 — the ADR-0087 D3 entry', () => { +describe('the ADR-0087 D3 entry', () => { it('is registered under protocol major 18 with a replacement that deletes the key and names no carrier', () => { const entry = MIGRATIONS_BY_MAJOR[18]?.semantic.find((e) => e.id === 'inline-grid-column-currency-scale-refused'); expect(entry).toBeDefined(); diff --git a/packages/spec/src/data/inline-related-columns.test.ts b/packages/spec/src/data/inline-related-columns.test.ts index 1635849e2e4..22f7af7cd33 100644 --- a/packages/spec/src/data/inline-related-columns.test.ts +++ b/packages/spec/src/data/inline-related-columns.test.ts @@ -78,7 +78,7 @@ const rejectField = (patch: Record): string => // =========================================================================== // 1. inlineColumns — the strict name-keyed grid column // =========================================================================== -describe('#9227 inlineColumns — strict name-keyed element', () => { +describe('inlineColumns — strict name-keyed element', () => { it('accepts identity-only entries (the showcase invoice fixture form)', () => { const parsed = acceptField({ inlineEdit: 'grid', @@ -226,7 +226,7 @@ describe('#9227 inlineColumns — strict name-keyed element', () => { * (GridField.tsx), which throws `RangeError` above 100. Asserted THROUGH the * door, like everything else in this file. */ - it('refuses a computed column whose `scale` is past the renderer ceiling (#18972)', () => { + it('refuses a computed column whose `scale` is past the renderer ceiling', () => { acceptField({ inlineEdit: 'grid', inlineColumns: [{ name: 'amount', computed: true, expr: 'quantity * unit_price', scale: 100 }], @@ -250,7 +250,7 @@ describe('#9227 inlineColumns — strict name-keyed element', () => { // =========================================================================== // 2. relatedListColumns — child field-name strings only // =========================================================================== -describe('#9227 relatedListColumns — strings only', () => { +describe('relatedListColumns — strings only', () => { it('accepts the in-repo showcase spellings', () => { const parsed = acceptField({ relatedListColumns: ['name', 'status', 'total', 'issued_on'], diff --git a/packages/spec/src/data/managed-api-affordance.test.ts b/packages/spec/src/data/managed-api-affordance.test.ts index 69e875cc4fa..e3538062c0b 100644 --- a/packages/spec/src/data/managed-api-affordance.test.ts +++ b/packages/spec/src/data/managed-api-affordance.test.ts @@ -44,7 +44,7 @@ describe('checkManagedApiMethodAffordances — the contradiction it names', () = expect(verbs(conflicts)).toEqual(['create', 'delete']); }); - it('covers the legacy `upsert`/`purge` verbs a raw whitelist may still carry (#3543)', () => { + it('covers the legacy `upsert`/`purge` verbs a raw whitelist may still carry', () => { const conflicts = checkManagedApiMethodAffordances( managed({ enable: { apiMethods: ['upsert', 'purge'] } }), ); @@ -54,7 +54,7 @@ describe('checkManagedApiMethodAffordances — the contradiction it names', () = ]); }); - it('is the exact shape #7521 was filed for (sys_environment / sys_package)', () => { + it('is the exact shape the boot only warned about, now named at authoring time (sys_environment / sys_package)', () => { // `managedBy: 'platform'` grants CRUD by default, so the contradiction here // comes from `userActions` CLOSING the writes while `apiMethods` still // advertises them. This declaration booted the control plane for months. diff --git a/packages/spec/src/data/masked-field-types.test.ts b/packages/spec/src/data/masked-field-types.test.ts index 197142ddeb1..88c2a1f08ac 100644 --- a/packages/spec/src/data/masked-field-types.test.ts +++ b/packages/spec/src/data/masked-field-types.test.ts @@ -21,7 +21,7 @@ const MANAGED_BY_BUCKETS: readonly string[] = ( ObjectSchema.shape.managedBy as unknown as { unwrap(): { options: readonly string[] } } ).unwrap().options; -describe('MASKED_ON_READ_FIELD_TYPES — the declaration (ADR-0100 / #20141)', () => { +describe('MASKED_ON_READ_FIELD_TYPES — the declaration (ADR-0100)', () => { it('declares exactly `secret` (always) and `password` (exempt on better-auth objects)', () => { expect(JSON.parse(JSON.stringify(MASKED_ON_READ_FIELD_TYPES))).toEqual({ secret: { exemptManagedBy: [] }, diff --git a/packages/spec/src/data/numeric-column-representation.test.ts b/packages/spec/src/data/numeric-column-representation.test.ts index 692d1d1de89..54047df3d89 100644 --- a/packages/spec/src/data/numeric-column-representation.test.ts +++ b/packages/spec/src/data/numeric-column-representation.test.ts @@ -21,7 +21,7 @@ import { numericColumnFor, } from './numeric-column-representation'; -describe('#16318 — the numeric physical-representation table', () => { +describe('the numeric physical-representation table — one table the driver and the migration generators both read', () => { it('names every member of NUMERIC_VALUE_TYPES and nothing else', () => { expect(Object.keys(NUMERIC_COLUMN_REPRESENTATION).sort()).toEqual([...NUMERIC_VALUE_TYPES].sort()); }); diff --git a/packages/spec/src/data/object-image-field.test.ts b/packages/spec/src/data/object-image-field.test.ts index 9597b301a0c..9f6f65ff398 100644 --- a/packages/spec/src/data/object-image-field.test.ts +++ b/packages/spec/src/data/object-image-field.test.ts @@ -46,7 +46,7 @@ function refusedAt(input: unknown) { return issue; } -describe('[#21182] `imageField` names a declared `image` or `avatar` field of the same object', () => { +describe('`imageField` names a declared `image` or `avatar` field of the same object', () => { it('accepts an `image` field (control)', () => { const parsed = ObjectSchema.safeParse(account('logo')); expect(parsed.success, parsed.success ? '' : JSON.stringify(parsed.error.issues)).toBe(true); diff --git a/packages/spec/src/data/object-strictness-batch20.test.ts b/packages/spec/src/data/object-strictness-batch20.test.ts index ef4454c63ac..7228fd54575 100644 --- a/packages/spec/src/data/object-strictness-batch20.test.ts +++ b/packages/spec/src/data/object-strictness-batch20.test.ts @@ -90,7 +90,7 @@ const rejectOnObject = (patch: Record): string => reject(Object // =========================================================================== // 1. The doors — a parse must exist, or none of the rest means anything // =========================================================================== -describe('#4001 批 20 — the doors these shapes are reachable through', () => { +describe('批 20, unknown keys refused — the doors these shapes are reachable through', () => { it('the `object` metadata type resolves to a registered schema (the save-time 422 door)', () => { expect(getMetadataTypeSchema('object')).toBeDefined(); }); @@ -121,7 +121,7 @@ describe('#4001 批 20 — the doors these shapes are reachable through', () => accept(ObjectExtensionSchema, { extend: 'contact', fields: {} }); }); - it('the root itself was already closed — this batch is the level BELOW it (#1535/#4519/#4522)', () => { + it('the root itself was already closed, on parse as well as create() — this batch is the level BELOW it', () => { expect(rejectOnObject({ notAnObjectKey: 1 })).toContain('notAnObjectKey'); }); }); @@ -129,7 +129,7 @@ describe('#4001 批 20 — the doors these shapes are reachable through', () => // =========================================================================== // 2. Every closed site, at its own path, through its real carrier // =========================================================================== -describe('#4001 批 20 — closed sites reject unknown keys where they live', () => { +describe('批 20 — closed sites reject unknown keys where they live', () => { it('`access` — the ADR-0066 D2 exposure posture', () => { accept(ObjectAccessConfigSchema, { default: 'private' }); expect(reject(ObjectAccessConfigSchema, { default: 'private', notAnAccessKey: 1 })).toContain('notAnAccessKey'); @@ -184,7 +184,7 @@ describe('#4001 批 20 — closed sites reject unknown keys where they live', () expect(rejectOnObject({ systemFields: { tenant: true, notASystemFieldKey: 1 } })).toContain('notASystemFieldKey'); }); - it('⚠️ `systemFields` is the batch\'s ONE #5014 flattening — pinned honestly, including the part that does not reach the author', () => { + it('⚠️ `systemFields` is the batch\'s ONE union flattened to a bare `Invalid input` — pinned honestly, including the part that does not reach the author', () => { // This site is a union (`z.literal(false) | {…}`), so its rejection is an // `invalid_union` whose OWN message is the bare "Invalid input" — the // curated prescription is real, but it sits one level down in @@ -226,7 +226,7 @@ describe('#4001 批 20 — closed sites reject unknown keys where they live', () // =========================================================================== // 3. The curation — every alias and guidance entry is a CLAIM (finding 18) // =========================================================================== -describe('#4001 批 20 — curation is anchored to the sibling contract that makes it true', () => { +describe('批 20, unknown keys refused — curation is anchored to the sibling contract that makes it true', () => { it('the bare rejection already names the surface and echoes the key — curation is an upgrade, not a precondition', () => { const msg = rejectOnObject({ publicSharing: { enabled: true, notASharingKey: 1 } }); expect(msg).toContain('publicSharing'); @@ -278,7 +278,7 @@ describe('#4001 批 20 — curation is anchored to the sibling contract that mak // not. Nothing here asserts anything about what `LifecycleSchema` ACCEPTS, // which is unchanged (the `onlyWhen`-vs-rotation `superRefine` carries the // same dialect-specific reason and is deliberately left alone). - it('`lifecycle.storage.maxAge` points SIDEWAYS at `retention` — and qualifies the mechanism it contrasts, which is SQLite-only (#6631)', () => { + it('`lifecycle.storage.maxAge` points SIDEWAYS at `retention` — and qualifies the mechanism it contrasts, which is SQLite-only', () => { const rotating = { strategy: 'rotation', shards: 7, unit: 'day' } as const; const msg = rejectOnObject({ lifecycle: { class: 'telemetry', storage: { ...rotating, maxAge: '7d' } } }); @@ -308,7 +308,7 @@ describe('#4001 批 20 — curation is anchored to the sibling contract that mak expect(msg).not.toContain('does not reap by age'); }); - it("`lifecycle.storage.strategy`'s description carries the same qualifier — `(O(1) reclaim)` is a property of SQLite, not of the strategy (#6631)", () => { + it("`lifecycle.storage.strategy`'s description carries the same qualifier — `(O(1) reclaim)` is a property of SQLite, not of the strategy", () => { const doc = LifecycleSchema.shape.storage.unwrap().shape.strategy.description ?? ''; // Anti-vacuity: an empty description satisfies every negative assertion @@ -348,7 +348,7 @@ describe('#4001 批 20 — curation is anchored to the sibling contract that mak // handoff) quietly does nothing. The assertions below are anchored to the // injection authority rather than to the sentence, so the prescription can // only stay green while it still describes what really happens. - it("`systemFields.owner`'s prescription matches the injection authority — `'org'` SKIPS `owner_id`, it does not pick a different principal (#6365)", () => { + it("`systemFields.owner`'s prescription matches the injection authority — `'org'` SKIPS `owner_id`, it does not pick a different principal", () => { // The authority `applySystemFields` consumes (`resolveInjectedSystemColumns`). // `'org'` sits with `'none'` on the withheld side, not opposite it. expect(resolveInjectedSystemColumns({ ...OBJ, ownership: 'org' }).owner).toBe(false); @@ -377,7 +377,7 @@ describe('#4001 批 20 — curation is anchored to the sibling contract that mak expect(msg).toContain('business_unit'); }); - it('`systemFields.ownership` names BOTH ownership anchors — since #5677 the property governs `owning_business_unit_id` too (#6365)', () => { + it('`systemFields.ownership` names BOTH ownership anchors — since the unit anchor is injected, the property governs `owning_business_unit_id` too', () => { const msg = rejectOnObject({ systemFields: { tenant: true, ownership: 'none' } }); expect(msg).toContain('TOP-LEVEL'); expect(msg).toContain('owner_id'); @@ -419,7 +419,7 @@ describe('#4001 批 20 — curation is anchored to the sibling contract that mak expect(msg).toContain('VIEW'); }); - it('the two `userActions` vocabularies stay disjoint — re-checked mechanically, not assumed (#11195)', () => { + it('the two `userActions` vocabularies stay disjoint, the three adopted view keys included — re-checked mechanically, not assumed', () => { // The enumeration above is prose and can drift; this reads the VIEW // block's real shape. The object block's five verbs are transcribed — // they are pinned individually across this file — and the overlap is @@ -436,7 +436,7 @@ describe('#4001 批 20 — curation is anchored to the sibling contract that mak } }); - it('`userActions.group` / `.hideFields` / `.rowColor` name the VIEW block, same as `sort` (#11459)', () => { + it('`userActions.group` / `.hideFields` / `.rowColor` name the VIEW block, same as `sort`', () => { // The three keys adopted onto the view's vocabulary by commit b37231883 got only // the generic unknown-key rejection on the object block — no curated // pointer — until this card added one, mirroring `sort`/`search`/ @@ -525,7 +525,7 @@ describe('#4001 批 20 — curation is anchored to the sibling contract that mak // =========================================================================== // 4. The formerly-held `IndexSchema` — closed once its producer converged // =========================================================================== -describe('#4001 批 20 — `IndexSchema` is closed (the held 14th site, after objectui#4772)', () => { +describe('批 20 — `IndexSchema` is closed (the held 14th site, once the console index editor converged on it)', () => { it('declared keys still parse, at every spelling ADR-0120 declares', () => { accept(IndexSchema, { fields: ['name'] }); accept(IndexSchema, { name: 'idx_probe', fields: ['name'], unique: true }); @@ -560,7 +560,7 @@ describe('#4001 批 20 — `IndexSchema` is closed (the held 14th site, after ob expect(reject(IndexSchema, { fields: ['name'], notAnIndexKey: 1 })).not.toContain('database layer'); }); - it('the `type`/`partial` tombstones SURVIVE the strict close — their prescription, not `unrecognized_keys` (#5114 class)', () => { + it('the `type`/`partial` tombstones SURVIVE the strict close — their prescription, not `unrecognized_keys`', () => { // The tombstones are declared keys, so the strict unknown-key path never // sees them; each still answers its own migration text. Losing that prose // to a generic strict rejection would be a regression the close must not diff --git a/packages/spec/src/data/object.test.ts b/packages/spec/src/data/object.test.ts index d5b8f24390b..5633632b74b 100644 --- a/packages/spec/src/data/object.test.ts +++ b/packages/spec/src/data/object.test.ts @@ -102,7 +102,7 @@ describe('ObjectCapabilities', () => { expect(message).not.toContain('Did you mean'); }); - it('emission order: which key is wrong → the fix → the history, last (#5955)', () => { + it('emission order: which key is wrong → the fix → the history, last', () => { const message = capabilityRejection({ trash: false, searchible: true }); const preamble = 'Unrecognized key(s) on `enable`:'; const fix = 'os migrate meta --from 16'; @@ -185,11 +185,11 @@ describe('LifecycleSchema (ADR-0057)', () => { // declared, so a triple whose ttl diverges from the age bound leaves // `retention.maxAge` declared but enforced by nothing — refused at parse // time unless the ttl restates the age bound (same clock, same window). - describe('retention + ttl + archive triple (#10527)', () => { + describe('retention + ttl + archive triple — refused unless the ttl restates the age bound', () => { const messagesOf = (result: ReturnType) => result.success ? '' : result.error.issues.map((i) => i.message).join('\n'); - it('still accepts the #10347-ruled ttl + archive pair (no retention)', () => { + it('still accepts the ttl + archive pair, whose ttl cutoff picks the rows to archive (no retention)', () => { const result = LifecycleSchema.safeParse({ class: 'audit', ttl: { field: 'expires_at', expireAfter: '90d' }, @@ -261,7 +261,7 @@ describe('LifecycleSchema (ADR-0057)', () => { } }); - it('accepts retention.onlyWhen with scalar and $in predicates (#2834 mixed tables)', () => { + it('accepts retention.onlyWhen with scalar and $in predicates (mixed tables, where only terminal rows age out)', () => { const result = LifecycleSchema.safeParse({ class: 'telemetry', retention: { @@ -286,7 +286,7 @@ describe('LifecycleSchema (ADR-0057)', () => { } }); - it('accepts ttl.onlyWhen with the canonical null predicate — the #10165 acceptance shape', () => { + it('accepts ttl.onlyWhen with the canonical null predicate — so rows whose value is absent are spared', () => { // The exact declaration this card unblocks (#7826 writes it on sys_session). const result = LifecycleSchema.safeParse({ class: 'transient', @@ -295,7 +295,7 @@ describe('LifecycleSchema (ADR-0057)', () => { expect(result.success).toBe(true); }); - it('accepts the null predicate on retention.onlyWhen too — one shared value union (#10165)', () => { + it('accepts the null predicate on retention.onlyWhen too — one shared value union', () => { // The two blocks are declared mirrors; the union is one schema on purpose, // so the absence member cannot exist on one side and not the other. const result = LifecycleSchema.safeParse({ @@ -332,7 +332,7 @@ describe('LifecycleSchema (ADR-0057)', () => { } }); - it('rejects ttl.onlyWhen combined with rotation storage (shard DROPs ignore filters) — #10165', () => { + it('rejects ttl.onlyWhen combined with rotation storage (shard DROPs ignore filters)', () => { const result = LifecycleSchema.safeParse({ class: 'telemetry', ttl: { field: 'created_at', expireAfter: '14d', onlyWhen: { status: 'done' } }, @@ -341,7 +341,7 @@ describe('LifecycleSchema (ADR-0057)', () => { expect(result.success).toBe(false); }); - it('rejects ttl.onlyWhen combined with archive (archive takes over; the ttl sweep never runs) — #10165', () => { + it('rejects ttl.onlyWhen combined with archive (archive takes over; the ttl sweep never runs)', () => { const result = LifecycleSchema.safeParse({ class: 'audit', ttl: { field: 'expires_at', expireAfter: '90d', onlyWhen: { revoked_at: { $null: true } } }, @@ -429,7 +429,7 @@ describe('IndexSchema', () => { * class). The tombstone is what makes the removal audible, so these tests pin * the PRESCRIPTION, not merely the rejection. */ -describe('IndexSchema retired keys (#5248 / #4943)', () => { +describe('IndexSchema retired keys', () => { it('REJECTS `type`, with the fix and the reason in the message', () => { expect(() => IndexSchema.parse({ fields: ['tags'], type: 'gin' })) .toThrow(/`indexes\[\]\.type` was removed.*no driver ever read it.*Delete the key/s); @@ -1098,7 +1098,7 @@ describe('ObjectSchema.create()', () => { // Before, the registry read it via `(schema as any).ownership` while // ObjectSchema.create() rejected it as an unknown key; these lock the two ends // together. - describe('ownership record-model field (#3175)', () => { + describe('ownership record-model field — declared, so the opt-out the registry reads can be authored', () => { it('accepts the record-ownership opt-out values the registry reads', () => { for (const ownership of ['user', 'business_unit', 'org', 'none'] as const) { const obj = ObjectSchema.create({ name: 'catalog', ownership, fields: { title: { type: 'text' } } }); @@ -1159,7 +1159,7 @@ describe('ObjectSchema.create()', () => { // column stays provisioned-but-inert, so an object declaring this tier gets // the COLUMN today and no value in it. Do not read acceptance here as a // decision on any of them. - it('accepts `business_unit` and resolves it to D1s row — owner_id withheld, unit anchor injected (#4611 → #5678)', () => { + it('accepts `business_unit` and resolves it to D1s row — owner_id withheld, unit anchor injected', () => { const obj = ObjectSchema.create({ name: 'inventory_item', ownership: 'business_unit', @@ -1177,7 +1177,7 @@ describe('ObjectSchema.create()', () => { expect(plan.names.has('owning_business_unit_id')).toBe(true); }); - it('still rejects a fifth value, and the rejection enumerates all four legal values (#4611 → #5678)', () => { + it('still rejects a fifth value, and the rejection enumerates all four legal values', () => { let message = ''; try { ObjectSchema.create({ @@ -1201,7 +1201,7 @@ describe('ObjectSchema.create()', () => { // ADR-0032 "no silent failure" for metadata shape (issue #1535): unknown // top-level keys used to be stripped silently, shipping dead metadata. - describe('unknown-key rejection (#1535)', () => { + describe('unknown-key rejection', () => { it('rejects object-level `workflows` with guidance toward hooks/record_change', () => { expect(() => ObjectSchema.create({ name: 'demo', @@ -1234,7 +1234,7 @@ describe('ObjectSchema.create()', () => { // key.toLowerCase())`), so a declared key's capitals were never charged to // the author here. Pinning it means the two suggesters cannot drift apart // again — this is the property #4990 fixed in the other one. - it('suggestKey judges a typo identically in either case (#4990 note 1)', () => { + it('suggestKey judges a typo identically in either case', () => { const bullet = (key: string): string => { try { ObjectSchema.create({ @@ -1277,7 +1277,7 @@ describe('ObjectSchema.create()', () => { expect(message).toContain('retired in 11.9.1'); }); - it('tombstone: dead metadata keys removed in 16.0 (#2377) carry upgrade guidance', () => { + it('tombstone: dead metadata keys removed in 16.0 carry upgrade guidance', () => { const cases: Array<[string, unknown, string]> = [ ['versioning', { enabled: true }, 'trackHistory'], ['softDelete', { enabled: true }, 'hard deletes'], @@ -1367,7 +1367,7 @@ describe('ObjectSchema.create()', () => { // removed, the directive goes unused and `check:test-typecheck` fails; // - the `.toThrow` is the RUNTIME pin — the strict parse stays the // enforcement of record, unchanged, for non-literal (dynamic) configs. - describe('excess-key rejection on nested action-param literals (#12615)', () => { + describe('excess-key rejection on nested action-param literals', () => { it('a typo\'d param key is refused at compile time AND still refused by the load-time strict parse', () => { expect(() => ObjectSchema.create({ name: 'demo', @@ -1435,7 +1435,7 @@ describe('ObjectSchema.create()', () => { // (#9138 — commit 75b7c240a, maintainer ruling Direction 2 / ADR-0055) // ============================================================================ -describe('ObjectSchema.create() forces a required master_detail under controlled_by_parent (#9138)', () => { +describe('ObjectSchema.create() forces a required master_detail under controlled_by_parent', () => { it('forces required: true when `required` is omitted on the master reference', () => { const obj = ObjectSchema.create({ name: 'cbp_line', @@ -1660,7 +1660,7 @@ describe('ObjectSchema semantic roles (ADR-0085)', () => { expect(ObjectSchema.safeParse({ name: 'lead', fields: {}, stageField: 3 }).success).toBe(false); }); - it('accepts highlightFields; the retired compactLayout alias no longer parses through (framework#2536)', () => { + it('accepts highlightFields; the retired compactLayout alias no longer parses through', () => { const direct = ObjectSchema.parse({ name: 'account', fields: {}, highlightFields: ['name', 'industry'], }); @@ -1710,7 +1710,7 @@ describe('ObjectSchema semantic roles (ADR-0085)', () => { }); }); -describe('ObjectSchema editMode (#11408 — declared by maintainer ruling, #10144 family)', () => { +describe('ObjectSchema editMode (declared by maintainer ruling: the renderer reads it, so the spec declares it)', () => { it('accepts both enum values through the strict parse and carries them on the output', () => { // Full parse green (not merely "no unrecognized_keys"): the ruling adopts // the key as authored surface, so a legal document must parse end to end. @@ -1915,8 +1915,8 @@ describe('ADR-0066 — object access posture (D2) + requiredPermissions (D3)', ( }); }); -describe('TenancyConfigSchema — #2763 strategy/crossTenantAccess removal', () => { - it('accepts the two live knobs and materializes NO tenantField default (#5315)', () => { +describe('TenancyConfigSchema — strategy/crossTenantAccess removal', () => { + it('accepts the two live knobs and materializes NO tenantField default', () => { // An undeclared tenant column stays undeclared. The old `.default('tenant_id')` // invented a column name the platform does not use and no consumer could act // on — the effective column is resolved by the driver, which falls back to @@ -1932,7 +1932,7 @@ describe('TenancyConfigSchema — #2763 strategy/crossTenantAccess removal', () .toEqual({ enabled: false, tenantField: 'workspace_id' }); }); - it('rejects the retired stamp-only `organizationField` with its prescription (#19054)', () => { + it('rejects the retired stamp-only `organizationField` with its prescription', () => { // The shape this used to accept, verbatim — the one declaration the whole // protocol ever carried (`sys_api_key`, commit 7901b2dd2). The block is `.strict()`, // so the key is REFUSED with the guidance row rather than stripped: a @@ -1954,7 +1954,7 @@ describe('TenancyConfigSchema — #2763 strategy/crossTenantAccess removal', () expect(message).toContain('os migrate meta --from 17'); }); - it('the surviving shape is exactly `enabled` + `tenantField` (#19054)', () => { + it('the surviving shape is exactly `enabled` + `tenantField`', () => { // The positive half of the retirement: what the credential table declares // now parses, and carries no residue of the removed key. const result = TenancyConfigSchema.parse({ enabled: false }); @@ -1983,7 +1983,7 @@ describe('TenancyConfigSchema — #2763 strategy/crossTenantAccess removal', () expect(message).toContain('externalSharingModel'); }); - it('rejects arbitrary unknown tenancy keys instead of silently stripping them (#1535)', () => { + it('rejects arbitrary unknown tenancy keys instead of silently stripping them', () => { // Truly arbitrary — no tombstone, no near-declared-key. Rejected with the // surface named; there is nothing more the message can honestly offer. const result = TenancyConfigSchema.safeParse({ enabled: true, zzNotAKey: 1 }); @@ -1992,7 +1992,7 @@ describe('TenancyConfigSchema — #2763 strategy/crossTenantAccess removal', () .toContain('Unrecognized key(s) on `tenancy`: `zzNotAKey`'); }); - it('a near-miss of a live key gets the template rename, not a dead-end verdict (#6619)', () => { + it('a near-miss of a live key gets the template rename, not a dead-end verdict', () => { // While the map was hand-written, `tenantfield` was answered with // "`tenantfield` is not a `tenancy` key." — a verdict that names the // problem and never the fix. The fold onto `strictObject` brought the @@ -2037,7 +2037,7 @@ describe('TenancyConfigSchema — #2763 strategy/crossTenantAccess removal', () * ORDER pins, not presence checks. Every `toContain` in the block above stays * green under either order — that is exactly why they cannot carry this fact. */ -describe('tenancy unknown-key message order — bullets before the explainer (#6416 / #6619)', () => { +describe('tenancy unknown-key message order — bullets before the explainer', () => { const EXPLAINER = 'The two supported tenancy modes are: database-per-tenant = environment-level ' + 'deployment (no object config); row-level isolation = `tenancy.enabled` + ' + @@ -2101,7 +2101,7 @@ describe('tenancy unknown-key message order — bullets before the explainer (#6 }); }); -describe('isTenancyDisabled — platform-global posture predicate (#3249, ADR-0066)', () => { +describe('isTenancyDisabled — platform-global posture predicate (ADR-0066)', () => { it('is true only for an explicit tenancy.enabled === false', () => { expect(isTenancyDisabled({ name: 'sys_license', tenancy: { enabled: false } })).toBe(true); expect(isTenancyDisabled({ name: 'task', tenancy: { enabled: true } })).toBe(false); @@ -2132,7 +2132,7 @@ describe('isTenancyDisabled — platform-global posture predicate (#3249, ADR-00 * which those tests can only observe indirectly: fail-CLOSED, with the three * unreadable cases collapsing to ONE answer. */ -describe('isPublicSharingEnabled — standing share-link policy predicate (#14935, #14637)', () => { +describe('isPublicSharingEnabled — the one canonical standing share-link policy predicate', () => { it('is true only for an explicit publicSharing.enabled === true', () => { expect(isPublicSharingEnabled({ name: 'article', publicSharing: { enabled: true } })).toBe(true); expect(isPublicSharingEnabled({ name: 'article', publicSharing: { enabled: false } })).toBe(false); @@ -2188,7 +2188,7 @@ describe('isPublicSharingEnabled — standing share-link policy predicate (#1493 }); }); -describe('userActions row predicates + resolveCrudAffordances (objectui#2614)', () => { +describe('userActions row predicates + resolveCrudAffordances', () => { it('accepts the plain boolean form unchanged (back-compat)', () => { const obj = ObjectSchema.parse({ name: 'invoice', @@ -2271,7 +2271,7 @@ describe('userActions row predicates + resolveCrudAffordances (objectui#2614)', // Same union, same schema piece — only the binding differs (per toolbar rather // than per row), which the schema's docblock states rather than inventing a // second dialect. -describe('userActions.create / .import toolbar predicates (#7692)', () => { +describe('userActions.create / .import toolbar predicates', () => { it('keeps parsing the plain boolean form for create and import (back-compat)', () => { const obj = ObjectSchema.parse({ name: 'invoice', @@ -2427,7 +2427,7 @@ describe('ObjectSchema.create() password-field author warning (ADR-0100)', () => expect(warn).not.toHaveBeenCalled(); }); - it('does NOT warn when the field affirms intent with ackPlaintextMasking (#3420)', () => { + it('does NOT warn when the field affirms intent with ackPlaintextMasking', () => { const warn = vi.spyOn(console, 'warn').mockImplementation(() => {}); ObjectSchema.create({ name: 'adr0100_acked_pw', @@ -2467,7 +2467,7 @@ describe('ObjectSchema.create() password-field author warning (ADR-0100)', () => // says the read mask applies. If `MASKED_ON_READ_FIELD_TYPES.password // .exemptManagedBy` changes, this stays green only because the warning follows; // a warning that hard-codes its own bucket goes red here. - describe('[#20141] the exemption is read from MASKED_ON_READ_FIELD_TYPES', () => { + describe('the exemption is read from MASKED_ON_READ_FIELD_TYPES', () => { const buckets = ( ObjectSchema.shape.managedBy as unknown as { unwrap(): { options: readonly string[] } } ).unwrap().options; @@ -2502,7 +2502,7 @@ describe('ObjectSchema.create() password-field author warning (ADR-0100)', () => // NOTE: the strip warning dedups per distinct legacy combination for the // process lifetime, so each test below uses a distinct combination. // --------------------------------------------------------------------------- -describe('#3543 apiMethods legacy-value strip (ObjectCapabilities)', () => { +describe('apiMethods legacy-value strip (ObjectCapabilities)', () => { afterEach(() => vi.restoreAllMocks()); it('strips a legacy value and keeps the declared primitives', () => { @@ -2568,7 +2568,7 @@ describe('#3543 apiMethods legacy-value strip (ObjectCapabilities)', () => { * These are the pin tests for that contract. Every one of them fails on the * pre-fix tree. */ -describe('managedBy: retiring the overloaded `system` bucket (#3355)', () => { +describe('managedBy: retiring the overloaded `system` bucket', () => { const object = (managedBy: string, extra: Record = {}) => ({ name: 'sys_thing', label: 'Thing', @@ -2630,7 +2630,7 @@ describe('managedBy: retiring the overloaded `system` bucket (#3355)', () => { * about import" is the safe one, which is the shape that matters most for * model-authored object metadata. */ - describe('`system-data` makes CSV import opt-IN (#4671)', () => { + describe('`system-data` makes CSV import opt-IN', () => { it('does not grant import by bucket default', () => { expect(resolveCrudAffordances({ managedBy: 'system-data' } as never).import).toBe(false); }); @@ -2720,7 +2720,7 @@ describe('managedBy: retiring the overloaded `system` bucket (#3355)', () => { * letting `constructor`/`prototype` through some other path, breaks these * without anyone reading zod's changelog first. */ -describe('ObjectSchema.fields — __proto__ / constructor / prototype key refusal (#17852)', () => { +describe('ObjectSchema.fields — __proto__ / constructor / prototype key refusal', () => { // `JSON.parse` is what makes `__proto__` land as an OWN enumerable key // (an object literal's `{ __proto__: ... }` sets the actual prototype // instead) — the exact shape the original defect report measured and the