From c63eba0adf19651015e46073e0e59d3423f36459 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 6 Oct 2026 08:20:49 +0000 Subject: [PATCH] test(spec): the second api/ file group's test titles state each cited decision in words instead of a tracker number (stage 25) Stage 25 of the spec lane's share of the runtime-string burn-down: the test strings shipped under packages/spec/src, the second and last name-ordered api/ group (plugin-rest-api.handler-status-retirement.test.ts through zod-issues-to-fields.test.ts). It finishes api/. 89 literals in 13 files (86 test titles and 3 declared expect messages) lose 95 tracker ids: 10 literals (11 ids) now state the cited decision in words, 12 (16 ids) get their subject back in words, and 67 (68 ids) drop a number the title already explains. No needle sits in this group. Text only: one line per literal, no assertion, identifier, test count, code comment or file name changes. Claude-Session: https://claude.ai/code/session_01T9u38rswFp5Rw8DswRUReJ Co-authored-by: Claude --- ...rest-api.handler-status-retirement.test.ts | 8 +- .../api/plugin-rest-api.schema-refs.test.ts | 4 +- packages/spec/src/api/plugin-rest-api.test.ts | 4 +- packages/spec/src/api/protocol.test.ts | 92 +++++++++---------- .../spec/src/api/registry-retirement.test.ts | 4 +- ...st-api-config-dead-keys-retirement.test.ts | 4 +- packages/spec/src/api/rest-server.test.ts | 38 ++++---- packages/spec/src/api/router.test.ts | 2 +- packages/spec/src/api/sortability.test.ts | 6 +- packages/spec/src/api/storage.test.ts | 4 +- packages/spec/src/api/validate-data.test.ts | 6 +- packages/spec/src/api/websocket.test.ts | 2 +- .../spec/src/api/zod-issues-to-fields.test.ts | 4 +- 13 files changed, 89 insertions(+), 89 deletions(-) diff --git a/packages/spec/src/api/plugin-rest-api.handler-status-retirement.test.ts b/packages/spec/src/api/plugin-rest-api.handler-status-retirement.test.ts index 34f6db454d7..28489c1dd34 100644 --- a/packages/spec/src/api/plugin-rest-api.handler-status-retirement.test.ts +++ b/packages/spec/src/api/plugin-rest-api.handler-status-retirement.test.ts @@ -70,7 +70,7 @@ const WELL_FORMED = { const PRESCRIPTION = /`RestApiEndpoint\.handlerStatus`.*was removed.*17/s; -describe('[#13823] RestApiEndpoint.handlerStatus retirement', () => { +describe('RestApiEndpoint.handlerStatus retirement', () => { // All three former values, INCLUDING the documented default: the old // docblock's `@default 'implemented'` was prose only — the key never carried // a Zod `.default()`, so no built artifact materialised it and there is no @@ -156,7 +156,7 @@ describe('[#13823] RestApiEndpoint.handlerStatus retirement', () => { }); }); -describe('[#13823] api/HandlerStatus + api/RouteCoverage{Entry,Report} def retirement', () => { +describe('api/HandlerStatus + api/RouteCoverage{Entry,Report} def retirement', () => { /** The 6 names the three retired defs exported (3 schema consts + 3 types). */ const RETIRED_NAMES = [ 'HandlerStatusSchema', @@ -176,7 +176,7 @@ describe('[#13823] api/HandlerStatus + api/RouteCoverage{Entry,Report} def retir // ── ABSENCE (every entry, not just ./api) ───────────────────────────── for (const name of RETIRED_NAMES) { - expect(holdersOf(name), `${name} must have zero holders after #13823`).toEqual([]); + expect(holdersOf(name), `${name} must have zero holders after its retirement`).toEqual([]); } // ── SURVIVAL ────────────────────────────────────────────────────────── @@ -205,7 +205,7 @@ describe('[#13823] api/HandlerStatus + api/RouteCoverage{Entry,Report} def retir }); }); -describe('[#13823] ADR-0087 registration', () => { +describe('handlerStatus retirement — ADR-0087 registration', () => { it('declares the tombstoned key and the three removed defs under major 18, with the D3 entry', () => { expect(RETIRED_KEYS_BY_MAJOR[18]).toContain('api/RestApiEndpoint:handlerStatus'); for (const def of ['api/HandlerStatus', 'api/RouteCoverageEntry', 'api/RouteCoverageReport']) { diff --git a/packages/spec/src/api/plugin-rest-api.schema-refs.test.ts b/packages/spec/src/api/plugin-rest-api.schema-refs.test.ts index 11fa956403c..019713413b6 100644 --- a/packages/spec/src/api/plugin-rest-api.schema-refs.test.ts +++ b/packages/spec/src/api/plugin-rest-api.schema-refs.test.ts @@ -53,7 +53,7 @@ function resolvesToZodSchema(name: string): boolean { return !!candidate && typeof (candidate as { safeParse?: unknown }).safeParse === 'function'; } -describe('#3899 — catalog schema references resolve and sit on the right methods', () => { +describe('catalog schema references resolve and sit on the right methods', () => { it('every requestSchema names a Zod schema exported from @objectstack/spec/api', () => { for (const ep of allEndpoints()) { if (!ep.requestSchema) continue; @@ -87,7 +87,7 @@ describe('#3899 — catalog schema references resolve and sit on the right metho } }); - it('at least the routes wired in #3899 still declare their request schemas', () => { + it('at least the routes wired to the request-schema gate still declare their request schemas', () => { // Anti-erosion floor: the gate above is vacuous if declarations are simply // deleted. These five are validated at their mounted routes. const declared = new Map( diff --git a/packages/spec/src/api/plugin-rest-api.test.ts b/packages/spec/src/api/plugin-rest-api.test.ts index 8ec12281ae0..df32975b7cc 100644 --- a/packages/spec/src/api/plugin-rest-api.test.ts +++ b/packages/spec/src/api/plugin-rest-api.test.ts @@ -541,7 +541,7 @@ describe('plugin-rest-api.zod', () => { expect(paths).not.toContain('/preferences'); }); - it('declares no AI routes — this table cannot vouch for a Cloud/EE surface (#3718)', () => { + it('declares no AI routes — this table cannot vouch for a Cloud/EE surface', () => { // DEFAULT_AI_ROUTES used to sit here declaring `/nlq`, `/suggest` and // `/insights`, and this test asserted its shape — three endpoints no repo // has ever mounted, checked for `toHaveLength(3)`. Shape is not @@ -691,7 +691,7 @@ describe('plugin-rest-api.zod', () => { // than a bare unrecognized-key error, and the value survives at the same // magnitude. Asserting the message, not just `.toThrow()`: a bare throw stays // green when the schema throws for some unrelated reason. -describe('RestApiEndpoint / RestApiPluginConfig durations carry their unit (#15677)', () => { +describe('RestApiEndpoint / RestApiPluginConfig durations carry their unit in the key name', () => { const endpoint = { method: 'GET' as const, path: '/api/v1/discovery', handler: 'getDiscovery', category: 'discovery' as const, diff --git a/packages/spec/src/api/protocol.test.ts b/packages/spec/src/api/protocol.test.ts index 94f195fd920..afd19f2ce9a 100644 --- a/packages/spec/src/api/protocol.test.ts +++ b/packages/spec/src/api/protocol.test.ts @@ -169,7 +169,7 @@ describe('ObjectStack Protocol', () => { expect(DeleteManyDataRequestSchema.safeParse(deleteManyReq).success).toBe(true); }); - it('no longer publishes a viewId-addressed view CRUD surface (#6239)', async () => { + it('no longer publishes a viewId-addressed view CRUD surface', async () => { // Retired at protocol 17: five methods, ten schemas, zero implementations // and zero routes — and already mis-read once as the contract of // `GET /ui/view/:object/:type` (#5948). The unit test that stood here @@ -296,7 +296,7 @@ describe('ObjectStack Protocol', () => { * test cannot see this class of defect at all — which is exactly why the * family's double-assertion ratchet (#3877 Stage D) was blind to it. */ - it('[#6361] tombstones `cursor` on BOTH halves, with the prescription', () => { + it('tombstones `cursor` on BOTH halves, with the prescription', () => { // BOTH halves or neither — the ruling's "one capability, two halves" clause, // asserted rather than trusted. A half-deletion is the specific outcome the // maintainer ruled out, so it gets a test rather than a comment. @@ -505,7 +505,7 @@ describe('GetDiscoveryResponseSchema (capabilities)', () => { // no producer emits and no consumer reads looked exactly like a real one. // That is the phantom the closed vocabulary removes, and it is worth a test // of its own rather than a silent deletion. - it('[#5672] rejects a capability key outside the vocabulary', () => { + it('strips a capability key outside the closed vocabulary', () => { const result = GetDiscoveryResponseSchema.safeParse({ version: 'v1', name: 'ObjectStack API', @@ -523,7 +523,7 @@ describe('GetDiscoveryResponseSchema (capabilities)', () => { } }); - it('[#5672] rejects a capability map that is missing part of the vocabulary', () => { + it('rejects a capability map that is missing part of the vocabulary (ruled: an absent capability is `enabled: false`, not a missing key)', () => { const { comments: _dropped, ...partial } = allCapabilitiesOff(); const result = GetDiscoveryResponseSchema.safeParse({ version: 'v1', @@ -674,7 +674,7 @@ describe('HttpFindQueryParamsSchema', () => { expect(result.success).toBe(true); }); - it('rejects ?distinct — the querystring spelling of the removed query.distinct (#4286)', () => { + it('rejects ?distinct — the querystring spelling of the removed query.distinct', () => { const result = HttpFindQueryParamsSchema.safeParse({ distinct: true }); expect(result.success).toBe(false); expect(JSON.stringify(result.error?.issues)).toMatch(/query\.distinct.*removed/s); @@ -702,7 +702,7 @@ import { SaveMetaItemResponseSchema } from './protocol.zod'; * return, and emits `projectionApplied` only when an ADR-0094 mutation * projector is registered for the type. */ -describe('SaveMetaItemResponseSchema (#5745 — declares the full save response)', () => { +describe('SaveMetaItemResponseSchema (declares the full save response)', () => { /** A verbatim capture of a real `saveMetaItem` return (repo write path). */ const realResponse = { success: true, @@ -776,7 +776,7 @@ import { PublishMetaItemResponseSchema } from './protocol.zod'; * literal always sets `success` / `version` / `seq`, and attaches each of the * three `*Applied` receipts only when the matching side effect ran. */ -describe('PublishMetaItemResponseSchema (#7294 — declares the full publish response)', () => { +describe('PublishMetaItemResponseSchema (declares the full publish response)', () => { /** A verbatim capture of a real `publishMetaItem` return (promotion path). */ const realResponse = { success: true, @@ -913,7 +913,7 @@ export type DeleteProjectionIsReachable = AssertD< * the producer's own returns fail their own contract, which is the #5563 * defect in mirror image. */ -describe('DeleteMetaItemResponseSchema (#13155 — carries #5745 to the third verb)', () => { +describe('DeleteMetaItemResponseSchema (carries the declared = returned discipline to the third verb)', () => { /** * A verbatim capture of a real `deleteMetaItem` return — the repository * path's delete-ful branch, the only one of the four that carries `seq`. @@ -1025,7 +1025,7 @@ import { RuntimeAuthoringIssueSchema } from './protocol.zod'; * assumed (the PR's R1/R3 rows). The declaration is deliberate rather than * test-driven, and these cases are what make it checkable at all. */ -describe('SaveMetaItemResponseSchema.advisories (#4717 — #4463 D3 on the response)', () => { +describe('SaveMetaItemResponseSchema.advisories (advisory findings ride the 2xx response)', () => { const realResponse = { success: true, version: 'sha256:7aad99c8d969efb5067fff275fb3e5be7ec90f9cd610d41709fcddbf8c34b1f0', @@ -1082,7 +1082,7 @@ describe('SaveMetaItemResponseSchema.advisories (#4717 — #4463 D3 on the respo * asserts nothing is stripped, and an absent key strips nothing — so these * declaration pins are what make the key checkable at all, in both directions. */ -describe('PublishMetaItemResponseSchema.advisories (#9176 — #4463 D3 on the publish door)', () => { +describe('PublishMetaItemResponseSchema.advisories (advisory findings ride the 2xx on the publish door too)', () => { const realPublishResponse = { success: true, version: 'sha256:7aad99c8d969efb5067fff275fb3e5be7ec90f9cd610d41709fcddbf8c34b1f0', @@ -1142,7 +1142,7 @@ describe('PublishMetaItemResponseSchema.advisories (#9176 — #4463 D3 on the pu * `@objectstack/metadata-protocol` as its `RuntimeAuthoringIssue`, so the 422's * `issues[]` and the 2xx's `advisories[]` cannot drift into two dialects. */ -describe('RuntimeAuthoringIssueSchema (#4717 — the ONE finding shape)', () => { +describe('RuntimeAuthoringIssueSchema (the ONE finding shape)', () => { const issue = { rule: 'flow-multi-write-unfiltered', path: 'flows[0].nodes[1].config.multi', @@ -1198,7 +1198,7 @@ import { PublishPackageDraftsResponseSchema } from './protocol.zod'; * and the route mutations in * `packages/runtime/src/domains/packages-publish-drafts-response-conformance.test.ts`. */ -describe('PublishPackageDraftsResponseSchema (#9406 — declares the batch publish response)', () => { +describe('PublishPackageDraftsResponseSchema (declares the batch publish response)', () => { /** A verbatim-shaped capture of a real `publishPackageDrafts` return (happy path). */ const realResponse = { success: true, @@ -1310,7 +1310,7 @@ describe('PublishPackageDraftsResponseSchema (#9406 — declares the batch publi ).toBe(false); }); - it('probes is opaque BY DECLARATION (#9406 ruling): any shape passes through unmodified, unstripped', () => { + it('probes is opaque BY DECLARATION (ruled: modeled only once a consumer needs a field): any shape passes through unmodified, unstripped', () => { // The real `BuildProbeReport` shape of today… const report = { issues: [], checked: { seeds: 1, views: 2, widgets: 0, objects: 3 } }; const parsed = PublishPackageDraftsResponseSchema.parse({ ...realResponse, probes: report }); @@ -1380,7 +1380,7 @@ describe('PublishPackageDraftsResponseSchema (#9406 — declares the batch publi * cannot go red for an absent key, so these declaration pins are what make the * key checkable in both directions. */ -describe('PublishPackageDraftsResponseSchema published[].advisories (#9343 — #4463 D3 per element)', () => { +describe('PublishPackageDraftsResponseSchema published[].advisories (ruled: advisory findings ride each published element)', () => { const base = { success: true, // #10462 — `outcome` is required on every producer return; this fixture is @@ -1456,7 +1456,7 @@ describe('PublishPackageDraftsResponseSchema published[].advisories (#9343 — # * shrink to a headline without the per-path detail becoming unreadable to * typed consumers. */ -describe('PublishPackageDraftsResponseSchema failed[].issues (#10524 — the causal refusal\'s findings)', () => { +describe('PublishPackageDraftsResponseSchema failed[].issues (the causal refusal\'s findings)', () => { const base = { success: false, outcome: 'refused', @@ -1535,7 +1535,7 @@ describe('PublishPackageDraftsResponseSchema failed[].issues (#10524 — the cau * registry, and declaring the six-key shape here would refuse every real * emission. */ -describe('PublishPackageDraftsResponseSchema seedApplied.issues (#10524 — the seed refusal\'s findings)', () => { +describe('PublishPackageDraftsResponseSchema seedApplied.issues (the seed refusal\'s findings)', () => { const base = { success: true, outcome: 'published', @@ -1597,7 +1597,7 @@ import { GetMetaItemLayeredRequestSchema, } from './protocol.zod'; -describe('meta-read request schemas declare organizationId (#9726 — declared = enforced)', () => { +describe('meta-read request schemas declare organizationId (declared = enforced)', () => { // The implementation (`@objectstack/metadata-protocol`) accepts and HONOURS // `organizationId` on all four read verbs: it selects the org partition in // the ADR-0005 overlay read order, i.e. it decides which tenant's row is @@ -1652,7 +1652,7 @@ describe('meta-read request schemas declare organizationId (#9726 — declared = }); }); -describe('meta-read request schemas declare the draft-visibility switches (#9741 — declared = enforced)', () => { +describe('meta-read request schemas declare the draft-visibility switches (declared = enforced)', () => { // Maintainer ruling 2026-08-18 (commit 2a29caa53): declare `previewDrafts` / `state` // exactly where the implementation enforces them, and record `environmentId` // as transport-level — OUT of the request shape by decision. The @@ -1736,7 +1736,7 @@ describe('meta-read request schemas declare the draft-visibility switches (#9741 }); }); -describe('environmentId stays OUT of the meta-read request shape — by decision, not omission (#9741)', () => { +describe('environmentId stays OUT of the meta-read request shape — transport-level by decision, not omission', () => { // Maintainer ruling 2026-08-18 (commit 2a29caa53): `environmentId` is the // TRANSPORT-level multi-kernel routing key. The REST layer resolves the // target kernel from it BEFORE the protocol call, the implementation's @@ -1767,7 +1767,7 @@ describe('environmentId stays OUT of the meta-read request shape — by decision }); }); -describe('MetadataProtocol declares getMetaItemLayered (#9740)', () => { +describe('MetadataProtocol declares getMetaItemLayered', () => { // Type-level pins (compiled by the spec test typecheck, the // translation-typegen.test.ts pattern). The member is an interface // declaration with no runtime shadow, so its presence and shape are only @@ -1797,7 +1797,7 @@ describe('MetadataProtocol declares getMetaItemLayered (#9740)', () => { import { PublishMetaItemRequestSchema } from './protocol.zod'; -describe('PublishMetaItemRequestSchema mirrors the implementation parameter type (#11006)', () => { +describe('PublishMetaItemRequestSchema mirrors the implementation parameter type', () => { // #7294 declared the RESPONSE side of `POST /meta/:type/:name/publish`; the // request shape stayed undeclared — the half-declared door. Maintainer // ruling 2026-08-22 (option B): declare the request and the interface @@ -1862,7 +1862,7 @@ describe('PublishMetaItemRequestSchema mirrors the implementation parameter type } }); - it('does not declare environmentId — transport-level by the #9741 ruling, stripped and shape-absent', () => { + it('does not declare environmentId — transport-level by ruling, stripped and shape-absent', () => { // Same regression guard as the meta-read block above: if someone declares // the member, the parse stops stripping it and this test names the ruling // they are overturning (2026-08-18, commit 2a29caa53: `environmentId` is the @@ -1888,7 +1888,7 @@ describe('PublishMetaItemRequestSchema mirrors the implementation parameter type }); }); -describe('MetadataProtocol declares publishMetaItem (#11006)', () => { +describe('MetadataProtocol declares publishMetaItem', () => { // Type-level pins (compiled by the spec test typecheck, the // translation-typegen.test.ts pattern — same as the getMetaItemLayered block above, commit 11b779e0f). // Before this declaration the cast at the REST call site carried @@ -1910,7 +1910,7 @@ describe('MetadataProtocol declares publishMetaItem (#11006)', () => { expect('publishMetaItem' in absent).toBe(false); }); - it('refuses an undeclared key at the member call shape — the #9612-gate class this card exists for', () => { + it('refuses an undeclared key at the member call shape — the package-closure publish-gate class this card exists for', () => { // Excess-property check on a fresh literal at the declared parameter // type: the compile-time teeth the ruling asked for. Before the // declaration any key sailed through the `(p as any)` cast. @@ -1928,7 +1928,7 @@ describe('MetadataProtocol declares publishMetaItem (#11006)', () => { import { AuditMetaItemRequestSchema, AuditMetaItemResponseSchema } from './protocol.zod'; import type { AuditMetaItemRequest, AuditMetaItemResponse } from './protocol.zod'; -describe('AuditMetaItemRequestSchema mirrors the implementation parameter type (#11678)', () => { +describe('AuditMetaItemRequestSchema mirrors the implementation parameter type', () => { // The audit door was a step BEHIND the half-declared publish door (closed by // commit cccbe51bf): NEITHER side was declared, and the REST call site reached the // verb through `(p as any)` twice (guard + call). The measure is the @@ -1981,7 +1981,7 @@ describe('AuditMetaItemRequestSchema mirrors the implementation parameter type ( expect(clampedNotRefused.success).toBe(true); }); - it('does not declare environmentId — transport-level by the #9741 ruling, stripped and shape-absent', () => { + it('does not declare environmentId — transport-level by ruling, stripped and shape-absent', () => { // Same regression guard as the meta-read and publish blocks above. On THIS // door the exclusion is even stronger than the ruling: #8747 removed // `environmentId` from the door's payload entirely (the implementation @@ -1996,7 +1996,7 @@ describe('AuditMetaItemRequestSchema mirrors the implementation parameter type ( }); }); -describe('AuditMetaItemResponseSchema declares the compliance-trail body (#11678)', () => { +describe('AuditMetaItemResponseSchema declares the compliance-trail body', () => { /** A verbatim-shaped capture of a real `auditMetaItem` return (one denied save). */ const realResponse = { events: [ @@ -2025,7 +2025,7 @@ describe('AuditMetaItemResponseSchema declares the compliance-trail body (#11678 } }); - it('the honest-empty answer parses — {events: []} is a declared, legal body (#9426)', () => { + it('the honest-empty answer parses — {events: []} is a declared, legal body', () => { // `[]` is the honest MISS shape (clean trail / no `find` on the host // engine / unprovisioned table). The capability gap is NOT in this body: // a protocol without the verb is refused 501 before the call. @@ -2044,7 +2044,7 @@ describe('AuditMetaItemResponseSchema declares the compliance-trail body (#11678 }); }); -describe('MetadataProtocol declares auditMetaItem (#11678)', () => { +describe('MetadataProtocol declares auditMetaItem', () => { // Type-level pins (compiled by the spec test typecheck, the // translation-typegen.test.ts pattern — same as the getMetaItemLayered (commit 11b779e0f) and publishMetaItem (commit cccbe51bf) blocks // above). Before this declaration the casts at the REST call site carried @@ -2079,7 +2079,7 @@ describe('MetadataProtocol declares auditMetaItem (#11678)', () => { import { HistoryMetaItemRequestSchema, HistoryMetaItemResponseSchema } from './protocol.zod'; import type { HistoryMetaItemRequest, HistoryMetaItemResponse } from './protocol.zod'; -describe('HistoryMetaItemRequestSchema mirrors the implementation parameter type (#12005)', () => { +describe('HistoryMetaItemRequestSchema mirrors the implementation parameter type', () => { // The history door is the audit door's explicitly named twin // (`rest-server.ts` says so at the `Number(...)`-shape comment) and was in // exactly the state the audit door left via #11678/PR #12003: NEITHER side @@ -2138,7 +2138,7 @@ describe('HistoryMetaItemRequestSchema mirrors the implementation parameter type expect(unclamped.success).toBe(true); }); - it('does not declare environmentId — transport-level by the #9741 ruling, stripped and shape-absent', () => { + it('does not declare environmentId — transport-level by ruling, stripped and shape-absent', () => { // Same regression guard as the audit block above, with one twist the // audit twin no longer has: this door STILL spreads `environmentId` into // its outgoing payload (dead weight — the implementation never declares @@ -2155,7 +2155,7 @@ describe('HistoryMetaItemRequestSchema mirrors the implementation parameter type }); }); -describe('HistoryMetaItemResponseSchema declares the change-log body (#12005)', () => { +describe('HistoryMetaItemResponseSchema declares the change-log body', () => { /** * A verbatim-shaped capture of a real `historyMetaItem` return: one update * (all optional members present) followed by the delete tombstone @@ -2224,7 +2224,7 @@ describe('HistoryMetaItemResponseSchema declares the change-log body (#12005)', }); }); -describe('MetadataProtocol declares historyMetaItem (#12005)', () => { +describe('MetadataProtocol declares historyMetaItem', () => { // Type-level pins, same pattern as the #11678 audit block above: before // this declaration the casts at the REST call site carried MEMBER-EXISTENCE // weight (TS2339, not TS2353), so the request literal there was typed by @@ -2259,7 +2259,7 @@ import { DeleteMetaItemRequestSchema } from './protocol.zod'; // there rather than re-importing the same binding. import type { DeleteMetaItemRequest } from './protocol.zod'; -describe('DeleteMetaItemRequestSchema declares the contract members the reset door sends (#11679)', () => { +describe('DeleteMetaItemRequestSchema declares the contract members the reset door sends', () => { // The sharper sibling of the audit door: the MEMBER was declared all along // (so a scan for undeclared members walked past it), while the request // schema declared 2 of the 8 members `DELETE /meta/:type/:name` sends — @@ -2317,7 +2317,7 @@ describe('DeleteMetaItemRequestSchema declares the contract members the reset do expect(DeleteMetaItemRequestSchema.safeParse({ ...base, dropStorage: 'true' }).success).toBe(false); }); - it('does not declare environmentId — transport-level by the #9741 ruling, stripped and shape-absent', () => { + it('does not declare environmentId — transport-level by ruling, stripped and shape-absent', () => { // Same regression guard as the meta-read, publish and audit blocks above: // the reset door DOES spread `environmentId` into its outgoing payload, // and that member rides `packages/rest`'s `TransportScopedMetaRequest` @@ -2333,7 +2333,7 @@ describe('DeleteMetaItemRequestSchema declares the contract members the reset do }); }); -describe('MetadataProtocol.deleteMetaItem types against the caught-up request schema (#11679)', () => { +describe('MetadataProtocol.deleteMetaItem types against the caught-up request schema', () => { // The member declaration itself predates this card; these pins are the // request-shape half — what turns red if the schema drops back to // `{ type, name }` (the member would still exist; the door literal would @@ -2370,7 +2370,7 @@ describe('MetadataProtocol.deleteMetaItem types against the caught-up request sc import { SaveMetaItemRequestSchema } from './protocol.zod'; import type { SaveMetaItemRequest, SaveMetaItemResponse } from './protocol.zod'; -describe('SaveMetaItemRequestSchema declares the contract members the save door sends (#12004)', () => { +describe('SaveMetaItemRequestSchema declares the contract members the save door sends', () => { // The biggest remaining member of the request-shape family the reset twin // above belongs to: `saveMetaItem` is a REQUIRED protocol member (so a scan // for undeclared members walked past it), while the request schema declared @@ -2479,7 +2479,7 @@ describe('SaveMetaItemRequestSchema declares the contract members the save door expect(SaveMetaItemRequestSchema.safeParse({ ...base, packageId: 42 }).success).toBe(false); }); - it('does not declare environmentId — transport-level by the #9741 ruling, stripped and shape-absent', () => { + it('does not declare environmentId — transport-level by ruling, stripped and shape-absent', () => { // Same regression guard as the meta-read, publish, audit, history and // reset blocks above: the save door DOES spread `environmentId` into its // outgoing payload, and that member rides `packages/rest`'s @@ -2513,7 +2513,7 @@ describe('SaveMetaItemRequestSchema declares the contract members the save door }); }); -describe('MetadataProtocol.saveMetaItem types against the caught-up request schema (#12004)', () => { +describe('MetadataProtocol.saveMetaItem types against the caught-up request schema', () => { // The member declaration itself long predates this card — `saveMetaItem` // is REQUIRED on `MetadataProtocol` — so these pins are the request-shape // half: what turns red if the schema drops back to `{ type, name, item }` @@ -2572,7 +2572,7 @@ import { DiffMetaItemResponseSchema, } from './protocol.zod'; -describe('ListDraftsResponseSchema declares the pending-drafts body (#12038)', () => { +describe('ListDraftsResponseSchema declares the pending-drafts body', () => { /** A verbatim-shaped capture of a real `listDrafts` return (one org draft). */ const realResponse = { drafts: [ @@ -2606,7 +2606,7 @@ describe('ListDraftsResponseSchema declares the pending-drafts body (#12038)', ( }); }); -describe('GetMetaDiagnosticsResponseSchema declares the validation-sweep body (#12038)', () => { +describe('GetMetaDiagnosticsResponseSchema declares the validation-sweep body', () => { /** A verbatim-shaped capture of a real `getMetaDiagnostics` return (one failing view). */ const realResponse = { entries: [ @@ -2641,7 +2641,7 @@ describe('GetMetaDiagnosticsResponseSchema declares the validation-sweep body (# }); }); -describe('FindReferencesToMetaResponseSchema declares the reverse-references body (#12038)', () => { +describe('FindReferencesToMetaResponseSchema declares the reverse-references body', () => { /** A verbatim-shaped capture of a real `findReferencesToMeta` return. */ const realResponse = { references: [ @@ -2661,7 +2661,7 @@ describe('FindReferencesToMetaResponseSchema declares the reverse-references bod }); }); -describe('RollbackMetaItemResponseSchema declares the item-rollback body (#12038)', () => { +describe('RollbackMetaItemResponseSchema declares the item-rollback body', () => { /** A verbatim-shaped capture of a real `rollbackMetaItem` return. */ const realResponse = { success: true, @@ -2683,7 +2683,7 @@ describe('RollbackMetaItemResponseSchema declares the item-rollback body (#12038 }); }); -describe('DiffMetaItemResponseSchema declares the structural-diff body (#12038)', () => { +describe('DiffMetaItemResponseSchema declares the structural-diff body', () => { /** A verbatim-shaped capture of a real `diffMetaItem` return. */ const realResponse = { type: 'object', @@ -2707,7 +2707,7 @@ describe('DiffMetaItemResponseSchema declares the structural-diff body (#12038)' }); }); -describe('GetPublishedMetaItemResponseSchema stays opaque by ruling (#12038 1C)', () => { +describe('GetPublishedMetaItemResponseSchema stays opaque (ruled: no shape frozen against the current type registry)', () => { it('accepts an arbitrary metadata item body and PRESERVES it — no shape is imposed', () => { const itemBody = { name: 'all_leads', type: 'grid', object: 'lead', columns: [{ field: 'name' }] }; const result = GetPublishedMetaItemResponseSchema.safeParse(itemBody); @@ -2723,7 +2723,7 @@ describe('GetPublishedMetaItemResponseSchema stays opaque by ruling (#12038 1C)' }); }); -describe('ListAiConversationsResponseSchema declares the next-page signal (#19543, door ③)', () => { +describe('ListAiConversationsResponseSchema declares the next-page signal', () => { // Ruled on #19543: the list is newest first and pages by keyset, `cursor` // being the id of the last conversation the caller holds. The response used // to be `{ conversations }` alone, so a caller asking for `limit` rows could diff --git a/packages/spec/src/api/registry-retirement.test.ts b/packages/spec/src/api/registry-retirement.test.ts index 404ab5264fe..d36c558c14d 100644 --- a/packages/spec/src/api/registry-retirement.test.ts +++ b/packages/spec/src/api/registry-retirement.test.ts @@ -58,7 +58,7 @@ const RETIRED_NAMES = [ 'ApiDiscoveryResponseSchema', ] as const; -describe('[#4939] ApiRegistry family retired from `@objectstack/spec/api`', () => { +describe('ApiRegistry family retired from `@objectstack/spec/api`', () => { it('exports none of the retired names', async () => { const api = await import('./index'); @@ -86,7 +86,7 @@ describe('[#4939] ApiRegistry family retired from `@objectstack/spec/api`', () = expect( 'ConflictResolutionStrategy' in api, 'two independent ratchets pin this as a ./api export: spec/src/automation/' + - 'sync-retirement.test.ts (#4738, the fourth ConflictResolution relative) and, ' + + 'sync-retirement.test.ts (the fourth ConflictResolution relative) and, ' + 'cross-repo, objectui offline-nav-performance-spec-parity.test.ts', ).toBe(true); diff --git a/packages/spec/src/api/rest-api-config-dead-keys-retirement.test.ts b/packages/spec/src/api/rest-api-config-dead-keys-retirement.test.ts index cb02ba145ff..4904edaccc3 100644 --- a/packages/spec/src/api/rest-api-config-dead-keys-retirement.test.ts +++ b/packages/spec/src/api/rest-api-config-dead-keys-retirement.test.ts @@ -145,7 +145,7 @@ describe('rest_api retirement — `api.documentation.enabled`, a tombstone insid }); }); -describe('rest_api retirement — `api.documentation.version` (#20294), a second tombstone inside the live block', () => { +describe('rest_api retirement — `api.documentation.version`, a second tombstone inside the live block', () => { // The old authored spellings: a release number, a semver-looking protocol // version, and an empty string. for (const version of ['2.3.0', '17.4.0', '']) { @@ -254,7 +254,7 @@ describe('rest_api retirement — ADR-0087 registration', () => { expect(step.conversionIds.filter((id) => /response-format|documentation-enabled/.test(id))).toEqual([]); }); - it('[#20294] declares `documentation.version` under major 18 with its own family D3 entry, and no D2 conversion', () => { + it('declares `documentation.version` under major 18 with its own family D3 entry, and no D2 conversion', () => { expect(RETIRED_KEYS_BY_MAJOR[18]).toContain('api/RestApiConfig:documentation.version'); const step = MIGRATIONS_BY_MAJOR[18]!; const entry = step.semantic.find((e) => e.id === 'rest-api-documentation-version-retired'); diff --git a/packages/spec/src/api/rest-server.test.ts b/packages/spec/src/api/rest-server.test.ts index 2af534c31f9..6f137a2e21f 100644 --- a/packages/spec/src/api/rest-server.test.ts +++ b/packages/spec/src/api/rest-server.test.ts @@ -79,7 +79,7 @@ describe('RestApiConfigSchema', () => { expect(config.enableDiscovery).toBe(false); }); - it('[#11983] enableSearch defaults to true — search is ON unless opted out', () => { + it('enableSearch defaults to true — search is ON unless opted out', () => { // Pinning the MATERIALIZED default (not just the declaration) is what makes // a later `.optional()` — which would hand `undefined` to the REST layer — // fail here rather than silently change the mount decision. @@ -88,7 +88,7 @@ describe('RestApiConfigSchema', () => { expect(config.enableSearch).toBe(true); }); - it('[#11983] enableSearch: false is the declared deployment-wide opt-out, and it SURVIVES the parse', () => { + it('enableSearch: false is the declared deployment-wide opt-out, and it SURVIVES the parse', () => { // Before this key had a declared seat, this exact parse was the measured // trap: `RestApiConfigSchema` is not `.strict()`, so it STRIPPED the // undeclared key and any consumer of the parsed output silently got search @@ -103,7 +103,7 @@ describe('RestApiConfigSchema', () => { expect(RestApiConfigSchema.parse({ enableSearch: true }).enableSearch).toBe(true); }); - it('[#11983] enableSearch is authorable without a cast, and is a boolean (compile-time)', () => { + it('enableSearch is authorable without a cast, and is a boolean (compile-time)', () => { // The declaration's REASON for existing: `objectstack.config.ts` authors // the key by name and `packages/rest`'s `normalizeConfig` reads it. Both go // through this input type, so this is the pin that says the key no longer @@ -205,7 +205,7 @@ describe('CrudEndpointsConfigSchema', () => { expect(config.operations?.delete).toBe(false); }); - it('[#14691] REJECTS `patterns` with the retirement prescription — the key never customized a route', () => { + it('REJECTS `patterns` with the retirement prescription — the key never customized a route', () => { expect(() => CrudEndpointsConfigSchema.parse({ patterns: { create: { method: 'POST', path: '/objects/{object}' }, @@ -221,14 +221,14 @@ describe('CrudEndpointsConfigSchema', () => { expect(config.dataPrefix).toBe('/objects'); }); - it('[#14691] REJECTS `objectParamStyle` — both former enum values, with the prescription', () => { + it('REJECTS `objectParamStyle` — both former enum values, with the prescription', () => { for (const objectParamStyle of ['path', 'query']) { expect(() => CrudEndpointsConfigSchema.parse({ objectParamStyle }), objectParamStyle) .toThrow(/`crud\.objectParamStyle` was removed.*path segment.*Delete the key/s); } }); - it('[#14691] the tombstones reject one key each, not the config — every live key still parses', () => { + it('the tombstones reject one key each, not the config — every live key still parses', () => { const config = CrudEndpointsConfigSchema.parse({ operations: { list: false }, dataPrefix: '/records', @@ -266,7 +266,7 @@ describe('MetadataEndpointsConfigSchema', () => { expect(config.enableCache).toBe(false); }); - it('[#14691] REJECTS `cacheTtl` — including the negative value the old contract accepted', () => { + it('REJECTS `cacheTtl` — including the negative value the old contract accepted', () => { for (const cacheTtl of [7200, 0, -1]) { expect(() => MetadataEndpointsConfigSchema.parse({ cacheTtl }), String(cacheTtl)) .toThrow(/`metadata\.cacheTtl` was removed.*takes no TTL.*Delete the key/s); @@ -290,7 +290,7 @@ describe('MetadataEndpointsConfigSchema', () => { expect(config.endpoints?.maintenance).toBe(true); }); - it('[#14691] REJECTS `endpoints.schema` — it gated a route that does not exist', () => { + it('REJECTS `endpoints.schema` — it gated a route that does not exist', () => { expect(() => MetadataEndpointsConfigSchema.parse({ endpoints: { schema: false } })) .toThrow(/`metadata\.endpoints\.schema` was removed.*does not exist.*Delete the key/s); }); @@ -386,12 +386,12 @@ describe('BatchEndpointsConfigSchema', () => { expect(config.operations).not.toHaveProperty('upsertMany'); }); - it('[#14691] REJECTS `operations.upsertMany` — it gated a route that was never built', () => { + it('REJECTS `operations.upsertMany` — it gated a route that was never built', () => { expect(() => BatchEndpointsConfigSchema.parse({ operations: { upsertMany: false } })) .toThrow(/`batch\.operations\.upsertMany` was removed.*never built.*Delete the key.*'upsert'/s); }); - it('[#14691] REJECTS `defaultAtomic` — atomicity is the per-request `options.atomic`', () => { + it('REJECTS `defaultAtomic` — atomicity is the per-request `options.atomic`', () => { for (const defaultAtomic of [true, false]) { expect(() => BatchEndpointsConfigSchema.parse({ defaultAtomic }), String(defaultAtomic)) .toThrow(/`batch\.defaultAtomic` was removed.*options\.atomic.*Delete the key/s); @@ -400,27 +400,27 @@ describe('BatchEndpointsConfigSchema', () => { }); describe('RouteGenerationConfigSchema', () => { - it('should accept the empty sub-object — and materialize nothing, every key being a tombstone (#14691)', () => { + it('should accept the empty sub-object — and materialize nothing, every key being a tombstone', () => { const config = RouteGenerationConfigSchema.parse({}); expect(config).toEqual({}); }); - it('[#14691] REJECTS `includeObjects` / `excludeObjects` — the object declares its own exposure', () => { + it('REJECTS `includeObjects` / `excludeObjects` — the object declares its own exposure', () => { expect(() => RouteGenerationConfigSchema.parse({ includeObjects: ['account', 'contact'] })) .toThrow(/`routes\.includeObjects` was removed.*Delete the key.*enable\.apiEnabled.*enable\.apiMethods/s); expect(() => RouteGenerationConfigSchema.parse({ excludeObjects: ['system_log'] })) .toThrow(/`routes\.excludeObjects` was removed.*Delete the key.*enable\.apiEnabled.*enable\.apiMethods/s); }); - it('[#14691] REJECTS `nameTransform` — every former enum value, `none` included', () => { + it('REJECTS `nameTransform` — every former enum value, `none` included', () => { for (const nameTransform of ['none', 'plural', 'kebab-case', 'camelCase']) { expect(() => RouteGenerationConfigSchema.parse({ nameTransform }), nameTransform) .toThrow(/`routes\.nameTransform` was removed.*Delete the key.*canonical id/s); } }); - it('[#14691] REJECTS `overrides` — the per-object record turned nothing on or off', () => { + it('REJECTS `overrides` — the per-object record turned nothing on or off', () => { expect(() => RouteGenerationConfigSchema.parse({ overrides: { account: { enabled: true, basePath: '/accounts' }, @@ -473,7 +473,7 @@ describe('RestServerConfigSchema', () => { expect(config.routes).toEqual({}); }); - it('[#14691] a retired sub-object key is refused THROUGH the whole config, with its own prescription', () => { + it('a retired sub-object key is refused THROUGH the whole config, with its own prescription', () => { // The tombstones live on the sub-schemas; this pins that composing them // under `RestServerConfigSchema` changes nothing — the same authored key is // refused at the whole-config parse with the same string. @@ -697,7 +697,7 @@ describe('Integration Tests', () => { // tests were removed with the schemas (#4579, ADR-0049 enforce-or-remove). // The retirement itself is pinned below. -describe('[#4579] `RestServerConfig.openApi31` retirement', () => { +describe('`RestServerConfig.openApi31` retirement', () => { it('REJECTS an authored openApi31 block, with the fix in the message', () => { // Tombstoned, not deleted: RestServerConfigSchema is not `.strict()`, so a // plain deletion would silently strip the key — the author's webhook @@ -739,7 +739,7 @@ describe('[#4579] `RestServerConfig.openApi31` retirement', () => { // so the load-bearing pin is the compiler-API test below, with anti-vacuity // guards (a resolution failure would otherwise make every assertion pass // vacuously); sabotage-verified in the PR (re-adding an export turns it red). -describe('[#4579] the OpenApi31 block schemas are not exported from any entry point', () => { +describe('the OpenApi31 block schemas are not exported from any entry point', () => { const REMOVED_NAMES = [ 'OpenApi31ExtensionsSchema', 'OpenApi31Extensions', @@ -765,7 +765,7 @@ describe('[#4579] the OpenApi31 block schemas are not exported from any entry po expect(apiNames).toContain('RestApiConfigSchema'); for (const removed of REMOVED_NAMES) { - expect(holdersOf(removed), `no entry may export ${removed} (#4579)`).toEqual([]); + expect(holdersOf(removed), `no entry may export ${removed}`).toEqual([]); } }); @@ -789,7 +789,7 @@ describe('[#4579] the OpenApi31 block schemas are not exported from any entry po // and removed; WebhookEvent(Schema) was first renamed OpenApiWebhookEvent(Schema) // (#4572) and then removed outright with the openApi31 block (#4579). // Pin: this module declares neither the bare names nor the renamed ones. - it('does not re-expose the bare WebhookEvent/WebhookConfig names from ./api (#4572)', async () => { + it('does not re-expose the bare WebhookEvent/WebhookConfig names from ./api', async () => { const restServer = await import('./rest-server.zod'); expect('WebhookEventSchema' in restServer).toBe(false); expect('WebhookConfigSchema' in restServer).toBe(false); diff --git a/packages/spec/src/api/router.test.ts b/packages/spec/src/api/router.test.ts index 6235a4787e5..22a07d802ee 100644 --- a/packages/spec/src/api/router.test.ts +++ b/packages/spec/src/api/router.test.ts @@ -562,7 +562,7 @@ describe('Integration Tests', () => { // than a bare unrecognized-key error, and the value survives at the same // magnitude. Asserting the message, not just `.toThrow()`: a bare throw stays // green when the schema throws for some unrelated reason. -describe('RouteDefinition.timeout \u2192 timeoutMs (#15677)', () => { +describe('RouteDefinition.timeout \u2192 timeoutMs', () => { const base = { method: 'GET' as const, path: '/api/test', handler: 'test_handler' }; it('REFUSES the retired `timeout` spelling with the rename in the message', () => { diff --git a/packages/spec/src/api/sortability.test.ts b/packages/spec/src/api/sortability.test.ts index a2dc3b9b6b3..379bda5cf4f 100644 --- a/packages/spec/src/api/sortability.test.ts +++ b/packages/spec/src/api/sortability.test.ts @@ -42,7 +42,7 @@ const OPPORTUNITY_LIKE = { }, }; -describe('#10235 resolveObjectSortability — the closed category set', () => { +describe('resolveObjectSortability — the closed category set', () => { it('marks a formula column unsortable with the refusal-backed reason', () => { const { fields } = resolveObjectSortability(OPPORTUNITY_LIKE); expect(fields.expected_revenue).toEqual({ @@ -111,7 +111,7 @@ describe('#10235 resolveObjectSortability — the closed category set', () => { }); }); -describe('#10235 the #7865 anchor category — accepted, caveated, never refused', () => { +describe('the unprovisioned injected-anchor category — accepted, caveated, never refused', () => { /** An ADR-0015 external object as the registry serves it: injected anchors present. */ const EXTERNAL = { name: 'ext_customer', @@ -167,7 +167,7 @@ describe('#10235 the #7865 anchor category — accepted, caveated, never refused }); }); -describe('#10235 wire validity — the projection parses under its own schema', () => { +describe('wire validity — the projection parses under its own schema', () => { it.each([ ['oracle-shaped object', OPPORTUNITY_LIKE], ['external object', { diff --git a/packages/spec/src/api/storage.test.ts b/packages/spec/src/api/storage.test.ts index 36977558867..ef0a9f31b0c 100644 --- a/packages/spec/src/api/storage.test.ts +++ b/packages/spec/src/api/storage.test.ts @@ -634,7 +634,7 @@ describe('FileDownloadUrlResponseSchema', () => { expect(resp.data.url).toBe('/api/v1/storage/_local/raw/eyJrIjoi.c2ln'); }); - it('should reject the bare pre-#3689 shape', () => { + it('should reject the bare shape from before the shared success envelope', () => { expect(() => FileDownloadUrlResponseSchema.parse({ url: 'https://cdn.example.com/f1.png' }) ).toThrow(); @@ -655,7 +655,7 @@ describe('RawUploadResponseSchema', () => { expect(resp.data.key).toBe('user/f1.png'); }); - it('should reject the pre-#3689 `{ ok, key }` shape', () => { + it('should reject the `{ ok, key }` shape from before the shared success envelope', () => { expect(() => RawUploadResponseSchema.parse({ ok: true, key: 'user/f1.png' })).toThrow(); }); diff --git a/packages/spec/src/api/validate-data.test.ts b/packages/spec/src/api/validate-data.test.ts index 200945843a6..83ccecd1f98 100644 --- a/packages/spec/src/api/validate-data.test.ts +++ b/packages/spec/src/api/validate-data.test.ts @@ -22,7 +22,7 @@ import { import { BatchOptionsSchema } from './batch.zod'; import { DroppedFieldsEventSchema } from '../data/data-engine.zod'; -describe('ValidateDataRequest (#6037)', () => { +describe('ValidateDataRequest — asks the write path for its verdict instead of predicting it', () => { it('accepts a single candidate row', () => { const r = ValidateDataRequestSchema.safeParse({ object: 'lead', data: { company: 'Acme' } }); expect(r.success).toBe(true); @@ -54,7 +54,7 @@ describe('ValidateDataRequest (#6037)', () => { }); }); -describe('ValidateDataResponse (#6037)', () => { +describe('ValidateDataResponse — the verdict the write path would reach, persisting nothing', () => { const ok = { object: 'lead', mode: 'insert' as const, @@ -163,7 +163,7 @@ describe('ValidateDataResponse — per-row droppedFields', () => { }); }); -describe('the #4052 non-repeat', () => { +describe('the non-repeat of the retired `validateOnly` dry-run flag', () => { it('does not reuse the retired `validateOnly` spelling', () => { // `BatchOptions.validateOnly` is tombstoned: it promised a dry run that // never existed. The new operation had to avoid that vocabulary so the diff --git a/packages/spec/src/api/websocket.test.ts b/packages/spec/src/api/websocket.test.ts index 230275f2334..7f86bea3fb3 100644 --- a/packages/spec/src/api/websocket.test.ts +++ b/packages/spec/src/api/websocket.test.ts @@ -709,7 +709,7 @@ describe('WebSocketConfigSchema', () => { // than a bare unrecognized-key error, and the value survives at the same // magnitude. Asserting the message, not just `.toThrow()`: a bare throw stays // green when the schema throws for some unrelated reason. -describe('WebSocket durations carry their unit (#15677)', () => { +describe('WebSocket durations carry their unit in the key name', () => { const url = 'wss://example.com/ws'; it.each([ diff --git a/packages/spec/src/api/zod-issues-to-fields.test.ts b/packages/spec/src/api/zod-issues-to-fields.test.ts index 3db430cc9be..f3c34d32d45 100644 --- a/packages/spec/src/api/zod-issues-to-fields.test.ts +++ b/packages/spec/src/api/zod-issues-to-fields.test.ts @@ -48,7 +48,7 @@ const WELL_FORMED_FLOW = { edges: [], }; -describe('zodIssuesToFields — the D3 table against the real FlowSchema (#8124/#8055)', () => { +describe('zodIssuesToFields — the D3 table against the real FlowSchema', () => { it('the well-formed control parses clean, so every failure below is the planted edit', () => { expect(FlowSchema.safeParse(WELL_FORMED_FLOW).success).toBe(true); }); @@ -78,7 +78,7 @@ describe('zodIssuesToFields — the D3 table against the real FlowSchema (#8124/ expect(blindLabel!.code).toBe('invalid_type'); }); - it('every code emitted for every #8055-shaped fixture is a catalog member', () => { + it('every code emitted for every malformed-flow-body fixture is a catalog member', () => { const fixtures: unknown[] = [ { ...WELL_FORMED_FLOW, nodes: [{ id: 'n', type: 'notify', config: { message: 'hi' } }] }, { ...WELL_FORMED_FLOW, nodes: [{ id: 'n', type: 'notify', label: 'Notify', next: 'other' }] },