@cleocode/contracts 2026.4.69 → 2026.4.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/acceptance-gate.test.d.ts +14 -0
- package/dist/__tests__/acceptance-gate.test.d.ts.map +1 -0
- package/dist/__tests__/acceptance-gate.test.js +642 -0
- package/dist/__tests__/acceptance-gate.test.js.map +1 -0
- package/dist/__tests__/attachment.test.d.ts +17 -0
- package/dist/__tests__/attachment.test.d.ts.map +1 -0
- package/dist/__tests__/attachment.test.js +505 -0
- package/dist/__tests__/attachment.test.js.map +1 -0
- package/dist/__tests__/evidence-record.test.d.ts +14 -0
- package/dist/__tests__/evidence-record.test.d.ts.map +1 -0
- package/dist/__tests__/evidence-record.test.js +362 -0
- package/dist/__tests__/evidence-record.test.js.map +1 -0
- package/dist/__tests__/invariants.test.d.ts +19 -0
- package/dist/__tests__/invariants.test.d.ts.map +1 -0
- package/dist/__tests__/invariants.test.js +351 -0
- package/dist/__tests__/invariants.test.js.map +1 -0
- package/dist/acceptance-gate-schema.d.ts +701 -0
- package/dist/acceptance-gate-schema.d.ts.map +1 -0
- package/dist/acceptance-gate-schema.js +303 -0
- package/dist/acceptance-gate-schema.js.map +1 -0
- package/dist/acceptance-gate.d.ts +350 -0
- package/dist/acceptance-gate.d.ts.map +1 -0
- package/dist/acceptance-gate.js +22 -0
- package/dist/acceptance-gate.js.map +1 -0
- package/dist/attachment-schema.d.ts +243 -0
- package/dist/attachment-schema.d.ts.map +1 -0
- package/dist/attachment-schema.js +200 -0
- package/dist/attachment-schema.js.map +1 -0
- package/dist/attachment.d.ts +224 -0
- package/dist/attachment.d.ts.map +1 -0
- package/dist/attachment.js +21 -0
- package/dist/attachment.js.map +1 -0
- package/dist/evidence-record-schema.d.ts +202 -0
- package/dist/evidence-record-schema.d.ts.map +1 -0
- package/dist/evidence-record-schema.js +130 -0
- package/dist/evidence-record-schema.js.map +1 -0
- package/dist/evidence-record.d.ts +167 -0
- package/dist/evidence-record.d.ts.map +1 -0
- package/dist/evidence-record.js +21 -0
- package/dist/evidence-record.js.map +1 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/task-evidence.d.ts +251 -0
- package/dist/task-evidence.d.ts.map +1 -0
- package/dist/task-evidence.js +89 -0
- package/dist/task-evidence.js.map +1 -0
- package/dist/task.d.ts +23 -4
- package/dist/task.d.ts.map +1 -1
- package/package.json +8 -2
- package/schemas/acceptance-gate.schema.json +9 -0
- package/schemas/attachment.schema.json +9 -0
- package/schemas/gate-result-details.schema.json +9 -0
- package/schemas/gate-result.schema.json +9 -0
- package/schemas/manifest-v1.json +176 -0
- package/schemas/task-evidence.schema.json +9 -0
- package/schemas/task.schema.json +9 -0
- package/src/__tests__/acceptance-gate.test.ts +736 -0
- package/src/__tests__/attachment.test.ts +601 -0
- package/src/__tests__/evidence-record.test.ts +412 -0
- package/src/__tests__/invariants.test.ts +445 -0
- package/src/acceptance-gate-schema.ts +347 -0
- package/src/acceptance-gate.ts +370 -0
- package/src/attachment-schema.ts +223 -0
- package/src/attachment.ts +245 -0
- package/src/evidence-record-schema.ts +158 -0
- package/src/evidence-record.ts +182 -0
- package/src/index.ts +114 -1
- package/src/task-evidence.ts +239 -0
- package/src/task.ts +24 -4
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contract invariant tests for @cleocode/contracts.
|
|
3
|
+
*
|
|
4
|
+
* Asserts structural rules that must hold across ALL contracts:
|
|
5
|
+
*
|
|
6
|
+
* 1. No contract field named `notes`, `details`, or `text` is typed as bare
|
|
7
|
+
* `string` when a structured shape is possible.
|
|
8
|
+
* Whitelisted exceptions are documented with inline rationale.
|
|
9
|
+
*
|
|
10
|
+
* 2. All discriminated unions use `kind` as the discriminant — NOT `type`.
|
|
11
|
+
* Convention: `type` is reserved for FileAssertion variants only (legacy).
|
|
12
|
+
*
|
|
13
|
+
* 3. Zod schemas for each major contract type are exported from the index.
|
|
14
|
+
*
|
|
15
|
+
* @epic T760
|
|
16
|
+
* @task T804
|
|
17
|
+
*/
|
|
18
|
+
import { describe, expect, it } from 'vitest';
|
|
19
|
+
import { acceptanceGateResultSchema, acceptanceGateSchema, attachmentSchema, fileAssertionSchema, gateResultDetailsSchema, taskEvidenceSchema, } from '../index.js';
|
|
20
|
+
/** Casts a schema to the opaque discriminated-union def shape. */
|
|
21
|
+
function asDiscriminatedUnion(schema) {
|
|
22
|
+
return schema._def;
|
|
23
|
+
}
|
|
24
|
+
/** Returns the discriminator key for a discriminated-union schema. */
|
|
25
|
+
function zodDiscriminator(schema) {
|
|
26
|
+
return asDiscriminatedUnion(schema).discriminator;
|
|
27
|
+
}
|
|
28
|
+
/** Returns option schemas from a discriminated-union schema. */
|
|
29
|
+
function zodOptions(schema) {
|
|
30
|
+
return asDiscriminatedUnion(schema).options;
|
|
31
|
+
}
|
|
32
|
+
/** Returns the literal value(s) from a literal schema field. */
|
|
33
|
+
function zodLiteralValues(literalField) {
|
|
34
|
+
// Zod v4: _def.values is an array
|
|
35
|
+
if (Array.isArray(literalField._def.values))
|
|
36
|
+
return literalField._def.values;
|
|
37
|
+
// Zod v3 compat: _def.value is a scalar
|
|
38
|
+
if (literalField._def.value !== undefined)
|
|
39
|
+
return [literalField._def.value];
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
/** Unwraps a ZodOptional and returns its inner discriminated-union def. */
|
|
43
|
+
function unwrapOptionalDiscriminator(schema) {
|
|
44
|
+
const optDef = schema._def;
|
|
45
|
+
return optDef.innerType._def.discriminator;
|
|
46
|
+
}
|
|
47
|
+
// ─── Rule 1: Field name invariants ────────────────────────────────────────────
|
|
48
|
+
/**
|
|
49
|
+
* Whitelisted fields where `string` typing is acceptable.
|
|
50
|
+
*
|
|
51
|
+
* Each entry documents WHY the bare string is appropriate so future
|
|
52
|
+
* reviewers can assess whether to keep or resolve the whitelist entry.
|
|
53
|
+
*/
|
|
54
|
+
const WHITELISTED_STRING_FIELDS = {
|
|
55
|
+
// task.ts / TaskCreate — `notes?: string` is a single append note for the
|
|
56
|
+
// create flow, not a queryable structured record. Structured notes live in
|
|
57
|
+
// TaskWorkState.sessionNotes (SessionNote[]).
|
|
58
|
+
'TaskCreate.notes': 'Single append note for create flow; structured notes live in SessionNote[]',
|
|
59
|
+
// task.ts / Task — `notes?: string[]` is legacy timestamped notes array.
|
|
60
|
+
// Structural upgrade tracked separately.
|
|
61
|
+
'Task.notes': 'Legacy timestamped notes array; structured upgrade tracked separately',
|
|
62
|
+
// task-record.ts / TaskRecord — `notes?: string[]` mirrors Task.notes for
|
|
63
|
+
// the string-widened wire format used by dispatch/LAFS.
|
|
64
|
+
'TaskRecord.notes': 'Wire-format mirror of Task.notes; same legacy rationale',
|
|
65
|
+
// task.ts / Release — `notes?: string | null` is a release changelog text.
|
|
66
|
+
// Not a query target; free-form narrative is appropriate here.
|
|
67
|
+
'Release.notes': 'Release changelog text — free-form narrative, not query target',
|
|
68
|
+
// session.ts — `notes?: string[]` is a session-level log accumulator.
|
|
69
|
+
'Session.notes': 'Session log accumulator — structured upgrade tracked separately',
|
|
70
|
+
// facade.ts — various `notes?: string` on action params (complete, prepare, etc.)
|
|
71
|
+
// are ephemeral caller-provided notes, not persisted entities.
|
|
72
|
+
'TasksAPI.notes': 'Ephemeral caller note on action params — not a persisted entity',
|
|
73
|
+
// memory.ts — BridgePattern/BridgeObservation `text: string` is the
|
|
74
|
+
// primary content field; the type IS the structure here.
|
|
75
|
+
'MemoryBridge.text': 'Primary content field in memory bridge — the text IS the value',
|
|
76
|
+
// SessionNote — `note: string` is the actual note content, not a metadata field.
|
|
77
|
+
// The struct is already structured (has taskId, sessionId, timestamp).
|
|
78
|
+
'SessionNote.note': 'Content field on an already-structured SessionNote record',
|
|
79
|
+
// data-accessor.ts — `notesJson?: string` is a raw JSON column for
|
|
80
|
+
// database queries where the serialised form is needed.
|
|
81
|
+
'DataAccessor.notesJson': 'Raw JSON column for DB query interface — deserialization is callers job',
|
|
82
|
+
// evidence-record.ts / ValidateSpecCheckRecord — `details: string` is a
|
|
83
|
+
// human-readable summary of per-REQ-ID results. Structured details for
|
|
84
|
+
// machine parsing live in other fields (reqIdsChecked, passed).
|
|
85
|
+
'ValidateSpecCheckRecord.details': 'Human-readable per-REQ-ID summary; machine fields are reqIdsChecked+passed',
|
|
86
|
+
};
|
|
87
|
+
describe('Rule 1 — no bare string on notes/details/text fields (with whitelist)', () => {
|
|
88
|
+
it('GateResultDetails does not use bare string for kind-specific payloads', () => {
|
|
89
|
+
// GateResultDetails must be a discriminated union — verify via schema shape
|
|
90
|
+
expect(zodDiscriminator(gateResultDetailsSchema)).toBe('kind');
|
|
91
|
+
});
|
|
92
|
+
it('AcceptanceGateResult.details is typed via GateResultDetails (not bare string)', () => {
|
|
93
|
+
const resultShape = acceptanceGateResultSchema.shape;
|
|
94
|
+
// details must exist as an optional discriminated union (not a plain string)
|
|
95
|
+
expect(resultShape.details).toBeDefined();
|
|
96
|
+
// Unwrap the ZodOptional and confirm the inner type is a discriminated union
|
|
97
|
+
expect(unwrapOptionalDiscriminator(resultShape.details)).toBe('kind');
|
|
98
|
+
});
|
|
99
|
+
it('TaskEvidence does not use bare string as the primary evidence shape', () => {
|
|
100
|
+
// taskEvidenceSchema must be a discriminated union, not a plain string type
|
|
101
|
+
expect(zodDiscriminator(taskEvidenceSchema)).toBe('kind');
|
|
102
|
+
});
|
|
103
|
+
it('documents all whitelisted string fields', () => {
|
|
104
|
+
// This test serves as a registry assertion: the whitelist must be non-empty
|
|
105
|
+
// and each key must follow the format 'TypeName.fieldName'
|
|
106
|
+
const entries = Object.entries(WHITELISTED_STRING_FIELDS);
|
|
107
|
+
expect(entries.length).toBeGreaterThan(0);
|
|
108
|
+
for (const [key, reason] of entries) {
|
|
109
|
+
expect(key).toMatch(/^\w[\w.]+\.\w+$/);
|
|
110
|
+
expect(reason.length).toBeGreaterThan(10);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
// ─── Rule 2: Discriminated unions use `kind`, not `type` ──────────────────────
|
|
115
|
+
describe('Rule 2 — discriminated unions use `kind` discriminant (not `type`)', () => {
|
|
116
|
+
it('acceptanceGateSchema uses kind discriminant', () => {
|
|
117
|
+
expect(zodDiscriminator(acceptanceGateSchema)).toBe('kind');
|
|
118
|
+
});
|
|
119
|
+
it('gateResultDetailsSchema uses kind discriminant', () => {
|
|
120
|
+
expect(zodDiscriminator(gateResultDetailsSchema)).toBe('kind');
|
|
121
|
+
});
|
|
122
|
+
it('taskEvidenceSchema uses kind discriminant', () => {
|
|
123
|
+
expect(zodDiscriminator(taskEvidenceSchema)).toBe('kind');
|
|
124
|
+
});
|
|
125
|
+
it('attachmentSchema uses kind discriminant', () => {
|
|
126
|
+
expect(zodDiscriminator(attachmentSchema)).toBe('kind');
|
|
127
|
+
});
|
|
128
|
+
it('FileAssertion uses type discriminant (documented exception — legacy)', () => {
|
|
129
|
+
// FileAssertion predates the `kind` convention and uses `type`.
|
|
130
|
+
// This test documents the exception, not enforces it.
|
|
131
|
+
// Resolution tracked under a future cleanup task.
|
|
132
|
+
expect(zodDiscriminator(fileAssertionSchema)).toBe('type');
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
// ─── Rule 3: Major Zod schemas are exported from index ────────────────────────
|
|
136
|
+
describe('Rule 3 — major Zod schemas are exported from index', () => {
|
|
137
|
+
it('exports acceptanceGateSchema', () => {
|
|
138
|
+
expect(typeof acceptanceGateSchema.parse).toBe('function');
|
|
139
|
+
});
|
|
140
|
+
it('exports acceptanceGateResultSchema', () => {
|
|
141
|
+
expect(typeof acceptanceGateResultSchema.parse).toBe('function');
|
|
142
|
+
});
|
|
143
|
+
it('exports gateResultDetailsSchema', () => {
|
|
144
|
+
expect(typeof gateResultDetailsSchema.parse).toBe('function');
|
|
145
|
+
});
|
|
146
|
+
it('exports taskEvidenceSchema', () => {
|
|
147
|
+
expect(typeof taskEvidenceSchema.parse).toBe('function');
|
|
148
|
+
});
|
|
149
|
+
it('exports attachmentSchema', () => {
|
|
150
|
+
expect(typeof attachmentSchema.parse).toBe('function');
|
|
151
|
+
});
|
|
152
|
+
it('acceptanceGateSchema is a discriminated union with 6 variants', () => {
|
|
153
|
+
const opts = zodOptions(acceptanceGateSchema);
|
|
154
|
+
expect(opts.length).toBe(6);
|
|
155
|
+
const kinds = opts.flatMap((opt) => zodLiteralValues(opt.shape.kind));
|
|
156
|
+
expect(kinds).toContain('test');
|
|
157
|
+
expect(kinds).toContain('file');
|
|
158
|
+
expect(kinds).toContain('command');
|
|
159
|
+
expect(kinds).toContain('lint');
|
|
160
|
+
expect(kinds).toContain('http');
|
|
161
|
+
expect(kinds).toContain('manual');
|
|
162
|
+
});
|
|
163
|
+
it('gateResultDetailsSchema is a discriminated union with 6 variants', () => {
|
|
164
|
+
const opts = zodOptions(gateResultDetailsSchema);
|
|
165
|
+
expect(opts.length).toBe(6);
|
|
166
|
+
const kinds = opts.flatMap((opt) => zodLiteralValues(opt.shape.kind));
|
|
167
|
+
expect(kinds).toContain('test');
|
|
168
|
+
expect(kinds).toContain('file');
|
|
169
|
+
expect(kinds).toContain('command');
|
|
170
|
+
expect(kinds).toContain('lint');
|
|
171
|
+
expect(kinds).toContain('http');
|
|
172
|
+
expect(kinds).toContain('manual');
|
|
173
|
+
});
|
|
174
|
+
it('taskEvidenceSchema is a discriminated union with 5 variants', () => {
|
|
175
|
+
const opts = zodOptions(taskEvidenceSchema);
|
|
176
|
+
expect(opts.length).toBe(5);
|
|
177
|
+
const kinds = opts.flatMap((opt) => zodLiteralValues(opt.shape.kind));
|
|
178
|
+
expect(kinds).toContain('file');
|
|
179
|
+
expect(kinds).toContain('log');
|
|
180
|
+
expect(kinds).toContain('screenshot');
|
|
181
|
+
expect(kinds).toContain('test-output');
|
|
182
|
+
expect(kinds).toContain('command-output');
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
// ─── Structural round-trip sanity checks ──────────────────────────────────────
|
|
186
|
+
describe('GateResultDetails — round-trip parse for all 6 kinds', () => {
|
|
187
|
+
it('parses test details', () => {
|
|
188
|
+
const result = gateResultDetailsSchema.parse({
|
|
189
|
+
kind: 'test',
|
|
190
|
+
exitCode: 0,
|
|
191
|
+
stdout: 'ok 7/7',
|
|
192
|
+
stderr: '',
|
|
193
|
+
duration: 3142,
|
|
194
|
+
});
|
|
195
|
+
expect(result.kind).toBe('test');
|
|
196
|
+
if (result.kind === 'test') {
|
|
197
|
+
expect(result.exitCode).toBe(0);
|
|
198
|
+
expect(result.duration).toBe(3142);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
it('parses file details', () => {
|
|
202
|
+
const result = gateResultDetailsSchema.parse({
|
|
203
|
+
kind: 'file',
|
|
204
|
+
path: 'src/timer.ts',
|
|
205
|
+
passedAssertions: ['exists', 'nonEmpty'],
|
|
206
|
+
failedAssertions: [],
|
|
207
|
+
});
|
|
208
|
+
expect(result.kind).toBe('file');
|
|
209
|
+
if (result.kind === 'file') {
|
|
210
|
+
expect(result.passedAssertions).toHaveLength(2);
|
|
211
|
+
expect(result.failedAssertions).toHaveLength(0);
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
it('parses command details', () => {
|
|
215
|
+
const result = gateResultDetailsSchema.parse({
|
|
216
|
+
kind: 'command',
|
|
217
|
+
cmd: 'cleo doctor',
|
|
218
|
+
exitCode: 0,
|
|
219
|
+
stdout: 'all checks passed',
|
|
220
|
+
});
|
|
221
|
+
expect(result.kind).toBe('command');
|
|
222
|
+
if (result.kind === 'command') {
|
|
223
|
+
expect(result.exitCode).toBe(0);
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
it('parses lint details', () => {
|
|
227
|
+
const result = gateResultDetailsSchema.parse({
|
|
228
|
+
kind: 'lint',
|
|
229
|
+
tool: 'biome',
|
|
230
|
+
warnings: 0,
|
|
231
|
+
errors: 0,
|
|
232
|
+
});
|
|
233
|
+
expect(result.kind).toBe('lint');
|
|
234
|
+
if (result.kind === 'lint') {
|
|
235
|
+
expect(result.errors).toBe(0);
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
it('parses http details', () => {
|
|
239
|
+
const result = gateResultDetailsSchema.parse({
|
|
240
|
+
kind: 'http',
|
|
241
|
+
url: 'http://localhost:8080/',
|
|
242
|
+
status: 200,
|
|
243
|
+
body: '<!DOCTYPE html>',
|
|
244
|
+
});
|
|
245
|
+
expect(result.kind).toBe('http');
|
|
246
|
+
if (result.kind === 'http') {
|
|
247
|
+
expect(result.status).toBe(200);
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
it('parses manual details', () => {
|
|
251
|
+
const result = gateResultDetailsSchema.parse({
|
|
252
|
+
kind: 'manual',
|
|
253
|
+
prompt: 'Does the dark theme toggle work?',
|
|
254
|
+
accepted: true,
|
|
255
|
+
});
|
|
256
|
+
expect(result.kind).toBe('manual');
|
|
257
|
+
if (result.kind === 'manual') {
|
|
258
|
+
expect(result.accepted).toBe(true);
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
it('rejects unknown kind', () => {
|
|
262
|
+
expect(() => gateResultDetailsSchema.parse({
|
|
263
|
+
kind: 'unknown',
|
|
264
|
+
exitCode: 0,
|
|
265
|
+
})).toThrow();
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
describe('TaskEvidence — round-trip parse for all 5 kinds', () => {
|
|
269
|
+
const sha256 = 'a'.repeat(64);
|
|
270
|
+
const timestamp = '2026-04-15T10:00:00.000Z';
|
|
271
|
+
it('parses file evidence', () => {
|
|
272
|
+
const result = taskEvidenceSchema.parse({
|
|
273
|
+
kind: 'file',
|
|
274
|
+
sha256,
|
|
275
|
+
timestamp,
|
|
276
|
+
path: 'packages/contracts/dist/index.js',
|
|
277
|
+
mime: 'text/javascript',
|
|
278
|
+
});
|
|
279
|
+
expect(result.kind).toBe('file');
|
|
280
|
+
if (result.kind === 'file') {
|
|
281
|
+
expect(result.path).toBe('packages/contracts/dist/index.js');
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
it('parses log evidence', () => {
|
|
285
|
+
const result = taskEvidenceSchema.parse({
|
|
286
|
+
kind: 'log',
|
|
287
|
+
sha256,
|
|
288
|
+
timestamp,
|
|
289
|
+
source: 'pnpm test',
|
|
290
|
+
});
|
|
291
|
+
expect(result.kind).toBe('log');
|
|
292
|
+
if (result.kind === 'log') {
|
|
293
|
+
expect(result.source).toBe('pnpm test');
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
it('parses screenshot evidence', () => {
|
|
297
|
+
const result = taskEvidenceSchema.parse({
|
|
298
|
+
kind: 'screenshot',
|
|
299
|
+
sha256,
|
|
300
|
+
timestamp,
|
|
301
|
+
mime: 'image/png',
|
|
302
|
+
});
|
|
303
|
+
expect(result.kind).toBe('screenshot');
|
|
304
|
+
});
|
|
305
|
+
it('parses test-output evidence', () => {
|
|
306
|
+
const result = taskEvidenceSchema.parse({
|
|
307
|
+
kind: 'test-output',
|
|
308
|
+
sha256,
|
|
309
|
+
timestamp,
|
|
310
|
+
passed: 42,
|
|
311
|
+
failed: 0,
|
|
312
|
+
skipped: 2,
|
|
313
|
+
exitCode: 0,
|
|
314
|
+
});
|
|
315
|
+
expect(result.kind).toBe('test-output');
|
|
316
|
+
if (result.kind === 'test-output') {
|
|
317
|
+
expect(result.passed).toBe(42);
|
|
318
|
+
expect(result.failed).toBe(0);
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
it('parses command-output evidence', () => {
|
|
322
|
+
const result = taskEvidenceSchema.parse({
|
|
323
|
+
kind: 'command-output',
|
|
324
|
+
sha256,
|
|
325
|
+
timestamp,
|
|
326
|
+
cmd: 'pnpm run build',
|
|
327
|
+
exitCode: 0,
|
|
328
|
+
});
|
|
329
|
+
expect(result.kind).toBe('command-output');
|
|
330
|
+
if (result.kind === 'command-output') {
|
|
331
|
+
expect(result.exitCode).toBe(0);
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
it('rejects sha256 with wrong length', () => {
|
|
335
|
+
expect(() => taskEvidenceSchema.parse({
|
|
336
|
+
kind: 'file',
|
|
337
|
+
sha256: 'tooshort',
|
|
338
|
+
timestamp,
|
|
339
|
+
path: 'src/foo.ts',
|
|
340
|
+
})).toThrow();
|
|
341
|
+
});
|
|
342
|
+
it('rejects invalid timestamp', () => {
|
|
343
|
+
expect(() => taskEvidenceSchema.parse({
|
|
344
|
+
kind: 'log',
|
|
345
|
+
sha256,
|
|
346
|
+
timestamp: 'not-a-date',
|
|
347
|
+
source: 'pnpm test',
|
|
348
|
+
})).toThrow();
|
|
349
|
+
});
|
|
350
|
+
});
|
|
351
|
+
//# sourceMappingURL=invariants.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invariants.test.js","sourceRoot":"","sources":["../../src/__tests__/invariants.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAgCrB,kEAAkE;AAClE,SAAS,oBAAoB,CAAC,MAAe;IAC3C,OAAQ,MAA6C,CAAC,IAAI,CAAC;AAC7D,CAAC;AAED,sEAAsE;AACtE,SAAS,gBAAgB,CAAC,MAAe;IACvC,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC;AACpD,CAAC;AAED,gEAAgE;AAChE,SAAS,UAAU,CAAC,MAAe;IACjC,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;AAC9C,CAAC;AAED,gEAAgE;AAChE,SAAS,gBAAgB,CAAC,YAA2B;IACnD,kCAAkC;IAClC,IAAI,KAAK,CAAC,O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