@resolveio/server-lib 22.3.161 → 22.3.163

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,142 @@ 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 supportManagerNoBlindLoopGate(job, evidence, now) {
223
+ var _a;
224
+ var history = supportManagerFailureRecords(job, evidence);
225
+ if (!history.length) {
226
+ return undefined;
227
+ }
228
+ var budget = plainObject(job.supportV5Budget || job.support_v5_budget || evidence.supportV5Budget || evidence.support_v5_budget);
229
+ var maxSameFailureRepeats = Math.max(1, Number(budget.maxRepeatedNoProgress || budget.max_repeated_no_progress || budget.maxSameFailureRepeats || budget.max_same_failure_repeats || 3) || 3);
230
+ var decision = (0, ai_runner_manager_policy_1.decideResolveIOAIManagerPolicy)({
231
+ history: history,
232
+ maxSameFailureRepeats: maxSameFailureRepeats
233
+ });
234
+ var parksRun = /^(park_repeated_failure|park_ping_pong|manual_handoff)$/.test(decision.action);
235
+ var status = parksRun
236
+ ? 'blocked'
237
+ : decision.action === 'retry_infra'
238
+ ? 'warn'
239
+ : 'pass';
240
+ return {
241
+ key: 'manager_no_blind_loop_policy',
242
+ label: 'No-blind-loop manager policy',
243
+ status: status,
244
+ reason: decision.reason,
245
+ evidenceRefs: cleanStringList(decision.recoveryAction.requiredArtifacts, 20, 500),
246
+ recordedAt: isoNow(now),
247
+ metadata: {
248
+ action: decision.action,
249
+ failureClass: decision.failureClass,
250
+ blockerFingerprint: decision.blockerFingerprint,
251
+ evidenceHash: decision.evidenceHash,
252
+ sameFailureCount: decision.sameFailureCount,
253
+ pingPongCount: decision.pingPongCount,
254
+ newEvidence: decision.newEvidence,
255
+ materialEvidence: decision.materialEvidence,
256
+ evidenceStrength: decision.evidenceStrength,
257
+ evidenceSignals: decision.evidenceSignals,
258
+ loopBudgetShouldReset: decision.loopBudgetShouldReset,
259
+ productRepairFailure: decision.productRepairFailure,
260
+ recoveryClass: decision.recoveryPlan.recoveryClass,
261
+ allowedAction: decision.recoveryPlan.allowedAction,
262
+ dispatchAction: decision.recoveryAction.allowedDispatchAction,
263
+ evidenceOnly: decision.recoveryAction.evidenceOnly,
264
+ productRepairAllowed: decision.recoveryAction.productRepairAllowed,
265
+ expensiveModelAllowed: decision.recoveryAction.expensiveModelAllowed,
266
+ costCeilingUsd: decision.recoveryAction.costCeilingUsd,
267
+ requiresNewEvidence: ((_a = decision.recoveryAction.retryPolicy) === null || _a === void 0 ? void 0 : _a.requireNewEvidence) === true,
268
+ nextCommands: decision.recoveryAction.nextCommands,
269
+ requiredEvidence: decision.recoveryAction.requiredArtifacts,
270
+ forbiddenActions: decision.recoveryPlan.forbiddenActions
271
+ }
272
+ };
273
+ }
140
274
  function hotfixEvidenceCandidates() {
141
- var e_3, _a;
275
+ var e_5, _a;
142
276
  var sources = [];
143
277
  for (var _i = 0; _i < arguments.length; _i++) {
144
278
  sources[_i] = arguments[_i];
@@ -146,7 +280,7 @@ function hotfixEvidenceCandidates() {
146
280
  var result = [];
147
281
  var seen = new Set();
148
282
  var pushCandidate = function (value) {
149
- var e_4, _a, e_5, _b;
283
+ var e_6, _a, e_7, _b;
150
284
  var _c, _d;
151
285
  if (Array.isArray(value)) {
152
286
  try {
@@ -155,12 +289,12 @@ function hotfixEvidenceCandidates() {
155
289
  pushCandidate(entry);
156
290
  }
157
291
  }
158
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
292
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
159
293
  finally {
160
294
  try {
161
295
  if (value_1_1 && !value_1_1.done && (_a = value_1.return)) _a.call(value_1);
162
296
  }
163
- finally { if (e_4) throw e_4.error; }
297
+ finally { if (e_6) throw e_6.error; }
164
298
  }
165
299
  return;
166
300
  }
@@ -184,12 +318,12 @@ function hotfixEvidenceCandidates() {
184
318
  pushCandidate(nestedValue);
185
319
  }
186
320
  }
187
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
321
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
188
322
  finally {
189
323
  try {
190
324
  if (nestedValues_1_1 && !nestedValues_1_1.done && (_b = nestedValues_1.return)) _b.call(nestedValues_1);
191
325
  }
192
- finally { if (e_5) throw e_5.error; }
326
+ finally { if (e_7) throw e_7.error; }
193
327
  }
194
328
  return;
195
329
  }
@@ -214,12 +348,12 @@ function hotfixEvidenceCandidates() {
214
348
  pushCandidate(source);
215
349
  }
216
350
  }
217
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
351
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
218
352
  finally {
219
353
  try {
220
354
  if (sources_1_1 && !sources_1_1.done && (_a = sources_1.return)) _a.call(sources_1);
221
355
  }
222
- finally { if (e_3) throw e_3.error; }
356
+ finally { if (e_5) throw e_5.error; }
223
357
  }
224
358
  return result;
225
359
  }
@@ -267,12 +401,50 @@ function hotfixEvidenceGate(evidence, now) {
267
401
  fullDeployBlocked: validation.fullDeployBlocked,
268
402
  hotfixSatisfied: validation.hotfixSatisfied,
269
403
  blockers: validation.blockers,
404
+ githubCommitGuard: validation.githubCommitGuard,
270
405
  target: (_b = validation.normalized) === null || _b === void 0 ? void 0 : _b.target
271
406
  }
272
407
  };
273
408
  }
409
+ function hotfixCommitProofGate(evidence, now) {
410
+ var _a;
411
+ var validation = (0, ai_runner_manager_policy_1.validateResolveIOAIManagerHotfixEvidence)(evidence);
412
+ var guard = validation.githubCommitGuard;
413
+ if (!guard.required) {
414
+ return undefined;
415
+ }
416
+ var status = guard.passed
417
+ ? 'pass'
418
+ : guard.status === 'invalid'
419
+ ? 'fail'
420
+ : 'blocked';
421
+ return {
422
+ key: 'hotfix_commit_proof',
423
+ label: 'Hotfix GitHub commit proof',
424
+ status: status,
425
+ reason: guard.passed
426
+ ? 'Hotfix has matching sourceCommitSha, GitHub commit URL, and passed gitPushStatus/gitCommitStatus.'
427
+ : (guard.blockers.join('; ') || 'Manager hotfix is blocked until sourceCommitSha, githubCommitUrl, and passed gitPushStatus prove the hotfix is pushed to GitHub.'),
428
+ evidenceRefs: cleanStringList([guard.githubCommitUrl], 1, 500),
429
+ recordedAt: isoNow(now || ((_a = validation.normalized) === null || _a === void 0 ? void 0 : _a.recordedAt)),
430
+ metadata: {
431
+ channel: guard.channel || validation.channel,
432
+ status: guard.status,
433
+ passed: guard.passed,
434
+ managerMustCommitBeforeHotfix: guard.managerMustCommitBeforeHotfix,
435
+ sourceCommitSha: guard.sourceCommitSha,
436
+ githubCommitUrl: guard.githubCommitUrl,
437
+ githubCommitSha: guard.githubCommitSha,
438
+ gitCommitStatus: guard.gitCommitStatus,
439
+ gitPushStatus: guard.gitPushStatus,
440
+ blockers: guard.blockers,
441
+ nextCommands: guard.nextCommands,
442
+ requiredEvidence: guard.requiredEvidence
443
+ }
444
+ };
445
+ }
274
446
  function collectHotfixEvidenceEvents(sources, events, gates, now) {
275
- var e_6, _a;
447
+ var e_8, _a;
276
448
  var _b, _c;
277
449
  try {
278
450
  for (var _d = __values(hotfixEvidenceCandidates.apply(void 0, __spreadArray([], __read(sources), false))), _e = _d.next(); !_e.done; _e = _d.next()) {
@@ -297,6 +469,7 @@ function collectHotfixEvidenceEvents(sources, events, gates, now) {
297
469
  fullDeployBlocked: validation.fullDeployBlocked,
298
470
  hotfixSatisfied: validation.hotfixSatisfied,
299
471
  blockers: validation.blockers,
472
+ githubCommitGuard: validation.githubCommitGuard,
300
473
  target: (_c = validation.normalized) === null || _c === void 0 ? void 0 : _c.target
301
474
  }
302
475
  });
@@ -304,18 +477,30 @@ function collectHotfixEvidenceEvents(sources, events, gates, now) {
304
477
  if (gate) {
305
478
  gates.push(gate);
306
479
  }
480
+ var commitProofGate = hotfixCommitProofGate(evidence, now);
481
+ if (commitProofGate) {
482
+ gates.push(commitProofGate);
483
+ pushEvent(events, {
484
+ type: 'log',
485
+ category: 'hotfix_commit_proof',
486
+ message: commitProofGate.reason,
487
+ artifactPaths: commitProofGate.evidenceRefs,
488
+ recordedAt: commitProofGate.recordedAt,
489
+ metadata: commitProofGate.metadata
490
+ });
491
+ }
307
492
  }
308
493
  }
309
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
494
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
310
495
  finally {
311
496
  try {
312
497
  if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
313
498
  }
314
- finally { if (e_6) throw e_6.error; }
499
+ finally { if (e_8) throw e_8.error; }
315
500
  }
316
501
  }
317
502
  function collectUsageEvents(entries, events) {
318
- var e_7, _a;
503
+ var e_9, _a;
319
504
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
320
505
  if (!entries.length) {
321
506
  return undefined;
@@ -346,17 +531,17 @@ function collectUsageEvents(entries, events) {
346
531
  });
347
532
  }
348
533
  }
349
- catch (e_7_1) { e_7 = { error: e_7_1 }; }
534
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
350
535
  finally {
351
536
  try {
352
537
  if (normalizedEntries_1_1 && !normalizedEntries_1_1.done && (_a = normalizedEntries_1.return)) _a.call(normalizedEntries_1);
353
538
  }
354
- finally { if (e_7) throw e_7.error; }
539
+ finally { if (e_9) throw e_9.error; }
355
540
  }
356
541
  return (0, ai_run_evidence_1.buildAIRunCost)(entries);
357
542
  }
358
543
  function collectCommitEvents(commits, events) {
359
- var e_8, _a;
544
+ var e_10, _a;
360
545
  try {
361
546
  for (var _b = __values(commits.slice(0, 80)), _c = _b.next(); !_c.done; _c = _b.next()) {
362
547
  var commit = _c.value;
@@ -372,12 +557,12 @@ function collectCommitEvents(commits, events) {
372
557
  });
373
558
  }
374
559
  }
375
- catch (e_8_1) { e_8 = { error: e_8_1 }; }
560
+ catch (e_10_1) { e_10 = { error: e_10_1 }; }
376
561
  finally {
377
562
  try {
378
563
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
379
564
  }
380
- finally { if (e_8) throw e_8.error; }
565
+ finally { if (e_10) throw e_10.error; }
381
566
  }
382
567
  }
383
568
  function statusFromBoolean(value, fallback) {
@@ -390,7 +575,7 @@ function statusFromBoolean(value, fallback) {
390
575
  return fallback;
391
576
  }
392
577
  function collectArtifacts(evidence) {
393
- var e_9, _a, e_10, _b, e_11, _c;
578
+ var e_11, _a, e_12, _b, e_13, _c;
394
579
  var artifacts = [];
395
580
  try {
396
581
  for (var _d = __values(asArray(evidence === null || evidence === void 0 ? void 0 : evidence.artifacts)), _e = _d.next(); !_e.done; _e = _d.next()) {
@@ -405,12 +590,12 @@ function collectArtifacts(evidence) {
405
590
  });
406
591
  }
407
592
  }
408
- catch (e_9_1) { e_9 = { error: e_9_1 }; }
593
+ catch (e_11_1) { e_11 = { error: e_11_1 }; }
409
594
  finally {
410
595
  try {
411
596
  if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
412
597
  }
413
- finally { if (e_9) throw e_9.error; }
598
+ finally { if (e_11) throw e_11.error; }
414
599
  }
415
600
  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));
416
601
  try {
@@ -431,12 +616,12 @@ function collectArtifacts(evidence) {
431
616
  }
432
617
  }
433
618
  }
434
- catch (e_10_1) { e_10 = { error: e_10_1 }; }
619
+ catch (e_12_1) { e_12 = { error: e_12_1 }; }
435
620
  finally {
436
621
  try {
437
622
  if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
438
623
  }
439
- finally { if (e_10) throw e_10.error; }
624
+ finally { if (e_12) throw e_12.error; }
440
625
  }
441
626
  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);
442
627
  try {
@@ -457,17 +642,17 @@ function collectArtifacts(evidence) {
457
642
  }
458
643
  }
459
644
  }
460
- catch (e_11_1) { e_11 = { error: e_11_1 }; }
645
+ catch (e_13_1) { e_13 = { error: e_13_1 }; }
461
646
  finally {
462
647
  try {
463
648
  if (_j && !_j.done && (_c = _h.return)) _c.call(_h);
464
649
  }
465
- finally { if (e_11) throw e_11.error; }
650
+ finally { if (e_13) throw e_13.error; }
466
651
  }
467
652
  return artifacts;
468
653
  }
469
654
  function collectInfraChecks(evidence) {
470
- var e_12, _a;
655
+ var e_14, _a;
471
656
  var _b;
472
657
  var checks = [];
473
658
  try {
@@ -484,12 +669,12 @@ function collectInfraChecks(evidence) {
484
669
  });
485
670
  }
486
671
  }
487
- catch (e_12_1) { e_12 = { error: e_12_1 }; }
672
+ catch (e_14_1) { e_14 = { error: e_14_1 }; }
488
673
  finally {
489
674
  try {
490
675
  if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
491
676
  }
492
- finally { if (e_12) throw e_12.error; }
677
+ finally { if (e_14) throw e_14.error; }
493
678
  }
494
679
  if (evidence === null || evidence === void 0 ? void 0 : evidence.preflightStatus) {
495
680
  checks.push({
@@ -522,7 +707,7 @@ function collectCompileResult(evidence) {
522
707
  };
523
708
  }
524
709
  function collectRouteProbes(evidence) {
525
- var e_13, _a, e_14, _b;
710
+ var e_15, _a, e_16, _b;
526
711
  var probes = [];
527
712
  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);
528
713
  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));
@@ -546,12 +731,12 @@ function collectRouteProbes(evidence) {
546
731
  });
547
732
  }
548
733
  }
549
- catch (e_13_1) { e_13 = { error: e_13_1 }; }
734
+ catch (e_15_1) { e_15 = { error: e_15_1 }; }
550
735
  finally {
551
736
  try {
552
737
  if (rows_1_1 && !rows_1_1.done && (_a = rows_1.return)) _a.call(rows_1);
553
738
  }
554
- finally { if (e_13) throw e_13.error; }
739
+ finally { if (e_15) throw e_15.error; }
555
740
  }
556
741
  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));
557
742
  try {
@@ -573,17 +758,17 @@ function collectRouteProbes(evidence) {
573
758
  }
574
759
  }
575
760
  }
576
- catch (e_14_1) { e_14 = { error: e_14_1 }; }
761
+ catch (e_16_1) { e_16 = { error: e_16_1 }; }
577
762
  finally {
578
763
  try {
579
764
  if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
580
765
  }
581
- finally { if (e_14) throw e_14.error; }
766
+ finally { if (e_16) throw e_16.error; }
582
767
  }
583
768
  return probes;
584
769
  }
585
770
  function collectBusinessAssertions(evidence) {
586
- var e_15, _a;
771
+ var e_17, _a;
587
772
  var assertions = [];
588
773
  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);
589
774
  try {
@@ -606,12 +791,12 @@ function collectBusinessAssertions(evidence) {
606
791
  });
607
792
  }
608
793
  }
609
- catch (e_15_1) { e_15 = { error: e_15_1 }; }
794
+ catch (e_17_1) { e_17 = { error: e_17_1 }; }
610
795
  finally {
611
796
  try {
612
797
  if (rows_2_1 && !rows_2_1.done && (_a = rows_2.return)) _a.call(rows_2);
613
798
  }
614
- finally { if (e_15) throw e_15.error; }
799
+ finally { if (e_17) throw e_17.error; }
615
800
  }
616
801
  if (!assertions.length && (evidence === null || evidence === void 0 ? void 0 : evidence.qaRunOutcome) === 'business_assertion_passed') {
617
802
  assertions.push({
@@ -670,7 +855,7 @@ function businessAssertionPassed(assertion) {
670
855
  return /^(pass|passed|success|ok|done)$/i.test(cleanText(assertion.status, 40));
671
856
  }
672
857
  function supportAssertionMatchesDiagnosisProof(assertion, proofPlan) {
673
- var e_16, _a;
858
+ var e_18, _a;
674
859
  var metadata = assertion.metadata || {};
675
860
  if (metadata.diagnosisProofPlanMatched === true || metadata.proofPlanMatched === true || metadata.supportDiagnosisProof === true) {
676
861
  return true;
@@ -715,12 +900,12 @@ function supportAssertionMatchesDiagnosisProof(assertion, proofPlan) {
715
900
  }
716
901
  }
717
902
  }
718
- catch (e_16_1) { e_16 = { error: e_16_1 }; }
903
+ catch (e_18_1) { e_18 = { error: e_18_1 }; }
719
904
  finally {
720
905
  try {
721
906
  if (proofTokens_1_1 && !proofTokens_1_1.done && (_a = proofTokens_1.return)) _a.call(proofTokens_1);
722
907
  }
723
- finally { if (e_16) throw e_16.error; }
908
+ finally { if (e_18) throw e_18.error; }
724
909
  }
725
910
  return overlap >= Math.min(4, Math.max(3, Math.ceil(proofTokens.size * 0.45)));
726
911
  }
@@ -851,7 +1036,7 @@ function applySupportDiagnosisProofGate(qa, diagnosisGate, now) {
851
1036
  ], false) });
852
1037
  }
853
1038
  function evidenceObject() {
854
- var e_17, _a;
1039
+ var e_19, _a;
855
1040
  var values = [];
856
1041
  for (var _i = 0; _i < arguments.length; _i++) {
857
1042
  values[_i] = arguments[_i];
@@ -864,17 +1049,17 @@ function evidenceObject() {
864
1049
  }
865
1050
  }
866
1051
  }
867
- catch (e_17_1) { e_17 = { error: e_17_1 }; }
1052
+ catch (e_19_1) { e_19 = { error: e_19_1 }; }
868
1053
  finally {
869
1054
  try {
870
1055
  if (values_1_1 && !values_1_1.done && (_a = values_1.return)) _a.call(values_1);
871
1056
  }
872
- finally { if (e_17) throw e_17.error; }
1057
+ finally { if (e_19) throw e_19.error; }
873
1058
  }
874
1059
  return {};
875
1060
  }
876
1061
  function mergeEvidenceRecords() {
877
- var e_18, _a, e_19, _b;
1062
+ var e_20, _a, e_21, _b;
878
1063
  var values = [];
879
1064
  for (var _i = 0; _i < arguments.length; _i++) {
880
1065
  values[_i] = arguments[_i];
@@ -885,7 +1070,7 @@ function mergeEvidenceRecords() {
885
1070
  var value = values_2_1.value;
886
1071
  var source = plainObject(value);
887
1072
  try {
888
- for (var _c = (e_19 = void 0, __values(Object.entries(source))), _d = _c.next(); !_d.done; _d = _c.next()) {
1073
+ for (var _c = (e_21 = void 0, __values(Object.entries(source))), _d = _c.next(); !_d.done; _d = _c.next()) {
889
1074
  var _e = __read(_d.value, 2), key = _e[0], entry = _e[1];
890
1075
  if (entry === undefined || entry === null || entry === '') {
891
1076
  continue;
@@ -901,21 +1086,21 @@ function mergeEvidenceRecords() {
901
1086
  merged[key] = entry;
902
1087
  }
903
1088
  }
904
- catch (e_19_1) { e_19 = { error: e_19_1 }; }
1089
+ catch (e_21_1) { e_21 = { error: e_21_1 }; }
905
1090
  finally {
906
1091
  try {
907
1092
  if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
908
1093
  }
909
- finally { if (e_19) throw e_19.error; }
1094
+ finally { if (e_21) throw e_21.error; }
910
1095
  }
911
1096
  }
912
1097
  }
913
- catch (e_18_1) { e_18 = { error: e_18_1 }; }
1098
+ catch (e_20_1) { e_20 = { error: e_20_1 }; }
914
1099
  finally {
915
1100
  try {
916
1101
  if (values_2_1 && !values_2_1.done && (_a = values_2.return)) _a.call(values_2);
917
1102
  }
918
- finally { if (e_18) throw e_18.error; }
1103
+ finally { if (e_20) throw e_20.error; }
919
1104
  }
920
1105
  return merged;
921
1106
  }
@@ -1032,7 +1217,7 @@ function supportCustomerReplyPolicyGate(policy, now) {
1032
1217
  };
1033
1218
  }
1034
1219
  function firstNonEmptyText(values, max) {
1035
- var e_20, _a;
1220
+ var e_22, _a;
1036
1221
  if (max === void 0) { max = 1000; }
1037
1222
  try {
1038
1223
  for (var values_3 = __values(values), values_3_1 = values_3.next(); !values_3_1.done; values_3_1 = values_3.next()) {
@@ -1043,12 +1228,12 @@ function firstNonEmptyText(values, max) {
1043
1228
  }
1044
1229
  }
1045
1230
  }
1046
- catch (e_20_1) { e_20 = { error: e_20_1 }; }
1231
+ catch (e_22_1) { e_22 = { error: e_22_1 }; }
1047
1232
  finally {
1048
1233
  try {
1049
1234
  if (values_3_1 && !values_3_1.done && (_a = values_3.return)) _a.call(values_3);
1050
1235
  }
1051
- finally { if (e_20) throw e_20.error; }
1236
+ finally { if (e_22) throw e_22.error; }
1052
1237
  }
1053
1238
  return undefined;
1054
1239
  }
@@ -1283,7 +1468,7 @@ function assistantDateWindowObject(quality) {
1283
1468
  return Object.keys(dateWindow).length ? dateWindow : nestedWindow;
1284
1469
  }
1285
1470
  function collectMongoProjectionObjects(value, result) {
1286
- var e_21, _a;
1471
+ var e_23, _a;
1287
1472
  if (result === void 0) { result = []; }
1288
1473
  if (!value || typeof value !== 'object') {
1289
1474
  return result;
@@ -1295,12 +1480,12 @@ function collectMongoProjectionObjects(value, result) {
1295
1480
  collectMongoProjectionObjects(entry, result);
1296
1481
  }
1297
1482
  }
1298
- catch (e_21_1) { e_21 = { error: e_21_1 }; }
1483
+ catch (e_23_1) { e_23 = { error: e_23_1 }; }
1299
1484
  finally {
1300
1485
  try {
1301
1486
  if (value_2_1 && !value_2_1.done && (_a = value_2.return)) _a.call(value_2);
1302
1487
  }
1303
- finally { if (e_21) throw e_21.error; }
1488
+ finally { if (e_23) throw e_23.error; }
1304
1489
  }
1305
1490
  return result;
1306
1491
  }
@@ -1541,8 +1726,8 @@ function applyAssistantAnswerQualityGate(qa, decision, now) {
1541
1726
  ], false) });
1542
1727
  }
1543
1728
  function buildSupportAIRunFromEvidence(input) {
1544
- var e_22, _a, e_23, _b;
1545
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
1729
+ var e_24, _a, e_25, _b;
1730
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
1546
1731
  var ticket = input.ticket || {};
1547
1732
  var job = input.job || {};
1548
1733
  var evidence = buildSupportQaEvidence(input);
@@ -1554,8 +1739,8 @@ function buildSupportAIRunFromEvidence(input) {
1554
1739
  addSourceId(sourceIds, 'jobId', job._id || job.id || job.jobId);
1555
1740
  addSourceId(sourceIds, 'buildPlanId', job.buildPlanId || ticket.buildPlanId);
1556
1741
  try {
1557
- for (var _s = __values(asArray(input.taskEvents)), _t = _s.next(); !_t.done; _t = _s.next()) {
1558
- var event_1 = _t.value;
1742
+ for (var _2 = __values(asArray(input.taskEvents)), _3 = _2.next(); !_3.done; _3 = _2.next()) {
1743
+ var event_1 = _3.value;
1559
1744
  pushEvent(events, {
1560
1745
  type: event_1.type === 'human_intervention' ? 'human_intervention' : 'log',
1561
1746
  category: cleanText(event_1.category || event_1.phase || event_1.type, 160),
@@ -1569,16 +1754,16 @@ function buildSupportAIRunFromEvidence(input) {
1569
1754
  });
1570
1755
  }
1571
1756
  }
1572
- catch (e_22_1) { e_22 = { error: e_22_1 }; }
1757
+ catch (e_24_1) { e_24 = { error: e_24_1 }; }
1573
1758
  finally {
1574
1759
  try {
1575
- if (_t && !_t.done && (_a = _s.return)) _a.call(_s);
1760
+ if (_3 && !_3.done && (_a = _2.return)) _a.call(_2);
1576
1761
  }
1577
- finally { if (e_22) throw e_22.error; }
1762
+ finally { if (e_24) throw e_24.error; }
1578
1763
  }
1579
1764
  try {
1580
- for (var _u = __values(asArray(input.aiJobs)), _v = _u.next(); !_v.done; _v = _u.next()) {
1581
- var aiJob = _v.value;
1765
+ for (var _4 = __values(asArray(input.aiJobs)), _5 = _4.next(); !_5.done; _5 = _4.next()) {
1766
+ var aiJob = _5.value;
1582
1767
  pushEvent(events, {
1583
1768
  type: aiJob.model ? 'model_call' : 'log',
1584
1769
  category: cleanText(aiJob.category || aiJob.phase || aiJob.runner, 160),
@@ -1593,15 +1778,27 @@ function buildSupportAIRunFromEvidence(input) {
1593
1778
  });
1594
1779
  }
1595
1780
  }
1596
- catch (e_23_1) { e_23 = { error: e_23_1 }; }
1781
+ catch (e_25_1) { e_25 = { error: e_25_1 }; }
1597
1782
  finally {
1598
1783
  try {
1599
- if (_v && !_v.done && (_b = _u.return)) _b.call(_u);
1784
+ if (_5 && !_5.done && (_b = _4.return)) _b.call(_4);
1600
1785
  }
1601
- finally { if (e_23) throw e_23.error; }
1786
+ finally { if (e_25) throw e_25.error; }
1602
1787
  }
1603
1788
  collectCommitEvents(asArray(input.commits), events);
1604
1789
  collectHotfixEvidenceEvents([job, ticket, evidence, input.qaEvidence], events, gates, input.now);
1790
+ var noBlindLoopGate = supportManagerNoBlindLoopGate(job, evidence, input.now);
1791
+ if (noBlindLoopGate) {
1792
+ gates.push(noBlindLoopGate);
1793
+ pushEvent(events, {
1794
+ type: 'log',
1795
+ category: 'manager_no_blind_loop_policy',
1796
+ message: noBlindLoopGate.reason,
1797
+ artifactPaths: noBlindLoopGate.evidenceRefs,
1798
+ recordedAt: noBlindLoopGate.recordedAt,
1799
+ metadata: noBlindLoopGate.metadata
1800
+ });
1801
+ }
1605
1802
  var businessProofReadiness = plainObject(evidence.businessProofReadiness || evidence.business_proof_readiness);
1606
1803
  var businessProofReadinessGate = supportBusinessProofReadinessGate(businessProofReadiness, input.now);
1607
1804
  if (businessProofReadinessGate) {
@@ -1685,20 +1882,33 @@ function buildSupportAIRunFromEvidence(input) {
1685
1882
  metadata: {
1686
1883
  versionCount: asArray(input.versions).length,
1687
1884
  buildPlanCount: asArray(input.buildPlans).length,
1885
+ managerNoBlindLoopPolicy: noBlindLoopGate ? {
1886
+ action: cleanText((_e = noBlindLoopGate.metadata) === null || _e === void 0 ? void 0 : _e.action, 120),
1887
+ status: noBlindLoopGate.status,
1888
+ failureClass: cleanText((_f = noBlindLoopGate.metadata) === null || _f === void 0 ? void 0 : _f.failureClass, 120),
1889
+ sameFailureCount: Number(((_g = noBlindLoopGate.metadata) === null || _g === void 0 ? void 0 : _g.sameFailureCount) || 0),
1890
+ pingPongCount: Number(((_h = noBlindLoopGate.metadata) === null || _h === void 0 ? void 0 : _h.pingPongCount) || 0),
1891
+ newEvidence: ((_j = noBlindLoopGate.metadata) === null || _j === void 0 ? void 0 : _j.newEvidence) === true,
1892
+ materialEvidence: ((_k = noBlindLoopGate.metadata) === null || _k === void 0 ? void 0 : _k.materialEvidence) === true,
1893
+ evidenceStrength: cleanText((_l = noBlindLoopGate.metadata) === null || _l === void 0 ? void 0 : _l.evidenceStrength, 120),
1894
+ loopBudgetShouldReset: ((_m = noBlindLoopGate.metadata) === null || _m === void 0 ? void 0 : _m.loopBudgetShouldReset) === true,
1895
+ dispatchAction: cleanText((_o = noBlindLoopGate.metadata) === null || _o === void 0 ? void 0 : _o.dispatchAction, 160),
1896
+ requiresNewEvidence: ((_p = noBlindLoopGate.metadata) === null || _p === void 0 ? void 0 : _p.requiresNewEvidence) === true
1897
+ } : undefined,
1688
1898
  rootCauseEntryContract: Object.keys(rootCauseEntryContract).length ? {
1689
1899
  contractId: cleanText(rootCauseEntryContract.contract_id || rootCauseEntryContract.contractId, 160),
1690
1900
  version: cleanText(rootCauseEntryContract.version, 120),
1691
1901
  status: cleanText(rootCauseEntryContract.status, 120),
1692
1902
  issueClassProbeCount: asArray(rootCauseEntryContract.issue_class_probes || rootCauseEntryContract.issueClassProbes).length,
1693
- ownerFileMax: Number(((_e = rootCauseEntryContract.owner_file_policy) === null || _e === void 0 ? void 0 : _e.max_files) || ((_f = rootCauseEntryContract.ownerFilePolicy) === null || _f === void 0 ? void 0 : _f.maxFiles) || 0) || 0,
1694
- requiresBusinessAssertion: ((_g = rootCauseEntryContract.business_proof_policy) === null || _g === void 0 ? void 0 : _g.requires_aiqa_business_assertion) === true
1695
- || ((_h = rootCauseEntryContract.businessProofPolicy) === null || _h === void 0 ? void 0 : _h.requiresAiqaBusinessAssertion) === true
1903
+ ownerFileMax: Number(((_q = rootCauseEntryContract.owner_file_policy) === null || _q === void 0 ? void 0 : _q.max_files) || ((_r = rootCauseEntryContract.ownerFilePolicy) === null || _r === void 0 ? void 0 : _r.maxFiles) || 0) || 0,
1904
+ requiresBusinessAssertion: ((_s = rootCauseEntryContract.business_proof_policy) === null || _s === void 0 ? void 0 : _s.requires_aiqa_business_assertion) === true
1905
+ || ((_t = rootCauseEntryContract.businessProofPolicy) === null || _t === void 0 ? void 0 : _t.requiresAiqaBusinessAssertion) === true
1696
1906
  } : undefined,
1697
1907
  diagnosis: Object.keys(diagnosisGate).length ? {
1698
1908
  status: cleanText(diagnosisGate.status, 80),
1699
1909
  issueClass: diagnosisIssueClass,
1700
1910
  ownerFiles: diagnosisOwnerFiles,
1701
- acceptedHypothesis: cleanText(((_j = diagnosisGate.accepted_hypothesis) === null || _j === void 0 ? void 0 : _j.statement) || ((_k = diagnosisGate.acceptedHypothesis) === null || _k === void 0 ? void 0 : _k.statement), 1000),
1911
+ acceptedHypothesis: cleanText(((_u = diagnosisGate.accepted_hypothesis) === null || _u === void 0 ? void 0 : _u.statement) || ((_v = diagnosisGate.acceptedHypothesis) === null || _v === void 0 ? void 0 : _v.statement), 1000),
1702
1912
  proofPlan: diagnosisGate.proof_plan || diagnosisGate.proofPlan
1703
1913
  } : undefined,
1704
1914
  businessProofReadiness: Object.keys(businessProofReadiness).length ? {
@@ -1713,18 +1923,18 @@ function buildSupportAIRunFromEvidence(input) {
1713
1923
  canDraftCustomerReply: customerReplyPolicy.canDraftCustomerReply === true || customerReplyPolicy.can_draft_customer_reply === true,
1714
1924
  canSendCustomerReply: customerReplyPolicy.canSendCustomerReply === true || customerReplyPolicy.can_send_customer_reply === true,
1715
1925
  reason: cleanText(customerReplyPolicy.reason, 1000),
1716
- reviewType: cleanText(((_l = customerReplyPolicy.humanReviewPacket) === null || _l === void 0 ? void 0 : _l.reviewType)
1717
- || ((_m = customerReplyPolicy.human_review_packet) === null || _m === void 0 ? void 0 : _m.review_type)
1718
- || ((_o = customerReplyPolicy.human_review_packet) === null || _o === void 0 ? void 0 : _o.reviewType), 160),
1719
- primaryAction: cleanText(((_p = customerReplyPolicy.humanReviewPacket) === null || _p === void 0 ? void 0 : _p.primaryAction)
1720
- || ((_q = customerReplyPolicy.human_review_packet) === null || _q === void 0 ? void 0 : _q.primary_action)
1721
- || ((_r = customerReplyPolicy.human_review_packet) === null || _r === void 0 ? void 0 : _r.primaryAction), 160)
1926
+ reviewType: cleanText(((_w = customerReplyPolicy.humanReviewPacket) === null || _w === void 0 ? void 0 : _w.reviewType)
1927
+ || ((_x = customerReplyPolicy.human_review_packet) === null || _x === void 0 ? void 0 : _x.review_type)
1928
+ || ((_y = customerReplyPolicy.human_review_packet) === null || _y === void 0 ? void 0 : _y.reviewType), 160),
1929
+ primaryAction: cleanText(((_z = customerReplyPolicy.humanReviewPacket) === null || _z === void 0 ? void 0 : _z.primaryAction)
1930
+ || ((_0 = customerReplyPolicy.human_review_packet) === null || _0 === void 0 ? void 0 : _0.primary_action)
1931
+ || ((_1 = customerReplyPolicy.human_review_packet) === null || _1 === void 0 ? void 0 : _1.primaryAction), 160)
1722
1932
  } : undefined
1723
1933
  }
1724
1934
  });
1725
1935
  }
1726
1936
  function buildAICoderAIRunFromEvidence(input) {
1727
- var e_24, _a;
1937
+ var e_26, _a;
1728
1938
  var _b, _c, _d, _e, _f, _g, _h;
1729
1939
  var app = input.app || {};
1730
1940
  var job = input.job || {};
@@ -1752,12 +1962,12 @@ function buildAICoderAIRunFromEvidence(input) {
1752
1962
  });
1753
1963
  }
1754
1964
  }
1755
- catch (e_24_1) { e_24 = { error: e_24_1 }; }
1965
+ catch (e_26_1) { e_26 = { error: e_26_1 }; }
1756
1966
  finally {
1757
1967
  try {
1758
1968
  if (_k && !_k.done && (_a = _j.return)) _a.call(_j);
1759
1969
  }
1760
- finally { if (e_24) throw e_24.error; }
1970
+ finally { if (e_26) throw e_26.error; }
1761
1971
  }
1762
1972
  collectCommitEvents(asArray(input.commits), events);
1763
1973
  collectHotfixEvidenceEvents([job, app, evidence, input.qaEvidence], events, gates, input.now);
@@ -1860,7 +2070,7 @@ function buildAICoderAIRunFromEvidence(input) {
1860
2070
  });
1861
2071
  }
1862
2072
  function buildAssistantAIRunFromEvidence(input) {
1863
- var e_25, _a, e_26, _b, e_27, _c;
2073
+ var e_27, _a, e_28, _b, e_29, _c;
1864
2074
  var _d, _e, _f, _g;
1865
2075
  var conversation = input.conversation || {};
1866
2076
  var events = [];
@@ -1886,12 +2096,12 @@ function buildAssistantAIRunFromEvidence(input) {
1886
2096
  });
1887
2097
  }
1888
2098
  }
1889
- catch (e_25_1) { e_25 = { error: e_25_1 }; }
2099
+ catch (e_27_1) { e_27 = { error: e_27_1 }; }
1890
2100
  finally {
1891
2101
  try {
1892
2102
  if (_j && !_j.done && (_a = _h.return)) _a.call(_h);
1893
2103
  }
1894
- finally { if (e_25) throw e_25.error; }
2104
+ finally { if (e_27) throw e_27.error; }
1895
2105
  }
1896
2106
  try {
1897
2107
  for (var _k = __values(asArray(input.issueReports)), _l = _k.next(); !_l.done; _l = _k.next()) {
@@ -1909,12 +2119,12 @@ function buildAssistantAIRunFromEvidence(input) {
1909
2119
  });
1910
2120
  }
1911
2121
  }
1912
- catch (e_26_1) { e_26 = { error: e_26_1 }; }
2122
+ catch (e_28_1) { e_28 = { error: e_28_1 }; }
1913
2123
  finally {
1914
2124
  try {
1915
2125
  if (_l && !_l.done && (_b = _k.return)) _b.call(_k);
1916
2126
  }
1917
- finally { if (e_26) throw e_26.error; }
2127
+ finally { if (e_28) throw e_28.error; }
1918
2128
  }
1919
2129
  var cost = collectUsageEvents(asArray(input.usageLedger), events);
1920
2130
  var answerQuality = assistantQualityObject(input);
@@ -1946,12 +2156,12 @@ function buildAssistantAIRunFromEvidence(input) {
1946
2156
  });
1947
2157
  }
1948
2158
  }
1949
- catch (e_27_1) { e_27 = { error: e_27_1 }; }
2159
+ catch (e_29_1) { e_29 = { error: e_29_1 }; }
1950
2160
  finally {
1951
2161
  try {
1952
2162
  if (_o && !_o.done && (_c = _m.return)) _c.call(_m);
1953
2163
  }
1954
- finally { if (e_27) throw e_27.error; }
2164
+ finally { if (e_29) throw e_29.error; }
1955
2165
  }
1956
2166
  var answerQualityDecision = evaluateAssistantAnswerQuality({
1957
2167
  answerQuality: answerQuality,