Skip to content

Commit dffd240

Browse files
committed
test(spec): the first api/ file group's test titles state each cited decision in words instead of a tracker number (stage 24)
Stage 24 of the spec lane's share of the runtime-string burn-down: the test strings shipped under packages/spec/src, the first name-ordered api/ group (ai-agents-envelope.test.ts through package-lifecycle.test.ts). 100 literals in 27 files (95 test titles and 5 declared expect messages) lose 106 tracker ids: 18 literals (22 ids) now state the cited decision in words, 10 (10 ids) get their subject back in words, and 72 (74 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 <noreply@anthropic.com>
1 parent a3bd157 commit dffd240

27 files changed

Lines changed: 100 additions & 100 deletions

‎packages/spec/src/api/ai-agents-envelope.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ describe('GET /ai/agents — the shapes a producer must NOT drift back into', ()
9191
expect(servesTheDeclaredShape(body)).toBe(false);
9292
});
9393

94-
it('the pre-#4053 bare body — no flag for `unwrapResponse` to key on', () => {
94+
it('the bare body from before the envelope relocation — no flag for `unwrapResponse` to key on', () => {
9595
const body = { agents: [ASK] };
9696
expect(servesTheDeclaredShape(body)).toBe(false);
9797
expect(envelopeViolations(body)).toContain('success is missing, must be a boolean');

‎packages/spec/src/api/analytics.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ describe('AnalyticsEndpoint', () => {
6363
});
6464
});
6565

66-
describe('AnalyticsQueryRequestSchema — the BARE AnalyticsQuery shape (#3878)', () => {
66+
describe('AnalyticsQueryRequestSchema — the BARE AnalyticsQuery shape', () => {
6767
it('should accept a minimal bare query', () => {
6868
const req = AnalyticsQueryRequestSchema.parse({
6969
cube: 'orders',
@@ -104,7 +104,7 @@ describe('AnalyticsQueryRequestSchema — the BARE AnalyticsQuery shape (#3878)'
104104
).toThrow();
105105
});
106106

107-
it('should reject the retired {cube, query: {...}} envelope (#3891 shim dialect)', () => {
107+
it('should reject the retired {cube, query: {...}} envelope (the degraded shim dialect)', () => {
108108
expect(() =>
109109
AnalyticsQueryRequestSchema.parse({
110110
cube: 'orders',
@@ -384,7 +384,7 @@ describe('GetAnalyticsMetaRequestSchema', () => {
384384
* replaced by the assertion that carries the actual load of this change: the
385385
* previously-declared shape is now rejected.
386386
*/
387-
describe('AnalyticsMetadataResponseSchema — the CubeMeta[] projection (#6442)', () => {
387+
describe('AnalyticsMetadataResponseSchema — the CubeMeta[] projection', () => {
388388
/**
389389
* A real `GET /analytics/meta` body: what `AnalyticsService.getMeta` builds —
390390
* measure/dimension names CUBE-QUALIFIED, `title` projected from the

‎packages/spec/src/api/api-entry-graph.pin.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function valueGraph(entry: string): Set<string> {
7474
return new Set([...seen].map((f) => relative(SRC, f).split('\\').join('/')));
7575
}
7676

77-
describe('`@objectstack/spec/api` stays off the assembled package body (#18576 ruling, letter B)', () => {
77+
describe('`@objectstack/spec/api` stays off the assembled package body (ruled: split the entry rather than watch its weight)', () => {
7878
const api = valueGraph('api/index.ts');
7979
const assembled = valueGraph('api-assembled/index.ts');
8080

‎packages/spec/src/api/api-error-code-type.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function refusalAt(result: z.ZodSafeParseResult<unknown>): Array<{ code: string;
6868
return (result.error?.issues ?? []).map((issue) => ({ code: issue.code, path: issue.path }));
6969
}
7070

71-
describe('[#19920] ApiError.code is typed as the vocabulary its schema parses against', () => {
71+
describe('ApiError.code is typed as the vocabulary its schema parses against', () => {
7272
it('every body the type refuses is refused by the schema at `code`', () => {
7373
expect(refusalAt(ApiErrorSchema.safeParse({ code: 42, message: 'x' }))).toEqual([
7474
{ code: 'invalid_value', path: ['code'] },

‎packages/spec/src/api/apis-publish-gates.test.ts‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function accept(stack: Record<string, unknown>) {
8585
return result.success ? result.data.apis : undefined;
8686
}
8787

88-
describe('[#5111] the flip — a well-formed `apis:` publishes', () => {
88+
describe('the flip — a well-formed `apis:` publishes', () => {
8989
it('accepts an object_operation endpoint under the stack\'s own namespace', () => {
9090
const apis = accept({ manifest, apis: [validObjectEndpoint] });
9191
expect(apis).toHaveLength(1);
@@ -149,7 +149,7 @@ describe('[#5111] the flip — a well-formed `apis:` publishes', () => {
149149
});
150150
});
151151

152-
it('still accepts an EMPTY and an ABSENT `apis:` — the #4936 regression pin', () => {
152+
it('still accepts an EMPTY and an ABSENT `apis:` — never refused, even while a non-empty one was', () => {
153153
expect(ObjectStackDefinitionSchema.safeParse({ manifest, apis: [] }).success).toBe(true);
154154
expect(ObjectStackDefinitionSchema.safeParse({ manifest }).success).toBe(true);
155155
expect(() => defineStack({ manifest, apis: [] })).not.toThrow();
@@ -162,7 +162,7 @@ describe('[#5111] the flip — a well-formed `apis:` publishes', () => {
162162
});
163163
});
164164

165-
describe('[#5111] gate (c) — namespace carve-out (ADR-0121 D1/D2)', () => {
165+
describe('gate (c) — namespace carve-out (ADR-0121 D1/D2)', () => {
166166
it('rejects a path outside the `apps/<namespace>/` mount, naming the endpoint and the shape', () => {
167167
const message = reject({
168168
manifest,
@@ -214,7 +214,7 @@ describe('[#5111] gate (c) — namespace carve-out (ADR-0121 D1/D2)', () => {
214214
});
215215
});
216216

217-
describe('[#5310] the `path` vocabulary text is itself publishable', () => {
217+
describe('the `path` vocabulary text is itself publishable', () => {
218218
/**
219219
* `ApiEndpointSchema.path`'s `.describe()` is not a code comment. Since `api`
220220
* became a registered metadata kind (#5271) it is the field help the
@@ -273,7 +273,7 @@ describe('[#5310] the `path` vocabulary text is itself publishable', () => {
273273
});
274274
});
275275

276-
describe('[#5111] gate (a) — the supported subset (mirrors `planEndpointTarget`)', () => {
276+
describe('gate (a) — the supported subset (mirrors `planEndpointTarget`)', () => {
277277
it("rejects `type: 'script'` with the flow prescription", () => {
278278
const message = reject({
279279
manifest,
@@ -324,7 +324,7 @@ describe('[#5111] gate (a) — the supported subset (mirrors `planEndpointTarget
324324
});
325325
});
326326

327-
describe('[#5111] gate (b) — mapping declarations (mirrors `mappingDeclarationRejection`)', () => {
327+
describe('gate (b) — mapping declarations (mirrors `mappingDeclarationRejection`)', () => {
328328
const bodyEndpoint = {
329329
...validObjectEndpoint,
330330
name: 'showcase_task_create',
@@ -399,7 +399,7 @@ describe('[#5111] gate (b) — mapping declarations (mirrors `mappingDeclaration
399399
});
400400
});
401401

402-
describe('[#5111] gate (e) — policy keys (ADR-0121 D6 + the E4 refusals)', () => {
402+
describe('gate (e) — policy keys (ADR-0121 D6 + the E4 refusals)', () => {
403403
it('rejects `authRequired: false` with NO rateLimit', () => {
404404
const message = reject({ manifest, apis: [{ ...validFlowEndpoint, authRequired: false }] });
405405
expect(message).toMatch(/ADR-0121 D6|armed rate limit/i);
@@ -464,7 +464,7 @@ describe('[#5111] gate (e) — policy keys (ADR-0121 D6 + the E4 refusals)', ()
464464
});
465465
});
466466

467-
describe('[#5111] gate (d) — one claim per METHOD + path inside a stack', () => {
467+
describe('gate (d) — one claim per METHOD + path inside a stack', () => {
468468
it('rejects two endpoints claiming the same method and path, naming BOTH', () => {
469469
const message = reject({
470470
manifest,
@@ -508,7 +508,7 @@ describe('[#5111] gate (d) — one claim per METHOD + path inside a stack', () =
508508
});
509509
});
510510

511-
describe('[#5111] every rejection is actionable, and reaches every publish seam', () => {
511+
describe('every rejection is actionable, and reaches every publish seam', () => {
512512
it('reports one issue per offending endpoint — three bad endpoints, three rejections', () => {
513513
const result = ObjectStackDefinitionSchema.safeParse({
514514
manifest,
@@ -538,7 +538,7 @@ describe('[#5111] every rejection is actionable, and reaches every publish seam'
538538
});
539539
});
540540

541-
describe('[#5111] the `ApiEndpoint` vocabulary itself is untouched', () => {
541+
describe('the `ApiEndpoint` vocabulary itself is untouched', () => {
542542
// Anti-vacuity for the whole file: the flip is validation logic on the
543543
// EXISTING keys. If a key had been added, removed or renamed, every
544544
// assertion above could still pass while the frozen-vocabulary constraint
@@ -565,7 +565,7 @@ describe('[#5111] the `ApiEndpoint` vocabulary itself is untouched', () => {
565565
expect(parsed.authRequired).toBe(true);
566566
});
567567

568-
it('keeps endpoint-level `rateLimit` in the vocabulary (#4910-Q2 routed it here)', () => {
568+
it('keeps endpoint-level `rateLimit` in the vocabulary (ruled: left to the endpoint executor, not the server-level seam)', () => {
569569
const parsed = ApiEndpointSchema.parse({
570570
name: 'x_endpoint',
571571
path: '/api/v1/apps/showcase/x',
@@ -594,7 +594,7 @@ describe('identityFreeEndpointGateFailure — the same judge, minus stack identi
594594
expect(identityFreeEndpointGateFailure(ApiEndpointSchema.parse(validObjectEndpoint))).toBeUndefined();
595595
});
596596

597-
it('still refuses D6 — the gate with no runtime counterpart, and the reason #5189 exists', () => {
597+
it('still refuses D6 — the gate with no runtime counterpart, so the per-item publish path runs it too', () => {
598598
const failure = identityFreeEndpointGateFailure(
599599
ApiEndpointSchema.parse({ ...validObjectEndpoint, cacheTtlSeconds: undefined, authRequired: false }),
600600
);

‎packages/spec/src/api/auth-endpoints.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ describe('AuthEndpointSchema', () => {
109109
// leave nothing to grep (#3733, ADR-0104) — the tombstone is what makes the
110110
// withdrawal audible, so it is pinned on both legs: the prescription a writer
111111
// hits, and the absence a reader gets.
112-
describe('AuthFeaturesConfig retired flags (#7481)', () => {
112+
describe('AuthFeaturesConfig retired flags (ruled: stop advertising them)', () => {
113113
const valid = { twoFactor: false, organization: true };
114114

115115
it('rejects `passkeys` with its own prescription, naming the missing consumer', () => {
@@ -181,7 +181,7 @@ describe('getAuthEndpointUrl', () => {
181181
// than a bare unrecognized-key error, and the value survives at the same
182182
// magnitude. Asserting the message, not just `.toThrow()`: a bare throw stays
183183
// green when the schema throws for some unrelated reason.
184-
describe('DeviceRequestResponse.interval \u2192 intervalSeconds (#15677)', () => {
184+
describe('DeviceRequestResponse.interval \u2192 intervalSeconds', () => {
185185
const base = {
186186
code: 'ABCD-1234',
187187
verificationUrl: 'https://example.com/device',

‎packages/spec/src/api/auth.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ describe('SessionUserSchema', () => {
8585
});
8686
});
8787

88-
describe('SessionUser.language retirement (#14788, ADR-0049 — maintainer ruling D, 2026-09-03)', () => {
88+
describe('SessionUser.language retirement (ADR-0049 — ruled: gone, with no replacement field)', () => {
8989
const base = { id: 'usr_1', email: 'a@b.com', name: 'A' };
9090

9191
it('REJECTS a `language` value, with the prescription in the message', () => {
@@ -152,7 +152,7 @@ describe('SessionUser.language retirement (#14788, ADR-0049 — maintainer rulin
152152
// and the excluded ledger really is where the key's record lives.
153153
expect(fs.existsSync(tombstone)).toBe(true);
154154
expect(fs.existsSync(path.join(ledger, 'entries', 'retired-keys', '18.api__SessionUser__language.ts'))).toBe(true);
155-
expect(readers, 'a reader of SessionUser.language reappeared — the key is retired (#14788)').toEqual([]);
155+
expect(readers, 'a reader of SessionUser.language reappeared — the key is retired').toEqual([]);
156156
});
157157
});
158158

‎packages/spec/src/api/automation-api.zod.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ describe('AutomationRunPathParamsSchema', () => {
8989
// List Flows — RETIRED (#19543, door ④)
9090
// ==========================================
9191

92-
describe('the GET /api/v1/automation flow-list door is retired (#19543)', () => {
92+
describe('the GET /api/v1/automation flow-list door is retired', () => {
9393
// Flows are metadata (ADR-0106); the list is `GET /api/v1/meta/flow`. The
9494
// three schemas left with the route and are registered as whole-def removals
9595
// (`RETIRED_DEFS_BY_MAJOR[18]`), so an export that came back would be a
@@ -324,7 +324,7 @@ describe('TriggerFlowResponseSchema', () => {
324324
// undeclared keys (BaseResponseSchema.extend + plain z.object), so before
325325
// the widening the paused-run triple below "passed" while the parse silently
326326
// dropped `status`, the `runId` a caller resumes with and the whole screen.
327-
it('should preserve the paused-run triple — status, runId and the screen (#9378/#9510 third state)', () => {
327+
it('should preserve the paused-run triple — status, runId and the screen (a pause is the third state, not a failure)', () => {
328328
const result = TriggerFlowResponseSchema.parse({
329329
success: true,
330330
data: {
@@ -596,7 +596,7 @@ describe('ListRunsRequestSchema', () => {
596596
})).toThrow();
597597
});
598598

599-
it('declares exactly the canonical ExecutionStatus set (#7359)', () => {
599+
it('declares exactly the canonical ExecutionStatus set', () => {
600600
// The wire's filter and the runtime boundary that now enforces it must
601601
// accept ONE set. The boundary reads `ExecutionStatus.options`; this pins
602602
// that the schema does too, so a member added to the enum cannot end up
@@ -754,7 +754,7 @@ describe('AutomationApiContracts', () => {
754754
expect(Object.keys(AutomationApiContracts)).toHaveLength(8);
755755
});
756756

757-
it('declares no flow-list entry and no GET at the bare /api/v1/automation path (#19543)', () => {
757+
it('declares no flow-list entry and no GET at the bare /api/v1/automation path', () => {
758758
expect(Object.keys(AutomationApiContracts)).not.toContain('listFlows');
759759
const routes = Object.values(AutomationApiContracts).map((c) => `${c.method} ${c.path}`);
760760
expect(routes).not.toContain('GET /api/v1/automation');

‎packages/spec/src/api/batch.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('BatchOptionsSchema', () => {
7575
expect(options.continueOnError).toBe(true);
7676
});
7777

78-
it('rejects the retired `validateOnly` key with its prescription (#3963 follow-up)', () => {
78+
it('rejects the retired `validateOnly` key with its prescription', () => {
7979
// Never implemented — a "dry-run" that silently persisted. Tombstoned so
8080
// writing it is audible rather than silently stripped (ADR-0104 / PD #10).
8181
const result = BatchOptionsSchema.safeParse({ validateOnly: true });
@@ -197,7 +197,7 @@ describe('UpdateManyRequestSchema', () => {
197197
// had already drifted: batch.zod's accepted `{}` rows, protocol.zod's required
198198
// id+data, and only the latter was ever enforced. Pin the relationship so a
199199
// future edit to one cannot silently fork them again.
200-
describe('protocol request schemas derive from the wire-body schemas (#3939)', () => {
200+
describe('protocol request schemas derive from the wire-body schemas', () => {
201201
it('updateMany: same record shape, plus object', async () => {
202202
const { UpdateManyDataRequestSchema } = await import('./protocol.zod');
203203
const records = [{ id: '1', data: { name: 'x' } }];

‎packages/spec/src/api/contract.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ describe('QueryOptimizationConfigSchema', () => {
701701
* unregistered code must still fail, and `ApiErrorSchema` must not have been
702702
* widened by the factory's existence.
703703
*/
704-
describe('makeApiErrorSchema (federated ledger, #4805)', () => {
704+
describe('makeApiErrorSchema (federated ledger)', () => {
705705
const DOWNSTREAM_CODES = ['CONTACT_SALES_PLAN', 'PRODUCTION_ENV_LIMIT'] as const;
706706
const DownstreamApiError = makeApiErrorSchema(DOWNSTREAM_CODES);
707707

@@ -778,7 +778,7 @@ describe('makeApiErrorSchema (federated ledger, #4805)', () => {
778778
// than a bare unrecognized-key error, and the value survives at the same
779779
// magnitude. Asserting the message, not just `.toThrow()`: a bare throw stays
780780
// green when the schema throws for some unrelated reason.
781-
describe('DataLoaderConfig.cacheTtl \u2192 cacheTtlSeconds (#15677)', () => {
781+
describe('DataLoaderConfig.cacheTtl \u2192 cacheTtlSeconds', () => {
782782
it('REFUSES the retired `cacheTtl` spelling with the rename in the message', () => {
783783
const result = DataLoaderConfigSchema.safeParse({ cacheTtl: 60 });
784784
expect(result.success).toBe(false);
@@ -810,7 +810,7 @@ describe('DataLoaderConfig.cacheTtl \u2192 cacheTtlSeconds (#15677)', () => {
810810
// contradict, the declaration is taken from the sibling channel that does speak:
811811
// every key in this spec that spells the unit for a processing time spells
812812
// milliseconds (`tracing.durationMs`, `worker.durationMs`, `worker.avgExecutionMs`).
813-
describe('BaseResponse.meta.duration declares milliseconds (#18124)', () => {
813+
describe('BaseResponse.meta.duration declares milliseconds', () => {
814814
it('refuses a fractional millisecond count', () => {
815815
const result = BaseResponseSchema.safeParse({
816816
success: true,

0 commit comments

Comments
 (0)