devcontour-harness 0.1.0-alpha.27 → 0.1.0-alpha.28

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.
@@ -255,7 +255,7 @@ export declare class Engine {
255
255
  pauseReason?: "runtime" | "operator" | "shutdown" | "base-check" | "reconfigure" | undefined;
256
256
  pausedAt?: string | undefined;
257
257
  pauseOperation?: string | undefined;
258
- pauseFailures?: ("gate" | "unknown" | "review" | "environment" | "cancelled" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "unfinished" | "scope-violation" | "review-protocol" | "merge" | "budget" | "needs-lead")[] | undefined;
258
+ pauseFailures?: ("gate" | "unknown" | "review" | "cancelled" | "environment" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "unfinished" | "scope-violation" | "review-protocol" | "merge" | "budget" | "needs-lead")[] | undefined;
259
259
  waits?: {
260
260
  kind: "base-check" | "context-lock";
261
261
  detail: string;
@@ -291,7 +291,7 @@ export declare class Engine {
291
291
  pauseReason?: "runtime" | "operator" | "shutdown" | "base-check" | "reconfigure" | undefined;
292
292
  pausedAt?: string | undefined;
293
293
  pauseOperation?: string | undefined;
294
- pauseFailures?: ("gate" | "unknown" | "review" | "environment" | "cancelled" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "unfinished" | "scope-violation" | "review-protocol" | "merge" | "budget" | "needs-lead")[] | undefined;
294
+ pauseFailures?: ("gate" | "unknown" | "review" | "cancelled" | "environment" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "unfinished" | "scope-violation" | "review-protocol" | "merge" | "budget" | "needs-lead")[] | undefined;
295
295
  waits?: {
296
296
  kind: "base-check" | "context-lock";
297
297
  detail: string;
@@ -321,7 +321,7 @@ export declare class Engine {
321
321
  pauseReason?: "runtime" | "operator" | "shutdown" | "base-check" | "reconfigure" | undefined;
322
322
  pausedAt?: string | undefined;
323
323
  pauseOperation?: string | undefined;
324
- pauseFailures?: ("gate" | "unknown" | "review" | "environment" | "cancelled" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "unfinished" | "scope-violation" | "review-protocol" | "merge" | "budget" | "needs-lead")[] | undefined;
324
+ pauseFailures?: ("gate" | "unknown" | "review" | "cancelled" | "environment" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "unfinished" | "scope-violation" | "review-protocol" | "merge" | "budget" | "needs-lead")[] | undefined;
325
325
  waits?: {
326
326
  kind: "base-check" | "context-lock";
327
327
  detail: string;
@@ -628,6 +628,21 @@ export declare class Engine {
628
628
  } | undefined;
629
629
  coverage?: string[] | undefined;
630
630
  } | undefined;
631
+ artifactFiles?: {
632
+ dir: string;
633
+ files: {
634
+ path: string;
635
+ sha256: string;
636
+ bytes: number;
637
+ redacted?: true | undefined;
638
+ }[];
639
+ skipped: {
640
+ path: string;
641
+ reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
642
+ detail?: string | undefined;
643
+ }[];
644
+ skippedMore?: number | undefined;
645
+ } | undefined;
631
646
  checks?: string | undefined;
632
647
  alreadySatisfied?: {
633
648
  gates: string[];
@@ -692,7 +707,7 @@ export declare class Engine {
692
707
  properties?: string[] | undefined;
693
708
  workId: string;
694
709
  runId: string;
695
- kind: "gate" | "unknown" | "review" | "environment" | "cancelled" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "unfinished" | "scope-violation" | "review-protocol" | "merge" | "budget" | "needs-lead";
710
+ kind: "gate" | "unknown" | "review" | "cancelled" | "environment" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "unfinished" | "scope-violation" | "review-protocol" | "merge" | "budget" | "needs-lead";
696
711
  blocked: boolean;
697
712
  /** Работа возвращена в очередь (штатная остановка); иначе — обычный отказ. */
698
713
  interrupted: boolean;
@@ -1046,7 +1061,7 @@ export declare class Engine {
1046
1061
  changed: string[];
1047
1062
  affected: string[];
1048
1063
  gateIds: string[];
1049
- mode: "all" | "affected";
1064
+ mode: "affected" | "all";
1050
1065
  reason: string;
1051
1066
  baseline?: string | undefined;
1052
1067
  };
@@ -1069,6 +1084,21 @@ export declare class Engine {
1069
1084
  path: string;
1070
1085
  digest: string;
1071
1086
  }[];
1087
+ artifactFiles?: {
1088
+ dir: string;
1089
+ files: {
1090
+ path: string;
1091
+ sha256: string;
1092
+ bytes: number;
1093
+ redacted?: true | undefined;
1094
+ }[];
1095
+ skipped: {
1096
+ path: string;
1097
+ reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
1098
+ detail?: string | undefined;
1099
+ }[];
1100
+ skippedMore?: number | undefined;
1101
+ } | undefined;
1072
1102
  durationMs?: number | undefined;
1073
1103
  }[];
1074
1104
  token: string;
@@ -1084,7 +1114,7 @@ export declare class Engine {
1084
1114
  changed: string[];
1085
1115
  affected: string[];
1086
1116
  gateIds: string[];
1087
- mode: "all" | "affected";
1117
+ mode: "affected" | "all";
1088
1118
  reason: string;
1089
1119
  baseline?: string | undefined;
1090
1120
  };
@@ -1109,6 +1139,21 @@ export declare class Engine {
1109
1139
  path: string;
1110
1140
  digest: string;
1111
1141
  }[];
1142
+ artifactFiles?: {
1143
+ dir: string;
1144
+ files: {
1145
+ path: string;
1146
+ sha256: string;
1147
+ bytes: number;
1148
+ redacted?: true | undefined;
1149
+ }[];
1150
+ skipped: {
1151
+ path: string;
1152
+ reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
1153
+ detail?: string | undefined;
1154
+ }[];
1155
+ skippedMore?: number | undefined;
1156
+ } | undefined;
1112
1157
  durationMs?: number | undefined;
1113
1158
  }[];
1114
1159
  token: string;
@@ -1124,7 +1169,7 @@ export declare class Engine {
1124
1169
  changed: string[];
1125
1170
  affected: string[];
1126
1171
  gateIds: string[];
1127
- mode: "all" | "affected";
1172
+ mode: "affected" | "all";
1128
1173
  reason: string;
1129
1174
  baseline?: string | undefined;
1130
1175
  };
@@ -1148,6 +1193,21 @@ export declare class Engine {
1148
1193
  path: string;
1149
1194
  digest: string;
1150
1195
  }[];
1196
+ artifactFiles?: {
1197
+ dir: string;
1198
+ files: {
1199
+ path: string;
1200
+ sha256: string;
1201
+ bytes: number;
1202
+ redacted?: true | undefined;
1203
+ }[];
1204
+ skipped: {
1205
+ path: string;
1206
+ reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
1207
+ detail?: string | undefined;
1208
+ }[];
1209
+ skippedMore?: number | undefined;
1210
+ } | undefined;
1151
1211
  durationMs?: number | undefined;
1152
1212
  }[];
1153
1213
  token: string;
@@ -1176,6 +1236,21 @@ export declare class Engine {
1176
1236
  path: string;
1177
1237
  digest: string;
1178
1238
  }[];
1239
+ artifactFiles?: {
1240
+ dir: string;
1241
+ files: {
1242
+ path: string;
1243
+ sha256: string;
1244
+ bytes: number;
1245
+ redacted?: true | undefined;
1246
+ }[];
1247
+ skipped: {
1248
+ path: string;
1249
+ reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
1250
+ detail?: string | undefined;
1251
+ }[];
1252
+ skippedMore?: number | undefined;
1253
+ } | undefined;
1179
1254
  durationMs?: number | undefined;
1180
1255
  }[];
1181
1256
  manifest?: Record<string, {
@@ -1187,7 +1262,7 @@ export declare class Engine {
1187
1262
  changed: string[];
1188
1263
  affected: string[];
1189
1264
  gateIds: string[];
1190
- mode: "all" | "affected";
1265
+ mode: "affected" | "all";
1191
1266
  reason: string;
1192
1267
  baseline?: string | undefined;
1193
1268
  } | undefined;
@@ -1213,6 +1288,21 @@ export declare class Engine {
1213
1288
  path: string;
1214
1289
  digest: string;
1215
1290
  }[];
1291
+ artifactFiles?: {
1292
+ dir: string;
1293
+ files: {
1294
+ path: string;
1295
+ sha256: string;
1296
+ bytes: number;
1297
+ redacted?: true | undefined;
1298
+ }[];
1299
+ skipped: {
1300
+ path: string;
1301
+ reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
1302
+ detail?: string | undefined;
1303
+ }[];
1304
+ skippedMore?: number | undefined;
1305
+ } | undefined;
1216
1306
  durationMs?: number | undefined;
1217
1307
  }[];
1218
1308
  manifest?: Record<string, {
@@ -1224,7 +1314,7 @@ export declare class Engine {
1224
1314
  changed: string[];
1225
1315
  affected: string[];
1226
1316
  gateIds: string[];
1227
- mode: "all" | "affected";
1317
+ mode: "affected" | "all";
1228
1318
  reason: string;
1229
1319
  baseline?: string | undefined;
1230
1320
  } | undefined;
@@ -1254,13 +1344,28 @@ export declare class Engine {
1254
1344
  path: string;
1255
1345
  digest: string;
1256
1346
  }[];
1347
+ artifactFiles?: {
1348
+ dir: string;
1349
+ files: {
1350
+ path: string;
1351
+ sha256: string;
1352
+ bytes: number;
1353
+ redacted?: true | undefined;
1354
+ }[];
1355
+ skipped: {
1356
+ path: string;
1357
+ reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
1358
+ detail?: string | undefined;
1359
+ }[];
1360
+ skippedMore?: number | undefined;
1361
+ } | undefined;
1257
1362
  durationMs?: number | undefined;
1258
1363
  }[];
1259
1364
  impact?: {
1260
1365
  changed: string[];
1261
1366
  affected: string[];
1262
1367
  gateIds: string[];
1263
- mode: "all" | "affected";
1368
+ mode: "affected" | "all";
1264
1369
  reason: string;
1265
1370
  baseline?: string | undefined;
1266
1371
  } | undefined;
@@ -1338,7 +1443,7 @@ export declare class Engine {
1338
1443
  activeRunId?: string | undefined;
1339
1444
  resultSha?: string | undefined;
1340
1445
  failure?: string | undefined;
1341
- failureKind?: "gate" | "unknown" | "review" | "environment" | "cancelled" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "unfinished" | "scope-violation" | "review-protocol" | "merge" | "budget" | "needs-lead" | undefined;
1446
+ failureKind?: "gate" | "unknown" | "review" | "cancelled" | "environment" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "unfinished" | "scope-violation" | "review-protocol" | "merge" | "budget" | "needs-lead" | undefined;
1342
1447
  failureFingerprint?: string | undefined;
1343
1448
  approvedAt?: string | undefined;
1344
1449
  approvedDigest?: string | undefined;
@@ -1496,7 +1601,7 @@ export declare class Engine {
1496
1601
  activeRunId?: string | undefined;
1497
1602
  resultSha?: string | undefined;
1498
1603
  failure?: string | undefined;
1499
- failureKind?: "gate" | "unknown" | "review" | "environment" | "cancelled" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "unfinished" | "scope-violation" | "review-protocol" | "merge" | "budget" | "needs-lead" | undefined;
1604
+ failureKind?: "gate" | "unknown" | "review" | "cancelled" | "environment" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "unfinished" | "scope-violation" | "review-protocol" | "merge" | "budget" | "needs-lead" | undefined;
1500
1605
  failureFingerprint?: string | undefined;
1501
1606
  approvedAt?: string | undefined;
1502
1607
  approvedDigest?: string | undefined;
@@ -56,6 +56,21 @@ export declare class JointRunner {
56
56
  path: string;
57
57
  digest: string;
58
58
  }[];
59
+ artifactFiles?: {
60
+ dir: string;
61
+ files: {
62
+ path: string;
63
+ sha256: string;
64
+ bytes: number;
65
+ redacted?: true | undefined;
66
+ }[];
67
+ skipped: {
68
+ path: string;
69
+ reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
70
+ detail?: string | undefined;
71
+ }[];
72
+ skippedMore?: number | undefined;
73
+ } | undefined;
59
74
  durationMs?: number | undefined;
60
75
  }[];
61
76
  manifest?: Record<string, {
@@ -67,7 +82,7 @@ export declare class JointRunner {
67
82
  changed: string[];
68
83
  affected: string[];
69
84
  gateIds: string[];
70
- mode: "all" | "affected";
85
+ mode: "affected" | "all";
71
86
  reason: string;
72
87
  baseline?: string | undefined;
73
88
  } | undefined;
@@ -93,6 +108,21 @@ export declare class JointRunner {
93
108
  path: string;
94
109
  digest: string;
95
110
  }[];
111
+ artifactFiles?: {
112
+ dir: string;
113
+ files: {
114
+ path: string;
115
+ sha256: string;
116
+ bytes: number;
117
+ redacted?: true | undefined;
118
+ }[];
119
+ skipped: {
120
+ path: string;
121
+ reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
122
+ detail?: string | undefined;
123
+ }[];
124
+ skippedMore?: number | undefined;
125
+ } | undefined;
96
126
  durationMs?: number | undefined;
97
127
  }[];
98
128
  manifest?: Record<string, {
@@ -104,7 +134,7 @@ export declare class JointRunner {
104
134
  changed: string[];
105
135
  affected: string[];
106
136
  gateIds: string[];
107
- mode: "all" | "affected";
137
+ mode: "affected" | "all";
108
138
  reason: string;
109
139
  baseline?: string | undefined;
110
140
  } | undefined;
@@ -134,13 +164,28 @@ export declare class JointRunner {
134
164
  path: string;
135
165
  digest: string;
136
166
  }[];
167
+ artifactFiles?: {
168
+ dir: string;
169
+ files: {
170
+ path: string;
171
+ sha256: string;
172
+ bytes: number;
173
+ redacted?: true | undefined;
174
+ }[];
175
+ skipped: {
176
+ path: string;
177
+ reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
178
+ detail?: string | undefined;
179
+ }[];
180
+ skippedMore?: number | undefined;
181
+ } | undefined;
137
182
  durationMs?: number | undefined;
138
183
  }[];
139
184
  impact?: {
140
185
  changed: string[];
141
186
  affected: string[];
142
187
  gateIds: string[];
143
- mode: "all" | "affected";
188
+ mode: "affected" | "all";
144
189
  reason: string;
145
190
  baseline?: string | undefined;
146
191
  } | undefined;
@@ -169,6 +214,21 @@ export declare class JointRunner {
169
214
  path: string;
170
215
  digest: string;
171
216
  }[];
217
+ artifactFiles?: {
218
+ dir: string;
219
+ files: {
220
+ path: string;
221
+ sha256: string;
222
+ bytes: number;
223
+ redacted?: true | undefined;
224
+ }[];
225
+ skipped: {
226
+ path: string;
227
+ reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
228
+ detail?: string | undefined;
229
+ }[];
230
+ skippedMore?: number | undefined;
231
+ } | undefined;
172
232
  durationMs?: number | undefined;
173
233
  }[];
174
234
  manifest?: Record<string, {
@@ -180,7 +240,7 @@ export declare class JointRunner {
180
240
  changed: string[];
181
241
  affected: string[];
182
242
  gateIds: string[];
183
- mode: "all" | "affected";
243
+ mode: "affected" | "all";
184
244
  reason: string;
185
245
  baseline?: string | undefined;
186
246
  } | undefined;
@@ -206,6 +266,21 @@ export declare class JointRunner {
206
266
  path: string;
207
267
  digest: string;
208
268
  }[];
269
+ artifactFiles?: {
270
+ dir: string;
271
+ files: {
272
+ path: string;
273
+ sha256: string;
274
+ bytes: number;
275
+ redacted?: true | undefined;
276
+ }[];
277
+ skipped: {
278
+ path: string;
279
+ reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
280
+ detail?: string | undefined;
281
+ }[];
282
+ skippedMore?: number | undefined;
283
+ } | undefined;
209
284
  durationMs?: number | undefined;
210
285
  }[];
211
286
  manifest?: Record<string, {
@@ -217,7 +292,7 @@ export declare class JointRunner {
217
292
  changed: string[];
218
293
  affected: string[];
219
294
  gateIds: string[];
220
- mode: "all" | "affected";
295
+ mode: "affected" | "all";
221
296
  reason: string;
222
297
  baseline?: string | undefined;
223
298
  } | undefined;
@@ -247,13 +322,28 @@ export declare class JointRunner {
247
322
  path: string;
248
323
  digest: string;
249
324
  }[];
325
+ artifactFiles?: {
326
+ dir: string;
327
+ files: {
328
+ path: string;
329
+ sha256: string;
330
+ bytes: number;
331
+ redacted?: true | undefined;
332
+ }[];
333
+ skipped: {
334
+ path: string;
335
+ reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
336
+ detail?: string | undefined;
337
+ }[];
338
+ skippedMore?: number | undefined;
339
+ } | undefined;
250
340
  durationMs?: number | undefined;
251
341
  }[];
252
342
  impact?: {
253
343
  changed: string[];
254
344
  affected: string[];
255
345
  gateIds: string[];
256
- mode: "all" | "affected";
346
+ mode: "affected" | "all";
257
347
  reason: string;
258
348
  baseline?: string | undefined;
259
349
  } | undefined;
@@ -9,6 +9,7 @@ import { CleanupFailure, availableRedactor, executionEnvironment, withEnvironmen
9
9
  import { composeRedactors } from "../environment/redaction.js";
10
10
  import { defaultResourceDatabase, withResources } from "../environment/resources.js";
11
11
  import { dependencyStoreRoot, materializeStore } from "../verification/dependency-store.js";
12
+ import { keepGateArtifacts } from "../verification/gate-artifacts.js";
12
13
  import { junitSummary, prepareReportPath, runCheck } from "../verification/gates.js";
13
14
  import { orderedWorkspaceGates, publicJoint } from "../verification/joint.js";
14
15
  /**
@@ -255,6 +256,17 @@ export class JointRunner {
255
256
  summary = redact(error instanceof Error ? error.message : String(error));
256
257
  log += '\n' + summary;
257
258
  }
259
+ // Объявленные artifacts сохраняются копиями при любом исходе;
260
+ // их наличие и неизменность по-прежнему проверяет сам gate.
261
+ const artifactFiles = gate.artifacts.length
262
+ ? await keepGateArtifacts({
263
+ root: cwd,
264
+ paths: gate.artifacts,
265
+ dest: join(dir, `${gate.id}.artifacts`),
266
+ redact,
267
+ signal,
268
+ })
269
+ : undefined;
258
270
  log = redact(log);
259
271
  await writeFile(logPath, log);
260
272
  const evidence = {
@@ -266,6 +278,7 @@ export class JointRunner {
266
278
  digest: createHash('sha256').update(log).digest('hex'),
267
279
  summary: redact(summary).slice(0, 4000),
268
280
  artifacts,
281
+ ...(artifactFiles ? { artifactFiles } : {}),
269
282
  durationMs: Date.now() - startedAt,
270
283
  };
271
284
  this.engine.jointEvidence(v.id, v.token, evidence);
@@ -125,6 +125,7 @@ export declare function repositoryFromProfile(profile: ResolvedProfile, own: Pic
125
125
  id: string;
126
126
  command: string[];
127
127
  timeoutMs: number;
128
+ artifacts?: string[] | undefined;
128
129
  property?: {
129
130
  path?: string | undefined;
130
131
  } | undefined;
@@ -140,6 +141,7 @@ export declare function repositoryFromProfile(profile: ResolvedProfile, own: Pic
140
141
  type: "junit";
141
142
  path: string;
142
143
  } | undefined;
144
+ artifacts?: string[] | undefined;
143
145
  property?: {
144
146
  path?: string | undefined;
145
147
  } | undefined;