@resolveio/server-lib 22.3.214 → 22.3.215

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.214",
3
+ "version": "22.3.215",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "package": "./build_package.sh",
@@ -130,7 +130,7 @@ function cleanListEntryText(value, max) {
130
130
  if (value && typeof value === 'object' && !Array.isArray(value)) {
131
131
  var source = value;
132
132
  var hypothesis = cleanListEntryText(source.hypothesis, Math.floor(max / 2));
133
- var whyRejected = cleanListEntryText(source.why_rejected || source.whyRejected || source.reason_rejected || source.reasonRejected || source.reason, Math.floor(max / 2));
133
+ var whyRejected = cleanListEntryText(source.why_rejected || source.whyRejected || source.reason_rejected || source.reasonRejected || source.rejection_reason || source.rejectionReason || source.reason, Math.floor(max / 2));
134
134
  if (hypothesis && whyRejected) {
135
135
  return "".concat(hypothesis, " rejected because ").concat(whyRejected).slice(0, max);
136
136
  }
@@ -152,9 +152,13 @@ function cleanListEntryText(value, max) {
152
152
  'detail',
153
153
  'message',
154
154
  'description',
155
+ 'rationale',
155
156
  'proof_required',
156
157
  'proofRequired',
158
+ 'rejection_reason',
159
+ 'rejectionReason',
157
160
  'reason',
161
+ 'fact',
158
162
  'value',
159
163
  'label',
160
164
  'id'
@@ -1047,7 +1051,7 @@ function normalizeSupportDiagnosisEvidence(values, ownerFiles) {
1047
1051
  .map(function (entry) {
1048
1052
  var type = cleanText(entry.type, 80).toLowerCase();
1049
1053
  var artifactPath = cleanText(entry.artifactPath || entry.artifact_path || entry.path || entry.file, 500);
1050
- var summary = cleanText(entry.summary || entry.detail || entry.message || entry.evidence || entry.reason || entry.fact || entry.description || entry.proof_required || entry.proofRequired, 1200)
1054
+ var summary = cleanText(entry.summary || entry.detail || entry.message || entry.evidence || entry.reason || entry.rejection_reason || entry.rejectionReason || entry.fact || entry.description || entry.proof_required || entry.proofRequired, 1200)
1051
1055
  || (artifactPath ? "Evidence from ".concat(artifactPath) : '');
1052
1056
  var evidenceText = [summary, artifactPath].filter(Boolean).join(' ');
1053
1057
  var inferredType = (function () {
@@ -1746,7 +1750,7 @@ function supportDiagnosisNarrativeText(value, max) {
1746
1750
  return '';
1747
1751
  }
1748
1752
  var hypothesis = cleanText(source.hypothesis, Math.floor(max / 2));
1749
- var whyRejected = cleanText(source.why_rejected || source.whyRejected || source.reason_rejected || source.reasonRejected || source.reason, Math.floor(max / 2));
1753
+ var whyRejected = cleanText(source.why_rejected || source.whyRejected || source.reason_rejected || source.reasonRejected || source.rejection_reason || source.rejectionReason || source.reason, Math.floor(max / 2));
1750
1754
  if (hypothesis && whyRejected) {
1751
1755
  return "".concat(hypothesis, " rejected because ").concat(whyRejected).slice(0, max);
1752
1756
  }
@@ -1754,6 +1758,7 @@ function supportDiagnosisNarrativeText(value, max) {
1754
1758
  'summary',
1755
1759
  'detail',
1756
1760
  'description',
1761
+ 'rationale',
1757
1762
  'statement',
1758
1763
  'issue_case',
1759
1764
  'issueCase',
@@ -1766,10 +1771,16 @@ function supportDiagnosisNarrativeText(value, max) {
1766
1771
  'route',
1767
1772
  'path_chain',
1768
1773
  'pathChain',
1774
+ 'reported_path',
1775
+ 'reportedPath',
1776
+ 'verified_path',
1777
+ 'verifiedPath',
1769
1778
  'assessment',
1770
1779
  'path',
1771
1780
  'proof_required',
1772
1781
  'proofRequired',
1782
+ 'rejection_reason',
1783
+ 'rejectionReason',
1773
1784
  'reason',
1774
1785
  'fact'
1775
1786
  ], max);
@@ -1861,6 +1872,7 @@ function normalizeOwnerFilePath(value) {
1861
1872
  .replace(/\\/g, '/')
1862
1873
  .replace(/^\.\/+/, '')
1863
1874
  .replace(/^\/+/, '')
1875
+ .replace(/:\d+(?:-\d+)?$/g, '')
1864
1876
  .replace(/\s+$/g, '');
1865
1877
  try {
1866
1878
  for (var _b = __values([
@@ -2345,15 +2357,23 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2345
2357
  var ticketEvidenceText = ((_a = diagnosisEvidence.find(function (entry) { return entry.type === 'ticket'; })) === null || _a === void 0 ? void 0 : _a.summary) || '';
2346
2358
  var browserEvidenceText = ((_b = diagnosisEvidence.find(function (entry) { return entry.type === 'browser'; })) === null || _b === void 0 ? void 0 : _b.summary) || '';
2347
2359
  var rootCauseEvidenceText = ((_c = diagnosisEvidence.find(function (entry) { return SUPPORT_ROOT_CAUSE_EVIDENCE_TYPES.has(entry.type); })) === null || _c === void 0 ? void 0 : _c.summary) || '';
2360
+ var explicitCustomerComplaint = pickText(issueCaseSource, ['customer_complaint', 'customerComplaint', 'complaint', 'request', 'summary'], 1200);
2348
2361
  var customerIssueCaseText = (function () {
2362
+ if (explicitCustomerComplaint) {
2363
+ return explicitCustomerComplaint;
2364
+ }
2365
+ var evidenceCustomerText = cleanText([ticketEvidenceText, browserEvidenceText]
2366
+ .filter(Boolean)
2367
+ .join(' '), 1200);
2368
+ if (evidenceCustomerText) {
2369
+ return evidenceCustomerText;
2370
+ }
2349
2371
  var issueText = cleanText(issueCaseText, 1200);
2350
2372
  if (issueText && !supportDiagnosisTextLooksGeneric(issueText, 18)
2351
2373
  && !/\b(general inquiry|existing behavior|not a confirmed runtime failure)\b/i.test(issueText)) {
2352
2374
  return issueText;
2353
2375
  }
2354
- return cleanText([ticketEvidenceText, browserEvidenceText]
2355
- .filter(Boolean)
2356
- .join(' '), 1200);
2376
+ return '';
2357
2377
  })();
2358
2378
  var issueCasePrimaryText = customerIssueCaseText || cleanText([
2359
2379
  rootCauseEvidenceText,
@@ -2362,7 +2382,7 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2362
2382
  ].filter(Boolean).join(' '), 1200);
2363
2383
  var routeModule = pickText(issueCaseSource, ['route_module', 'routeModule', 'route', 'module', 'screen'], 500)
2364
2384
  || pickText(source, ['route_module', 'routeModule', 'module', 'screen'], 500)
2365
- || pickText(failingPathSource, ['route', 'module', 'path', 'description'], 500)
2385
+ || pickText(failingPathSource, ['route', 'module', 'path', 'description', 'reported_path', 'reportedPath', 'verified_path', 'verifiedPath'], 500)
2366
2386
  || failingPathText
2367
2387
  || (featureRequestClassified ? 'net-new support feature workflow' : '');
2368
2388
  var expectedResult = pickText(issueCaseSource, ['expected_result', 'expectedResult', 'expected'], 1000)
@@ -2381,7 +2401,7 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2381
2401
  var hasRuntimeReproductionEvidence = diagnosisEvidence.some(function (entry) { return SUPPORT_REPRODUCTION_EVIDENCE_TYPES.has(entry.type); });
2382
2402
  var gate = {
2383
2403
  issue_case: {
2384
- customer_complaint: pickText(issueCaseSource, ['customer_complaint', 'customerComplaint', 'complaint', 'request', 'summary'], 1200) || customerIssueCaseText,
2404
+ customer_complaint: explicitCustomerComplaint || customerIssueCaseText,
2385
2405
  expected_result: expectedResult,
2386
2406
  observed_result: observedResult,
2387
2407
  route_module: routeModule,
@@ -2397,8 +2417,8 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2397
2417
  || hypothesisText,
2398
2418
  falsifiable_test: pickText(hypothesisSource, ['falsifiable_test', 'falsifiableTest', 'test', 'proof', 'falsifier'], 1000)
2399
2419
  || (failingPathText ? "Verify the accepted hypothesis against the failing path evidence: ".concat(failingPathText) : ''),
2400
- evidence: cleanList(hypothesisSource.evidence || source.hypothesis_evidence || source.hypothesisEvidence, 10, 800).length
2401
- ? cleanList(hypothesisSource.evidence || source.hypothesis_evidence || source.hypothesisEvidence, 10, 800)
2420
+ evidence: cleanList(hypothesisSource.evidence || hypothesisSource.evidence_refs || hypothesisSource.evidenceRefs || source.hypothesis_evidence || source.hypothesisEvidence, 10, 800).length
2421
+ ? cleanList(hypothesisSource.evidence || hypothesisSource.evidence_refs || hypothesisSource.evidenceRefs || source.hypothesis_evidence || source.hypothesisEvidence, 10, 800)
2402
2422
  : diagnosisEvidence.map(function (entry) { return [entry.artifactPath, entry.summary].filter(Boolean).join(': '); }).filter(Boolean).slice(0, 10)
2403
2423
  },
2404
2424
  rejected_alternatives: normalizeSupportDiagnosisRejectedAlternatives(source.rejected_alternatives || source.rejectedAlternatives),
@@ -2407,7 +2427,7 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
2407
2427
  backend: pickText(failingPathSource, ['backend', 'backend_path', 'backendPath', 'methodPublicationPath'], 700),
2408
2428
  shared_library: pickText(failingPathSource, ['shared_library', 'sharedLibrary', 'library', 'lib'], 700),
2409
2429
  data_query: pickText(failingPathSource, ['data_query', 'dataQuery', 'query'], 700),
2410
- description: pickText(failingPathSource, ['description', 'path_chain', 'pathChain', 'path', 'assessment', 'summary', 'route'], 1200) || failingPathText
2430
+ description: pickText(failingPathSource, ['description', 'path_chain', 'pathChain', 'reported_path', 'reportedPath', 'verified_path', 'verifiedPath', 'path', 'assessment', 'summary', 'route'], 1200) || failingPathText
2411
2431
  },
2412
2432
  owner_files: ownerFiles,
2413
2433
  proof_plan: {