@cat-factory/contracts 0.52.0 → 0.54.0

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.
@@ -175,7 +175,7 @@ export declare const workspaceSnapshotSchema: v.ObjectSchema<{
175
175
  readonly phase: v.PicklistSchema<["testing", "fixing"], undefined>;
176
176
  readonly attempts: v.NumberSchema<undefined>;
177
177
  readonly maxAttempts: v.NumberSchema<undefined>;
178
- readonly lastReport: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
178
+ readonly lastReport: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
179
179
  readonly greenlight: v.BooleanSchema<undefined>;
180
180
  readonly summary: v.StringSchema<undefined>;
181
181
  readonly tested: v.ArraySchema<v.StringSchema<undefined>, undefined>;
@@ -198,6 +198,80 @@ export declare const workspaceSnapshotSchema: v.ObjectSchema<{
198
198
  readonly height: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
199
199
  readonly referenceArtifactId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
200
200
  }, undefined>, undefined>, undefined>;
201
+ readonly abort: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
202
+ readonly reason: v.StringSchema<undefined>;
203
+ }, undefined>, undefined>, undefined>;
204
+ }, undefined>, v.TransformAction<{
205
+ greenlight: boolean;
206
+ summary: string;
207
+ tested: string[];
208
+ outcomes: {
209
+ name: string;
210
+ status: "failed" | "passed" | "skipped";
211
+ detail?: string | undefined;
212
+ }[];
213
+ concerns: {
214
+ title: string;
215
+ detail: string;
216
+ severity: "critical" | "high" | "low" | "medium";
217
+ }[];
218
+ environment?: "ephemeral" | "local" | undefined;
219
+ screenshots?: {
220
+ view: string;
221
+ artifactId: string;
222
+ hash?: string | undefined;
223
+ width?: number | undefined;
224
+ height?: number | undefined;
225
+ referenceArtifactId?: string | undefined;
226
+ }[] | undefined;
227
+ abort?: {
228
+ reason: string;
229
+ } | null | undefined;
230
+ }, {
231
+ greenlight: boolean;
232
+ summary: string;
233
+ tested: string[];
234
+ outcomes: {
235
+ name: string;
236
+ status: "failed" | "passed" | "skipped";
237
+ detail?: string | undefined;
238
+ }[];
239
+ concerns: {
240
+ title: string;
241
+ detail: string;
242
+ severity: "critical" | "high" | "low" | "medium";
243
+ }[];
244
+ environment?: "ephemeral" | "local" | undefined;
245
+ screenshots?: {
246
+ view: string;
247
+ artifactId: string;
248
+ hash?: string | undefined;
249
+ width?: number | undefined;
250
+ height?: number | undefined;
251
+ referenceArtifactId?: string | undefined;
252
+ }[] | undefined;
253
+ abort?: {
254
+ reason: string;
255
+ } | null | undefined;
256
+ }>]>, undefined>, undefined>;
257
+ readonly attemptLog: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
258
+ readonly attempt: v.NumberSchema<undefined>;
259
+ readonly at: v.NumberSchema<undefined>;
260
+ readonly outcome: v.PicklistSchema<["completed", "failed"], undefined>;
261
+ readonly summary: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
262
+ readonly concerns: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
263
+ readonly title: v.StringSchema<undefined>;
264
+ readonly detail: v.StringSchema<undefined>;
265
+ readonly severity: v.PicklistSchema<["low", "medium", "high", "critical"], undefined>;
266
+ }, undefined>, undefined>, undefined>, undefined>;
267
+ }, undefined>, undefined>, undefined>, undefined>;
268
+ readonly infraSetup: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
269
+ readonly started: v.BooleanSchema<undefined>;
270
+ readonly composePath: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
271
+ readonly at: v.NumberSchema<undefined>;
272
+ readonly durationMs: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
273
+ readonly logs: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
274
+ readonly error: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
201
275
  }, undefined>, undefined>, undefined>;
202
276
  }, undefined>, undefined>, undefined>;
203
277
  readonly humanTest: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
@@ -263,7 +337,12 @@ export declare const workspaceSnapshotSchema: v.ObjectSchema<{
263
337
  readonly status: v.PicklistSchema<["pending", "in_progress", "completed"], undefined>;
264
338
  }, undefined>, undefined>, undefined>;
265
339
  }, undefined>, undefined>;
266
- readonly startingContainer: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
340
+ readonly container: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
341
+ readonly status: v.PicklistSchema<["starting", "up", "errored", "destroyed"], undefined>;
342
+ readonly phase: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
343
+ readonly id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
344
+ readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
345
+ }, undefined>, undefined>, undefined>;
267
346
  readonly decision: v.NullableSchema<v.ObjectSchema<{
268
347
  readonly id: v.StringSchema<undefined>;
269
348
  readonly question: v.StringSchema<undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../src/snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AA0B5B,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKlC;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;IAEH;;;;;;OAMG;;;;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;IAEH;;;;;;;;OAQG;;;;;IAOH;;;OAGG;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;;OAIG;;;;;;;;;;;;;;IAEH;;;;;;OAMG;;;;;;;;;;;;;IAEH;;;;;;;OAOG;;aAEH,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
package/dist/testing.d.ts CHANGED
@@ -52,13 +52,13 @@ export declare const testScreenshotSchema: v.ObjectSchema<{
52
52
  }, undefined>;
53
53
  export type TestScreenshot = v.InferOutput<typeof testScreenshotSchema>;
54
54
  /**
55
- * A Tester's structured report. `greenlight` is the gate's verdict: true means the
56
- * change is safe to release (no blocking concerns); false routes the run through
57
- * the `fixer`. `tested` lists what the Tester decided to cover (this task's
58
- * requirements plus best-judgement regression of related ones); `outcomes` are the
59
- * per-area results; `concerns` are the bugs/risks to fix before re-testing.
55
+ * Enforce the `abort greenlight === false` invariant at the schema boundary so it can't
56
+ * depend on every caller getting the ordering right: a report that signals `abort` is never
57
+ * release-ready, so normalise `greenlight` to false whenever an `abort` reason is present.
58
+ * (The container executor's `coerceTestReport` already forces this on the dispatch path; the
59
+ * transform makes it hold for every parse e.g. re-validating persisted step state too.)
60
60
  */
61
- export declare const testReportSchema: v.ObjectSchema<{
61
+ export declare const testReportSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
62
62
  /** The gate verdict: release-ready (true) or needs fixing (false). */
63
63
  readonly greenlight: v.BooleanSchema<undefined>;
64
64
  /** Plain-prose overall summary of the testing session. */
@@ -106,8 +106,102 @@ export declare const testReportSchema: v.ObjectSchema<{
106
106
  /** The matching reference design image's artifact id, when one was supplied. */
107
107
  readonly referenceArtifactId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
108
108
  }, undefined>, undefined>, undefined>;
109
- }, undefined>;
109
+ /**
110
+ * Set when the Tester could NOT run a meaningful test at all and the run must STOP for a
111
+ * human rather than loop the fixer — e.g. the ephemeral environment it was configured to
112
+ * use never came up, a required dependency was unavailable, or the change simply can't be
113
+ * exercised in this setup. The engine then blocks the task (retryable) and raises a
114
+ * notification WITHOUT dispatching the `fixer` (which can't fix missing infrastructure).
115
+ * This is distinct from a withheld greenlight (bugs were found → loop the fixer); when
116
+ * `abort` is set, `greenlight` MUST be false. The `reason` is shown to the human verbatim.
117
+ */
118
+ readonly abort: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
119
+ readonly reason: v.StringSchema<undefined>;
120
+ }, undefined>, undefined>, undefined>;
121
+ }, undefined>, v.TransformAction<{
122
+ greenlight: boolean;
123
+ summary: string;
124
+ tested: string[];
125
+ outcomes: {
126
+ name: string;
127
+ status: "failed" | "passed" | "skipped";
128
+ detail?: string | undefined;
129
+ }[];
130
+ concerns: {
131
+ title: string;
132
+ detail: string;
133
+ severity: "critical" | "high" | "low" | "medium";
134
+ }[];
135
+ environment?: "ephemeral" | "local" | undefined;
136
+ screenshots?: {
137
+ view: string;
138
+ artifactId: string;
139
+ hash?: string | undefined;
140
+ width?: number | undefined;
141
+ height?: number | undefined;
142
+ referenceArtifactId?: string | undefined;
143
+ }[] | undefined;
144
+ abort?: {
145
+ reason: string;
146
+ } | null | undefined;
147
+ }, {
148
+ greenlight: boolean;
149
+ summary: string;
150
+ tested: string[];
151
+ outcomes: {
152
+ name: string;
153
+ status: "failed" | "passed" | "skipped";
154
+ detail?: string | undefined;
155
+ }[];
156
+ concerns: {
157
+ title: string;
158
+ detail: string;
159
+ severity: "critical" | "high" | "low" | "medium";
160
+ }[];
161
+ environment?: "ephemeral" | "local" | undefined;
162
+ screenshots?: {
163
+ view: string;
164
+ artifactId: string;
165
+ hash?: string | undefined;
166
+ width?: number | undefined;
167
+ height?: number | undefined;
168
+ referenceArtifactId?: string | undefined;
169
+ }[] | undefined;
170
+ abort?: {
171
+ reason: string;
172
+ } | null | undefined;
173
+ }>]>;
110
174
  export type TestReport = v.InferOutput<typeof testReportSchema>;
111
175
  /** Parse-or-throw a test report payload an agent returned (the engine validates it). */
112
176
  export declare function parseTestReport(value: unknown): TestReport;
177
+ /**
178
+ * The record of standing the service's docker-compose dependencies up before a `local`
179
+ * tester run. The stand-up happens INSIDE the executor container (`docker compose up
180
+ * --wait`), so its output never reaches the orchestrator-side provisioning-log store
181
+ * (which records only the backend's container/env spin-up). The harness captures it
182
+ * (redacted + tail-bounded) and the engine persists it on the Tester step, so the test
183
+ * window can show WHY the dependencies failed to come up — the single highest-signal
184
+ * artifact for a local-infra Tester failure, previously trapped in the harness's own logs.
185
+ */
186
+ export declare const testerInfraSetupSchema: v.ObjectSchema<{
187
+ /** Whether `docker compose up --wait` succeeded (the dependencies are up). */
188
+ readonly started: v.BooleanSchema<undefined>;
189
+ /** The repo-relative compose file that was stood up, when known. */
190
+ readonly composePath: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
191
+ /** Epoch ms the stand-up attempt finished. */
192
+ readonly at: v.NumberSchema<undefined>;
193
+ /** Wall-clock of the stand-up attempt, ms. */
194
+ readonly durationMs: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
195
+ /** Captured (redacted, tail-bounded) stdout+stderr of the stand-up command. */
196
+ readonly logs: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
197
+ /** The verbatim (redacted) failure message when stand-up failed, else null. */
198
+ readonly error: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
199
+ }, undefined>;
200
+ export type TesterInfraSetup = v.InferOutput<typeof testerInfraSetupSchema>;
201
+ /**
202
+ * Parse a tester infra-setup record the harness reported, or null when absent/malformed.
203
+ * The data is harness-produced (deterministic, not LLM), but it crosses the container→
204
+ * backend HTTP boundary, so the engine validates it defensively before persisting.
205
+ */
206
+ export declare function parseTesterInfraSetup(value: unknown): TesterInfraSetup | null;
113
207
  //# sourceMappingURL=testing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAgB5B;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,qDAAqC,CAAA;AACvE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,oDAAoD;AACpD,eAAO,MAAM,yBAAyB,oEAAoD,CAAA;AAC1F,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF,yFAAyF;AACzF,eAAO,MAAM,iBAAiB;IAC5B,oCAAoC;;IAEpC,oDAAoD;;IAEpD,uDAAuD;;aAEvD,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEjE,8DAA8D;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AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB;IACjC,8EAA8E;;IAE9E,oEAAoE;;IAEpE,8CAA8C;;IAE9C,8CAA8C;;IAE9C,+EAA+E;;IAE/E,+EAA+E;;aAE/E,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CAG7E"}
package/dist/testing.js CHANGED
@@ -66,7 +66,7 @@ export const testScreenshotSchema = v.object({
66
66
  * requirements plus best-judgement regression of related ones); `outcomes` are the
67
67
  * per-area results; `concerns` are the bugs/risks to fix before re-testing.
68
68
  */
69
- export const testReportSchema = v.object({
69
+ const testReportObjectSchema = v.object({
70
70
  /** The gate verdict: release-ready (true) or needs fixing (false). */
71
71
  greenlight: v.boolean(),
72
72
  /** Plain-prose overall summary of the testing session. */
@@ -89,9 +89,59 @@ export const testReportSchema = v.object({
89
89
  * the visual-confirmation gate's actual-vs-reference review.
90
90
  */
91
91
  screenshots: v.optional(v.array(testScreenshotSchema)),
92
+ /**
93
+ * Set when the Tester could NOT run a meaningful test at all and the run must STOP for a
94
+ * human rather than loop the fixer — e.g. the ephemeral environment it was configured to
95
+ * use never came up, a required dependency was unavailable, or the change simply can't be
96
+ * exercised in this setup. The engine then blocks the task (retryable) and raises a
97
+ * notification WITHOUT dispatching the `fixer` (which can't fix missing infrastructure).
98
+ * This is distinct from a withheld greenlight (bugs were found → loop the fixer); when
99
+ * `abort` is set, `greenlight` MUST be false. The `reason` is shown to the human verbatim.
100
+ */
101
+ abort: v.optional(v.nullable(v.object({ reason: v.string() }))),
92
102
  });
103
+ /**
104
+ * Enforce the `abort ⇒ greenlight === false` invariant at the schema boundary so it can't
105
+ * depend on every caller getting the ordering right: a report that signals `abort` is never
106
+ * release-ready, so normalise `greenlight` to false whenever an `abort` reason is present.
107
+ * (The container executor's `coerceTestReport` already forces this on the dispatch path; the
108
+ * transform makes it hold for every parse — e.g. re-validating persisted step state too.)
109
+ */
110
+ export const testReportSchema = v.pipe(testReportObjectSchema, v.transform((report) => (report.abort?.reason ? { ...report, greenlight: false } : report)));
93
111
  /** Parse-or-throw a test report payload an agent returned (the engine validates it). */
94
112
  export function parseTestReport(value) {
95
113
  return v.parse(testReportSchema, value);
96
114
  }
115
+ /**
116
+ * The record of standing the service's docker-compose dependencies up before a `local`
117
+ * tester run. The stand-up happens INSIDE the executor container (`docker compose up
118
+ * --wait`), so its output never reaches the orchestrator-side provisioning-log store
119
+ * (which records only the backend's container/env spin-up). The harness captures it
120
+ * (redacted + tail-bounded) and the engine persists it on the Tester step, so the test
121
+ * window can show WHY the dependencies failed to come up — the single highest-signal
122
+ * artifact for a local-infra Tester failure, previously trapped in the harness's own logs.
123
+ */
124
+ export const testerInfraSetupSchema = v.object({
125
+ /** Whether `docker compose up --wait` succeeded (the dependencies are up). */
126
+ started: v.boolean(),
127
+ /** The repo-relative compose file that was stood up, when known. */
128
+ composePath: v.optional(v.nullable(v.string())),
129
+ /** Epoch ms the stand-up attempt finished. */
130
+ at: v.number(),
131
+ /** Wall-clock of the stand-up attempt, ms. */
132
+ durationMs: v.optional(v.nullable(v.number())),
133
+ /** Captured (redacted, tail-bounded) stdout+stderr of the stand-up command. */
134
+ logs: v.optional(v.nullable(v.string())),
135
+ /** The verbatim (redacted) failure message when stand-up failed, else null. */
136
+ error: v.optional(v.nullable(v.string())),
137
+ });
138
+ /**
139
+ * Parse a tester infra-setup record the harness reported, or null when absent/malformed.
140
+ * The data is harness-produced (deterministic, not LLM), but it crosses the container→
141
+ * backend HTTP boundary, so the engine validates it defensively before persisting.
142
+ */
143
+ export function parseTesterInfraSetup(value) {
144
+ const result = v.safeParse(testerInfraSetupSchema, value);
145
+ return result.success ? result.output : null;
146
+ }
97
147
  //# sourceMappingURL=testing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"test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,CAAC,SAAS,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAA;IACzD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA;AAC9C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/contracts",
3
- "version": "0.52.0",
3
+ "version": "0.54.0",
4
4
  "description": "Valibot wire contract shared between the Agent Architecture Board frontend and backend.",
5
5
  "repository": {
6
6
  "type": "git",