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
42 changes: 21 additions & 21 deletions packages/spec/src/system/metadata-form-zod-reconciliation.test.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/spec/src/system/metadata-persistence.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ describe('PackagePublishResultSchema', () => {
// (`filesystem-loader.ts`, `database-loader.ts`) or writes a literal `0`
// (`memory-loader.ts`, `remote-loader.ts`). Milliseconds, integral, non-negative
// — which is exactly `DurationMs`.
describe('metadata load/save result durations declare milliseconds (#18124)', () => {
describe('metadata load/save result durations declare milliseconds', () => {
it('loadTime refuses a fractional millisecond count and a negative span', () => {
const fractional = MetadataLoadResultSchema.safeParse({ data: null, loadTime: 42.5 });
expect(fractional.success).toBe(false);
Expand Down
8 changes: 4 additions & 4 deletions packages/spec/src/system/metrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ describe('MetricsConfigSchema', () => {
// gate's mechanical `sizeSeconds`: `size` is byte/row-count vocabulary elsewhere
// in this spec, and the parent key is already `window`, so `windowSeconds` would
// read `window.windowSeconds`.
describe('metrics window and period lengths carry their unit (#15679)', () => {
describe('metrics window and period lengths carry their unit in the key name', () => {
const sliBase = {
name: 'api_availability',
label: 'API Availability',
Expand Down Expand Up @@ -581,7 +581,7 @@ describe('metrics window and period lengths carry their unit (#15679)', () => {
// Three of the five new names are not the mechanical suffix: see the tombstone
// prose on each key for why `windowSeconds`, `periodSeconds` and a bare
// `intervalSeconds` were rejected.
describe('metrics JSDoc-only durations carry their unit (#15939, #14478)', () => {
describe('metrics JSDoc-only durations carry their unit in the describe and the key name', () => {
const sliBase = {
name: 'api_availability',
label: 'API Availability',
Expand Down Expand Up @@ -734,7 +734,7 @@ describe('metrics JSDoc-only durations carry their unit (#15939, #14478)', () =>
//
// Both keep the `.positive()` floor they already declared, so the accepted set
// narrows only by the integer requirement `DurationSeconds` carries.
describe('metrics duration rows declare seconds through the type (#18124)', () => {
describe('metrics duration rows declare seconds through the type', () => {
const window = { durationSeconds: 300, sliding: true };

it('slideInterval refuses a fractional second count', () => {
Expand Down Expand Up @@ -821,7 +821,7 @@ describe('metrics duration rows declare seconds through the type (#18124)', () =
* delete it, because the day it silently stops being true is the day the
* retirement stops being audible in one of its two spellings.
*/
describe('#18118 ServiceLevelIndicator.successCriteria — the retired CEL arm', () => {
describe('ServiceLevelIndicator.successCriteria — the retired CEL arm', () => {
const sli = (successCriteria: unknown) => ServiceLevelIndicatorSchema.safeParse({
name: 'api_latency',
label: 'API Latency',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const PRE_RETIREMENT_MATRIX = `/**
* - \`details.outcome\`: the four-valued result, verbatim.
*/`;

describe('[#16194] adr-0030-notification-event: the id left the creation-attested set', () => {
describe('adr-0030-notification-event: the id left the creation-attested set', () => {
it('CREATION_ATTESTED_MIGRATION_IDS is exactly the TWO surviving ids, in order', () => {
// Literal on purpose. A length alone would not notice which member went,
// and a `not.toContain` alone would pass on an array that lost everything.
Expand Down Expand Up @@ -157,12 +157,12 @@ describe('[#16194] adr-0030-notification-event: the id left the creation-atteste
});
});

describe('[#16194] adr-0030-notification-event: the ruled receipt-claim matrix is withdrawn', () => {
describe('adr-0030-notification-event: the ruled receipt-claim matrix is withdrawn', () => {
it("the id's docblock no longer states a ledger-claim matrix", () => {
const doc = notificationEventDoc();
expect(
statesClaimMatrix(doc),
'a receipt-claim matrix is back on an id no code can write a row for — re-read #16194',
'a receipt-claim matrix is back on an id no code can write a row for — its runner was retired, with no operator door and no boot-time invoker',
).toBe(false);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/spec/src/system/notification.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('NotificationChannelSchema', () => {
// gate that cannot fail. Sabotage-verified in the PR: S1 re-declares a removed
// const in notification.zod.ts, S2 re-exports it from another entry under the
// bare name (the route a "./system does not export it" assertion would miss).
describe('[#4616] notification-template orphan removal', () => {
describe('notification-template orphan removal', () => {
/** Names that must not be exported by ANY public entry point. */
const REMOVED = [
// #4616 — this change.
Expand Down
2 changes: 1 addition & 1 deletion packages/spec/src/system/object-storage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ describe('ObjectStorageConfigSchema', () => {
// twin mirrors carries no unit token. No gate can catch the twin being renamed
// along with this one — the marker exempts it either way — so a find-and-replace
// that harmonised the two would land silently. The pin below is the only guard.
describe('object-storage durations carry their unit (#15679)', () => {
describe('object-storage durations carry their unit in the key name', () => {
it('REFUSES the retired `AccessControlConfig.maxAge` with the rename in the message', () => {
const result = AccessControlConfigSchema.safeParse({ corsEnabled: true, maxAge: 3600 });
expect(result.success).toBe(false);
Expand Down
6 changes: 3 additions & 3 deletions packages/spec/src/system/operation-message.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ describe('operation message catalog', () => {
* `packages/plugins/plugin-security/src/permission-denied-user-copy.test.ts`,
* against the real middleware and a real `II18nService`.
*/
describe('operation message catalog — permission_denied (#7414)', () => {
describe('operation message catalog — permission_denied, the 403 refusal as localized user copy', () => {
/**
* The vocabulary a business user must never read in a permission refusal.
* `positions` is the internal authorization noun the reporter quoted; the
Expand Down Expand Up @@ -190,7 +190,7 @@ describe('operation message catalog — permission_denied (#7414)', () => {
* capability AND-gate) deliberately reuses it, so its catalog coverage above is
* already the coverage for that gate.
*/
describe('operation message catalog — the row-level user copy (#7451)', () => {
describe('operation message catalog — the row-level user copy, a sentence per situation', () => {
/**
* The vocabulary a business user must never read in a row-level refusal. It
* is the #7414 list plus the two nouns these particular gates leaked:
Expand Down Expand Up @@ -303,7 +303,7 @@ describe('operation message catalog — the row-level user copy (#7451)', () =>
* this catalog block is the only pin the keys have — same battery the #7451
* family keys get.
*/
describe('operation message catalog — sharing write denial and approvals recall (#12493)', () => {
describe('operation message catalog — sharing write denial and approvals recall, two keys of their own', () => {
/**
* The vocabulary a business user must never read in these refusals. It is
* the #7451 list plus the exact nouns the two measured raw strings leaked:
Expand Down
2 changes: 1 addition & 1 deletion packages/spec/src/system/registry-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ describe('RegistryConfigSchema', () => {
// lines apart, both bare, and the `min(1000)` bound on the timeout reads as one
// second under the right unit and sixteen minutes under the wrong one — both in
// range, so no parse could have caught the mistake.
describe('registry duration keys carry their unit (#15679)', () => {
describe('registry duration keys carry their unit in the key name', () => {
const url = 'https://registry.example.com';

it('REFUSES the retired `syncInterval` with the rename in the message', () => {
Expand Down
10 changes: 5 additions & 5 deletions packages/spec/src/system/settings-manifest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ describe('SpecifierSchema — layout-only specifiers', () => {
});
});

describe('SpecifierValueDomainSchema — the closed standard-domain vocabulary (#5933)', () => {
describe('SpecifierValueDomainSchema — the closed standard-domain vocabulary', () => {
it('accepts exactly the three domains with measured authoring pull', () => {
for (const d of ['iana_time_zone', 'iso_4217_currency', 'iso_3166_alpha2']) {
expect(() => SpecifierValueDomainSchema.parse(d)).not.toThrow();
Expand Down Expand Up @@ -227,7 +227,7 @@ describe('SpecifierValueDomainSchema — the closed standard-domain vocabulary (
});
});

describe('Specifier.valueDomain (#5933)', () => {
describe('Specifier.valueDomain — a declared standard domain is the boundary, `options` a UI list', () => {
it('SURVIVES the parse — a dropped key is the defect this closes', () => {
// #5712's dev measured the current shape by smuggling a `format` key in:
// Zod stripped it and `parse()` returned `undefined`, so the manifest had
Expand All @@ -243,7 +243,7 @@ describe('Specifier.valueDomain (#5933)', () => {
expect(parsed.valueDomain).toBe('iana_time_zone');
});

it('is optional — an undeclared specifier keeps #5131 exhaustive-options semantics', () => {
it('is optional — an undeclared specifier keeps exhaustive-options semantics, enforced at save', () => {
const parsed = SpecifierSchema.parse({
type: 'select',
key: 'provider',
Expand Down Expand Up @@ -303,7 +303,7 @@ describe('Specifier.valueDomain (#5933)', () => {
});
});

describe('`visible` — the settings visibility grammar (#7327)', () => {
describe('`visible` — the settings visibility grammar, narrowed to what the save-time evaluator runs', () => {
const withVisible = (visible: unknown) =>
SpecifierSchema.safeParse({ type: 'text', key: 'smtp_host', label: 'Host', visible });
const firstMessage = (visible: unknown): string => {
Expand Down Expand Up @@ -335,7 +335,7 @@ describe('`visible` — the settings visibility grammar (#7327)', () => {
expect(withVisible({ dialect: 'cel', source: "${data.provider === 'smtp'}" }).success).toBe(true);
});

it('REFUSES an `ast`-only envelope — #15811 moved this slot onto the evaluated rule', () => {
it('REFUSES an `ast`-only envelope — an evaluated slot requires a non-blank `source`', () => {
// It used to pass: the AST is opaque at this layer and the grammar walk had
// nothing to read, so the slot admitted an envelope `evaluateVisibility`
// could never run and the refusal arrived at the tenant's next save. Since
Expand Down
4 changes: 2 additions & 2 deletions packages/spec/src/system/stack-server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('server: reaches the runtime through defineStack', () => {
});
});

describe('server: carries only keys with a consumer (#4938 stays shut)', () => {
describe('server: carries only keys with a consumer — the retired HttpServerConfig keys stay out', () => {
it('declares exactly `security` and `trustProxy`', () => {
// The hard constraint from the 2026-08-03 adjudication. If this list grows,
// the new key must have arrived with an executor — the whole reason the
Expand Down Expand Up @@ -90,7 +90,7 @@ describe('server: carries only keys with a consumer (#4938 stays shut)', () => {
});
});

describe('server.security.rateLimit is strict from birth (#4001)', () => {
describe('server.security.rateLimit is strict from birth', () => {
it('accepts every declared key', () => {
expect(ServerRateLimitConfigSchema.parse({ enabled: true, windowMs: 1000, maxRequests: 3 }))
.toEqual({ enabled: true, windowMs: 1000, maxRequests: 3 });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
// was a no-op until #5286 (tsconfig excluded `**/*.test.ts`; vitest never enables
// `typecheck`), so the load-bearing pin is the export-origins test below, with
// anti-vacuity guards.
describe('[#4739 / #16325] the system-side provisioning family stays retired, and `TenantPlan` has left the package', () => {
describe('the system-side provisioning family stays retired, and `TenantPlan` has left the package', () => {
it('resolves the export surface: ./system and ./contracts name none of the retired family', () => {
// Anti-vacuity: the baseline must cover the real surface (`export-origins/`
// IS the resolution, computed at build time and checked in — #4796).
Expand Down
6 changes: 3 additions & 3 deletions packages/spec/src/system/tenant.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ describe('QuotaEnforcementResultSchema', () => {
// reference-page reader could not tell 300 seconds from 300 milliseconds.
// Renamed with the unit in the key; the old spellings are retiredKey
// tombstones (the nested objects are not strict).
describe('tenant idleTimeout / sessionTimeout → *Seconds (#14478, #14519)', () => {
describe('tenant idleTimeout / sessionTimeout → *Seconds', () => {
it('REFUSES `connectionPool.idleTimeout` with a rename naming `idleTimeoutSeconds`', () => {
const result = DatabaseLevelIsolationStrategySchema.safeParse({
strategy: 'isolated_db',
Expand Down Expand Up @@ -747,7 +747,7 @@ describe('tenant idleTimeout / sessionTimeout → *Seconds (#14478, #14519)', ()
expect(TenantSecurityPolicySchema.parse({ accessControl: {} }).accessControl?.sessionTimeoutSeconds).toBe(3600);
});

it('publishes the unit in the describe — the text the reference pages render (#14519)', () => {
it('publishes the unit in the describe — the text the reference pages render', () => {
const pool = DatabaseLevelIsolationStrategySchema.shape.connectionPool.unwrap().shape.idleTimeoutSeconds;
const access = TenantSecurityPolicySchema.shape.accessControl.unwrap().shape.sessionTimeoutSeconds;
expect(pool.description).toBe('Idle pool timeout in seconds');
Expand All @@ -760,7 +760,7 @@ describe('tenant idleTimeout / sessionTimeout → *Seconds (#14478, #14519)', ()
// so the reference-page reader could not tell 3600 seconds from 3600
// milliseconds. Renamed with the unit in the key; the old spelling is a
// retiredKey tombstone (the nested `performance` object is not strict).
describe('tenant schemaCacheTTL → schemaCacheTtlSeconds (#15939, #14478)', () => {
describe('tenant schemaCacheTTL → schemaCacheTtlSeconds', () => {
it('REFUSES `performance.schemaCacheTTL` with a rename naming `schemaCacheTtlSeconds`', () => {
const result = SchemaLevelIsolationStrategySchema.safeParse({
strategy: 'isolated_schema',
Expand Down
6 changes: 3 additions & 3 deletions packages/spec/src/system/tracing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ describe('TracingConfigSchema', () => {
// never on a bare `toThrow()`. A span is runtime-emitted, so the silent-strip
// alternative is the real hazard here: an exporter still writing `duration`
// would have lost the measurement without any error at all.
describe('Span.duration carries its unit (#15679)', () => {
describe('Span.duration carries its unit in the key name', () => {
const base = {
context: { traceId: '0123456789abcdef0123456789abcdef', spanId: '0123456789abcdef' },
name: 'GET /api/users',
Expand Down Expand Up @@ -562,7 +562,7 @@ describe('Span.duration carries its unit (#15679)', () => {
// These shapes are NOT `.strict()`, so `unrecognized_keys` was never the
// alternative: a bare deletion would have been a silent strip that lands a
// default on an exporter deadline.
describe('the OTel exporter and performance durations carry their unit (#17785)', () => {
describe('the OTel exporter and performance durations carry their unit in the describe and the key name', () => {
const otelBase = {
exporter: { type: 'console' as const },
resource: { serviceName: 'test' },
Expand Down Expand Up @@ -718,7 +718,7 @@ describe('the OTel exporter and performance durations carry their unit (#17785)'
* about the other. The negative is pinned too: a value refused for a reason
* that is NOT the retirement must not borrow its sentence.
*/
describe('#18118 TraceSamplingConfig.composite[].condition — the retired CEL arm', () => {
describe('TraceSamplingConfig.composite[].condition — the retired CEL arm', () => {
const parse = (condition: unknown) => TraceSamplingConfigSchema.safeParse({
type: 'composite',
composite: [{ strategy: 'always_on', condition }],
Expand Down
Loading
Loading