@resolveio/server-lib 22.3.194 → 22.3.196

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.
@@ -48,6 +48,7 @@ export interface ResolveIOAICoderV6WorkflowQaRow {
48
48
  expectedState?: string;
49
49
  expectedOutput?: string;
50
50
  proofKind?: string;
51
+ coverageTags?: string[];
51
52
  acceptanceGate?: 'aiqa_business_assertion';
52
53
  requiredArtifacts?: string[];
53
54
  stateTransition?: {
@@ -274,7 +274,7 @@ function buildWorkflowStepId(step, index) {
274
274
  }
275
275
  function normalizeWorkflowProofKind(source, fallbackText) {
276
276
  if (fallbackText === void 0) { fallbackText = ''; }
277
- var explicit = cleanField(source, ['proof_kind', 'proofKind', 'coverage', 'type', 'kind'], 120).toLowerCase().replace(/[\s-]+/g, '_');
277
+ var explicit = cleanField(source, ['proof_kind', 'proofKind', 'qa_proof_kind', 'qaProofKind', 'type', 'kind'], 120).toLowerCase().replace(/[\s-]+/g, '_');
278
278
  if (explicit) {
279
279
  return explicit;
280
280
  }
@@ -302,9 +302,144 @@ function normalizeWorkflowProofKind(source, fallbackText) {
302
302
  }
303
303
  return 'business_workflow';
304
304
  }
305
+ function normalizeWorkflowQaCoverageTag(value) {
306
+ var normalized = cleanText(value, 120).toLowerCase().replace(/[^a-z0-9]+/g, '_').replace(/^_+|_+$/g, '');
307
+ if (!normalized) {
308
+ return '';
309
+ }
310
+ var aliases = {
311
+ auth: 'login',
312
+ authentication: 'login',
313
+ authenticated_session: 'login',
314
+ signed_in: 'login',
315
+ dashboard: 'hub_action',
316
+ dashboard_hub: 'hub_action',
317
+ hub: 'hub_action',
318
+ primary_hub_action: 'hub_action',
319
+ command_center: 'hub_action',
320
+ embedded_hub_action: 'hub_action',
321
+ completion: 'workflow_completion',
322
+ business_completion: 'workflow_completion',
323
+ final_result: 'workflow_completion',
324
+ result: 'workflow_completion',
325
+ saved_result: 'workflow_completion',
326
+ saved_output: 'workflow_completion',
327
+ calculated_result: 'workflow_completion',
328
+ export: 'report_export',
329
+ report: 'report_export',
330
+ pdf_export: 'report_export',
331
+ report_download: 'report_export',
332
+ sample_data: 'non_empty_data',
333
+ seed_data: 'non_empty_data',
334
+ seeded_data: 'non_empty_data',
335
+ non_empty: 'non_empty_data',
336
+ nonempty: 'non_empty_data',
337
+ kpi_data: 'non_empty_data',
338
+ responsive: 'mobile',
339
+ responsive_mobile: 'mobile',
340
+ mobile_viewport: 'mobile',
341
+ phone: 'mobile',
342
+ empty_state: 'recovery',
343
+ error_state: 'recovery',
344
+ error_recovery: 'recovery',
345
+ empty_error_recovery: 'recovery',
346
+ invalid_input_recovery: 'recovery'
347
+ };
348
+ return aliases[normalized] || normalized;
349
+ }
350
+ function appendWorkflowQaCoverageValues(target, value) {
351
+ var e_3, _a, e_4, _b;
352
+ if (Array.isArray(value)) {
353
+ value.forEach(function (entry) { return appendWorkflowQaCoverageValues(target, entry); });
354
+ return;
355
+ }
356
+ if (value && typeof value === 'object') {
357
+ try {
358
+ for (var _c = __values(Object.entries(value)), _d = _c.next(); !_d.done; _d = _c.next()) {
359
+ var _e = __read(_d.value, 2), key = _e[0], entry = _e[1];
360
+ if (entry === true) {
361
+ target.push(normalizeWorkflowQaCoverageTag(key));
362
+ }
363
+ else if (typeof entry === 'string' || Array.isArray(entry) || (entry && typeof entry === 'object')) {
364
+ appendWorkflowQaCoverageValues(target, entry);
365
+ }
366
+ }
367
+ }
368
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
369
+ finally {
370
+ try {
371
+ if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
372
+ }
373
+ finally { if (e_3) throw e_3.error; }
374
+ }
375
+ return;
376
+ }
377
+ var text = cleanText(value, 500);
378
+ if (!text) {
379
+ return;
380
+ }
381
+ try {
382
+ for (var _f = __values(text.split(/[|,;]/)), _g = _f.next(); !_g.done; _g = _f.next()) {
383
+ var entry = _g.value;
384
+ target.push(normalizeWorkflowQaCoverageTag(entry));
385
+ }
386
+ }
387
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
388
+ finally {
389
+ try {
390
+ if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
391
+ }
392
+ finally { if (e_4) throw e_4.error; }
393
+ }
394
+ }
395
+ function normalizeWorkflowQaCoverageTags(source, options) {
396
+ var e_5, _a, e_6, _b;
397
+ if (options === void 0) { options = {}; }
398
+ var tags = [];
399
+ try {
400
+ for (var _c = __values([
401
+ 'coverage',
402
+ 'coverage_tags',
403
+ 'coverageTags',
404
+ 'qa_coverage',
405
+ 'qaCoverage',
406
+ 'required_coverage',
407
+ 'requiredCoverage',
408
+ 'business_coverage',
409
+ 'businessCoverage'
410
+ ]), _d = _c.next(); !_d.done; _d = _c.next()) {
411
+ var key = _d.value;
412
+ appendWorkflowQaCoverageValues(tags, readField(source, [key]));
413
+ }
414
+ }
415
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
416
+ finally {
417
+ try {
418
+ if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
419
+ }
420
+ finally { if (e_5) throw e_5.error; }
421
+ }
422
+ if (options.includeProofKind !== false) {
423
+ try {
424
+ for (var _e = __values(['proof_kind', 'proofKind', 'proof_kinds', 'proofKinds']), _f = _e.next(); !_f.done; _f = _e.next()) {
425
+ var key = _f.value;
426
+ appendWorkflowQaCoverageValues(tags, readField(source, [key]));
427
+ }
428
+ }
429
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
430
+ finally {
431
+ try {
432
+ if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
433
+ }
434
+ finally { if (e_6) throw e_6.error; }
435
+ }
436
+ }
437
+ return Array.from(new Set(tags.filter(Boolean))).slice(0, 20);
438
+ }
305
439
  function buildWorkflowQaRequiredArtifacts(source, proofKind) {
306
440
  var explicit = cleanList(readField(source, ['required_artifacts', 'requiredArtifacts', 'proof_artifacts', 'artifact_expectation', 'artifacts_required']), 12, 180);
307
441
  var defaultsByKind = {
442
+ login: ['authenticated session proof', 'post-login hub route proof'],
308
443
  hub_action: ['hub screenshot or DOM snapshot', 'next action state proof'],
309
444
  workflow_completion: ['before/action/after trace', 'saved or calculated output proof', 'business assertion artifact'],
310
445
  report_export: ['generated report/export artifact', 'export control proof', 'saved output row proof'],
@@ -346,13 +481,14 @@ function buildResolveIOAICoderWorkflowQaRowsFromJourneyContract(input) {
346
481
  return;
347
482
  }
348
483
  var proofKind = normalizeWorkflowProofKind(assertion);
484
+ var coverageTags = normalizeWorkflowQaCoverageTags(assertion);
349
485
  var rowBase = {
350
486
  route: route || undefined,
351
487
  action: action || undefined,
352
488
  assertion: assertionText || undefined,
353
489
  expectedState: expectedState || undefined
354
490
  };
355
- rows.push(__assign(__assign({ index: cleanNumber(readField(assertion, ['index', 'order'])) || index + 1, workflowId: cleanField(assertion, ['workflow_id', 'workflowId'], 160) || workflowId, stepId: cleanField(assertion, ['step_id', 'stepId', 'id'], 160) || "qa-".concat(index + 1) }, rowBase), { expectedOutput: cleanField(assertion, ['expected_output', 'expectedOutput', 'saved_output', 'calculated_output', 'report_output'], 700) || expectedState || assertionText || undefined, proofKind: proofKind, acceptanceGate: 'aiqa_business_assertion', requiredArtifacts: buildWorkflowQaRequiredArtifacts(assertion, proofKind), stateTransition: buildWorkflowQaStateTransition(assertion, rowBase), status: cleanField(assertion, ['status'], 120) || undefined, artifactPaths: cleanList(readField(assertion, ['artifact_paths', 'artifactPaths']), 20, 500) }));
491
+ rows.push(__assign(__assign({ index: cleanNumber(readField(assertion, ['index', 'order'])) || index + 1, workflowId: cleanField(assertion, ['workflow_id', 'workflowId'], 160) || workflowId, stepId: cleanField(assertion, ['step_id', 'stepId', 'id'], 160) || "qa-".concat(index + 1) }, rowBase), { expectedOutput: cleanField(assertion, ['expected_output', 'expectedOutput', 'saved_output', 'calculated_output', 'report_output'], 700) || expectedState || assertionText || undefined, proofKind: proofKind, coverageTags: coverageTags, acceptanceGate: 'aiqa_business_assertion', requiredArtifacts: buildWorkflowQaRequiredArtifacts(assertion, proofKind), stateTransition: buildWorkflowQaStateTransition(assertion, rowBase), status: cleanField(assertion, ['status'], 120) || undefined, artifactPaths: cleanList(readField(assertion, ['artifact_paths', 'artifactPaths']), 20, 500) }));
356
492
  });
357
493
  if (rows.length) {
358
494
  return rows.slice(0, 80);
@@ -368,13 +504,13 @@ function buildResolveIOAICoderWorkflowQaRowsFromJourneyContract(input) {
368
504
  assertion: cleanField(step, ['success_confirmation', 'expected_state_transition', 'final_result'], 700) || undefined,
369
505
  expectedState: cleanField(step, ['expected_state_transition', 'success_confirmation', 'final_result'], 500) || undefined
370
506
  };
371
- rows.push(__assign(__assign({ index: index + 1, workflowId: workflowId, stepId: buildWorkflowStepId(step, index) }, rowBase), { expectedOutput: cleanField(step, ['final_result', 'saved_exported_reported_result', 'completion_result', 'expected_state_transition'], 700) || rowBase.expectedState || rowBase.assertion, proofKind: proofKind, acceptanceGate: 'aiqa_business_assertion', requiredArtifacts: buildWorkflowQaRequiredArtifacts(step, proofKind), stateTransition: buildWorkflowQaStateTransition(step, rowBase), status: undefined, artifactPaths: [] }));
507
+ rows.push(__assign(__assign({ index: index + 1, workflowId: workflowId, stepId: buildWorkflowStepId(step, index) }, rowBase), { expectedOutput: cleanField(step, ['final_result', 'saved_exported_reported_result', 'completion_result', 'expected_state_transition'], 700) || rowBase.expectedState || rowBase.assertion, proofKind: proofKind, coverageTags: Array.from(new Set([proofKind, normalizeWorkflowStepPosition(step, index, workflow.length)].map(normalizeWorkflowQaCoverageTag).filter(Boolean))), acceptanceGate: 'aiqa_business_assertion', requiredArtifacts: buildWorkflowQaRequiredArtifacts(step, proofKind), stateTransition: buildWorkflowQaStateTransition(step, rowBase), status: undefined, artifactPaths: [] }));
372
508
  void workflow;
373
509
  });
374
510
  return rows.slice(0, 80);
375
511
  }
376
512
  function validateResolveIOAICoderJourneyContract(input, options) {
377
- var e_3, _a, e_4, _b, e_5, _c, e_6, _d;
513
+ var e_7, _a, e_8, _b, e_9, _c, e_10, _d;
378
514
  if (options === void 0) { options = {}; }
379
515
  var pathLabel = cleanText(options.pathLabel || 'docs/APP_JOURNEY_CONTRACT.md', 240) || 'docs/APP_JOURNEY_CONTRACT.md';
380
516
  var issues = [];
@@ -423,12 +559,12 @@ function validateResolveIOAICoderJourneyContract(input, options) {
423
559
  }
424
560
  }
425
561
  }
426
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
562
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
427
563
  finally {
428
564
  try {
429
565
  if (requiredKeys_1_1 && !requiredKeys_1_1.done && (_a = requiredKeys_1.return)) _a.call(requiredKeys_1);
430
566
  }
431
- finally { if (e_3) throw e_3.error; }
567
+ finally { if (e_7) throw e_7.error; }
432
568
  }
433
569
  try {
434
570
  for (var _e = __values(['app_archetype', 'primary_actor', 'primary_goal']), _f = _e.next(); !_f.done; _f = _e.next()) {
@@ -442,12 +578,12 @@ function validateResolveIOAICoderJourneyContract(input, options) {
442
578
  }
443
579
  }
444
580
  }
445
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
581
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
446
582
  finally {
447
583
  try {
448
584
  if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
449
585
  }
450
- finally { if (e_4) throw e_4.error; }
586
+ finally { if (e_8) throw e_8.error; }
451
587
  }
452
588
  var firstScreen = contract.first_screen;
453
589
  if (!firstScreen || typeof firstScreen !== 'object' || Array.isArray(firstScreen)) {
@@ -468,12 +604,12 @@ function validateResolveIOAICoderJourneyContract(input, options) {
468
604
  }
469
605
  }
470
606
  }
471
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
607
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
472
608
  finally {
473
609
  try {
474
610
  if (_h && !_h.done && (_c = _g.return)) _c.call(_g);
475
611
  }
476
- finally { if (e_5) throw e_5.error; }
612
+ finally { if (e_9) throw e_9.error; }
477
613
  }
478
614
  if (route && !looksLikeAbsoluteRoute(route)) {
479
615
  addJourneyIssue(issues, 'relative_first_screen_route', "".concat(pathLabel, ".journey_contract.first_screen.route"), "".concat(pathLabel, ": first_screen.route must be an absolute app route."));
@@ -492,15 +628,15 @@ function validateResolveIOAICoderJourneyContract(input, options) {
492
628
  }
493
629
  }
494
630
  }
495
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
631
+ catch (e_10_1) { e_10 = { error: e_10_1 }; }
496
632
  finally {
497
633
  try {
498
634
  if (_l && !_l.done && (_d = _k.return)) _d.call(_k);
499
635
  }
500
- finally { if (e_6) throw e_6.error; }
636
+ finally { if (e_10) throw e_10.error; }
501
637
  }
502
638
  workflow.forEach(function (step, index) {
503
- var e_7, _a;
639
+ var e_11, _a;
504
640
  var stepPath = "".concat(pathLabel, ".journey_contract.north_star_workflow[").concat(index, "]");
505
641
  if (!step || typeof step !== 'object' || Array.isArray(step)) {
506
642
  addJourneyIssue(issues, 'invalid_workflow_step', stepPath, "".concat(pathLabel, ": north_star_workflow[").concat(index, "] must be an object."));
@@ -538,12 +674,12 @@ function validateResolveIOAICoderJourneyContract(input, options) {
538
674
  }
539
675
  }
540
676
  }
541
- catch (e_7_1) { e_7 = { error: e_7_1 }; }
677
+ catch (e_11_1) { e_11 = { error: e_11_1 }; }
542
678
  finally {
543
679
  try {
544
680
  if (requiredStepFields_1_1 && !requiredStepFields_1_1.done && (_a = requiredStepFields_1.return)) _a.call(requiredStepFields_1);
545
681
  }
546
- finally { if (e_7) throw e_7.error; }
682
+ finally { if (e_11) throw e_11.error; }
547
683
  }
548
684
  if (!route && !embeddedAction) {
549
685
  addJourneyIssue(issues, 'workflow_step_missing_route_or_hub_action', stepPath, "".concat(pathLabel, ": north_star_workflow[").concat(index, "] must specify a route or embedded hub action."));
@@ -570,7 +706,7 @@ function validateResolveIOAICoderJourneyContract(input, options) {
570
706
  addJourneyIssue(issues, 'screen_sequence_too_short', "".concat(pathLabel, ".journey_contract.screen_sequence"), "".concat(pathLabel, ": screen_sequence must map workflow steps to routes, CTAs, data, and next state."));
571
707
  }
572
708
  screenSequence.forEach(function (screen, index) {
573
- var e_8, _a;
709
+ var e_12, _a;
574
710
  var screenPath = "".concat(pathLabel, ".journey_contract.screen_sequence[").concat(index, "]");
575
711
  if (!screen || typeof screen !== 'object' || Array.isArray(screen)) {
576
712
  addJourneyIssue(issues, 'invalid_screen_sequence_row', screenPath, "".concat(pathLabel, ": screen_sequence[").concat(index, "] must be an object."));
@@ -590,12 +726,12 @@ function validateResolveIOAICoderJourneyContract(input, options) {
590
726
  }
591
727
  }
592
728
  }
593
- catch (e_8_1) { e_8 = { error: e_8_1 }; }
729
+ catch (e_12_1) { e_12 = { error: e_12_1 }; }
594
730
  finally {
595
731
  try {
596
732
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
597
733
  }
598
- finally { if (e_8) throw e_8.error; }
734
+ finally { if (e_12) throw e_12.error; }
599
735
  }
600
736
  var route = cleanField(screen, ['route'], 240);
601
737
  if (route && !looksLikeAbsoluteRoute(route)) {
@@ -650,8 +786,10 @@ function validateResolveIOAICoderJourneyContract(input, options) {
650
786
  var hasRecoveryQa = false;
651
787
  var hasCompletionQa = false;
652
788
  var hasNonEmptyQa = false;
789
+ var hasLoginQa = false;
790
+ var hasHubActionQa = false;
653
791
  qaAssertions.forEach(function (assertion, index) {
654
- var e_9, _a;
792
+ var e_13, _a;
655
793
  var qaPath = "".concat(pathLabel, ".journey_contract.qa_assertions[").concat(index, "]");
656
794
  if (!assertion || typeof assertion !== 'object' || Array.isArray(assertion)) {
657
795
  addJourneyIssue(issues, 'invalid_qa_assertion', qaPath, "".concat(pathLabel, ": qa_assertions[").concat(index, "] must be an object."));
@@ -669,26 +807,35 @@ function validateResolveIOAICoderJourneyContract(input, options) {
669
807
  }
670
808
  }
671
809
  }
672
- catch (e_9_1) { e_9 = { error: e_9_1 }; }
810
+ catch (e_13_1) { e_13 = { error: e_13_1 }; }
673
811
  finally {
674
812
  try {
675
813
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
676
814
  }
677
- finally { if (e_9) throw e_9.error; }
815
+ finally { if (e_13) throw e_13.error; }
678
816
  }
679
817
  var route = cleanField(assertion, ['route', 'screen_route', 'path'], 240);
680
818
  if (route && !looksLikeAbsoluteRoute(route)) {
681
819
  addJourneyIssue(issues, 'relative_qa_route', "".concat(qaPath, ".route"), "".concat(pathLabel, ": qa_assertions[").concat(index, "].route must be an absolute app route."));
682
820
  }
683
- var text = [
684
- concatFields(assertion, ['id', 'type', 'kind', 'coverage', 'viewport'], 300),
685
- concatFields(assertion, ['action', 'browser_steps', 'expected_dom_or_data_proof', 'proof', 'expected_result'], 1000)
686
- ].join(' ').toLowerCase();
687
- hasMobileQa = hasMobileQa || /\b(mobile|390x844|viewport)\b/.test(text);
688
- hasRecoveryQa = hasRecoveryQa || /\b(empty|error|recovery|invalid)\b/.test(text);
689
- hasCompletionQa = hasCompletionQa || /\b(complete|saved|export|report|result|recommendation|calculated|optimized)\b/.test(text);
690
- hasNonEmptyQa = hasNonEmptyQa || /\b(sample|seeded|non[-\s]?empty|kpi|table|chart|record|row)\b/.test(text);
821
+ var explicitCoverageTags = normalizeWorkflowQaCoverageTags(assertion, { includeProofKind: false });
822
+ var coverageTags = normalizeWorkflowQaCoverageTags(assertion);
823
+ if (!explicitCoverageTags.length) {
824
+ addJourneyIssue(issues, 'qa_assertion_missing_structured_coverage', "".concat(qaPath, ".coverage_tags"), "".concat(pathLabel, ": qa_assertions[").concat(index, "] must declare coverage_tags such as login, hub_action, workflow_completion, non_empty_data, mobile, or recovery; prose-only keyword detection is not accepted."));
825
+ }
826
+ hasLoginQa = hasLoginQa || coverageTags.includes('login');
827
+ hasHubActionQa = hasHubActionQa || coverageTags.includes('hub_action');
828
+ hasMobileQa = hasMobileQa || coverageTags.includes('mobile');
829
+ hasRecoveryQa = hasRecoveryQa || coverageTags.includes('recovery');
830
+ hasCompletionQa = hasCompletionQa || coverageTags.includes('workflow_completion');
831
+ hasNonEmptyQa = hasNonEmptyQa || coverageTags.includes('non_empty_data');
691
832
  });
833
+ if (!hasLoginQa) {
834
+ addJourneyIssue(issues, 'missing_login_qa', "".concat(pathLabel, ".journey_contract.qa_assertions"), "".concat(pathLabel, ": qa_assertions missing structured login coverage."));
835
+ }
836
+ if (!hasHubActionQa) {
837
+ addJourneyIssue(issues, 'missing_hub_action_qa', "".concat(pathLabel, ".journey_contract.qa_assertions"), "".concat(pathLabel, ": qa_assertions missing structured dashboard hub action coverage."));
838
+ }
692
839
  if (!hasCompletionQa) {
693
840
  addJourneyIssue(issues, 'missing_completion_qa', "".concat(pathLabel, ".journey_contract.qa_assertions"), "".concat(pathLabel, ": qa_assertions missing business completion proof."));
694
841
  }
@@ -719,7 +866,7 @@ function cleanNumber(value) {
719
866
  return Number.isFinite(parsed) && parsed > 0 ? Math.floor(parsed) : 0;
720
867
  }
721
868
  function cleanWorkflowQaRows(values, limit) {
722
- var e_10, _a;
869
+ var e_14, _a;
723
870
  if (limit === void 0) { limit = 40; }
724
871
  if (!Array.isArray(values)) {
725
872
  return [];
@@ -741,6 +888,7 @@ function cleanWorkflowQaRows(values, limit) {
741
888
  expectedState: cleanText(value.expectedState || value.expected_state, 500) || undefined,
742
889
  expectedOutput: cleanText(value.expectedOutput || value.expected_output, 700) || undefined,
743
890
  proofKind: cleanText(value.proofKind || value.proof_kind, 120) || undefined,
891
+ coverageTags: normalizeWorkflowQaCoverageTags(value),
744
892
  acceptanceGate: (value.acceptanceGate || value.acceptance_gate) === 'aiqa_business_assertion'
745
893
  ? 'aiqa_business_assertion'
746
894
  : undefined,
@@ -764,12 +912,12 @@ function cleanWorkflowQaRows(values, limit) {
764
912
  }
765
913
  }
766
914
  }
767
- catch (e_10_1) { e_10 = { error: e_10_1 }; }
915
+ catch (e_14_1) { e_14 = { error: e_14_1 }; }
768
916
  finally {
769
917
  try {
770
918
  if (values_2_1 && !values_2_1.done && (_a = values_2.return)) _a.call(values_2);
771
919
  }
772
- finally { if (e_10) throw e_10.error; }
920
+ finally { if (e_14) throw e_14.error; }
773
921
  }
774
922
  return rows;
775
923
  }
@@ -831,7 +979,7 @@ function mergeWorkflowQaRows(contractRows, recordedRows) {
831
979
  if (!recorded) {
832
980
  return contractRow;
833
981
  }
834
- return __assign(__assign(__assign({}, contractRow), recorded), { workflowId: recorded.workflowId || contractRow.workflowId, stepId: recorded.stepId || contractRow.stepId, route: recorded.route || contractRow.route, action: recorded.action || contractRow.action, assertion: recorded.assertion || contractRow.assertion, expectedState: recorded.expectedState || contractRow.expectedState, expectedOutput: recorded.expectedOutput || contractRow.expectedOutput, proofKind: recorded.proofKind || contractRow.proofKind, acceptanceGate: recorded.acceptanceGate || contractRow.acceptanceGate, requiredArtifacts: Array.from(new Set(__spreadArray(__spreadArray([], __read(cleanList(contractRow.requiredArtifacts, 20, 180)), false), __read(cleanList(recorded.requiredArtifacts, 20, 180)), false))), stateTransition: recorded.stateTransition || contractRow.stateTransition, artifactPaths: Array.from(new Set(__spreadArray(__spreadArray([], __read(cleanList(contractRow.artifactPaths, 20, 500)), false), __read(cleanList(recorded.artifactPaths, 20, 500)), false))) });
982
+ return __assign(__assign(__assign({}, contractRow), recorded), { workflowId: recorded.workflowId || contractRow.workflowId, stepId: recorded.stepId || contractRow.stepId, route: recorded.route || contractRow.route, action: recorded.action || contractRow.action, assertion: recorded.assertion || contractRow.assertion, expectedState: recorded.expectedState || contractRow.expectedState, expectedOutput: recorded.expectedOutput || contractRow.expectedOutput, proofKind: recorded.proofKind || contractRow.proofKind, coverageTags: Array.from(new Set(__spreadArray(__spreadArray([], __read(cleanList(contractRow.coverageTags, 20, 120)), false), __read(cleanList(recorded.coverageTags, 20, 120)), false))), acceptanceGate: recorded.acceptanceGate || contractRow.acceptanceGate, requiredArtifacts: Array.from(new Set(__spreadArray(__spreadArray([], __read(cleanList(contractRow.requiredArtifacts, 20, 180)), false), __read(cleanList(recorded.requiredArtifacts, 20, 180)), false))), stateTransition: recorded.stateTransition || contractRow.stateTransition, artifactPaths: Array.from(new Set(__spreadArray(__spreadArray([], __read(cleanList(contractRow.artifactPaths, 20, 500)), false), __read(cleanList(recorded.artifactPaths, 20, 500)), false))) });
835
983
  });
836
984
  }
837
985
  function assertionMatchesWorkflowRow(assertion, row) {
@@ -980,7 +1128,7 @@ function fingerprintResolveIOAICoderWorkflowProofPayload(value, prefix) {
980
1128
  return "".concat(prefix, "-").concat(Math.abs(hash).toString(36));
981
1129
  }
982
1130
  function normalizeWorkflowProofFingerprintList() {
983
- var e_11, _a, e_12, _b;
1131
+ var e_15, _a, e_16, _b;
984
1132
  var values = [];
985
1133
  for (var _i = 0; _i < arguments.length; _i++) {
986
1134
  values[_i] = arguments[_i];
@@ -991,7 +1139,7 @@ function normalizeWorkflowProofFingerprintList() {
991
1139
  var value = values_3_1.value;
992
1140
  var list = Array.isArray(value) ? value : value ? [value] : [];
993
1141
  try {
994
- for (var list_1 = (e_12 = void 0, __values(list)), list_1_1 = list_1.next(); !list_1_1.done; list_1_1 = list_1.next()) {
1142
+ for (var list_1 = (e_16 = void 0, __values(list)), list_1_1 = list_1.next(); !list_1_1.done; list_1_1 = list_1.next()) {
995
1143
  var entry = list_1_1.value;
996
1144
  var normalized = cleanText(entry, 200);
997
1145
  if (normalized && !fingerprints.includes(normalized)) {
@@ -999,21 +1147,21 @@ function normalizeWorkflowProofFingerprintList() {
999
1147
  }
1000
1148
  }
1001
1149
  }
1002
- catch (e_12_1) { e_12 = { error: e_12_1 }; }
1150
+ catch (e_16_1) { e_16 = { error: e_16_1 }; }
1003
1151
  finally {
1004
1152
  try {
1005
1153
  if (list_1_1 && !list_1_1.done && (_b = list_1.return)) _b.call(list_1);
1006
1154
  }
1007
- finally { if (e_12) throw e_12.error; }
1155
+ finally { if (e_16) throw e_16.error; }
1008
1156
  }
1009
1157
  }
1010
1158
  }
1011
- catch (e_11_1) { e_11 = { error: e_11_1 }; }
1159
+ catch (e_15_1) { e_15 = { error: e_15_1 }; }
1012
1160
  finally {
1013
1161
  try {
1014
1162
  if (values_3_1 && !values_3_1.done && (_a = values_3.return)) _a.call(values_3);
1015
1163
  }
1016
- finally { if (e_11) throw e_11.error; }
1164
+ finally { if (e_15) throw e_15.error; }
1017
1165
  }
1018
1166
  return fingerprints.slice(0, 40);
1019
1167
  }