Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/spec/src/ui/dataset-filter-nested-relation-list.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const REFUSED: ReadonlyArray<readonly [
// §1 Both carriers refuse, at the list's own path
// ---------------------------------------------------------------------------

describe('#20080 §1 — both analytics carriers refuse a list inside a nested relation', () => {
describe('§1 — both analytics carriers refuse a list inside a nested relation, at save', () => {
it.each(REFUSED)('DatasetSchema.filter refuses %s', (_label, filter, issuePath) => {
const issue = issueAt(DatasetSchema.safeParse(withScope(filter)), `filter.${issuePath}`);
expect(issue.message).toMatch(/requires a single comparable value, but received an array/);
Expand Down Expand Up @@ -145,7 +145,7 @@ describe('#20080 §1 — both analytics carriers refuse a list inside a nested r
// §2 The carrier prints the analytics door's sentence
// ---------------------------------------------------------------------------

describe('#20080 §2 — the carrier refusal is the analytics door\'s sentence', () => {
describe('§2 — the carrier refusal is the analytics door\'s sentence', () => {
it.each(REFUSED)('%s', (_label, filter, issuePath, field, list, eq, holder) => {
const door = analyticsDoorRefusal(field, eq ? { $eq: list } : list, holder);
// The door's refusal is the ADR-0112 class-1 envelope the face throws.
Expand Down Expand Up @@ -175,7 +175,7 @@ describe('#20080 §2 — the carrier refusal is the analytics door\'s sentence',
// §3 A list the shared schema already refuses is refused once, not twice
// ---------------------------------------------------------------------------

describe('#20080 §3 — outside a nested relation the shared schema answers, once', () => {
describe('§3 — outside a nested relation the shared schema answers, once', () => {
it.each([
['top level, implicit', { region: ['a'] }, 'region', /^The implicit-equality comparand on field "region"/],
['top level, $eq', { region: { $eq: ['a'] } }, 'region.$eq', /^Operator "\$eq" on field "region"/],
Expand All @@ -192,7 +192,7 @@ describe('#20080 §3 — outside a nested relation the shared schema answers, on
// §4 CONTROLS — accepted on both carriers, and kept
// ---------------------------------------------------------------------------

describe('#20080 §4 — what a nested relation may still carry', () => {
describe('§4 — what a nested relation may still carry', () => {
const day = new Date('2026-07-01T00:00:00.000Z');
it.each([
['a scalar', { account: { region: 'a' } }],
Expand All @@ -217,7 +217,7 @@ describe('#20080 §4 — what a nested relation may still carry', () => {
expect(measure.data!.filter).toEqual(filter);
});

it('[#20116] $ne carrying a list inside a relation is refused on both carriers, in the door\'s $ne sentence', () => {
it('$ne carrying a list inside a relation is refused on both carriers, in the door\'s $ne sentence', () => {
// This row sat in the table above as "not yet at this save door (#20116)".
// #20116 routes every slot this walk reaches through the query faces'
// verdict, so the shape the analytics door refuses on chart is refused here.
Expand Down
8 changes: 4 additions & 4 deletions packages/spec/src/ui/door-reachability.testkit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const defOf = (s: unknown): unknown => (s as { _zod?: { def?: unknown } })?._zod
// derivation or a coincidence. A zod upgrade that changes `clone()` semantics
// changes the bridge's meaning, and that must be LOUD rather than silent.
// ============================================================================
describe('#5056 premise — which zod builders share the `_zod.def` object', () => {
describe('the derived-clone bridge premise — which zod builders share the `_zod.def` object', () => {
it('`.describe()` shares the def of the instance it was called on', () => {
// THE mechanism behind #5056. `clone(inst)` without an explicit def reuses
// `inst._zod.def`, so a described clone is def-IDENTICAL to its receiver.
Expand Down Expand Up @@ -104,7 +104,7 @@ describe('#5056 premise — which zod builders share the `_zod.def` object', ()
// ============================================================================
// 2. The three controls, on the instrument itself.
// ============================================================================
describe('#5056 controls — the walker finds doors, and only real ones', () => {
describe('controls — the walker finds doors, and only real ones', () => {
it('positive: live authoring roots resolve, and the graph is really walked', () => {
const { verdict, nodeCount, rootCount } = measureDoors();
expect(rootCount, 'every metadata type plus ObjectStackSchema').toBeGreaterThan(20);
Expand Down Expand Up @@ -153,7 +153,7 @@ describe('#5056 controls — the walker finds doors, and only real ones', () =>
// ============================================================================
// 3. The #5056 regression boundary itself.
// ============================================================================
describe('#5056 regression — the any-one-shared-property bridge stays dead', () => {
describe('regression — the any-one-shared-property bridge stays dead; a share of the shape decides', () => {
it('a 2-of-19 shared-leaf shape shares leaves with the live graph but is NOT derived from it', () => {
// The reverse verification, standing rather than one-shot.
//
Expand Down Expand Up @@ -213,6 +213,6 @@ describe('#5056 regression — the any-one-shared-property bridge stays dead', (
label: I18nLabelSchema.describe('Display label'),
});
expect(cloneOverlap(allSharedLeaves), '2 shared of 2 keys').toBe(1);
expect(verdict(allSharedLeaves), 'the residual false-reachable case — see #5828').toBe('derived-clone');
expect(verdict(allSharedLeaves), 'the residual false-reachable case — no threshold excludes it').toBe('derived-clone');
});
});
2 changes: 1 addition & 1 deletion packages/spec/src/ui/expression-scope-app-root.pin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const sentenceContaining = (source: string, anchor: string): string => {
/** Root tokens that are still true on these surfaces and must stay in place. */
const SURVIVING_ROOTS = ['features', 'os.user'] as const;

describe('#17203 — no UI prose face advertises `app` as an expression-scope root', () => {
describe('no UI prose face advertises `app` as an expression-scope root — the renderer no longer mounts it', () => {
describe('published faces (read by authoring tools and republished into the reference docs)', () => {
it('`PageComponentSchema.visibleWhen`.describe() does not name `app` among the mounted roots', () => {
// ⚠️ NOT `.shape` — ADR-0089 D3a made this schema a `.strict().transform(…)`
Expand Down
8 changes: 4 additions & 4 deletions packages/spec/src/ui/form-layout-inline-grid-retired.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const DOORS: readonly Door[] = [
layoutPath: ['layout'],
},
{
name: "ComponentPropsMap['object-form'] (the #5068 props gate's dispatch)",
name: "ComponentPropsMap['object-form'] (the props gate's dispatch)",
parse: (layout) => ComponentPropsMap['object-form'].safeParse({ objectName: 'crm_lead', layout }),
layoutPath: ['layout'],
},
Expand Down Expand Up @@ -86,7 +86,7 @@ const DOORS: readonly Door[] = [
},
];

describe('form `layout` — the retired arms are refused with the prescription (#20221)', () => {
describe('form `layout` — the retired arms are refused with the prescription', () => {
for (const door of DOORS) {
describe(door.name, () => {
it("'grid' → refused, prescribing 'vertical' and naming `columns` for multi-column", () => {
Expand Down Expand Up @@ -138,7 +138,7 @@ describe('form `layout` — the retired arms are refused with the prescription (
});
});

describe(`D2 conversion \`${CONVERSION_ID}\` (#20221)`, () => {
describe(`D2 conversion \`${CONVERSION_ID}\``, () => {
const conversion = CONVERSIONS_BY_MAJOR[18]!.find((c) => c.id === CONVERSION_ID);

it('is registered under protocol 18 and retired from the load path', () => {
Expand Down Expand Up @@ -217,7 +217,7 @@ describe(`D2 conversion \`${CONVERSION_ID}\` (#20221)`, () => {
});
});

describe('D3: the family entry and the chain step are registered (#20221)', () => {
describe('D3: the family entry and the chain step are registered', () => {
const step = MIGRATIONS_BY_MAJOR[18]!;

it(`the protocol-18 step wires \`${CONVERSION_ID}\``, () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/spec/src/ui/form-option-enum-derive.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ describe('ruling 乙 item 1, on real spec enums — each case with a firing and
});
});

describe('a spellable enum row with a labelled inline list (`object.sharingModel`, the #19331 shape)', () => {
describe('a spellable enum row with a labelled inline list (`object.sharingModel`, as its form row writes it)', () => {
const members = servedEnum('object', 'sharingModel');
const LABELS: Record<string, string> = {
private: 'Private — owner only',
Expand Down
10 changes: 5 additions & 5 deletions packages/spec/src/ui/i18n-label-resolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ const PARITY_VECTORS: readonly ParityVector[] = [
},
];

describe('resolveI18nLabel — rule parity with objectui pickLocalized (#6765 / #6761 ruling B)', () => {
describe('resolveI18nLabel — rule parity with objectui pickLocalized (ruled: one shared resolver, on the server)', () => {
describe('the vector table really is the reference\'s behaviour', () => {
it.each(PARITY_VECTORS)('$limb', ({ label, locale, pick }) => {
// Asserted against the copied reference FIRST. If this row is wrong, the
Expand Down Expand Up @@ -326,7 +326,7 @@ describe('resolveI18nLabel — the producer-facing return shape', () => {
expect(resolveI18nLabel({ en: '' }, 'en')).toBe('');
});

it('composes with `??` into the producer call shape #6761 needs', () => {
it('composes with `??` into the producer call shape the dataset compiler needs', () => {
// `dataset-compiler.ts:374/406` today: `typeof d.label === 'string' ? d.label : d.name`,
// which publishes the MACHINE NAME as a display title for a map label.
const dimension = { name: 'owner', label: { en: 'Owner', 'zh-CN': '负责人' } as I18nLabel };
Expand All @@ -337,7 +337,7 @@ describe('resolveI18nLabel — the producer-facing return shape', () => {
});
});

describe('resolveI18nLabel — the rule departures converged with objectui#3907; one departure survives', () => {
describe('resolveI18nLabel — the rule departures converged once objectui read only own, string-valued entries; one departure survives', () => {
// Before objectui#3907 (landed as objectui PR #4359) this module's rule
// documented two DELIBERATE narrowings of the reference. #4359 landed the
// same two guards upstream, so the copied reference now answers identically
Expand Down Expand Up @@ -372,7 +372,7 @@ describe('resolveI18nLabel — the rule departures converged with objectui#3907;
expect(resolveI18nLabel(offSpec, 'zh-CN')).toBe('Owner');
});

it('refuses an off-contract scalar rather than stringifying it — the one departure objectui#3907 did NOT touch', () => {
it('refuses an off-contract scalar rather than stringifying it — the one departure the objectui map-limb fix did NOT touch', () => {
// `pickLocalized` accepts `unknown` and stringifies numbers/booleans
// (`pickLocalized(42, 'en')` is `'42'`). This resolver's parameter is the
// declared `I18nLabel`, so the shapes below are type errors — the
Expand All @@ -388,7 +388,7 @@ describe('resolveI18nLabel — the rule departures converged with objectui#3907;
});
});

describe('resolveI18nLabel — the type signature refuses the calls that caused #6761', () => {
describe('resolveI18nLabel — the type signature refuses the calls behind the dropped dataset label', () => {
// Reverse verification at the type level. `check:test-typecheck` compiles this
// file (packages/spec/tsconfig.test.json), so each directive below is a REAL
// check: delete the argument it guards and tsc goes red on the unused
Expand Down
12 changes: 6 additions & 6 deletions packages/spec/src/ui/i18n.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('I18nLabelSchema', () => {
// runtime to the same line. Each rejection pin asserts the named error
// content (issue code + message), not just parse failure.

it('rejects a lone `key` — the enforcement hole #10492 closes', () => {
it('rejects a lone `key`, which used to parse as a locale map', () => {
const r = I18nLabelSchema.safeParse({ key: 'common.save' });
expect(r.success).toBe(false);
const issues = JSON.stringify(r.error?.issues);
Expand Down Expand Up @@ -164,7 +164,7 @@ describe('I18nLabelSchema', () => {
expect(
description,
'no key is generated for any label — a plain string is translatable only where a resolver + '
+ 'translation slot exist for its surface (#5377)',
+ 'translation slot exist for its surface',
).not.toMatch(/auto-generated/i);
});
});
Expand All @@ -186,7 +186,7 @@ describe('AriaPropsSchema', () => {
expect(result.ariaLabel).toBe('Close dialog');
});

it('accepts ariaLabel as an inline locale map — it rides `I18nLabelSchema` (#5728)', () => {
it('accepts ariaLabel as an inline locale map — it rides `I18nLabelSchema`', () => {
const result = AriaPropsSchema.parse({ ariaLabel: { en: 'Close dialog', 'zh-CN': '关闭对话框' } });
expect(result.ariaLabel).toEqual({ en: 'Close dialog', 'zh-CN': '关闭对话框' });
});
Expand All @@ -200,7 +200,7 @@ describe('AriaPropsSchema', () => {
})).toThrow();
});

it('does not promise a generated translation key for `ariaLabel` either (#5377)', () => {
it('does not promise a generated translation key for `ariaLabel` either', () => {
// The reporter's second surviving point. `ariaLabel` overrides the shared
// describe, so it never carried the "auto-generated" sentence verbatim —
// but it inherited the assumption, and there is no bundle slot addressing
Expand Down Expand Up @@ -271,7 +271,7 @@ function reject(schema: { safeParse: (v: unknown) => { success: boolean; error?:
return JSON.stringify(r.error?.issues ?? []);
}

describe('#4001 批 16 — AriaPropsSchema is closed (the door is real)', () => {
describe('批 16 — AriaPropsSchema is closed (the door is real)', () => {
it('the controls parse — this suite fails closed, not by rejecting everything', () => {
expect(AriaPropsSchema.safeParse({}).success).toBe(true);
expect(AriaPropsSchema.safeParse({ ariaLabel: 'Close dialog' }).success).toBe(true);
Expand Down Expand Up @@ -371,7 +371,7 @@ describe('#4001 批 16 — AriaPropsSchema is closed (the door is real)', () =>
expect(reject(objectuiAria as never, { ariaLabel: 'x', bogus: 1 })).toContain('these ARIA attributes');
});

it('has no `.merge()` riders left at all — the four it had were retired at #4988', async () => {
it('has no `.merge()` riders left at all — the four it had were retired with the interaction-config family', async () => {
// REPLACED WHOLESALE at #4988, not re-spelled. This test used to name five
// shapes in `animation` / `dnd` / `keyboard` / `touch` and assert each still
// accepted an undeclared key, because `X.merge(AriaPropsSchema.partial())`
Expand Down
2 changes: 1 addition & 1 deletion packages/spec/src/ui/inline-action-type.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const legacyTo: InlineAction = { type: 'url', to: '/pricing' };
const scalar: InlineAction = 42;
void [fromUnknown, scalar];

describe('[#19920] InlineAction is an inline action body, not unknown', () => {
describe('InlineAction is an inline action body, not unknown', () => {
it.each([
['a url action', urlAction],
['an api action with a static payload', apiAction],
Expand Down
6 changes: 3 additions & 3 deletions packages/spec/src/ui/inline-action.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('InlineActionSchema — identity is optional, unlike a registered actio
* same-name union. `bodyExtra` is that key — already declared on `ActionSchema`
* for `type:'api'` bodies, now picked onto the inline shape.
*/
describe('InlineActionSchema — `bodyExtra` is the payload key, `params` is not (#5777)', () => {
describe('InlineActionSchema — `bodyExtra` is the payload key, `params` is not', () => {
it('accepts the showcase submit button verbatim, `{{page.<var>}}` tokens included', () => {
// examples/app-showcase/src/ui/pages/contact-form.page.ts — the site the
// #5068 gate reported. Values are template tokens, not literals: the
Expand Down Expand Up @@ -222,7 +222,7 @@ describe('InlineActionSchema — `bodyExtra` is the payload key, `params` is not
* regression that drops either arm is a wrong instruction again, and the bare
* "expected array, received object" would keep a `toThrow()`-shaped test green.
*/
describe('object-form `params` prescribes per action type (#6828)', () => {
describe('object-form `params` prescribes per action type — its url meaning is retired, not re-keyed', () => {
/** The `params` issue a parse produced, or a readable failure if it produced none. */
const paramsIssue = (r: { success: boolean; error?: z.ZodError }) => {
expect(r.success).toBe(false);
Expand Down Expand Up @@ -380,7 +380,7 @@ describe('element:button declares its action', () => {
expect(r.success).toBe(false);
});

it('carries an api payload through to parse output (#5777, end to end)', () => {
it('carries an api payload through to parse output (end to end)', () => {
// The #5068 gate parses `properties` through this schema, so this is the
// exact call whose `component-props-invalid` finding the showcase page
// produced before the ruling.
Expand Down
8 changes: 4 additions & 4 deletions packages/spec/src/ui/interaction-config-retirement.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import {
// conditional-type pin in this package was a no-op until #5286 (tsconfig excluded
// `**/*.test.ts`; vitest never enables `typecheck`), so the compiler-API walk
// with anti-vacuity guards is the load-bearing instrument.
describe('[#4988] ui/ interaction config family retirement', () => {
describe('ui/ interaction config family retirement — renderer behaviour, not authored metadata', () => {
/** Every name the five modules exported (32 schema/enum consts + 32 types). */
const RETIRED_NAMES = [
// touch.zod.ts
Expand Down Expand Up @@ -145,7 +145,7 @@ describe('[#4988] ui/ interaction config family retirement', () => {
// ── ABSENCE (every entry, not just ./ui) ──────────────────────────────
for (const name of RETIRED_NAMES) {
const holders = holdersOf(name);
expect(holders, `${name} must have zero holders after #4988`).toEqual([]);
expect(holders, `${name} must have zero holders after the family retirement`).toEqual([]);
}

// ── SURVIVAL (on ./ui, where they live) ───────────────────────────────
Expand Down Expand Up @@ -186,7 +186,7 @@ describe('[#4988] ui/ interaction config family retirement', () => {
}
};
walk(srcRoot);
expect(importers, 'a resurrected import means the retirement is being undone — re-read #4988').toEqual([]);
expect(importers, 'a resurrected import means the retirement is being undone — these are renderer behaviour, not authored metadata').toEqual([]);
});

it('runtime namespace agrees with the compiler view', async () => {
Expand All @@ -200,7 +200,7 @@ describe('[#4988] ui/ interaction config family retirement', () => {
}
});

it('the bare `ConflictResolution` name is now published by NOBODY — #4738 left it to ./ui alone', async () => {
it('the bare `ConflictResolution` name is now published by NOBODY — the connector-side rename left it to ./ui alone', async () => {
// #4738 renamed the connector-side enum to `ConnectorConflictResolution`
// BECAUSE `ui/offline.zod.ts` owned the bare name. That owner is gone, so
// the bare name is unowned rather than re-homed: the rename is not undone
Expand Down
2 changes: 1 addition & 1 deletion packages/spec/src/ui/joined-report-block-type.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const reportWithScalarBlock: Report = { name: 'r', label: 'R', type: 'joined', b
const parsedScalarBlock: ParsedBlock = 42;
void [fromUnknown, scalar, undeclaredKey, retiredChart, nestedJoined, reportWithScalarBlock, parsedScalarBlock];

describe('[#19920] JoinedReportBlock is a joined-report block, not unknown', () => {
describe('JoinedReportBlock is a joined-report block, not unknown', () => {
it('each block typed as JoinedReportBlock parses at the block door', () => {
for (const block of [openBlock, listBlock]) {
expect(JoinedReportBlockSchema.safeParse(block).success).toBe(true);
Expand Down
Loading
Loading