@resolveio/server-lib 22.3.217 → 22.3.219

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "22.3.217",
3
+ "version": "22.3.219",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "package": "./build_package.sh",
@@ -1749,14 +1749,34 @@ function normalizeSupportDiagnosisBusinessProofContract(value, issueClassHint) {
1749
1749
  var issueClass = normalizeIssueClass(source.issue_class || source.issueClass || issueClassHint)
1750
1750
  || normalizeIssueClass(issueClassHint)
1751
1751
  || 'missing_wrong_data';
1752
+ var expectedBusinessStateChange = pickText(source, ['expected_business_state_change', 'expectedBusinessStateChange', 'expected_change', 'expectedChange', 'after'], 1000);
1753
+ var dataOrDomAssertion = pickText(source, [
1754
+ 'data_or_dom_assertion',
1755
+ 'dataOrDomAssertion',
1756
+ 'dom_data_assertion',
1757
+ 'domDataAssertion',
1758
+ 'data_assertion',
1759
+ 'dataAssertion',
1760
+ 'dom_assertion',
1761
+ 'domAssertion',
1762
+ 'assertion'
1763
+ ], 1000);
1764
+ var proofArtifacts = cleanList(source.proof_artifacts || source.proofArtifacts || source.artifacts || source.artifact_paths || source.artifactPaths, 10, 500);
1765
+ var hasPathLikeArtifactName = proofArtifacts.some(function (artifact) { return /[/.\\]|json|artifact|aiqa|evidence/i.test(artifact); });
1766
+ if (proofArtifacts.length && hasPathLikeArtifactName && proofArtifacts.every(supportProofArtifactLooksVague)) {
1767
+ var derivedArtifact = firstSupportDiagnosisText(dataOrDomAssertion ? "DOM/data proof artifact: ".concat(dataOrDomAssertion) : '', expectedBusinessStateChange ? "before/after business data proof artifact: ".concat(expectedBusinessStateChange) : '');
1768
+ if (derivedArtifact && !proofArtifacts.includes(derivedArtifact)) {
1769
+ proofArtifacts.push(derivedArtifact);
1770
+ }
1771
+ }
1752
1772
  return {
1753
1773
  issue_class: issueClass,
1754
1774
  setup_state: pickText(source, ['setup_state', 'setupState', 'before', 'precondition'], 1000),
1755
1775
  action_under_test: pickText(source, ['action_under_test', 'actionUnderTest', 'action', 'steps'], 1000),
1756
- expected_business_state_change: pickText(source, ['expected_business_state_change', 'expectedBusinessStateChange', 'expected_change', 'expectedChange', 'after'], 1000),
1776
+ expected_business_state_change: expectedBusinessStateChange,
1757
1777
  prohibited_false_pass: pickText(source, ['prohibited_false_pass', 'prohibitedFalsePass', 'false_pass', 'falsePass'], 1000),
1758
- proof_artifacts: cleanList(source.proof_artifacts || source.proofArtifacts || source.artifacts || source.artifact_paths || source.artifactPaths, 10, 500),
1759
- data_or_dom_assertion: pickText(source, ['data_or_dom_assertion', 'dataOrDomAssertion', 'data_assertion', 'dataAssertion', 'dom_assertion', 'domAssertion', 'assertion'], 1000)
1778
+ proof_artifacts: proofArtifacts,
1779
+ data_or_dom_assertion: dataOrDomAssertion
1760
1780
  };
1761
1781
  }
1762
1782
  function supportDiagnosisNarrativeText(value, max) {
@@ -2419,10 +2439,35 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2419
2439
  var failingPathText = supportDiagnosisNarrativeText(rawFailingPath, 1200);
2420
2440
  var proofPlanRows = normalizeSupportDiagnosisProofPlanRows(rawProofPlan);
2421
2441
  var issueClass = normalizeIssueClass(source.issue_class || source.issueClass);
2442
+ var rawBusinessProofContract = proofPlanSource.business_proof_contract
2443
+ || proofPlanSource.businessProofContract
2444
+ || source.business_proof_contract
2445
+ || source.businessProofContract;
2446
+ var businessProofContractSource = cleanObject(rawBusinessProofContract);
2447
+ var contractSetupState = pickText(businessProofContractSource, ['setup_state', 'setupState', 'before', 'precondition'], 1000);
2448
+ var contractActionUnderTest = pickText(businessProofContractSource, ['action_under_test', 'actionUnderTest', 'action', 'steps'], 1000);
2449
+ var contractExpectedChange = pickText(businessProofContractSource, ['expected_business_state_change', 'expectedBusinessStateChange', 'expected_change', 'expectedChange', 'after'], 1000);
2450
+ var contractDataAssertion = pickText(businessProofContractSource, [
2451
+ 'data_or_dom_assertion',
2452
+ 'dataOrDomAssertion',
2453
+ 'dom_data_assertion',
2454
+ 'domDataAssertion',
2455
+ 'data_assertion',
2456
+ 'dataAssertion',
2457
+ 'dom_assertion',
2458
+ 'domAssertion',
2459
+ 'assertion'
2460
+ ], 1000);
2461
+ var contractArtifacts = cleanList(businessProofContractSource.proof_artifacts
2462
+ || businessProofContractSource.proofArtifacts
2463
+ || businessProofContractSource.artifacts
2464
+ || businessProofContractSource.artifact_paths
2465
+ || businessProofContractSource.artifactPaths, 10, 500);
2422
2466
  var featureRequestClassified = supportDiagnosisLooksLikeClassifiedFeatureRequest(source, issueCaseText, failingPathText, hypothesisText);
2423
2467
  var shouldDeriveLooseProofPlan = Array.isArray(rawProofPlan) || featureRequestClassified;
2424
2468
  var looseProofSubject = cleanText(issueCaseText || failingPathText || hypothesisText, 1200);
2425
- var proofPlanBefore = pickText(proofPlanSource, ['before', 'before_state', 'beforeState', 'precondition'], 1000);
2469
+ var proofPlanBefore = pickText(proofPlanSource, ['before', 'before_state', 'beforeState', 'precondition'], 1000)
2470
+ || contractSetupState;
2426
2471
  var proofPlanBeforeUnavailable = pickText(proofPlanSource, ['before_state_unavailable_reason', 'beforeStateUnavailableReason', 'before_unavailable_reason'], 1000)
2427
2472
  || (featureRequestClassified ? 'Before-state business proof is not available because this is classified as net-new feature scope; current evidence proves the requested route/workflow is not implemented yet.' : '');
2428
2473
  var derivedLooseBefore = shouldDeriveLooseProofPlan && looseProofSubject
@@ -2430,18 +2475,24 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2430
2475
  : '';
2431
2476
  var proofPlanBeforeResolved = proofPlanBefore || derivedLooseBefore;
2432
2477
  var proofPlanAction = pickText(proofPlanSource, ['action', 'browser_action', 'browserAction', 'steps'], 1000)
2478
+ || contractActionUnderTest
2433
2479
  || proofPlanRows.action
2434
2480
  || (shouldDeriveLooseProofPlan ? 'Execute the issue-specific workflow and inspect the affected data/rendering path.' : '');
2435
2481
  var proofPlanAfter = pickText(proofPlanSource, ['after', 'after_state', 'afterState', 'expected_after'], 1000)
2482
+ || contractExpectedChange
2436
2483
  || proofPlanRows.after
2437
2484
  || (shouldDeriveLooseProofPlan && looseProofSubject ? "The workflow produces the expected customer-facing business value instead of the reported wrong result for: ".concat(looseProofSubject) : '');
2438
2485
  var proofPlanBusinessAssertion = pickText(proofPlanSource, ['business_assertion', 'businessAssertion', 'assertion'], 1000)
2486
+ || contractExpectedChange
2487
+ || contractDataAssertion
2439
2488
  || proofPlanRows.business_assertion
2440
2489
  || (shouldDeriveLooseProofPlan && looseProofSubject ? "The customer-reported condition is resolved with business data proof: ".concat(looseProofSubject) : '');
2441
2490
  var proofPlanDataAssertion = pickText(proofPlanSource, ['data_assertion', 'dataAssertion', 'mongo_delta', 'mongoDelta'], 1000)
2491
+ || contractDataAssertion
2442
2492
  || proofPlanRows.data_assertion
2443
2493
  || (shouldDeriveLooseProofPlan ? 'DOM/data or Mongo proof shows the expected business value and does not show the reported wrong value.' : '');
2444
2494
  var proofPlanArtifactExpectation = pickText(proofPlanSource, ['artifact_expectation', 'artifactExpectation', 'artifact', 'screenshot'], 1000)
2495
+ || contractArtifacts.join(' | ').slice(0, 1000)
2445
2496
  || (shouldDeriveLooseProofPlan && proofPlanBusinessAssertion ? 'browser trace/screenshot plus persisted DOM/data or Mongo delta tied to the business assertion' : '');
2446
2497
  var derivedBusinessProofContract = shouldDeriveLooseProofPlan && proofPlanBusinessAssertion ? {
2447
2498
  issue_class: issueClass || source.issue_class || source.issueClass,
@@ -2456,7 +2507,7 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2456
2507
  ].filter(Boolean),
2457
2508
  data_or_dom_assertion: proofPlanDataAssertion || proofPlanBusinessAssertion
2458
2509
  } : undefined;
2459
- var businessProofContract = normalizeSupportDiagnosisBusinessProofContract(proofPlanSource.business_proof_contract || proofPlanSource.businessProofContract || source.business_proof_contract || source.businessProofContract, issueClass || source.issue_class || source.issueClass) || normalizeSupportDiagnosisBusinessProofContract(derivedBusinessProofContract, issueClass || source.issue_class || source.issueClass);
2510
+ var businessProofContract = normalizeSupportDiagnosisBusinessProofContract(rawBusinessProofContract, issueClass || source.issue_class || source.issueClass) || normalizeSupportDiagnosisBusinessProofContract(derivedBusinessProofContract, issueClass || source.issue_class || source.issueClass);
2460
2511
  var rawOwnerFiles = cleanList(source.owner_files || source.ownerFiles, 20, 500)
2461
2512
  .map(normalizeOwnerFilePath)
2462
2513
  .filter(Boolean);
@@ -2481,7 +2532,18 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2481
2532
  var ticketEvidenceText = ((_a = diagnosisEvidence.find(function (entry) { return entry.type === 'ticket'; })) === null || _a === void 0 ? void 0 : _a.summary) || '';
2482
2533
  var browserEvidenceText = ((_b = diagnosisEvidence.find(function (entry) { return entry.type === 'browser'; })) === null || _b === void 0 ? void 0 : _b.summary) || '';
2483
2534
  var rootCauseEvidenceText = ((_c = diagnosisEvidence.find(function (entry) { return SUPPORT_ROOT_CAUSE_EVIDENCE_TYPES.has(entry.type); })) === null || _c === void 0 ? void 0 : _c.summary) || '';
2484
- var explicitCustomerComplaint = pickText(issueCaseSource, ['customer_complaint', 'customerComplaint', 'complaint', 'request', 'summary'], 1200);
2535
+ var explicitCustomerComplaint = pickText(issueCaseSource, [
2536
+ 'customer_complaint',
2537
+ 'customerComplaint',
2538
+ 'customer_symptom',
2539
+ 'customerSymptom',
2540
+ 'symptom',
2541
+ 'reported_issue',
2542
+ 'reportedIssue',
2543
+ 'complaint',
2544
+ 'request',
2545
+ 'summary'
2546
+ ], 1200);
2485
2547
  var customerIssueCaseText = (function () {
2486
2548
  if (explicitCustomerComplaint) {
2487
2549
  return explicitCustomerComplaint;
@@ -2504,24 +2566,28 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2504
2566
  failingPathText,
2505
2567
  hypothesisText
2506
2568
  ].filter(Boolean).join(' '), 1200);
2507
- var routeModule = pickText(issueCaseSource, ['route_module', 'routeModule', 'route', 'module', 'screen'], 500)
2508
- || pickText(source, ['route_module', 'routeModule', 'module', 'screen'], 500)
2569
+ var routeModule = pickText(issueCaseSource, ['route_module', 'routeModule', 'route', 'module', 'workflow', 'screen', 'route_or_module', 'routeOrModule', 'module_path', 'modulePath'], 500)
2570
+ || pickText(source, ['route_module', 'routeModule', 'module', 'workflow', 'screen', 'route_or_module', 'routeOrModule', 'module_path', 'modulePath'], 500)
2509
2571
  || pickText(failingPathSource, ['route', 'module', 'path', 'description', 'reported', 'verified', 'reported_path', 'reportedPath', 'verified_path', 'verifiedPath'], 500)
2510
2572
  || failingPathText
2511
2573
  || (featureRequestClassified ? 'net-new support feature workflow' : '');
2512
- var expectedResult = pickText(issueCaseSource, ['expected_result', 'expectedResult', 'expected'], 1000)
2513
- || pickText(source, ['expected_result', 'expectedResult', 'expected', 'primary_goal', 'primaryGoal', 'requested_behavior', 'requestedBehavior'], 1000)
2574
+ var expectedResult = pickText(issueCaseSource, ['expected_result', 'expectedResult', 'expected', 'expected_business_result', 'expectedBusinessResult', 'expected_business_state', 'expectedBusinessState', 'desired_result', 'desiredResult', 'desired_outcome', 'desiredOutcome'], 1000)
2575
+ || pickText(source, ['expected_result', 'expectedResult', 'expected', 'expected_business_result', 'expectedBusinessResult', 'primary_goal', 'primaryGoal', 'requested_behavior', 'requestedBehavior', 'desired_result', 'desiredResult'], 1000)
2514
2576
  || (!featureRequestClassified && issueCasePrimaryText ? "Expected customer-facing business result from ticket evidence: ".concat(issueCasePrimaryText) : '')
2515
2577
  || (featureRequestClassified && issueCasePrimaryText ? "Implement the requested workflow: ".concat(issueCasePrimaryText) : '');
2516
- var observedResult = pickText(issueCaseSource, ['observed_result', 'observedResult', 'observed', 'actual'], 1000)
2517
- || pickText(source, ['observed_result', 'observedResult', 'observed', 'actual', 'current_state', 'currentState'], 1000)
2578
+ var observedResult = pickText(issueCaseSource, ['observed_result', 'observedResult', 'observed', 'actual', 'actual_result', 'actualResult', 'current_state', 'currentState', 'customer_symptom', 'customerSymptom', 'symptom'], 1000)
2579
+ || pickText(source, ['observed_result', 'observedResult', 'observed', 'actual', 'actual_result', 'actualResult', 'current_state', 'currentState', 'customer_symptom', 'customerSymptom'], 1000)
2518
2580
  || (!featureRequestClassified && (browserEvidenceText || issueCasePrimaryText) ? "Observed/reported wrong business result from ticket or screenshot evidence: ".concat(browserEvidenceText || issueCasePrimaryText) : '')
2519
2581
  || (featureRequestClassified ? "Current repo evidence indicates no implemented route/module for ".concat(routeModule || 'the requested workflow', ".") : '');
2520
- var accountCustomerContext = pickText(issueCaseSource, ['account_customer_context', 'accountCustomerContext', 'account', 'customer', 'user', 'context'], 800)
2521
- || pickText(source, ['account_customer_context', 'accountCustomerContext', 'affected_account_user', 'affectedAccountUser', 'account', 'customer', 'client', 'user', 'context'], 800)
2582
+ var accountCustomerContext = pickText(issueCaseSource, ['account_customer_context', 'accountCustomerContext', 'account_context', 'accountContext', 'customer_context', 'customerContext', 'client_context', 'clientContext', 'affected_customer', 'affectedCustomer', 'account', 'customer', 'client', 'user', 'context', 'reporter'], 800)
2583
+ || pickText(source, ['account_customer_context', 'accountCustomerContext', 'affected_account_user', 'affectedAccountUser', 'account_context', 'accountContext', 'customer_context', 'customerContext', 'client_context', 'clientContext', 'affected_customer', 'affectedCustomer', 'account', 'customer', 'client', 'user', 'context', 'reporter'], 800)
2522
2584
  || (issueCasePrimaryText ? 'Customer/account context from support ticket intake and hydrated support attachments.' : '')
2523
2585
  || (featureRequestClassified ? 'Customer/account context from support ticket intake.' : '');
2524
2586
  var rawReproductionStatus = issueCaseSource.reproduction_status || issueCaseSource.reproductionStatus || source.reproduction_status;
2587
+ var explicitReproductionBlocker = pickText(issueCaseSource, ['reproduction_blocker', 'reproductionBlocker', 'runtime_blocker', 'runtimeBlocker', 'blocked_reason', 'blockedReason', 'blocker', 'blocked_by', 'blockedBy'], 1000);
2588
+ var inferredReproductionBlocked = /\b(?:runtime\s+)?reproduction\s+(?:is\s+)?blocked\b|\bno accessible staged runtime\b|\bstaged (?:mongo|log|runtime) artifacts?.{0,80}\b(?:not accessible|unavailable|missing)\b|\b(?:cannot|unable to) reproduce\b/i.test(issueCaseText);
2589
+ var inferredReproductionBlocker = explicitReproductionBlocker
2590
+ || (inferredReproductionBlocked ? issueCaseText : '');
2525
2591
  var hasRuntimeReproductionEvidence = diagnosisEvidence.some(function (entry) { return SUPPORT_REPRODUCTION_EVIDENCE_TYPES.has(entry.type); });
2526
2592
  var explicitHypothesisEvidence = collectSupportDiagnosisTextListFromValues([
2527
2593
  hypothesisSource.evidence,
@@ -2542,8 +2608,8 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2542
2608
  account_customer_context: accountCustomerContext,
2543
2609
  reproduction_status: rawReproductionStatus
2544
2610
  ? normalizeReproductionStatus(rawReproductionStatus)
2545
- : (featureRequestClassified || !hasRuntimeReproductionEvidence ? 'classified' : 'reproduced'),
2546
- reproduction_blocker: pickText(issueCaseSource, ['reproduction_blocker', 'reproductionBlocker', 'blocked_reason', 'blockedReason'], 1000)
2611
+ : (inferredReproductionBlocker ? 'blocked' : (featureRequestClassified || !hasRuntimeReproductionEvidence ? 'classified' : 'reproduced')),
2612
+ reproduction_blocker: inferredReproductionBlocker
2547
2613
  },
2548
2614
  issue_class: issueClass || 'missing_wrong_data',
2549
2615
  accepted_hypothesis: {