@resolveio/server-lib 22.3.240 → 22.3.241

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.
@@ -1467,7 +1467,7 @@ function buildResolveIOSupportDiagnosisEvidencePack(input) {
1467
1467
  activeMicrotaskId: activeMicrotask === null || activeMicrotask === void 0 ? void 0 : activeMicrotask.microtaskId,
1468
1468
  similarCaseSelection: similarCaseSelection,
1469
1469
  businessProofGuidance: [
1470
- 'Let the model choose the proof mechanics from the current ticket, code path, and data evidence; do not map the ticket into a fixed issue/proof category.',
1470
+ 'There is no support-runner proof category menu. Choose the proof from the customer complaint, observed behavior, code path, and data evidence.',
1471
1471
  'Use only checks that directly prove or falsify this customer complaint.',
1472
1472
  'Acceptance requires AIQaBusinessAssertion before/action/after proof tied to the diagnosis proof_plan; route load or a model claim is not enough.'
1473
1473
  ],
@@ -1589,12 +1589,11 @@ function buildResolveIOSupportDiagnosisRetryScaffold(input) {
1589
1589
  };
1590
1590
  }
1591
1591
  function normalizeSupportDiagnosisBusinessProofContract(value, issueClassHint) {
1592
+ void issueClassHint;
1592
1593
  var source = cleanObject(value);
1593
1594
  if (!Object.keys(source).length) {
1594
1595
  return undefined;
1595
1596
  }
1596
- var issueClass = normalizeIssueClass(source.issue_class || source.issueClass || issueClassHint)
1597
- || normalizeIssueClass(issueClassHint);
1598
1597
  var expectedBusinessStateChange = pickText(source, ['expected_business_state_change', 'expectedBusinessStateChange', 'expected_change', 'expectedChange', 'after'], 1000);
1599
1598
  var dataOrDomAssertion = pickText(source, [
1600
1599
  'data_or_dom_assertion',
@@ -1615,7 +1614,14 @@ function normalizeSupportDiagnosisBusinessProofContract(value, issueClassHint) {
1615
1614
  proofArtifacts.push(derivedArtifact);
1616
1615
  }
1617
1616
  }
1618
- return __assign(__assign({}, (issueClass ? { issue_class: issueClass } : {})), { setup_state: pickText(source, ['setup_state', 'setupState', 'before', 'precondition'], 1000), action_under_test: pickText(source, ['action_under_test', 'actionUnderTest', 'action', 'steps'], 1000), expected_business_state_change: expectedBusinessStateChange, prohibited_false_pass: pickText(source, ['prohibited_false_pass', 'prohibitedFalsePass', 'false_pass', 'falsePass'], 1000), proof_artifacts: proofArtifacts, data_or_dom_assertion: dataOrDomAssertion });
1617
+ return {
1618
+ setup_state: pickText(source, ['setup_state', 'setupState', 'before', 'precondition'], 1000),
1619
+ action_under_test: pickText(source, ['action_under_test', 'actionUnderTest', 'action', 'steps'], 1000),
1620
+ expected_business_state_change: expectedBusinessStateChange,
1621
+ prohibited_false_pass: pickText(source, ['prohibited_false_pass', 'prohibitedFalsePass', 'false_pass', 'falsePass'], 1000),
1622
+ proof_artifacts: proofArtifacts,
1623
+ data_or_dom_assertion: dataOrDomAssertion
1624
+ };
1619
1625
  }
1620
1626
  function supportDiagnosisNarrativeText(value, max) {
1621
1627
  if (max === void 0) { max = 1200; }
@@ -2342,7 +2348,6 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2342
2348
  var hypothesisText = supportDiagnosisNarrativeText(rawHypothesis, 1200);
2343
2349
  var failingPathText = supportDiagnosisNarrativeText(rawFailingPath, 1200);
2344
2350
  var proofPlanRows = normalizeSupportDiagnosisProofPlanRows(rawProofPlan);
2345
- var issueClass = normalizeIssueClass(source.issue_class || source.issueClass);
2346
2351
  var rawBusinessProofContract = proofPlanSource.business_proof_contract
2347
2352
  || proofPlanSource.businessProofContract
2348
2353
  || source.business_proof_contract
@@ -2398,12 +2403,19 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2398
2403
  var proofPlanArtifactExpectation = pickText(proofPlanSource, ['artifact_expectation', 'artifactExpectation', 'artifact', 'screenshot'], 1000)
2399
2404
  || contractArtifacts.join(' | ').slice(0, 1000)
2400
2405
  || (shouldDeriveLooseProofPlan && proofPlanBusinessAssertion ? 'business proof artifacts tied to the assertion and actual execution path' : '');
2401
- var derivedBusinessProofContract = shouldDeriveLooseProofPlan && proofPlanBusinessAssertion ? __assign(__assign({}, (issueClass ? { issue_class: issueClass } : {})), { setup_state: proofPlanBeforeResolved || proofPlanBeforeUnavailable, action_under_test: proofPlanAction, expected_business_state_change: proofPlanAfter || proofPlanBusinessAssertion, prohibited_false_pass: 'Route load, screenshot, scorecard, or model claim alone is not acceptance.', proof_artifacts: [
2406
+ var derivedBusinessProofContract = shouldDeriveLooseProofPlan && proofPlanBusinessAssertion ? {
2407
+ setup_state: proofPlanBeforeResolved || proofPlanBeforeUnavailable,
2408
+ action_under_test: proofPlanAction,
2409
+ expected_business_state_change: proofPlanAfter || proofPlanBusinessAssertion,
2410
+ prohibited_false_pass: 'Route load, screenshot, scorecard, or model claim alone is not acceptance.',
2411
+ proof_artifacts: [
2402
2412
  proofPlanArtifactExpectation,
2403
2413
  'business assertion artifact',
2404
2414
  'state-change evidence artifact'
2405
- ].filter(Boolean), data_or_dom_assertion: proofPlanDataAssertion || proofPlanBusinessAssertion }) : undefined;
2406
- var businessProofContract = normalizeSupportDiagnosisBusinessProofContract(rawBusinessProofContract, issueClass || source.issue_class || source.issueClass) || normalizeSupportDiagnosisBusinessProofContract(derivedBusinessProofContract, issueClass || source.issue_class || source.issueClass);
2415
+ ].filter(Boolean),
2416
+ data_or_dom_assertion: proofPlanDataAssertion || proofPlanBusinessAssertion
2417
+ } : undefined;
2418
+ var businessProofContract = normalizeSupportDiagnosisBusinessProofContract(rawBusinessProofContract, undefined) || normalizeSupportDiagnosisBusinessProofContract(derivedBusinessProofContract, undefined);
2407
2419
  var rawOwnerFiles = cleanList(source.owner_files || source.ownerFiles, 20, 500)
2408
2420
  .map(normalizeOwnerFilePath)
2409
2421
  .filter(Boolean);
@@ -2522,7 +2534,8 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2522
2534
  || hypothesisSource.falsifiableBy
2523
2535
  || hypothesisSource.falsifies_by
2524
2536
  || hypothesisSource.falsifiesBy, 8, 500).join(' | ').slice(0, 1000);
2525
- var gate = __assign(__assign({ issue_case: {
2537
+ var gate = {
2538
+ issue_case: {
2526
2539
  customer_complaint: explicitCustomerComplaint || customerIssueCaseText,
2527
2540
  expected_result: expectedResult,
2528
2541
  observed_result: observedResult,
@@ -2532,7 +2545,8 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2532
2545
  ? normalizeReproductionStatus(rawReproductionStatus)
2533
2546
  : (inferredReproductionBlocker ? 'blocked' : (featureRequestClassified || !hasRuntimeReproductionEvidence ? 'classified' : 'reproduced')),
2534
2547
  reproduction_blocker: inferredReproductionBlocker
2535
- } }, (issueClass ? { issue_class: issueClass } : {})), { accepted_hypothesis: {
2548
+ },
2549
+ accepted_hypothesis: {
2536
2550
  statement: pickText(hypothesisSource, ['statement', 'hypothesis', 'root_cause', 'rootCause', 'root_cause_theory', 'rootCauseTheory', 'theory', 'summary', 'why_accepted', 'whyAccepted'], 1200)
2537
2551
  || hypothesisText,
2538
2552
  falsifiable_test: pickText(hypothesisSource, ['falsifiable_test', 'falsifiableTest', 'falsification_method', 'falsificationMethod', 'falsifiable_method', 'falsifiableMethod', 'test', 'proof', 'falsifier'], 1000)
@@ -2541,13 +2555,17 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2541
2555
  evidence: explicitHypothesisEvidence.length
2542
2556
  ? explicitHypothesisEvidence
2543
2557
  : diagnosisEvidence.map(function (entry) { return [entry.artifactPath, entry.summary].filter(Boolean).join(': '); }).filter(Boolean).slice(0, 10)
2544
- }, rejected_alternatives: normalizeSupportDiagnosisRejectedAlternatives(source.rejected_alternatives || source.rejectedAlternatives), failing_path: {
2558
+ },
2559
+ rejected_alternatives: normalizeSupportDiagnosisRejectedAlternatives(source.rejected_alternatives || source.rejectedAlternatives),
2560
+ failing_path: {
2545
2561
  frontend: pickText(failingPathSource, ['frontend', 'frontend_path', 'frontendPath', 'eventPath', 'frontend_event_data_path', 'frontendEventDataPath'], 700),
2546
2562
  backend: pickText(failingPathSource, ['backend', 'backend_path', 'backendPath', 'methodPublicationPath', 'backend_method_publication_query_path', 'backendMethodPublicationQueryPath'], 700),
2547
2563
  shared_library: pickText(failingPathSource, ['shared_library', 'sharedLibrary', 'shared_library_path', 'sharedLibraryPath', 'library', 'lib'], 700),
2548
2564
  data_query: pickText(failingPathSource, ['data_query', 'dataQuery', 'query', 'data_path', 'dataPath'], 700),
2549
2565
  description: pickText(failingPathSource, ['description', 'path_chain', 'pathChain', 'chain', 'visibility_gate_trace', 'visibilityGateTrace', 'reported', 'verified', 'reported_path', 'reportedPath', 'verified_path', 'verifiedPath', 'path', 'assessment', 'summary', 'route', 'frontend_event_data_path', 'frontendEventDataPath', 'backend_method_publication_query_path', 'backendMethodPublicationQueryPath', 'data_path', 'dataPath'], 1200) || failingPathText
2550
- }, owner_files: ownerFiles, proof_plan: {
2566
+ },
2567
+ owner_files: ownerFiles,
2568
+ proof_plan: {
2551
2569
  before: proofPlanBeforeResolved,
2552
2570
  before_state_unavailable_reason: proofPlanBeforeUnavailable,
2553
2571
  action: proofPlanAction,
@@ -2557,7 +2575,13 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2557
2575
  data_assertion: proofPlanDataAssertion,
2558
2576
  artifact_expectation: proofPlanArtifactExpectation,
2559
2577
  business_proof_contract: businessProofContract
2560
- }, similar_tickets: normalizeSupportDiagnosisHints(source.similar_tickets || source.similarTickets), similar_commits: normalizeSupportDiagnosisHints(source.similar_commits || source.similarCommits), evidence: diagnosisEvidence, status: cleanText(source.status, 80).toLowerCase() || 'incomplete', updatedAt: isoNow(now || source.updatedAt || source.updated_at) });
2578
+ },
2579
+ similar_tickets: normalizeSupportDiagnosisHints(source.similar_tickets || source.similarTickets),
2580
+ similar_commits: normalizeSupportDiagnosisHints(source.similar_commits || source.similarCommits),
2581
+ evidence: diagnosisEvidence,
2582
+ status: cleanText(source.status, 80).toLowerCase() || 'incomplete',
2583
+ updatedAt: isoNow(now || source.updatedAt || source.updated_at)
2584
+ };
2561
2585
  if (!['missing', 'incomplete', 'blocked', 'passed'].includes(gate.status)) {
2562
2586
  gate.status = 'incomplete';
2563
2587
  }
@@ -3061,7 +3085,6 @@ function supportBusinessProofFingerprint(gate, assertion, artifactPaths) {
3061
3085
  var proofPlan = gate.proof_plan;
3062
3086
  var proofContract = proofPlan.business_proof_contract;
3063
3087
  return hashResolveIOSupportV5Evidence({
3064
- issueClass: gate.issue_class,
3065
3088
  proofPlan: {
3066
3089
  before: proofPlan.before,
3067
3090
  action: proofPlan.action,
@@ -3876,7 +3899,22 @@ function buildSupportIssueClassProbeQaRow(args) {
3876
3899
  action: args.action,
3877
3900
  assertion: args.stateTransition.assertion
3878
3901
  }).slice(0, 16));
3879
- return __assign(__assign({ row_id: rowId }, (args.issueClass ? { issue_class: args.issueClass } : {})), { probe_type: 'business_proof', route: cleanText(args.route, 500) || undefined, action_under_test: args.action, browser_steps: args.browserSteps, expected_result: args.expected, expected_dom_or_data_proof: args.expectedEvidence, required_artifacts: args.requiredArtifacts, false_pass_blockers: args.falsePassBlockers, state_transition: args.stateTransition, acceptance_gate: 'aiqa_business_assertion', requires_aiqa_business_assertion: true, route_only_is_false_pass: true, mobile_viewport_required: false });
3902
+ return {
3903
+ row_id: rowId,
3904
+ probe_type: 'business_proof',
3905
+ route: cleanText(args.route, 500) || undefined,
3906
+ action_under_test: args.action,
3907
+ browser_steps: args.browserSteps,
3908
+ expected_result: args.expected,
3909
+ expected_dom_or_data_proof: args.expectedEvidence,
3910
+ required_artifacts: args.requiredArtifacts,
3911
+ false_pass_blockers: args.falsePassBlockers,
3912
+ state_transition: args.stateTransition,
3913
+ acceptance_gate: 'aiqa_business_assertion',
3914
+ requires_aiqa_business_assertion: true,
3915
+ route_only_is_false_pass: true,
3916
+ mobile_viewport_required: false
3917
+ };
3880
3918
  }
3881
3919
  function normalizeResolveIOSupportIssueClassProbeQaRow(value, fallback) {
3882
3920
  var source = cleanObject(value);
@@ -3893,19 +3931,32 @@ function normalizeResolveIOSupportIssueClassProbeQaRow(value, fallback) {
3893
3931
  var browserSteps = cleanList(source.browser_steps || source.browserSteps, 12, 500).length
3894
3932
  ? cleanList(source.browser_steps || source.browserSteps, 12, 500)
3895
3933
  : fallback.browserSteps;
3896
- return __assign(__assign({ row_id: cleanText(source.row_id || source.rowId || source.id, 180) || "support-business-proof-".concat(hashResolveIOSupportV5Evidence({
3934
+ return {
3935
+ row_id: cleanText(source.row_id || source.rowId || source.id, 180) || "support-business-proof-".concat(hashResolveIOSupportV5Evidence({
3897
3936
  route: source.route || fallback.route,
3898
3937
  action: source.action_under_test || source.actionUnderTest || fallback.action,
3899
3938
  assertion: normalizedStateTransition.assertion
3900
- }).slice(0, 16)) }, (normalizeIssueClass(source.issue_class || source.issueClass) || fallback.issueClass
3901
- ? { issue_class: (normalizeIssueClass(source.issue_class || source.issueClass) || fallback.issueClass) }
3902
- : {})), { probe_type: cleanText(source.probe_type || source.probeType, 80) === 'issue_class_probe'
3939
+ }).slice(0, 16)),
3940
+ probe_type: cleanText(source.probe_type || source.probeType, 80) === 'issue_class_probe'
3903
3941
  ? 'business_proof'
3904
- : (cleanText(source.probe_type || source.probeType, 80) || 'business_proof'), route: cleanText(source.route, 500) || fallback.route, action_under_test: cleanText(source.action_under_test || source.actionUnderTest || source.action, 1200) || fallback.action, browser_steps: browserSteps, expected_result: cleanText(source.expected_result || source.expectedResult, 1600) || fallback.expectedBusinessProof, expected_dom_or_data_proof: cleanText(source.expected_dom_or_data_proof || source.expectedDomOrDataProof || source.expected_evidence || source.expectedEvidence, 1600) || fallback.expectedEvidence, required_artifacts: cleanList(source.required_artifacts || source.requiredArtifacts, 16, 260).length
3942
+ : (cleanText(source.probe_type || source.probeType, 80) || 'business_proof'),
3943
+ route: cleanText(source.route, 500) || fallback.route,
3944
+ action_under_test: cleanText(source.action_under_test || source.actionUnderTest || source.action, 1200) || fallback.action,
3945
+ browser_steps: browserSteps,
3946
+ expected_result: cleanText(source.expected_result || source.expectedResult, 1600) || fallback.expectedBusinessProof,
3947
+ expected_dom_or_data_proof: cleanText(source.expected_dom_or_data_proof || source.expectedDomOrDataProof || source.expected_evidence || source.expectedEvidence, 1600) || fallback.expectedEvidence,
3948
+ required_artifacts: cleanList(source.required_artifacts || source.requiredArtifacts, 16, 260).length
3905
3949
  ? cleanList(source.required_artifacts || source.requiredArtifacts, 16, 260)
3906
- : fallback.requiredArtifacts, false_pass_blockers: cleanList(source.false_pass_blockers || source.falsePassBlockers, 12, 260).length
3950
+ : fallback.requiredArtifacts,
3951
+ false_pass_blockers: cleanList(source.false_pass_blockers || source.falsePassBlockers, 12, 260).length
3907
3952
  ? cleanList(source.false_pass_blockers || source.falsePassBlockers, 12, 260)
3908
- : fallback.falsePassBlockers, state_transition: normalizedStateTransition, acceptance_gate: 'aiqa_business_assertion', requires_aiqa_business_assertion: true, route_only_is_false_pass: true, mobile_viewport_required: source.mobile_viewport_required === true || source.mobileViewportRequired === true });
3953
+ : fallback.falsePassBlockers,
3954
+ state_transition: normalizedStateTransition,
3955
+ acceptance_gate: 'aiqa_business_assertion',
3956
+ requires_aiqa_business_assertion: true,
3957
+ route_only_is_false_pass: true,
3958
+ mobile_viewport_required: source.mobile_viewport_required === true || source.mobileViewportRequired === true
3959
+ };
3909
3960
  }
3910
3961
  function normalizeResolveIOSupportIssueClassProbeAssertionTemplate(value, fallback) {
3911
3962
  var source = cleanObject(value);
@@ -3965,9 +4016,7 @@ function buildResolveIOSupportBusinessProofProbes(value) {
3965
4016
  'screenshot without business state proof',
3966
4017
  'model claim without business proof artifact'
3967
4018
  ];
3968
- var issueClass = gate.issue_class;
3969
4019
  var browserSteps = buildSupportIssueClassBrowserSteps({
3970
- issueClass: issueClass,
3971
4020
  route: route,
3972
4021
  action: stateTransition.action || action,
3973
4022
  before: stateTransition.before,
@@ -3975,12 +4024,10 @@ function buildResolveIOSupportBusinessProofProbes(value) {
3975
4024
  assertion: stateTransition.assertion
3976
4025
  });
3977
4026
  var dataProofRequirements = buildSupportIssueClassDataProofRequirements({
3978
- issueClass: issueClass,
3979
4027
  assertion: stateTransition.assertion,
3980
4028
  requiredArtifacts: requiredArtifacts
3981
4029
  });
3982
4030
  var qaRow = buildSupportIssueClassProbeQaRow({
3983
- issueClass: issueClass,
3984
4031
  route: route,
3985
4032
  objective: objective,
3986
4033
  action: action,
@@ -3992,7 +4039,6 @@ function buildResolveIOSupportBusinessProofProbes(value) {
3992
4039
  browserSteps: browserSteps
3993
4040
  });
3994
4041
  var assertionTemplate = buildSupportIssueClassProbeAssertionTemplate({
3995
- issueClass: issueClass,
3996
4042
  route: route,
3997
4043
  objective: objective,
3998
4044
  expected: proof || gate.proof_plan.business_assertion,
@@ -4010,15 +4056,14 @@ function buildResolveIOSupportBusinessProofProbes(value) {
4010
4056
  return [__assign(__assign({}, common), { failure_class: 'business', objective: objective, action: action, browser_steps: browserSteps, expected_evidence: expectedEvidence, expected_business_proof: proof || gate.proof_plan.business_assertion, data_proof_requirements: dataProofRequirements, required_artifacts: requiredArtifacts, qa_rows: [qaRow], active_qa_row: qaRow, aiqa_business_assertion_template: assertionTemplate, false_pass_blockers: falsePassBlockers })];
4011
4057
  }
4012
4058
  function normalizeResolveIOSupportIssueClassProbe(value, diagnosisGate) {
4059
+ void diagnosisGate;
4013
4060
  var source = cleanObject(value);
4014
4061
  if (!Object.keys(source).length) {
4015
4062
  return undefined;
4016
4063
  }
4017
- var issueClass = normalizeIssueClass(source.issue_class || source.issueClass || (diagnosisGate === null || diagnosisGate === void 0 ? void 0 : diagnosisGate.issue_class));
4018
4064
  var stateTransition = cleanObject(source.state_transition || source.stateTransition);
4019
4065
  var route = cleanText(source.route, 500);
4020
4066
  var failureClass = cleanText(source.failure_class || source.failureClass || 'business', 80);
4021
- var normalizedIssueClass = (issueClass || normalizeIssueClass(diagnosisGate === null || diagnosisGate === void 0 ? void 0 : diagnosisGate.issue_class) || undefined);
4022
4067
  var action = cleanText(source.action, 1200);
4023
4068
  var expectedEvidence = cleanText(source.expected_evidence || source.expectedEvidence, 1600);
4024
4069
  var expectedBusinessProof = cleanText(source.expected_business_proof || source.expectedBusinessProof, 1600);
@@ -4033,7 +4078,6 @@ function normalizeResolveIOSupportIssueClassProbe(value, diagnosisGate) {
4033
4078
  var browserSteps = cleanList(source.browser_steps || source.browserSteps, 12, 500).length
4034
4079
  ? cleanList(source.browser_steps || source.browserSteps, 12, 500)
4035
4080
  : buildSupportIssueClassBrowserSteps({
4036
- issueClass: normalizedIssueClass,
4037
4081
  route: route,
4038
4082
  action: normalizedStateTransition.action || action,
4039
4083
  before: normalizedStateTransition.before,
@@ -4043,7 +4087,6 @@ function normalizeResolveIOSupportIssueClassProbe(value, diagnosisGate) {
4043
4087
  var dataProofRequirements = cleanList(source.data_proof_requirements || source.dataProofRequirements, 16, 260).length
4044
4088
  ? cleanList(source.data_proof_requirements || source.dataProofRequirements, 16, 260)
4045
4089
  : buildSupportIssueClassDataProofRequirements({
4046
- issueClass: normalizedIssueClass,
4047
4090
  assertion: normalizedStateTransition.assertion,
4048
4091
  requiredArtifacts: requiredArtifacts
4049
4092
  });
@@ -4056,7 +4099,6 @@ function normalizeResolveIOSupportIssueClassProbe(value, diagnosisGate) {
4056
4099
  : [];
4057
4100
  var normalizedQaRows = rawQaRows
4058
4101
  .map(function (row) { return normalizeResolveIOSupportIssueClassProbeQaRow(row, {
4059
- issueClass: normalizedIssueClass,
4060
4102
  route: route,
4061
4103
  action: action,
4062
4104
  expectedBusinessProof: expectedBusinessProof,
@@ -4069,7 +4111,6 @@ function normalizeResolveIOSupportIssueClassProbe(value, diagnosisGate) {
4069
4111
  .filter(function (row) { return !!row; });
4070
4112
  if (!normalizedQaRows.length && action && expectedEvidence) {
4071
4113
  normalizedQaRows.push(buildSupportIssueClassProbeQaRow({
4072
- issueClass: normalizedIssueClass,
4073
4114
  route: route,
4074
4115
  objective: cleanText(source.objective, 1000),
4075
4116
  action: action,
@@ -4084,7 +4125,6 @@ function normalizeResolveIOSupportIssueClassProbe(value, diagnosisGate) {
4084
4125
  var assertionTemplateSource = cleanObject(source.aiqa_business_assertion_template || source.aiqaBusinessAssertionTemplate);
4085
4126
  var assertionTemplate = Object.keys(assertionTemplateSource).length
4086
4127
  ? normalizeResolveIOSupportIssueClassProbeAssertionTemplate(assertionTemplateSource, {
4087
- issueClass: normalizedIssueClass,
4088
4128
  route: route,
4089
4129
  objective: cleanText(source.objective, 1000),
4090
4130
  expected: expectedBusinessProof,
@@ -4092,19 +4132,36 @@ function normalizeResolveIOSupportIssueClassProbe(value, diagnosisGate) {
4092
4132
  requiredArtifacts: requiredArtifacts
4093
4133
  })
4094
4134
  : buildSupportIssueClassProbeAssertionTemplate({
4095
- issueClass: normalizedIssueClass,
4096
4135
  route: route,
4097
4136
  objective: cleanText(source.objective, 1000),
4098
4137
  expected: expectedBusinessProof,
4099
4138
  stateTransition: normalizedStateTransition,
4100
4139
  requiredArtifacts: requiredArtifacts
4101
4140
  });
4102
- return __assign(__assign({}, (normalizedIssueClass ? { issue_class: normalizedIssueClass } : {})), { probe_type: cleanText(source.probe_type || source.probeType, 80) === 'issue_class_probe'
4141
+ return {
4142
+ probe_type: cleanText(source.probe_type || source.probeType, 80) === 'issue_class_probe'
4103
4143
  ? 'business_proof'
4104
- : (cleanText(source.probe_type || source.probeType, 80) || 'business_proof'), failure_class: failureClass, objective: cleanText(source.objective, 1000), route: route, action: action, browser_steps: browserSteps, expected_evidence: expectedEvidence, expected_business_proof: expectedBusinessProof, data_proof_requirements: dataProofRequirements, required_artifacts: requiredArtifacts, qa_rows: normalizedQaRows, active_qa_row: normalizedQaRows[0], aiqa_business_assertion_template: assertionTemplate, state_transition: normalizedStateTransition, acceptance_gate: cleanText(source.acceptance_gate || source.acceptanceGate, 120) === 'aiqa_business_assertion'
4144
+ : (cleanText(source.probe_type || source.probeType, 80) || 'business_proof'),
4145
+ failure_class: failureClass,
4146
+ objective: cleanText(source.objective, 1000),
4147
+ route: route,
4148
+ action: action,
4149
+ browser_steps: browserSteps,
4150
+ expected_evidence: expectedEvidence,
4151
+ expected_business_proof: expectedBusinessProof,
4152
+ data_proof_requirements: dataProofRequirements,
4153
+ required_artifacts: requiredArtifacts,
4154
+ qa_rows: normalizedQaRows,
4155
+ active_qa_row: normalizedQaRows[0],
4156
+ aiqa_business_assertion_template: assertionTemplate,
4157
+ state_transition: normalizedStateTransition,
4158
+ acceptance_gate: cleanText(source.acceptance_gate || source.acceptanceGate, 120) === 'aiqa_business_assertion'
4105
4159
  ? 'aiqa_business_assertion'
4106
- : 'aiqa_business_assertion', blocks_acceptance_without_business_assertion: source.blocks_acceptance_without_business_assertion !== false
4107
- && source.blocksAcceptanceWithoutBusinessAssertion !== false, false_pass_blockers: falsePassBlockers });
4160
+ : 'aiqa_business_assertion',
4161
+ blocks_acceptance_without_business_assertion: source.blocks_acceptance_without_business_assertion !== false
4162
+ && source.blocksAcceptanceWithoutBusinessAssertion !== false,
4163
+ false_pass_blockers: falsePassBlockers
4164
+ };
4108
4165
  }
4109
4166
  function validateResolveIOSupportIssueClassProbePlan(value, diagnosisGate, now) {
4110
4167
  var diagnosisValidation = validateResolveIOSupportDiagnosisGate(diagnosisGate);
@@ -4125,7 +4182,6 @@ function validateResolveIOSupportIssueClassProbePlan(value, diagnosisGate, now)
4125
4182
  .map(function (probe) { return normalizeResolveIOSupportIssueClassProbe(probe, normalizedDiagnosis); })
4126
4183
  .filter(function (probe) { return !!probe; });
4127
4184
  var activeProbe = probes[0] || normalizeResolveIOSupportIssueClassProbe(source.activeProbe || source.active_probe, normalizedDiagnosis);
4128
- var issueClass = normalizeIssueClass(source.issue_class || source.issueClass || (activeProbe === null || activeProbe === void 0 ? void 0 : activeProbe.issue_class) || (normalizedDiagnosis === null || normalizedDiagnosis === void 0 ? void 0 : normalizedDiagnosis.issue_class));
4129
4185
  var planRequiredArtifacts = cleanList(source.requiredArtifacts || source.required_artifacts, 16, 220);
4130
4186
  var requiredArtifacts = planRequiredArtifacts.length ? planRequiredArtifacts : cleanList(activeProbe === null || activeProbe === void 0 ? void 0 : activeProbe.required_artifacts, 16, 220);
4131
4187
  var planQaRows = Array.isArray(source.qaRows)
@@ -4135,7 +4191,6 @@ function validateResolveIOSupportIssueClassProbePlan(value, diagnosisGate, now)
4135
4191
  : [];
4136
4192
  var qaRows = (planQaRows.length ? planQaRows : probes.flatMap(function (probe) { return probe.qa_rows || []; }))
4137
4193
  .map(function (row) { return normalizeResolveIOSupportIssueClassProbeQaRow(row, {
4138
- issueClass: (issueClass || normalizeIssueClass(normalizedDiagnosis === null || normalizedDiagnosis === void 0 ? void 0 : normalizedDiagnosis.issue_class) || undefined),
4139
4194
  route: activeProbe === null || activeProbe === void 0 ? void 0 : activeProbe.route,
4140
4195
  action: (activeProbe === null || activeProbe === void 0 ? void 0 : activeProbe.action) || '',
4141
4196
  expectedBusinessProof: (activeProbe === null || activeProbe === void 0 ? void 0 : activeProbe.expected_business_proof) || '',
@@ -4934,7 +4989,7 @@ function validateResolveIOSupportEvidenceProbeContract(value) {
4934
4989
  };
4935
4990
  }
4936
4991
  function buildResolveIOSupportEvidenceProbeContract(input) {
4937
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
4992
+ var _a, _b, _c, _d, _e, _f, _g;
4938
4993
  var now = isoNow(input.now);
4939
4994
  var diagnosisValidation = validateResolveIOSupportDiagnosisGate(input.diagnosisGate);
4940
4995
  var issueClassProbePlanValidation = validateResolveIOSupportIssueClassProbePlan(input.issueClassProbePlan, diagnosisValidation.normalized, input.now);
@@ -4979,8 +5034,7 @@ function buildResolveIOSupportEvidenceProbeContract(input) {
4979
5034
  ])).slice(0, 12);
4980
5035
  var contract = {
4981
5036
  contractId: "support-evidence-probe-".concat(hashResolveIOSupportV5Evidence({
4982
- issueClass: (_c = diagnosisValidation.normalized) === null || _c === void 0 ? void 0 : _c.issue_class,
4983
- planId: (_d = issueClassProbePlanValidation.normalized) === null || _d === void 0 ? void 0 : _d.planId,
5037
+ planId: (_c = issueClassProbePlanValidation.normalized) === null || _c === void 0 ? void 0 : _c.planId,
4984
5038
  failureClass: freshness.failureClass,
4985
5039
  blockerFingerprint: freshness.blockerFingerprint,
4986
5040
  evidenceHash: freshness.evidenceHash,
@@ -4992,11 +5046,10 @@ function buildResolveIOSupportEvidenceProbeContract(input) {
4992
5046
  evidenceOnly: true,
4993
5047
  productRepairAllowed: false,
4994
5048
  canRunWithoutCodexMonitor: blockers.length === 0,
4995
- issueClass: ((_e = diagnosisValidation.normalized) === null || _e === void 0 ? void 0 : _e.issue_class) || (activeProbe === null || activeProbe === void 0 ? void 0 : activeProbe.issue_class),
4996
- planId: (_f = issueClassProbePlanValidation.normalized) === null || _f === void 0 ? void 0 : _f.planId,
4997
- activeRoute: (activeProbe === null || activeProbe === void 0 ? void 0 : activeProbe.route) || ((_g = diagnosisValidation.normalized) === null || _g === void 0 ? void 0 : _g.proof_plan.route),
4998
- actionUnderTest: (activeProbe === null || activeProbe === void 0 ? void 0 : activeProbe.action) || ((_h = diagnosisValidation.normalized) === null || _h === void 0 ? void 0 : _h.proof_plan.action),
4999
- expectedBusinessProof: (activeProbe === null || activeProbe === void 0 ? void 0 : activeProbe.expected_business_proof) || ((_j = diagnosisValidation.normalized) === null || _j === void 0 ? void 0 : _j.proof_plan.business_assertion),
5049
+ planId: (_d = issueClassProbePlanValidation.normalized) === null || _d === void 0 ? void 0 : _d.planId,
5050
+ activeRoute: (activeProbe === null || activeProbe === void 0 ? void 0 : activeProbe.route) || ((_e = diagnosisValidation.normalized) === null || _e === void 0 ? void 0 : _e.proof_plan.route),
5051
+ actionUnderTest: (activeProbe === null || activeProbe === void 0 ? void 0 : activeProbe.action) || ((_f = diagnosisValidation.normalized) === null || _f === void 0 ? void 0 : _f.proof_plan.action),
5052
+ expectedBusinessProof: (activeProbe === null || activeProbe === void 0 ? void 0 : activeProbe.expected_business_proof) || ((_g = diagnosisValidation.normalized) === null || _g === void 0 ? void 0 : _g.proof_plan.business_assertion),
5000
5053
  stateTransition: activeProbe === null || activeProbe === void 0 ? void 0 : activeProbe.state_transition,
5001
5054
  startingFailureClass: freshness.failureClass,
5002
5055
  startingBlockerFingerprint: freshness.blockerFingerprint,