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
4 changes: 2 additions & 2 deletions packages/spec/src/system/auth-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ describe('AuthConfigSchema – new passthrough fields', () => {
});
});

describe('AudienceConfigSchema (#11739)', () => {
describe('AudienceConfigSchema — one closed audience posture, invite_only when undeclared', () => {
it('defaults an undeclared posture to invite_only (the ruled safe default)', () => {
const parsed = AudienceConfigSchema.parse({});
expect(parsed.posture).toBe('invite_only');
Expand Down Expand Up @@ -517,7 +517,7 @@ describe('AudienceConfigSchema (#11739)', () => {
// `updateAge: this.config.session?.updateAge || 60 * 60 * 24` straight into
// better-auth's `session.updateAge`, whose unit is seconds. Only `expiresIn`
// carried the marker; this closes the pair.
describe('AuthConfig.session.updateAge declares seconds by mirror (#18124)', () => {
describe('AuthConfig.session.updateAge declares seconds by mirror', () => {
it('keeps the bare name, the default and the value it always accepted', () => {
expect(AuthConfigSchema.parse({}).session).toBeUndefined();
const parsed = AuthConfigSchema.parse({ session: { updateAge: 3 * 86_400 } });
Expand Down
4 changes: 2 additions & 2 deletions packages/spec/src/system/book.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ describe('resolveDocAudiences — union over claiming books (§6.7)', () => {
});

// ── Inline translation maps retired in 17.0.0 (#4667, ADR-0049) ─────────────
describe('retired book translation maps (#4667)', () => {
describe('retired book translation maps', () => {
it('rejects a book-level `translations` map and names the live neighbour', () => {
// The prescription has to mention `doc.translations`: that key is live on
// every doc render path and is what the author actually wanted. Without it
Expand Down Expand Up @@ -410,7 +410,7 @@ describe('retired book translation maps (#4667)', () => {
// book-tree response contract (#12038)
// ==========================================

describe('ResolvedBookSchema is the book-tree response contract (#12038)', () => {
describe('ResolvedBookSchema is the book-tree response contract', () => {
// The conformance suite for the `GET /meta/book/:name/tree` ledger rows
// (#3877's no-row-without-conformance rule). Stronger than the handwritten
// captures its meta.* siblings use: `resolveBookTree()` is pure and lives in
Expand Down
2 changes: 1 addition & 1 deletion packages/spec/src/system/cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ describe('DistributedCacheConfigSchema', () => {
// Asserted on the issue CODE and the prescription text, never on "it threw":
// a bare `toThrow()` would stay green against a schema that rejected for any
// other reason, which is the failure this pin exists to catch.
describe('cache duration keys carry their unit (#15679)', () => {
describe('cache duration keys carry their unit in the key name', () => {
it('REFUSES the retired `CacheTier.ttl` with the rename in the message', () => {
const result = CacheTierSchema.safeParse({ name: 'l1', type: 'memory', ttl: 600 });
expect(result.success).toBe(false);
Expand Down
2 changes: 1 addition & 1 deletion packages/spec/src/system/collaboration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ describe('CollaborationSessionSchema', () => {
// collision that got this population ruled: milliseconds here, seconds on the
// tenant surface. Both old spellings are `retiredKey()` tombstones; asserted on
// the issue CODE and the prescription, never on a bare `toThrow()`.
describe('collaboration session durations carry their unit (#15679)', () => {
describe('collaboration session durations carry their unit in the key name', () => {
it('REFUSES the retired `idleTimeout` with the rename in the message', () => {
const result = CollaborationSessionConfigSchema.safeParse({ mode: 'ot', idleTimeout: 600000 });
expect(result.success).toBe(false);
Expand Down
14 changes: 7 additions & 7 deletions packages/spec/src/system/compliance-families-retirement.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,15 @@ const MUST_SURVIVE_SYSTEM = ['DataClassificationSchema', 'ComplianceFrameworkSch
const SPEC_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..');
const SRC_ROOT = path.join(SPEC_ROOT, 'src');

describe('[#15513] system/ compliance families retirement — the public surface', () => {
describe('system/ compliance families retirement — the public surface', () => {
it('every retired name has ZERO holders on any public entry; the survivors still stand', () => {
for (const needed of ['.', './system', './kernel']) {
expect(EXPORT_ENTRY_POINTS, `exports map must include ${needed}`).toContain(needed);
}
expect(exportNamesOf('./system').length, './system must export a non-trivial surface').toBeGreaterThan(100);

for (const name of RETIRED_NAMES) {
expect(holdersOf(name), `${name} must have zero holders after #15513`).toEqual([]);
expect(holdersOf(name), `${name} must have zero holders after the families' retirement`).toEqual([]);
}
const systemNames = exportNamesOf('./system');
for (const name of MUST_SURVIVE_SYSTEM) {
Expand Down Expand Up @@ -207,7 +207,7 @@ describe('[#15513] system/ compliance families retirement — the public surface
}
};
walk(SRC_ROOT);
expect(importers, 'a resurrected import means the retirement is being undone — re-read #15513').toEqual([]);
expect(importers, 'a resurrected import means the retirement is being undone — the three families were retired whole, none roadmapped').toEqual([]);
});

it('the generated shards no longer list any of the nineteen defs or forty-five names', () => {
Expand Down Expand Up @@ -238,7 +238,7 @@ describe('[#15513] system/ compliance families retirement — the public surface
});
});

describe('[#15513] ADR-0087 registration', () => {
describe('compliance families retirement — ADR-0087 registration', () => {
it('declares all nineteen defs under major 18, with the three D3 semantic entries wired and no D2 conversion', () => {
for (const def of RETIRED_DEFS) {
expect(RETIRED_DEFS_BY_MAJOR[18], `${def} must be declared`).toContain(def);
Expand All @@ -265,7 +265,7 @@ describe('[#15513] ADR-0087 registration', () => {
expect(step!.rationale).toMatch(/retires those three compliance-shaped families WHOLE/);
});

it("keeps PR #15514's fourteen deadline-key registrations and three D3 entries as history", () => {
it("keeps the earlier deadline-key retirement's fourteen registrations and three D3 entries as history", () => {
for (const key of HISTORY_KEYS) {
expect(RETIRED_KEYS_BY_MAJOR[18], `${key} is history — keep it`).toContain(key);
}
Expand Down Expand Up @@ -312,7 +312,7 @@ describe('[#15513] ADR-0087 registration', () => {
// the very declaration the self-test refuses.)
// The residue this leg covers is everything `tsc` does not compile: JSON,
// YAML, MD, MDX, and (under `packages/`) untyped `.js` / `.mjs` / `.cjs`.
describe('[#15513] tree-scoped absence: nothing inside the declared radius references a retired name', () => {
describe('tree-scoped absence: nothing inside the declared radius references a retired name', () => {
const REPO_ROOT = path.resolve(SPEC_ROOT, '../..');
const THIS_FILE = path.relative(REPO_ROOT, fileURLToPath(import.meta.url)).split(path.sep).join('/');

Expand Down Expand Up @@ -491,6 +491,6 @@ describe('[#15513] tree-scoped absence: nothing inside the declared radius refer
for (const root of WALK_ROOTS) walk(path.join(REPO_ROOT, root));
// Anti-vacuity: the walk really covered the tree.
expect(visited).toBeGreaterThan(1000);
expect(offenders, 'a reference to a retired name means the retirement is being undone — re-read #15513').toEqual([]);
expect(offenders, 'a reference to a retired name means the retirement is being undone — the three families were retired whole, none roadmapped').toEqual([]);
});
});
2 changes: 1 addition & 1 deletion packages/spec/src/system/constants/system-names.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe('SystemFieldName', () => {
// authorable, pinned in `../../data/object.test.ts`. The column reaching a row
// and the tier being declarable are now BOTH true — a change from the split
// state this comment used to record, not a restatement of it.
it('registers the ADR-0117 business-unit ownership stamp, distinct from the user attribute (#4611)', () => {
it('registers the ADR-0117 business-unit ownership stamp, distinct from the user attribute', () => {
expect(SystemFieldName.OWNING_BUSINESS_UNIT_ID).toBe('owning_business_unit_id');
// Guard the naming discipline ADR-0117 D10 spells out: the record stamp must
// NOT be confused with `sys_user.primary_business_unit_id`, which is a USER
Expand Down
2 changes: 1 addition & 1 deletion packages/spec/src/system/core-service-provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('CORE_SERVICE_PROVIDER', () => {
}
});

it('carries no entry for retired or never-real slots (#4451)', () => {
it('carries no entry for retired or never-real slots', () => {
for (const slot of ['workflow', 'graphql']) {
expect(
Object.prototype.hasOwnProperty.call(CORE_SERVICE_PROVIDER, slot),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function baseRow(over: Partial<DataMigrationFlag> = {}): DataMigrationFlag {
};
}

describe('columns_moved_at — absence is the contract (#16185, ruling on #15989 Q1)', () => {
describe('columns_moved_at — absence is the contract (ruled: one nullable datetime on the flag row)', () => {
it('parses green when the member is absent — every row alive today', () => {
const result = DataMigrationFlagSchema.safeParse(baseRow());
expect(result.success, JSON.stringify(result.error?.issues)).toBe(true);
Expand Down Expand Up @@ -123,7 +123,7 @@ describe('columns_moved_at — absence is the contract (#16185, ruling on #15989
});
});

describe('the ONE arbiter is unchanged by this card (#16185 constraint 2)', () => {
describe('the ONE arbiter is unchanged by the new member — read beside it, never inside it', () => {
/** `(verified_at, blocking)` and the verdict recorded BEFORE the new member existed. */
const CASES: Array<{ label: string; over: Partial<DataMigrationFlag>; verified: boolean }> = [
{ label: 'verified, no blocking', over: { verified_at: MOVED_AT, blocking: 0 }, verified: true },
Expand Down
2 changes: 1 addition & 1 deletion packages/spec/src/system/disaster-recovery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ import { z } from 'zod';
// neighbouring `dns.ttl` is a DECLARED `externalVocabulary` mirror and must
// survive this rename untouched, and no gate can catch its loss (the marker
// exempts the key either way), so the pin is the only guard.
describe('FailoverConfig.healthCheckInterval carries its unit (#15679)', () => {
describe('FailoverConfig.healthCheckInterval carries its unit in the key name', () => {
const regions = [
{ name: 'us-east-1', role: 'primary' as const },
{ name: 'eu-west-1', role: 'secondary' as const },
Expand Down
4 changes: 2 additions & 2 deletions packages/spec/src/system/email-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('EmailProviderSchema', () => {
expect(accepted).toEqual([...DELIVERABLE_PROVIDERS]);
});

it('accepts smtp — shipped by plugin-email since #5087 (ADR-0012)', () => {
it('accepts smtp — shipped by the SMTP transport in plugin-email (ADR-0012)', () => {
// The single assertion #5104 is about: green after the enum gained
// 'smtp', red on any revert of it.
expect(EmailProviderSchema.safeParse('smtp').success).toBe(true);
Expand Down Expand Up @@ -123,7 +123,7 @@ describe('EmailServiceConfigSchema', () => {
// assertion below reads `parsed.data`, so each one is green after the
// declaration and red on a revert of it.
// ─────────────────────────────────────────────────────────────────────────────
describe('EmailServiceConfigSchema — keys the CLI reads (#5307)', () => {
describe('EmailServiceConfigSchema — keys the CLI reads', () => {
it('carries queueDelivery through the parse, not into the bin', () => {
for (const queueDelivery of [true, false]) {
const parsed = EmailServiceConfigSchema.safeParse({ queueDelivery });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const EMAIL_INDEX_SOURCE = join(REPO_ROOT, 'packages', 'plugins', 'plugin-email'
/** `export const DEFAULT_TEMPLATE_LOCALE = '…';` — how plugin-email declares it. */
const DECLARATION = /^export const DEFAULT_TEMPLATE_LOCALE = '([^']*)';\s*$/m;

describe('#17614 — the published "must stay equal" claim, held', () => {
describe('EMAIL_TEMPLATE_FLOOR_LOCALE — the published "must stay equal" claim, held', () => {
it("plugin-email's DEFAULT_TEMPLATE_LOCALE literal equals EMAIL_TEMPLATE_FLOOR_LOCALE", () => {
const source = readFileSync(EMAIL_SERVICE_SOURCE, 'utf8');
const match = DECLARATION.exec(source);
Expand Down
10 changes: 5 additions & 5 deletions packages/spec/src/system/environment-artifact.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const RETIRED_V0_FAMILY = [
'EnvironmentArtifactRequirement', 'EnvironmentArtifactRequirementSchema',
] as const;

describe('[#4740] `EnvironmentArtifact(Schema)` resolves to the ./system declaration everywhere', () => {
describe('`EnvironmentArtifact(Schema)` resolves to the ./system declaration everywhere', () => {
it('resolves the export surface: one declaration in ./system, no other entry names it, the v0 family is gone', () => {
// Anti-vacuity: the baseline must cover the real surface. (This used to
// enumerate package.json's exports map and build its own `ts.createProgram`
Expand Down Expand Up @@ -192,7 +192,7 @@ describe('EnvironmentArtifactSchema (wire shape)', () => {
// ⚠ #4666 pin — the checksum object→string convergence is a TYPE change
// invisible to the key-level authorable-surface gates (`checksum` exists in
// both shapes). These parses are the gate for it.
describe('checksum is a 64-char hex STRING (#4666 pin)', () => {
describe('checksum is a 64-char hex STRING (pinned here: a type change the key-level gates cannot see)', () => {
it('accepts a 64-char lowercase hex digest', () => {
expect(Sha256DigestSchema.parse(WIRE_CHECKSUM)).toBe(WIRE_CHECKSUM);
});
Expand Down Expand Up @@ -256,7 +256,7 @@ describe('EnvironmentArtifactSchema (wire shape)', () => {
// The v0 keys are tombstoned, not silently stripped: authoring one raises
// the prescription itself (retiredKey, #3855), and `tsc` types the key
// `never` at the authoring site.
describe('retired v0 keys are tombstoned (#4740, ADR-0049)', () => {
describe('retired v0 keys are tombstoned (ADR-0049)', () => {
it('rejects `functions` with the prescription', () => {
expect(() => EnvironmentArtifactSchema.parse({ ...wireMinimal, functions: [] }))
.toThrow(/`environmentArtifact\.functions` was removed in @objectstack\/spec 17\.0\.0.*Delete the key/s);
Expand All @@ -272,7 +272,7 @@ describe('EnvironmentArtifactSchema (wire shape)', () => {
.toThrow(/`environmentArtifact\.payloadRef` was removed in @objectstack\/spec 17\.0\.0.*Delete the key/s);
});

it('a full pre-#4740 v0 artifact is rejected loudly, not half-parsed', () => {
it('a full v0 artifact is rejected loudly, not half-parsed', () => {
const v0 = {
schemaVersion: '0.1',
environmentId: 'proj_01HABCDE',
Expand Down Expand Up @@ -308,7 +308,7 @@ describe('EnvironmentArtifactSchema (wire shape)', () => {
// have gone passthrough to admit this key. Every pin here is a schema-reachable
// parse, not a type-level assertion.

describe('grantedPermissions — install-time granted set per plugin manifest `id` (#14865)', () => {
describe('grantedPermissions — install-time granted set per plugin manifest `id`', () => {
const granted = {
'@acme/plugin-crm': {
services: ['object', 'http'],
Expand Down
4 changes: 2 additions & 2 deletions packages/spec/src/system/http-server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { ApiEndpointSchema } from '../api/endpoint.zod';
* what is pinned HERE is that the export is gone and that nothing else went
* with it.
*/
describe('HttpServerConfig retirement (#4938)', () => {
describe('HttpServerConfig retirement', () => {
// `HttpServerConfigSchema` and `HttpServerConfig` were both runtime VALUES
// (the latter via `Object.assign(HttpServerConfigSchema, { create })`), so a
// runtime `in` check is a real witness for them — reverse-verified by pasting
Expand Down Expand Up @@ -207,7 +207,7 @@ describe('MiddlewareConfigSchema', () => {
* being removed. Replacing them wholesale with the pins below is the third
* fixture disposition in the retirement playbook.
*/
describe('server runtime vocabulary retirement (#5295)', () => {
describe('server runtime vocabulary retirement', () => {
// All four were runtime VALUES (`z.enum` and `lazySchema` both produce one),
// so an `in` check is a real witness. Reverse verification, direction
// predicted before running it: pasting any limb back turns exactly these
Expand Down
Loading
Loading