@resolveio/server-lib 22.3.162 → 22.3.164
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.
|
@@ -137,8 +137,309 @@ function pushEvent(events, event) {
|
|
|
137
137
|
function eventDate(record) {
|
|
138
138
|
return dateValue(record, ['recordedAt', 'createdAt', 'updatedAt', 'timestamp', 'time', 'date']);
|
|
139
139
|
}
|
|
140
|
+
function normalizeManagerFailureRecord(value, fallback) {
|
|
141
|
+
if (fallback === void 0) { fallback = {}; }
|
|
142
|
+
var entry = plainObject(value);
|
|
143
|
+
if (!Object.keys(entry).length && !Object.keys(fallback).length) {
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
var blocker = cleanText(entry.blocker || entry.reason || entry.summary || entry.message || fallback.blocker || fallback.summary, 1200);
|
|
147
|
+
var failureClass = cleanText(entry.failureClass || entry.failure_class || entry.class || fallback.failureClass, 120);
|
|
148
|
+
var evidenceHash = cleanText(entry.evidenceHash || entry.evidence_hash || entry.hash || fallback.evidenceHash, 180);
|
|
149
|
+
var blockerFingerprint = cleanText(entry.blockerFingerprint || entry.blocker_fingerprint || fallback.blockerFingerprint, 180);
|
|
150
|
+
var lane = cleanText(entry.lane || fallback.lane || 'support', 80);
|
|
151
|
+
var stepType = cleanText(entry.stepType || entry.step_type || entry.type || fallback.stepType || 'support_step', 80);
|
|
152
|
+
var outcome = cleanText(entry.outcome || entry.status || entry.result || fallback.outcome || 'needs_repair', 80);
|
|
153
|
+
if (!blocker && !failureClass && !evidenceHash && !blockerFingerprint) {
|
|
154
|
+
return undefined;
|
|
155
|
+
}
|
|
156
|
+
return {
|
|
157
|
+
lane: lane,
|
|
158
|
+
stepType: stepType,
|
|
159
|
+
outcome: outcome,
|
|
160
|
+
failureClass: failureClass || undefined,
|
|
161
|
+
blocker: blocker || undefined,
|
|
162
|
+
summary: cleanText(entry.summary || entry.message || fallback.summary, 1200) || undefined,
|
|
163
|
+
blockerFingerprint: blockerFingerprint || undefined,
|
|
164
|
+
evidenceHash: evidenceHash || undefined,
|
|
165
|
+
changedFiles: cleanStringList(entry.changedFiles || entry.changed_files || fallback.changedFiles, 80, 500),
|
|
166
|
+
artifactPaths: cleanStringList(entry.artifactPaths || entry.artifact_paths || entry.artifacts || fallback.artifactPaths, 80, 500)
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function supportManagerFailureRecords(job, evidence) {
|
|
170
|
+
var e_3, _a, e_4, _b;
|
|
171
|
+
var records = [];
|
|
172
|
+
var pushRecord = function (value, fallback) {
|
|
173
|
+
if (fallback === void 0) { fallback = {}; }
|
|
174
|
+
var record = normalizeManagerFailureRecord(value, fallback);
|
|
175
|
+
if (record) {
|
|
176
|
+
records.push(record);
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
try {
|
|
180
|
+
for (var _c = __values(asArray(job.supportV5StepHistory || job.support_v5_step_history || evidence.supportV5StepHistory || evidence.support_v5_step_history)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
181
|
+
var entry = _d.value;
|
|
182
|
+
pushRecord(entry);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
186
|
+
finally {
|
|
187
|
+
try {
|
|
188
|
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
189
|
+
}
|
|
190
|
+
finally { if (e_3) throw e_3.error; }
|
|
191
|
+
}
|
|
192
|
+
try {
|
|
193
|
+
for (var _e = __values(asArray(job.supportV5FailureFingerprints || job.support_v5_failure_fingerprints || evidence.supportV5FailureFingerprints || evidence.support_v5_failure_fingerprints)), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
194
|
+
var entry = _f.value;
|
|
195
|
+
var fingerprint = plainObject(entry);
|
|
196
|
+
var count = Math.max(1, Math.min(8, Number(fingerprint.count || fingerprint.repeatedCount || fingerprint.repeated_count || 1) || 1));
|
|
197
|
+
var fallback = {
|
|
198
|
+
lane: cleanText(fingerprint.lane || 'support', 80),
|
|
199
|
+
stepType: cleanText(fingerprint.stepType || fingerprint.step_type || 'support_step', 80),
|
|
200
|
+
outcome: cleanText(fingerprint.outcome || 'needs_repair', 80),
|
|
201
|
+
failureClass: cleanText(fingerprint.failureClass || fingerprint.failure_class || fingerprint.class, 120),
|
|
202
|
+
blocker: cleanText(fingerprint.blocker || fingerprint.reason || fingerprint.summary, 1200),
|
|
203
|
+
blockerFingerprint: cleanText(fingerprint.blockerFingerprint || fingerprint.blocker_fingerprint, 180),
|
|
204
|
+
evidenceHash: cleanText(fingerprint.evidenceHash || fingerprint.evidence_hash, 180)
|
|
205
|
+
};
|
|
206
|
+
for (var index = 0; index < count; index += 1) {
|
|
207
|
+
pushRecord(fingerprint, fallback);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
212
|
+
finally {
|
|
213
|
+
try {
|
|
214
|
+
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
215
|
+
}
|
|
216
|
+
finally { if (e_4) throw e_4.error; }
|
|
217
|
+
}
|
|
218
|
+
var currentFailure = evidenceObject(job.supportV5CurrentFailure, job.support_v5_current_failure, job.supportV5RecoveryCurrent, job.support_v5_recovery_current, evidence.currentFailure, evidence.current_failure);
|
|
219
|
+
pushRecord(currentFailure);
|
|
220
|
+
return records.slice(-80);
|
|
221
|
+
}
|
|
222
|
+
function managerNoBlindLoopGateFromHistory(history, budgetSource, now) {
|
|
223
|
+
var _a;
|
|
224
|
+
if (!history.length) {
|
|
225
|
+
return undefined;
|
|
226
|
+
}
|
|
227
|
+
var budget = plainObject(budgetSource);
|
|
228
|
+
var maxSameFailureRepeats = Math.max(1, Number(budget.maxRepeatedNoProgress || budget.max_repeated_no_progress || budget.maxSameFailureRepeats || budget.max_same_failure_repeats || 3) || 3);
|
|
229
|
+
var decision = (0, ai_runner_manager_policy_1.decideResolveIOAIManagerPolicy)({
|
|
230
|
+
history: history,
|
|
231
|
+
maxSameFailureRepeats: maxSameFailureRepeats
|
|
232
|
+
});
|
|
233
|
+
var parksRun = /^(park_repeated_failure|park_ping_pong|manual_handoff)$/.test(decision.action);
|
|
234
|
+
var status = parksRun
|
|
235
|
+
? 'blocked'
|
|
236
|
+
: decision.action === 'retry_infra'
|
|
237
|
+
? 'warn'
|
|
238
|
+
: 'pass';
|
|
239
|
+
return {
|
|
240
|
+
key: 'manager_no_blind_loop_policy',
|
|
241
|
+
label: 'No-blind-loop manager policy',
|
|
242
|
+
status: status,
|
|
243
|
+
reason: decision.reason,
|
|
244
|
+
evidenceRefs: cleanStringList(decision.recoveryAction.requiredArtifacts, 20, 500),
|
|
245
|
+
recordedAt: isoNow(now),
|
|
246
|
+
metadata: {
|
|
247
|
+
action: decision.action,
|
|
248
|
+
failureClass: decision.failureClass,
|
|
249
|
+
blockerFingerprint: decision.blockerFingerprint,
|
|
250
|
+
evidenceHash: decision.evidenceHash,
|
|
251
|
+
sameFailureCount: decision.sameFailureCount,
|
|
252
|
+
pingPongCount: decision.pingPongCount,
|
|
253
|
+
newEvidence: decision.newEvidence,
|
|
254
|
+
materialEvidence: decision.materialEvidence,
|
|
255
|
+
evidenceStrength: decision.evidenceStrength,
|
|
256
|
+
evidenceSignals: decision.evidenceSignals,
|
|
257
|
+
loopBudgetShouldReset: decision.loopBudgetShouldReset,
|
|
258
|
+
productRepairFailure: decision.productRepairFailure,
|
|
259
|
+
recoveryClass: decision.recoveryPlan.recoveryClass,
|
|
260
|
+
allowedAction: decision.recoveryPlan.allowedAction,
|
|
261
|
+
dispatchAction: decision.recoveryAction.allowedDispatchAction,
|
|
262
|
+
evidenceOnly: decision.recoveryAction.evidenceOnly,
|
|
263
|
+
productRepairAllowed: decision.recoveryAction.productRepairAllowed,
|
|
264
|
+
expensiveModelAllowed: decision.recoveryAction.expensiveModelAllowed,
|
|
265
|
+
costCeilingUsd: decision.recoveryAction.costCeilingUsd,
|
|
266
|
+
requiresNewEvidence: ((_a = decision.recoveryAction.retryPolicy) === null || _a === void 0 ? void 0 : _a.requireNewEvidence) === true,
|
|
267
|
+
nextCommands: decision.recoveryAction.nextCommands,
|
|
268
|
+
requiredEvidence: decision.recoveryAction.requiredArtifacts,
|
|
269
|
+
forbiddenActions: decision.recoveryPlan.forbiddenActions
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
function supportManagerNoBlindLoopGate(job, evidence, now) {
|
|
274
|
+
return managerNoBlindLoopGateFromHistory(supportManagerFailureRecords(job, evidence), job.supportV5Budget || job.support_v5_budget || evidence.supportV5Budget || evidence.support_v5_budget, now);
|
|
275
|
+
}
|
|
276
|
+
function aicoderManagerFailureRecords(app, job, evidence) {
|
|
277
|
+
var e_5, _a, e_6, _b, e_7, _c, e_8, _d;
|
|
278
|
+
var records = [];
|
|
279
|
+
var pushRecord = function (value, fallback) {
|
|
280
|
+
if (fallback === void 0) { fallback = {}; }
|
|
281
|
+
var record = normalizeManagerFailureRecord(value, __assign({ lane: 'aicoder', stepType: 'workflow_step' }, fallback));
|
|
282
|
+
if (record) {
|
|
283
|
+
records.push(record);
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
var historySources = [
|
|
287
|
+
job.aicoderV6StepHistory,
|
|
288
|
+
job.aiCoderV6StepHistory,
|
|
289
|
+
job.aicoder_v6_step_history,
|
|
290
|
+
job.ai_coder_v6_step_history,
|
|
291
|
+
job.workflowStepHistory,
|
|
292
|
+
job.workflow_step_history,
|
|
293
|
+
job.stepHistory,
|
|
294
|
+
job.step_history,
|
|
295
|
+
job.managerFailureHistory,
|
|
296
|
+
job.manager_failure_history,
|
|
297
|
+
app.aicoderV6StepHistory,
|
|
298
|
+
app.aiCoderV6StepHistory,
|
|
299
|
+
app.aicoder_v6_step_history,
|
|
300
|
+
app.ai_coder_v6_step_history,
|
|
301
|
+
app.workflowStepHistory,
|
|
302
|
+
app.workflow_step_history,
|
|
303
|
+
evidence.aicoderV6StepHistory,
|
|
304
|
+
evidence.aiCoderV6StepHistory,
|
|
305
|
+
evidence.aicoder_v6_step_history,
|
|
306
|
+
evidence.ai_coder_v6_step_history,
|
|
307
|
+
evidence.workflowStepHistory,
|
|
308
|
+
evidence.workflow_step_history,
|
|
309
|
+
evidence.stepHistory,
|
|
310
|
+
evidence.step_history,
|
|
311
|
+
evidence.managerFailureHistory,
|
|
312
|
+
evidence.manager_failure_history
|
|
313
|
+
];
|
|
314
|
+
try {
|
|
315
|
+
for (var historySources_1 = __values(historySources), historySources_1_1 = historySources_1.next(); !historySources_1_1.done; historySources_1_1 = historySources_1.next()) {
|
|
316
|
+
var source = historySources_1_1.value;
|
|
317
|
+
try {
|
|
318
|
+
for (var _e = (e_6 = void 0, __values(asArray(source))), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
319
|
+
var entry = _f.value;
|
|
320
|
+
pushRecord(entry);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
324
|
+
finally {
|
|
325
|
+
try {
|
|
326
|
+
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
327
|
+
}
|
|
328
|
+
finally { if (e_6) throw e_6.error; }
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
333
|
+
finally {
|
|
334
|
+
try {
|
|
335
|
+
if (historySources_1_1 && !historySources_1_1.done && (_a = historySources_1.return)) _a.call(historySources_1);
|
|
336
|
+
}
|
|
337
|
+
finally { if (e_5) throw e_5.error; }
|
|
338
|
+
}
|
|
339
|
+
var fingerprintSources = [
|
|
340
|
+
job.aicoderV6FailureFingerprints,
|
|
341
|
+
job.aiCoderV6FailureFingerprints,
|
|
342
|
+
job.aicoder_v6_failure_fingerprints,
|
|
343
|
+
job.ai_coder_v6_failure_fingerprints,
|
|
344
|
+
job.workflowFailureFingerprints,
|
|
345
|
+
job.workflow_failure_fingerprints,
|
|
346
|
+
job.failureFingerprints,
|
|
347
|
+
job.failure_fingerprints,
|
|
348
|
+
app.aicoderV6FailureFingerprints,
|
|
349
|
+
app.aiCoderV6FailureFingerprints,
|
|
350
|
+
app.aicoder_v6_failure_fingerprints,
|
|
351
|
+
app.ai_coder_v6_failure_fingerprints,
|
|
352
|
+
evidence.aicoderV6FailureFingerprints,
|
|
353
|
+
evidence.aiCoderV6FailureFingerprints,
|
|
354
|
+
evidence.aicoder_v6_failure_fingerprints,
|
|
355
|
+
evidence.ai_coder_v6_failure_fingerprints,
|
|
356
|
+
evidence.workflowFailureFingerprints,
|
|
357
|
+
evidence.workflow_failure_fingerprints,
|
|
358
|
+
evidence.failureFingerprints,
|
|
359
|
+
evidence.failure_fingerprints
|
|
360
|
+
];
|
|
361
|
+
try {
|
|
362
|
+
for (var fingerprintSources_1 = __values(fingerprintSources), fingerprintSources_1_1 = fingerprintSources_1.next(); !fingerprintSources_1_1.done; fingerprintSources_1_1 = fingerprintSources_1.next()) {
|
|
363
|
+
var source = fingerprintSources_1_1.value;
|
|
364
|
+
try {
|
|
365
|
+
for (var _g = (e_8 = void 0, __values(asArray(source))), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
366
|
+
var entry = _h.value;
|
|
367
|
+
var fingerprint = plainObject(entry);
|
|
368
|
+
var count = Math.max(1, Math.min(8, Number(fingerprint.count || fingerprint.repeatedCount || fingerprint.repeated_count || 1) || 1));
|
|
369
|
+
var fallback = {
|
|
370
|
+
lane: cleanText(fingerprint.lane || 'aicoder', 80),
|
|
371
|
+
stepType: cleanText(fingerprint.stepType || fingerprint.step_type || 'workflow_step', 80),
|
|
372
|
+
outcome: cleanText(fingerprint.outcome || 'needs_repair', 80),
|
|
373
|
+
failureClass: cleanText(fingerprint.failureClass || fingerprint.failure_class || fingerprint.class, 120),
|
|
374
|
+
blocker: cleanText(fingerprint.blocker || fingerprint.reason || fingerprint.summary, 1200),
|
|
375
|
+
blockerFingerprint: cleanText(fingerprint.blockerFingerprint || fingerprint.blocker_fingerprint, 180),
|
|
376
|
+
evidenceHash: cleanText(fingerprint.evidenceHash || fingerprint.evidence_hash, 180)
|
|
377
|
+
};
|
|
378
|
+
for (var index = 0; index < count; index += 1) {
|
|
379
|
+
pushRecord(fingerprint, fallback);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
384
|
+
finally {
|
|
385
|
+
try {
|
|
386
|
+
if (_h && !_h.done && (_d = _g.return)) _d.call(_g);
|
|
387
|
+
}
|
|
388
|
+
finally { if (e_8) throw e_8.error; }
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
393
|
+
finally {
|
|
394
|
+
try {
|
|
395
|
+
if (fingerprintSources_1_1 && !fingerprintSources_1_1.done && (_c = fingerprintSources_1.return)) _c.call(fingerprintSources_1);
|
|
396
|
+
}
|
|
397
|
+
finally { if (e_7) throw e_7.error; }
|
|
398
|
+
}
|
|
399
|
+
var currentFailure = evidenceObject(job.aicoderV6CurrentFailure, job.aiCoderV6CurrentFailure, job.aicoder_v6_current_failure, job.ai_coder_v6_current_failure, job.workflowCurrentFailure, job.workflow_current_failure, job.currentFailure, job.current_failure, evidence.aicoderV6CurrentFailure, evidence.aiCoderV6CurrentFailure, evidence.aicoder_v6_current_failure, evidence.ai_coder_v6_current_failure, evidence.workflowCurrentFailure, evidence.workflow_current_failure, evidence.currentFailure, evidence.current_failure);
|
|
400
|
+
pushRecord(currentFailure);
|
|
401
|
+
return records.slice(-80);
|
|
402
|
+
}
|
|
403
|
+
function aicoderManagerNoBlindLoopGate(app, job, evidence, now) {
|
|
404
|
+
return managerNoBlindLoopGateFromHistory(aicoderManagerFailureRecords(app, job, evidence), job.aicoderV6Budget
|
|
405
|
+
|| job.aiCoderV6Budget
|
|
406
|
+
|| job.aicoder_v6_budget
|
|
407
|
+
|| job.ai_coder_v6_budget
|
|
408
|
+
|| evidence.aicoderV6Budget
|
|
409
|
+
|| evidence.aiCoderV6Budget
|
|
410
|
+
|| evidence.aicoder_v6_budget
|
|
411
|
+
|| evidence.ai_coder_v6_budget
|
|
412
|
+
|| app.aicoderV6Budget
|
|
413
|
+
|| app.aiCoderV6Budget
|
|
414
|
+
|| app.aicoder_v6_budget
|
|
415
|
+
|| app.ai_coder_v6_budget
|
|
416
|
+
|| job.budget
|
|
417
|
+
|| evidence.budget, now);
|
|
418
|
+
}
|
|
419
|
+
function managerNoBlindLoopMetadata(gate) {
|
|
420
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
421
|
+
if (!gate) {
|
|
422
|
+
return undefined;
|
|
423
|
+
}
|
|
424
|
+
return {
|
|
425
|
+
action: cleanText((_a = gate.metadata) === null || _a === void 0 ? void 0 : _a.action, 120),
|
|
426
|
+
status: gate.status,
|
|
427
|
+
failureClass: cleanText((_b = gate.metadata) === null || _b === void 0 ? void 0 : _b.failureClass, 120),
|
|
428
|
+
sameFailureCount: Number(((_c = gate.metadata) === null || _c === void 0 ? void 0 : _c.sameFailureCount) || 0),
|
|
429
|
+
pingPongCount: Number(((_d = gate.metadata) === null || _d === void 0 ? void 0 : _d.pingPongCount) || 0),
|
|
430
|
+
newEvidence: ((_e = gate.metadata) === null || _e === void 0 ? void 0 : _e.newEvidence) === true,
|
|
431
|
+
materialEvidence: ((_f = gate.metadata) === null || _f === void 0 ? void 0 : _f.materialEvidence) === true,
|
|
432
|
+
evidenceStrength: cleanText((_g = gate.metadata) === null || _g === void 0 ? void 0 : _g.evidenceStrength, 120),
|
|
433
|
+
loopBudgetShouldReset: ((_h = gate.metadata) === null || _h === void 0 ? void 0 : _h.loopBudgetShouldReset) === true,
|
|
434
|
+
dispatchAction: cleanText((_j = gate.metadata) === null || _j === void 0 ? void 0 : _j.dispatchAction, 160),
|
|
435
|
+
productRepairAllowed: ((_k = gate.metadata) === null || _k === void 0 ? void 0 : _k.productRepairAllowed) === true,
|
|
436
|
+
expensiveModelAllowed: ((_l = gate.metadata) === null || _l === void 0 ? void 0 : _l.expensiveModelAllowed) === true,
|
|
437
|
+
productRepairFailure: ((_m = gate.metadata) === null || _m === void 0 ? void 0 : _m.productRepairFailure) === true,
|
|
438
|
+
requiresNewEvidence: ((_o = gate.metadata) === null || _o === void 0 ? void 0 : _o.requiresNewEvidence) === true
|
|
439
|
+
};
|
|
440
|
+
}
|
|
140
441
|
function hotfixEvidenceCandidates() {
|
|
141
|
-
var
|
|
442
|
+
var e_9, _a;
|
|
142
443
|
var sources = [];
|
|
143
444
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
144
445
|
sources[_i] = arguments[_i];
|
|
@@ -146,7 +447,7 @@ function hotfixEvidenceCandidates() {
|
|
|
146
447
|
var result = [];
|
|
147
448
|
var seen = new Set();
|
|
148
449
|
var pushCandidate = function (value) {
|
|
149
|
-
var
|
|
450
|
+
var e_10, _a, e_11, _b;
|
|
150
451
|
var _c, _d;
|
|
151
452
|
if (Array.isArray(value)) {
|
|
152
453
|
try {
|
|
@@ -155,12 +456,12 @@ function hotfixEvidenceCandidates() {
|
|
|
155
456
|
pushCandidate(entry);
|
|
156
457
|
}
|
|
157
458
|
}
|
|
158
|
-
catch (
|
|
459
|
+
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
159
460
|
finally {
|
|
160
461
|
try {
|
|
161
462
|
if (value_1_1 && !value_1_1.done && (_a = value_1.return)) _a.call(value_1);
|
|
162
463
|
}
|
|
163
|
-
finally { if (
|
|
464
|
+
finally { if (e_10) throw e_10.error; }
|
|
164
465
|
}
|
|
165
466
|
return;
|
|
166
467
|
}
|
|
@@ -184,12 +485,12 @@ function hotfixEvidenceCandidates() {
|
|
|
184
485
|
pushCandidate(nestedValue);
|
|
185
486
|
}
|
|
186
487
|
}
|
|
187
|
-
catch (
|
|
488
|
+
catch (e_11_1) { e_11 = { error: e_11_1 }; }
|
|
188
489
|
finally {
|
|
189
490
|
try {
|
|
190
491
|
if (nestedValues_1_1 && !nestedValues_1_1.done && (_b = nestedValues_1.return)) _b.call(nestedValues_1);
|
|
191
492
|
}
|
|
192
|
-
finally { if (
|
|
493
|
+
finally { if (e_11) throw e_11.error; }
|
|
193
494
|
}
|
|
194
495
|
return;
|
|
195
496
|
}
|
|
@@ -214,12 +515,12 @@ function hotfixEvidenceCandidates() {
|
|
|
214
515
|
pushCandidate(source);
|
|
215
516
|
}
|
|
216
517
|
}
|
|
217
|
-
catch (
|
|
518
|
+
catch (e_9_1) { e_9 = { error: e_9_1 }; }
|
|
218
519
|
finally {
|
|
219
520
|
try {
|
|
220
521
|
if (sources_1_1 && !sources_1_1.done && (_a = sources_1.return)) _a.call(sources_1);
|
|
221
522
|
}
|
|
222
|
-
finally { if (
|
|
523
|
+
finally { if (e_9) throw e_9.error; }
|
|
223
524
|
}
|
|
224
525
|
return result;
|
|
225
526
|
}
|
|
@@ -310,7 +611,7 @@ function hotfixCommitProofGate(evidence, now) {
|
|
|
310
611
|
};
|
|
311
612
|
}
|
|
312
613
|
function collectHotfixEvidenceEvents(sources, events, gates, now) {
|
|
313
|
-
var
|
|
614
|
+
var e_12, _a;
|
|
314
615
|
var _b, _c;
|
|
315
616
|
try {
|
|
316
617
|
for (var _d = __values(hotfixEvidenceCandidates.apply(void 0, __spreadArray([], __read(sources), false))), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
@@ -357,16 +658,16 @@ function collectHotfixEvidenceEvents(sources, events, gates, now) {
|
|
|
357
658
|
}
|
|
358
659
|
}
|
|
359
660
|
}
|
|
360
|
-
catch (
|
|
661
|
+
catch (e_12_1) { e_12 = { error: e_12_1 }; }
|
|
361
662
|
finally {
|
|
362
663
|
try {
|
|
363
664
|
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
|
|
364
665
|
}
|
|
365
|
-
finally { if (
|
|
666
|
+
finally { if (e_12) throw e_12.error; }
|
|
366
667
|
}
|
|
367
668
|
}
|
|
368
669
|
function collectUsageEvents(entries, events) {
|
|
369
|
-
var
|
|
670
|
+
var e_13, _a;
|
|
370
671
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
371
672
|
if (!entries.length) {
|
|
372
673
|
return undefined;
|
|
@@ -397,17 +698,17 @@ function collectUsageEvents(entries, events) {
|
|
|
397
698
|
});
|
|
398
699
|
}
|
|
399
700
|
}
|
|
400
|
-
catch (
|
|
701
|
+
catch (e_13_1) { e_13 = { error: e_13_1 }; }
|
|
401
702
|
finally {
|
|
402
703
|
try {
|
|
403
704
|
if (normalizedEntries_1_1 && !normalizedEntries_1_1.done && (_a = normalizedEntries_1.return)) _a.call(normalizedEntries_1);
|
|
404
705
|
}
|
|
405
|
-
finally { if (
|
|
706
|
+
finally { if (e_13) throw e_13.error; }
|
|
406
707
|
}
|
|
407
708
|
return (0, ai_run_evidence_1.buildAIRunCost)(entries);
|
|
408
709
|
}
|
|
409
710
|
function collectCommitEvents(commits, events) {
|
|
410
|
-
var
|
|
711
|
+
var e_14, _a;
|
|
411
712
|
try {
|
|
412
713
|
for (var _b = __values(commits.slice(0, 80)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
413
714
|
var commit = _c.value;
|
|
@@ -423,12 +724,12 @@ function collectCommitEvents(commits, events) {
|
|
|
423
724
|
});
|
|
424
725
|
}
|
|
425
726
|
}
|
|
426
|
-
catch (
|
|
727
|
+
catch (e_14_1) { e_14 = { error: e_14_1 }; }
|
|
427
728
|
finally {
|
|
428
729
|
try {
|
|
429
730
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
430
731
|
}
|
|
431
|
-
finally { if (
|
|
732
|
+
finally { if (e_14) throw e_14.error; }
|
|
432
733
|
}
|
|
433
734
|
}
|
|
434
735
|
function statusFromBoolean(value, fallback) {
|
|
@@ -441,7 +742,7 @@ function statusFromBoolean(value, fallback) {
|
|
|
441
742
|
return fallback;
|
|
442
743
|
}
|
|
443
744
|
function collectArtifacts(evidence) {
|
|
444
|
-
var
|
|
745
|
+
var e_15, _a, e_16, _b, e_17, _c;
|
|
445
746
|
var artifacts = [];
|
|
446
747
|
try {
|
|
447
748
|
for (var _d = __values(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.artifacts)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
@@ -456,12 +757,12 @@ function collectArtifacts(evidence) {
|
|
|
456
757
|
});
|
|
457
758
|
}
|
|
458
759
|
}
|
|
459
|
-
catch (
|
|
760
|
+
catch (e_15_1) { e_15 = { error: e_15_1 }; }
|
|
460
761
|
finally {
|
|
461
762
|
try {
|
|
462
763
|
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
|
|
463
764
|
}
|
|
464
|
-
finally { if (
|
|
765
|
+
finally { if (e_15) throw e_15.error; }
|
|
465
766
|
}
|
|
466
767
|
var screenshots = asArray((evidence === null || evidence === void 0 ? void 0 : evidence.screenshots) || (evidence === null || evidence === void 0 ? void 0 : evidence.qaScreenshots) || (evidence === null || evidence === void 0 ? void 0 : evidence.browserScreenshots));
|
|
467
768
|
try {
|
|
@@ -482,12 +783,12 @@ function collectArtifacts(evidence) {
|
|
|
482
783
|
}
|
|
483
784
|
}
|
|
484
785
|
}
|
|
485
|
-
catch (
|
|
786
|
+
catch (e_16_1) { e_16 = { error: e_16_1 }; }
|
|
486
787
|
finally {
|
|
487
788
|
try {
|
|
488
789
|
if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
|
|
489
790
|
}
|
|
490
|
-
finally { if (
|
|
791
|
+
finally { if (e_16) throw e_16.error; }
|
|
491
792
|
}
|
|
492
793
|
var artifactRefs = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.artifactPaths)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.artifact_paths)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.runnerEvidenceArtifacts)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.runner_evidence_artifacts)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.supportQaArtifacts)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.support_qa_artifacts)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.qa_artifacts)), false);
|
|
493
794
|
try {
|
|
@@ -508,17 +809,17 @@ function collectArtifacts(evidence) {
|
|
|
508
809
|
}
|
|
509
810
|
}
|
|
510
811
|
}
|
|
511
|
-
catch (
|
|
812
|
+
catch (e_17_1) { e_17 = { error: e_17_1 }; }
|
|
512
813
|
finally {
|
|
513
814
|
try {
|
|
514
815
|
if (_j && !_j.done && (_c = _h.return)) _c.call(_h);
|
|
515
816
|
}
|
|
516
|
-
finally { if (
|
|
817
|
+
finally { if (e_17) throw e_17.error; }
|
|
517
818
|
}
|
|
518
819
|
return artifacts;
|
|
519
820
|
}
|
|
520
821
|
function collectInfraChecks(evidence) {
|
|
521
|
-
var
|
|
822
|
+
var e_18, _a;
|
|
522
823
|
var _b;
|
|
523
824
|
var checks = [];
|
|
524
825
|
try {
|
|
@@ -535,12 +836,12 @@ function collectInfraChecks(evidence) {
|
|
|
535
836
|
});
|
|
536
837
|
}
|
|
537
838
|
}
|
|
538
|
-
catch (
|
|
839
|
+
catch (e_18_1) { e_18 = { error: e_18_1 }; }
|
|
539
840
|
finally {
|
|
540
841
|
try {
|
|
541
842
|
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
542
843
|
}
|
|
543
|
-
finally { if (
|
|
844
|
+
finally { if (e_18) throw e_18.error; }
|
|
544
845
|
}
|
|
545
846
|
if (evidence === null || evidence === void 0 ? void 0 : evidence.preflightStatus) {
|
|
546
847
|
checks.push({
|
|
@@ -573,7 +874,7 @@ function collectCompileResult(evidence) {
|
|
|
573
874
|
};
|
|
574
875
|
}
|
|
575
876
|
function collectRouteProbes(evidence) {
|
|
576
|
-
var
|
|
877
|
+
var e_19, _a, e_20, _b;
|
|
577
878
|
var probes = [];
|
|
578
879
|
var rows = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.routeProbes)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.route_probes)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.routes)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.browserRoutes)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.browser_routes)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.workflowProbes)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.workflow_probes)), false);
|
|
579
880
|
var directProbe = plainObject((evidence === null || evidence === void 0 ? void 0 : evidence.routeProbe) || (evidence === null || evidence === void 0 ? void 0 : evidence.route_probe) || (evidence === null || evidence === void 0 ? void 0 : evidence.workflowProbe) || (evidence === null || evidence === void 0 ? void 0 : evidence.workflow_probe));
|
|
@@ -597,12 +898,12 @@ function collectRouteProbes(evidence) {
|
|
|
597
898
|
});
|
|
598
899
|
}
|
|
599
900
|
}
|
|
600
|
-
catch (
|
|
901
|
+
catch (e_19_1) { e_19 = { error: e_19_1 }; }
|
|
601
902
|
finally {
|
|
602
903
|
try {
|
|
603
904
|
if (rows_1_1 && !rows_1_1.done && (_a = rows_1.return)) _a.call(rows_1);
|
|
604
905
|
}
|
|
605
|
-
finally { if (
|
|
906
|
+
finally { if (e_19) throw e_19.error; }
|
|
606
907
|
}
|
|
607
908
|
var screenshots = asArray((evidence === null || evidence === void 0 ? void 0 : evidence.screenshots) || (evidence === null || evidence === void 0 ? void 0 : evidence.qaScreenshots) || (evidence === null || evidence === void 0 ? void 0 : evidence.browserScreenshots));
|
|
608
909
|
try {
|
|
@@ -624,17 +925,17 @@ function collectRouteProbes(evidence) {
|
|
|
624
925
|
}
|
|
625
926
|
}
|
|
626
927
|
}
|
|
627
|
-
catch (
|
|
928
|
+
catch (e_20_1) { e_20 = { error: e_20_1 }; }
|
|
628
929
|
finally {
|
|
629
930
|
try {
|
|
630
931
|
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
631
932
|
}
|
|
632
|
-
finally { if (
|
|
933
|
+
finally { if (e_20) throw e_20.error; }
|
|
633
934
|
}
|
|
634
935
|
return probes;
|
|
635
936
|
}
|
|
636
937
|
function collectBusinessAssertions(evidence) {
|
|
637
|
-
var
|
|
938
|
+
var e_21, _a;
|
|
638
939
|
var assertions = [];
|
|
639
940
|
var rows = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.businessAssertions)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.business_assertions)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.workflowAssertions)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.workflow_assertions)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.assertions)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.qaRows)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.qa_rows)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.rows)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.supportQaAssertions)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.support_qa_assertions)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.aiQaBusinessAssertions)), false), __read(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.ai_qa_business_assertions)), false);
|
|
640
941
|
try {
|
|
@@ -657,12 +958,12 @@ function collectBusinessAssertions(evidence) {
|
|
|
657
958
|
});
|
|
658
959
|
}
|
|
659
960
|
}
|
|
660
|
-
catch (
|
|
961
|
+
catch (e_21_1) { e_21 = { error: e_21_1 }; }
|
|
661
962
|
finally {
|
|
662
963
|
try {
|
|
663
964
|
if (rows_2_1 && !rows_2_1.done && (_a = rows_2.return)) _a.call(rows_2);
|
|
664
965
|
}
|
|
665
|
-
finally { if (
|
|
966
|
+
finally { if (e_21) throw e_21.error; }
|
|
666
967
|
}
|
|
667
968
|
if (!assertions.length && (evidence === null || evidence === void 0 ? void 0 : evidence.qaRunOutcome) === 'business_assertion_passed') {
|
|
668
969
|
assertions.push({
|
|
@@ -721,7 +1022,7 @@ function businessAssertionPassed(assertion) {
|
|
|
721
1022
|
return /^(pass|passed|success|ok|done)$/i.test(cleanText(assertion.status, 40));
|
|
722
1023
|
}
|
|
723
1024
|
function supportAssertionMatchesDiagnosisProof(assertion, proofPlan) {
|
|
724
|
-
var
|
|
1025
|
+
var e_22, _a;
|
|
725
1026
|
var metadata = assertion.metadata || {};
|
|
726
1027
|
if (metadata.diagnosisProofPlanMatched === true || metadata.proofPlanMatched === true || metadata.supportDiagnosisProof === true) {
|
|
727
1028
|
return true;
|
|
@@ -766,12 +1067,12 @@ function supportAssertionMatchesDiagnosisProof(assertion, proofPlan) {
|
|
|
766
1067
|
}
|
|
767
1068
|
}
|
|
768
1069
|
}
|
|
769
|
-
catch (
|
|
1070
|
+
catch (e_22_1) { e_22 = { error: e_22_1 }; }
|
|
770
1071
|
finally {
|
|
771
1072
|
try {
|
|
772
1073
|
if (proofTokens_1_1 && !proofTokens_1_1.done && (_a = proofTokens_1.return)) _a.call(proofTokens_1);
|
|
773
1074
|
}
|
|
774
|
-
finally { if (
|
|
1075
|
+
finally { if (e_22) throw e_22.error; }
|
|
775
1076
|
}
|
|
776
1077
|
return overlap >= Math.min(4, Math.max(3, Math.ceil(proofTokens.size * 0.45)));
|
|
777
1078
|
}
|
|
@@ -902,7 +1203,7 @@ function applySupportDiagnosisProofGate(qa, diagnosisGate, now) {
|
|
|
902
1203
|
], false) });
|
|
903
1204
|
}
|
|
904
1205
|
function evidenceObject() {
|
|
905
|
-
var
|
|
1206
|
+
var e_23, _a;
|
|
906
1207
|
var values = [];
|
|
907
1208
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
908
1209
|
values[_i] = arguments[_i];
|
|
@@ -915,17 +1216,17 @@ function evidenceObject() {
|
|
|
915
1216
|
}
|
|
916
1217
|
}
|
|
917
1218
|
}
|
|
918
|
-
catch (
|
|
1219
|
+
catch (e_23_1) { e_23 = { error: e_23_1 }; }
|
|
919
1220
|
finally {
|
|
920
1221
|
try {
|
|
921
1222
|
if (values_1_1 && !values_1_1.done && (_a = values_1.return)) _a.call(values_1);
|
|
922
1223
|
}
|
|
923
|
-
finally { if (
|
|
1224
|
+
finally { if (e_23) throw e_23.error; }
|
|
924
1225
|
}
|
|
925
1226
|
return {};
|
|
926
1227
|
}
|
|
927
1228
|
function mergeEvidenceRecords() {
|
|
928
|
-
var
|
|
1229
|
+
var e_24, _a, e_25, _b;
|
|
929
1230
|
var values = [];
|
|
930
1231
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
931
1232
|
values[_i] = arguments[_i];
|
|
@@ -936,7 +1237,7 @@ function mergeEvidenceRecords() {
|
|
|
936
1237
|
var value = values_2_1.value;
|
|
937
1238
|
var source = plainObject(value);
|
|
938
1239
|
try {
|
|
939
|
-
for (var _c = (
|
|
1240
|
+
for (var _c = (e_25 = void 0, __values(Object.entries(source))), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
940
1241
|
var _e = __read(_d.value, 2), key = _e[0], entry = _e[1];
|
|
941
1242
|
if (entry === undefined || entry === null || entry === '') {
|
|
942
1243
|
continue;
|
|
@@ -952,21 +1253,21 @@ function mergeEvidenceRecords() {
|
|
|
952
1253
|
merged[key] = entry;
|
|
953
1254
|
}
|
|
954
1255
|
}
|
|
955
|
-
catch (
|
|
1256
|
+
catch (e_25_1) { e_25 = { error: e_25_1 }; }
|
|
956
1257
|
finally {
|
|
957
1258
|
try {
|
|
958
1259
|
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
959
1260
|
}
|
|
960
|
-
finally { if (
|
|
1261
|
+
finally { if (e_25) throw e_25.error; }
|
|
961
1262
|
}
|
|
962
1263
|
}
|
|
963
1264
|
}
|
|
964
|
-
catch (
|
|
1265
|
+
catch (e_24_1) { e_24 = { error: e_24_1 }; }
|
|
965
1266
|
finally {
|
|
966
1267
|
try {
|
|
967
1268
|
if (values_2_1 && !values_2_1.done && (_a = values_2.return)) _a.call(values_2);
|
|
968
1269
|
}
|
|
969
|
-
finally { if (
|
|
1270
|
+
finally { if (e_24) throw e_24.error; }
|
|
970
1271
|
}
|
|
971
1272
|
return merged;
|
|
972
1273
|
}
|
|
@@ -1083,7 +1384,7 @@ function supportCustomerReplyPolicyGate(policy, now) {
|
|
|
1083
1384
|
};
|
|
1084
1385
|
}
|
|
1085
1386
|
function firstNonEmptyText(values, max) {
|
|
1086
|
-
var
|
|
1387
|
+
var e_26, _a;
|
|
1087
1388
|
if (max === void 0) { max = 1000; }
|
|
1088
1389
|
try {
|
|
1089
1390
|
for (var values_3 = __values(values), values_3_1 = values_3.next(); !values_3_1.done; values_3_1 = values_3.next()) {
|
|
@@ -1094,12 +1395,12 @@ function firstNonEmptyText(values, max) {
|
|
|
1094
1395
|
}
|
|
1095
1396
|
}
|
|
1096
1397
|
}
|
|
1097
|
-
catch (
|
|
1398
|
+
catch (e_26_1) { e_26 = { error: e_26_1 }; }
|
|
1098
1399
|
finally {
|
|
1099
1400
|
try {
|
|
1100
1401
|
if (values_3_1 && !values_3_1.done && (_a = values_3.return)) _a.call(values_3);
|
|
1101
1402
|
}
|
|
1102
|
-
finally { if (
|
|
1403
|
+
finally { if (e_26) throw e_26.error; }
|
|
1103
1404
|
}
|
|
1104
1405
|
return undefined;
|
|
1105
1406
|
}
|
|
@@ -1230,7 +1531,12 @@ function adapterStatusPassed(value) {
|
|
|
1230
1531
|
return !!normalized && /(pass|passed|success|succeeded|ok|done|complete|completed|ready|saved|published|deployed)/i.test(normalized);
|
|
1231
1532
|
}
|
|
1232
1533
|
function applyAICoderWorkflowProofGate(qa, readiness, now) {
|
|
1233
|
-
if (readiness.ready
|
|
1534
|
+
if (readiness.ready
|
|
1535
|
+
|| readiness.status === 'release_blocked'
|
|
1536
|
+
|| qa.outcome === 'infra_failed'
|
|
1537
|
+
|| qa.outcome === 'compile_failed'
|
|
1538
|
+
|| qa.outcome === 'route_failed'
|
|
1539
|
+
|| qa.outcome === 'business_assertion_failed') {
|
|
1234
1540
|
return qa;
|
|
1235
1541
|
}
|
|
1236
1542
|
var gate = aicoderWorkflowProofReadinessGate(readiness, now);
|
|
@@ -1334,7 +1640,7 @@ function assistantDateWindowObject(quality) {
|
|
|
1334
1640
|
return Object.keys(dateWindow).length ? dateWindow : nestedWindow;
|
|
1335
1641
|
}
|
|
1336
1642
|
function collectMongoProjectionObjects(value, result) {
|
|
1337
|
-
var
|
|
1643
|
+
var e_27, _a;
|
|
1338
1644
|
if (result === void 0) { result = []; }
|
|
1339
1645
|
if (!value || typeof value !== 'object') {
|
|
1340
1646
|
return result;
|
|
@@ -1346,12 +1652,12 @@ function collectMongoProjectionObjects(value, result) {
|
|
|
1346
1652
|
collectMongoProjectionObjects(entry, result);
|
|
1347
1653
|
}
|
|
1348
1654
|
}
|
|
1349
|
-
catch (
|
|
1655
|
+
catch (e_27_1) { e_27 = { error: e_27_1 }; }
|
|
1350
1656
|
finally {
|
|
1351
1657
|
try {
|
|
1352
1658
|
if (value_2_1 && !value_2_1.done && (_a = value_2.return)) _a.call(value_2);
|
|
1353
1659
|
}
|
|
1354
|
-
finally { if (
|
|
1660
|
+
finally { if (e_27) throw e_27.error; }
|
|
1355
1661
|
}
|
|
1356
1662
|
return result;
|
|
1357
1663
|
}
|
|
@@ -1592,7 +1898,7 @@ function applyAssistantAnswerQualityGate(qa, decision, now) {
|
|
|
1592
1898
|
], false) });
|
|
1593
1899
|
}
|
|
1594
1900
|
function buildSupportAIRunFromEvidence(input) {
|
|
1595
|
-
var
|
|
1901
|
+
var e_28, _a, e_29, _b;
|
|
1596
1902
|
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
1597
1903
|
var ticket = input.ticket || {};
|
|
1598
1904
|
var job = input.job || {};
|
|
@@ -1620,12 +1926,12 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
1620
1926
|
});
|
|
1621
1927
|
}
|
|
1622
1928
|
}
|
|
1623
|
-
catch (
|
|
1929
|
+
catch (e_28_1) { e_28 = { error: e_28_1 }; }
|
|
1624
1930
|
finally {
|
|
1625
1931
|
try {
|
|
1626
1932
|
if (_t && !_t.done && (_a = _s.return)) _a.call(_s);
|
|
1627
1933
|
}
|
|
1628
|
-
finally { if (
|
|
1934
|
+
finally { if (e_28) throw e_28.error; }
|
|
1629
1935
|
}
|
|
1630
1936
|
try {
|
|
1631
1937
|
for (var _u = __values(asArray(input.aiJobs)), _v = _u.next(); !_v.done; _v = _u.next()) {
|
|
@@ -1644,15 +1950,27 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
1644
1950
|
});
|
|
1645
1951
|
}
|
|
1646
1952
|
}
|
|
1647
|
-
catch (
|
|
1953
|
+
catch (e_29_1) { e_29 = { error: e_29_1 }; }
|
|
1648
1954
|
finally {
|
|
1649
1955
|
try {
|
|
1650
1956
|
if (_v && !_v.done && (_b = _u.return)) _b.call(_u);
|
|
1651
1957
|
}
|
|
1652
|
-
finally { if (
|
|
1958
|
+
finally { if (e_29) throw e_29.error; }
|
|
1653
1959
|
}
|
|
1654
1960
|
collectCommitEvents(asArray(input.commits), events);
|
|
1655
1961
|
collectHotfixEvidenceEvents([job, ticket, evidence, input.qaEvidence], events, gates, input.now);
|
|
1962
|
+
var noBlindLoopGate = supportManagerNoBlindLoopGate(job, evidence, input.now);
|
|
1963
|
+
if (noBlindLoopGate) {
|
|
1964
|
+
gates.push(noBlindLoopGate);
|
|
1965
|
+
pushEvent(events, {
|
|
1966
|
+
type: 'log',
|
|
1967
|
+
category: 'manager_no_blind_loop_policy',
|
|
1968
|
+
message: noBlindLoopGate.reason,
|
|
1969
|
+
artifactPaths: noBlindLoopGate.evidenceRefs,
|
|
1970
|
+
recordedAt: noBlindLoopGate.recordedAt,
|
|
1971
|
+
metadata: noBlindLoopGate.metadata
|
|
1972
|
+
});
|
|
1973
|
+
}
|
|
1656
1974
|
var businessProofReadiness = plainObject(evidence.businessProofReadiness || evidence.business_proof_readiness);
|
|
1657
1975
|
var businessProofReadinessGate = supportBusinessProofReadinessGate(businessProofReadiness, input.now);
|
|
1658
1976
|
if (businessProofReadinessGate) {
|
|
@@ -1736,6 +2054,7 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
1736
2054
|
metadata: {
|
|
1737
2055
|
versionCount: asArray(input.versions).length,
|
|
1738
2056
|
buildPlanCount: asArray(input.buildPlans).length,
|
|
2057
|
+
managerNoBlindLoopPolicy: managerNoBlindLoopMetadata(noBlindLoopGate),
|
|
1739
2058
|
rootCauseEntryContract: Object.keys(rootCauseEntryContract).length ? {
|
|
1740
2059
|
contractId: cleanText(rootCauseEntryContract.contract_id || rootCauseEntryContract.contractId, 160),
|
|
1741
2060
|
version: cleanText(rootCauseEntryContract.version, 120),
|
|
@@ -1775,7 +2094,7 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
1775
2094
|
});
|
|
1776
2095
|
}
|
|
1777
2096
|
function buildAICoderAIRunFromEvidence(input) {
|
|
1778
|
-
var
|
|
2097
|
+
var e_30, _a;
|
|
1779
2098
|
var _b, _c, _d, _e, _f, _g, _h;
|
|
1780
2099
|
var app = input.app || {};
|
|
1781
2100
|
var job = input.job || {};
|
|
@@ -1803,15 +2122,27 @@ function buildAICoderAIRunFromEvidence(input) {
|
|
|
1803
2122
|
});
|
|
1804
2123
|
}
|
|
1805
2124
|
}
|
|
1806
|
-
catch (
|
|
2125
|
+
catch (e_30_1) { e_30 = { error: e_30_1 }; }
|
|
1807
2126
|
finally {
|
|
1808
2127
|
try {
|
|
1809
2128
|
if (_k && !_k.done && (_a = _j.return)) _a.call(_j);
|
|
1810
2129
|
}
|
|
1811
|
-
finally { if (
|
|
2130
|
+
finally { if (e_30) throw e_30.error; }
|
|
1812
2131
|
}
|
|
1813
2132
|
collectCommitEvents(asArray(input.commits), events);
|
|
1814
2133
|
collectHotfixEvidenceEvents([job, app, evidence, input.qaEvidence], events, gates, input.now);
|
|
2134
|
+
var noBlindLoopGate = aicoderManagerNoBlindLoopGate(app, job, evidence, input.now);
|
|
2135
|
+
if (noBlindLoopGate) {
|
|
2136
|
+
gates.push(noBlindLoopGate);
|
|
2137
|
+
pushEvent(events, {
|
|
2138
|
+
type: 'log',
|
|
2139
|
+
category: 'manager_no_blind_loop_policy',
|
|
2140
|
+
message: noBlindLoopGate.reason,
|
|
2141
|
+
artifactPaths: noBlindLoopGate.evidenceRefs,
|
|
2142
|
+
recordedAt: noBlindLoopGate.recordedAt,
|
|
2143
|
+
metadata: noBlindLoopGate.metadata
|
|
2144
|
+
});
|
|
2145
|
+
}
|
|
1815
2146
|
var cost = collectUsageEvents(asArray(input.usageLedger), events);
|
|
1816
2147
|
var scorecardPassed = evidence.scorecardPassed === true
|
|
1817
2148
|
|| evidence.scorecardStatus === 'pass'
|
|
@@ -1892,6 +2223,7 @@ function buildAICoderAIRunFromEvidence(input) {
|
|
|
1892
2223
|
domain: app.domain || app.customDomain || job.domain,
|
|
1893
2224
|
wowScore: (_g = evidence.wowScore) !== null && _g !== void 0 ? _g : job.wowScore,
|
|
1894
2225
|
score: (_h = evidence.score) !== null && _h !== void 0 ? _h : evidence.qualityScore,
|
|
2226
|
+
managerNoBlindLoopPolicy: managerNoBlindLoopMetadata(noBlindLoopGate),
|
|
1895
2227
|
workflowProofReadiness: {
|
|
1896
2228
|
ready: workflowReadiness.ready,
|
|
1897
2229
|
status: workflowReadiness.status,
|
|
@@ -1911,7 +2243,7 @@ function buildAICoderAIRunFromEvidence(input) {
|
|
|
1911
2243
|
});
|
|
1912
2244
|
}
|
|
1913
2245
|
function buildAssistantAIRunFromEvidence(input) {
|
|
1914
|
-
var
|
|
2246
|
+
var e_31, _a, e_32, _b, e_33, _c;
|
|
1915
2247
|
var _d, _e, _f, _g;
|
|
1916
2248
|
var conversation = input.conversation || {};
|
|
1917
2249
|
var events = [];
|
|
@@ -1937,12 +2269,12 @@ function buildAssistantAIRunFromEvidence(input) {
|
|
|
1937
2269
|
});
|
|
1938
2270
|
}
|
|
1939
2271
|
}
|
|
1940
|
-
catch (
|
|
2272
|
+
catch (e_31_1) { e_31 = { error: e_31_1 }; }
|
|
1941
2273
|
finally {
|
|
1942
2274
|
try {
|
|
1943
2275
|
if (_j && !_j.done && (_a = _h.return)) _a.call(_h);
|
|
1944
2276
|
}
|
|
1945
|
-
finally { if (
|
|
2277
|
+
finally { if (e_31) throw e_31.error; }
|
|
1946
2278
|
}
|
|
1947
2279
|
try {
|
|
1948
2280
|
for (var _k = __values(asArray(input.issueReports)), _l = _k.next(); !_l.done; _l = _k.next()) {
|
|
@@ -1960,12 +2292,12 @@ function buildAssistantAIRunFromEvidence(input) {
|
|
|
1960
2292
|
});
|
|
1961
2293
|
}
|
|
1962
2294
|
}
|
|
1963
|
-
catch (
|
|
2295
|
+
catch (e_32_1) { e_32 = { error: e_32_1 }; }
|
|
1964
2296
|
finally {
|
|
1965
2297
|
try {
|
|
1966
2298
|
if (_l && !_l.done && (_b = _k.return)) _b.call(_k);
|
|
1967
2299
|
}
|
|
1968
|
-
finally { if (
|
|
2300
|
+
finally { if (e_32) throw e_32.error; }
|
|
1969
2301
|
}
|
|
1970
2302
|
var cost = collectUsageEvents(asArray(input.usageLedger), events);
|
|
1971
2303
|
var answerQuality = assistantQualityObject(input);
|
|
@@ -1997,12 +2329,12 @@ function buildAssistantAIRunFromEvidence(input) {
|
|
|
1997
2329
|
});
|
|
1998
2330
|
}
|
|
1999
2331
|
}
|
|
2000
|
-
catch (
|
|
2332
|
+
catch (e_33_1) { e_33 = { error: e_33_1 }; }
|
|
2001
2333
|
finally {
|
|
2002
2334
|
try {
|
|
2003
2335
|
if (_o && !_o.done && (_c = _m.return)) _c.call(_m);
|
|
2004
2336
|
}
|
|
2005
|
-
finally { if (
|
|
2337
|
+
finally { if (e_33) throw e_33.error; }
|
|
2006
2338
|
}
|
|
2007
2339
|
var answerQualityDecision = evaluateAssistantAnswerQuality({
|
|
2008
2340
|
answerQuality: answerQuality,
|