@resolveio/server-lib 22.3.212 → 22.3.214
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/methods/ai-terminal.js +342 -206
- package/methods/ai-terminal.js.map +1 -1
- package/package.json +1 -1
- package/util/support-runner-v5.js +168 -33
- package/util/support-runner-v5.js.map +1 -1
package/package.json
CHANGED
|
@@ -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, Math.floor(max / 2));
|
|
133
|
+
var whyRejected = cleanListEntryText(source.why_rejected || source.whyRejected || source.reason_rejected || source.reasonRejected || 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
|
}
|
|
@@ -149,8 +149,11 @@ function cleanListEntryText(value, max) {
|
|
|
149
149
|
'artifactPath',
|
|
150
150
|
'artifact_path',
|
|
151
151
|
'summary',
|
|
152
|
+
'detail',
|
|
152
153
|
'message',
|
|
153
154
|
'description',
|
|
155
|
+
'proof_required',
|
|
156
|
+
'proofRequired',
|
|
154
157
|
'reason',
|
|
155
158
|
'value',
|
|
156
159
|
'label',
|
|
@@ -924,6 +927,13 @@ function normalizeIssueClass(value) {
|
|
|
924
927
|
upload: 'upload_import',
|
|
925
928
|
import: 'upload_import',
|
|
926
929
|
upload_import: 'upload_import',
|
|
930
|
+
behavior: 'missing_wrong_data',
|
|
931
|
+
workflow_behavior: 'missing_wrong_data',
|
|
932
|
+
general: 'missing_wrong_data',
|
|
933
|
+
general_inquiry: 'missing_wrong_data',
|
|
934
|
+
customer_inquiry: 'missing_wrong_data',
|
|
935
|
+
data_mismatch: 'missing_wrong_data',
|
|
936
|
+
warehouse_mismatch: 'missing_wrong_data',
|
|
927
937
|
route_auth: 'route_auth_hydration',
|
|
928
938
|
auth_hydration: 'route_auth_hydration',
|
|
929
939
|
route_auth_hydration: 'route_auth_hydration',
|
|
@@ -948,24 +958,88 @@ function normalizeReproductionStatus(value) {
|
|
|
948
958
|
}
|
|
949
959
|
return 'reproduced';
|
|
950
960
|
}
|
|
951
|
-
function
|
|
961
|
+
function inferSupportDiagnosisEvidenceTypeFromText(value, artifactPath) {
|
|
962
|
+
if (artifactPath === void 0) { artifactPath = ''; }
|
|
963
|
+
var text = cleanText([value, artifactPath].filter(Boolean).join(' '), 2000).toLowerCase();
|
|
964
|
+
var pathText = cleanText(artifactPath, 500).toLowerCase();
|
|
965
|
+
if (/\b(screenshot|screen shot)\b/i.test(text) || /\.(?:png|jpe?g|webp|gif)$/i.test(pathText)) {
|
|
966
|
+
return 'browser';
|
|
967
|
+
}
|
|
968
|
+
if (/\b(angular|server|client|src|methods|publications|routing|permission|component|template)\b/i.test(pathText)) {
|
|
969
|
+
return 'code';
|
|
970
|
+
}
|
|
971
|
+
if (/\b(browser|dom|click|route|page|playwright|puppeteer)\b/i.test(text)) {
|
|
972
|
+
return 'browser';
|
|
973
|
+
}
|
|
974
|
+
if (/\b(ticket|customer|client|reporter|reported|support request|manual-ticket|email\.metadata)\b/i.test(text)) {
|
|
975
|
+
return 'ticket';
|
|
976
|
+
}
|
|
977
|
+
if (/\b(mongo|database|collection|document|query|findone|aggregate)\b/i.test(text)) {
|
|
978
|
+
return 'mongo';
|
|
979
|
+
}
|
|
980
|
+
if (/\b(log|trace|stack|console|network)\b/i.test(text)) {
|
|
981
|
+
return 'log';
|
|
982
|
+
}
|
|
983
|
+
if (/\b(commit|git|branch|pr)\b/i.test(text)) {
|
|
984
|
+
return 'commit';
|
|
985
|
+
}
|
|
986
|
+
if (/\b(qa|test artifact|assertion)\b/i.test(text)) {
|
|
987
|
+
return 'qa';
|
|
988
|
+
}
|
|
989
|
+
if (/\b(component|template|publication|method|model|route|service|resolver|subscription|subscribe|render|renders|stores|persists|returns|finds?|source|repo|repository|angular|server|client|src)\b/i.test(text)) {
|
|
990
|
+
return 'code';
|
|
991
|
+
}
|
|
992
|
+
return 'other';
|
|
993
|
+
}
|
|
994
|
+
function supportLooseOwnerFileMatch(value, ownerFile) {
|
|
995
|
+
var normalizedOwner = normalizeOwnerFilePath(ownerFile);
|
|
996
|
+
var text = cleanText(value, 2000).replace(/[\\/.]+/g, ' ').replace(/[_-]+/g, ' ').toLowerCase();
|
|
997
|
+
var base = normalizedOwner.split('/').pop() || normalizedOwner;
|
|
998
|
+
var stem = base.replace(/\.[a-z0-9]+$/i, '');
|
|
999
|
+
var stemWithoutAngularKind = stem.replace(/\.(component|service|module|directive|pipe|model|resolver|guard|template)$/i, '');
|
|
1000
|
+
var looseStem = stem.replace(/[._-]+/g, ' ').toLowerCase();
|
|
1001
|
+
var looseStemWithoutKind = stemWithoutAngularKind.replace(/[._-]+/g, ' ').toLowerCase();
|
|
1002
|
+
var compactStem = stem.replace(/[^a-z0-9]+/gi, '').toLowerCase();
|
|
1003
|
+
var compactStemWithoutKind = stemWithoutAngularKind.replace(/[^a-z0-9]+/gi, '').toLowerCase();
|
|
1004
|
+
var compactText = text.replace(/[^a-z0-9]+/g, '');
|
|
1005
|
+
return !!normalizedOwner && (supportNormalizedPathMentioned(value, normalizedOwner)
|
|
1006
|
+
|| (!!looseStem && looseStem.length >= 5 && text.includes(looseStem))
|
|
1007
|
+
|| (!!looseStemWithoutKind && looseStemWithoutKind.length >= 5 && text.includes(looseStemWithoutKind))
|
|
1008
|
+
|| (!!compactStem && compactStem.length >= 5 && compactText.includes(compactStem))
|
|
1009
|
+
|| (!!compactStemWithoutKind && compactStemWithoutKind.length >= 5 && compactText.includes(compactStemWithoutKind)));
|
|
1010
|
+
}
|
|
1011
|
+
function supportLooseEvidenceOwnerFiles(value, ownerFiles) {
|
|
1012
|
+
return ownerFiles
|
|
1013
|
+
.map(normalizeOwnerFilePath)
|
|
1014
|
+
.filter(Boolean)
|
|
1015
|
+
.filter(function (ownerFile) { return supportLooseOwnerFileMatch(value, ownerFile); })
|
|
1016
|
+
.slice(0, 8);
|
|
1017
|
+
}
|
|
1018
|
+
function normalizeSupportDiagnosisEvidence(values, ownerFiles) {
|
|
1019
|
+
if (ownerFiles === void 0) { ownerFiles = []; }
|
|
952
1020
|
var allowed = new Set(['ticket', 'browser', 'mongo', 'log', 'code', 'commit', 'qa', 'other']);
|
|
953
1021
|
if (!Array.isArray(values)) {
|
|
954
1022
|
var summary = cleanText(values, 1200);
|
|
955
1023
|
return summary ? [{
|
|
956
|
-
id: "evidence-".concat(hashResolveIOSupportV5Evidence({ type:
|
|
957
|
-
type:
|
|
958
|
-
summary: summary
|
|
1024
|
+
id: "evidence-".concat(hashResolveIOSupportV5Evidence({ type: inferSupportDiagnosisEvidenceTypeFromText(summary), summary: summary }).slice(0, 12)),
|
|
1025
|
+
type: inferSupportDiagnosisEvidenceTypeFromText(summary),
|
|
1026
|
+
summary: summary,
|
|
1027
|
+
ownerFiles: supportLooseEvidenceOwnerFiles(summary, ownerFiles),
|
|
1028
|
+
artifactPath: supportLooseEvidenceOwnerFiles(summary, ownerFiles)[0]
|
|
959
1029
|
}] : [];
|
|
960
1030
|
}
|
|
961
1031
|
var stringEvidence = values
|
|
962
1032
|
.filter(function (entry) { return typeof entry === 'string'; })
|
|
963
1033
|
.map(function (entry) {
|
|
964
1034
|
var summary = cleanText(entry, 1200);
|
|
1035
|
+
var matchedOwnerFiles = supportLooseEvidenceOwnerFiles(summary, ownerFiles);
|
|
1036
|
+
var type = matchedOwnerFiles.length ? 'code' : inferSupportDiagnosisEvidenceTypeFromText(summary);
|
|
965
1037
|
return {
|
|
966
|
-
id: "evidence-".concat(hashResolveIOSupportV5Evidence({ type:
|
|
967
|
-
type:
|
|
968
|
-
summary: summary
|
|
1038
|
+
id: "evidence-".concat(hashResolveIOSupportV5Evidence({ type: type, summary: summary, ownerFiles: matchedOwnerFiles }).slice(0, 12)),
|
|
1039
|
+
type: type,
|
|
1040
|
+
summary: summary,
|
|
1041
|
+
artifactPath: type === 'code' ? matchedOwnerFiles[0] : undefined,
|
|
1042
|
+
ownerFiles: matchedOwnerFiles
|
|
969
1043
|
};
|
|
970
1044
|
});
|
|
971
1045
|
var objectEvidence = values
|
|
@@ -973,30 +1047,45 @@ function normalizeSupportDiagnosisEvidence(values) {
|
|
|
973
1047
|
.map(function (entry) {
|
|
974
1048
|
var type = cleanText(entry.type, 80).toLowerCase();
|
|
975
1049
|
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)
|
|
1051
|
+
|| (artifactPath ? "Evidence from ".concat(artifactPath) : '');
|
|
1052
|
+
var evidenceText = [summary, artifactPath].filter(Boolean).join(' ');
|
|
976
1053
|
var inferredType = (function () {
|
|
977
|
-
|
|
1054
|
+
var inferredFromText = inferSupportDiagnosisEvidenceTypeFromText(summary, artifactPath);
|
|
1055
|
+
if (allowed.has(type) && type !== 'other') {
|
|
1056
|
+
if (type === 'ticket' && inferredFromText === 'browser') {
|
|
1057
|
+
return 'browser';
|
|
1058
|
+
}
|
|
978
1059
|
return type;
|
|
979
1060
|
}
|
|
980
|
-
if (/\b(
|
|
1061
|
+
if (/\b(screenshot|screen shot)\b/i.test(evidenceText)
|
|
1062
|
+
|| /\.(?:png|jpe?g|webp|gif)$/i.test(artifactPath)) {
|
|
1063
|
+
return 'browser';
|
|
1064
|
+
}
|
|
1065
|
+
if (/\b(angular|server|client|src|methods|publications|routing|permission|component|template)\b/i.test(artifactPath)) {
|
|
1066
|
+
return 'code';
|
|
1067
|
+
}
|
|
1068
|
+
if (/\b(playwright|puppeteer|browser|dom|click|route|page)\b/i.test(evidenceText)) {
|
|
1069
|
+
return 'browser';
|
|
1070
|
+
}
|
|
1071
|
+
if (/\b(ticket|manual-ticket|support request|customer|reporter|email\.metadata)\b/i.test(evidenceText)) {
|
|
981
1072
|
return 'ticket';
|
|
982
1073
|
}
|
|
983
|
-
if (/\b(commit|git)\b/i.test(
|
|
1074
|
+
if (/\b(commit|git)\b/i.test(evidenceText)) {
|
|
984
1075
|
return 'commit';
|
|
985
1076
|
}
|
|
986
|
-
if (/\b(mongo|query|database|collection)\b/i.test(
|
|
1077
|
+
if (/\b(mongo|query|database|collection)\b/i.test(evidenceText)) {
|
|
987
1078
|
return 'mongo';
|
|
988
1079
|
}
|
|
989
|
-
if (/\b(log|trace)\b/i.test(
|
|
1080
|
+
if (/\b(log|trace|console|network)\b/i.test(evidenceText)) {
|
|
990
1081
|
return 'log';
|
|
991
1082
|
}
|
|
992
|
-
if (/\b(angular|server|client|src|methods|publications|routing|permission|component)\b/i.test(
|
|
1083
|
+
if (/\b(angular|server|client|src|methods|publications|routing|permission|component|template)\b/i.test(evidenceText)) {
|
|
993
1084
|
return 'code';
|
|
994
1085
|
}
|
|
995
|
-
return
|
|
1086
|
+
return inferredFromText;
|
|
996
1087
|
})();
|
|
997
1088
|
var normalizedType = inferredType;
|
|
998
|
-
var summary = cleanText(entry.summary || entry.message || entry.evidence || entry.reason || entry.fact || entry.description, 1200)
|
|
999
|
-
|| (artifactPath ? "Evidence from ".concat(artifactPath) : '');
|
|
1000
1089
|
var ownerFiles = cleanList(entry.ownerFiles || entry.owner_files || entry.files, 12, 500)
|
|
1001
1090
|
.map(normalizeOwnerFilePath)
|
|
1002
1091
|
.filter(Boolean);
|
|
@@ -1656,8 +1745,14 @@ function supportDiagnosisNarrativeText(value, max) {
|
|
|
1656
1745
|
if (!Object.keys(source).length) {
|
|
1657
1746
|
return '';
|
|
1658
1747
|
}
|
|
1748
|
+
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));
|
|
1750
|
+
if (hypothesis && whyRejected) {
|
|
1751
|
+
return "".concat(hypothesis, " rejected because ").concat(whyRejected).slice(0, max);
|
|
1752
|
+
}
|
|
1659
1753
|
var direct = pickText(source, [
|
|
1660
1754
|
'summary',
|
|
1755
|
+
'detail',
|
|
1661
1756
|
'description',
|
|
1662
1757
|
'statement',
|
|
1663
1758
|
'issue_case',
|
|
@@ -1668,18 +1763,19 @@ function supportDiagnosisNarrativeText(value, max) {
|
|
|
1668
1763
|
'expectedResult',
|
|
1669
1764
|
'observed_result',
|
|
1670
1765
|
'observedResult',
|
|
1766
|
+
'route',
|
|
1767
|
+
'path_chain',
|
|
1768
|
+
'pathChain',
|
|
1769
|
+
'assessment',
|
|
1671
1770
|
'path',
|
|
1771
|
+
'proof_required',
|
|
1772
|
+
'proofRequired',
|
|
1672
1773
|
'reason',
|
|
1673
1774
|
'fact'
|
|
1674
1775
|
], max);
|
|
1675
1776
|
if (direct) {
|
|
1676
1777
|
return direct;
|
|
1677
1778
|
}
|
|
1678
|
-
var hypothesis = cleanText(source.hypothesis, Math.floor(max / 2));
|
|
1679
|
-
var whyRejected = cleanText(source.why_rejected || source.whyRejected || source.reason_rejected || source.reasonRejected, Math.floor(max / 2));
|
|
1680
|
-
if (hypothesis && whyRejected) {
|
|
1681
|
-
return "".concat(hypothesis, " rejected because ").concat(whyRejected).slice(0, max);
|
|
1682
|
-
}
|
|
1683
1779
|
var routeModulePermission = cleanText(source.route_module_permission_gate || source.routeModulePermissionGate, Math.floor(max / 2));
|
|
1684
1780
|
var templateGate = cleanText(source.template_conditional_rendering_gate || source.templateConditionalRenderingGate, Math.floor(max / 2));
|
|
1685
1781
|
var backingGate = cleanText(source.backing_role_group_config_publications_gate || source.backingRoleGroupConfigPublicationsGate, Math.floor(max / 2));
|
|
@@ -2164,6 +2260,7 @@ function evaluateResolveIOSupportDiagnosisEvidenceQuality(value) {
|
|
|
2164
2260
|
};
|
|
2165
2261
|
}
|
|
2166
2262
|
function normalizeResolveIOSupportDiagnosisGate(value, now) {
|
|
2263
|
+
var _a, _b, _c;
|
|
2167
2264
|
var rootSource = cleanObject(value);
|
|
2168
2265
|
var source = cleanObject(rootSource.support_diagnosis_gate
|
|
2169
2266
|
|| rootSource.supportDiagnosisGate
|
|
@@ -2188,18 +2285,31 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
|
|
|
2188
2285
|
var issueClass = normalizeIssueClass(source.issue_class || source.issueClass);
|
|
2189
2286
|
var featureRequestClassified = supportDiagnosisLooksLikeClassifiedFeatureRequest(source, issueCaseText, failingPathText, hypothesisText);
|
|
2190
2287
|
var shouldDeriveLooseProofPlan = Array.isArray(rawProofPlan) || featureRequestClassified;
|
|
2288
|
+
var looseProofSubject = cleanText(issueCaseText || failingPathText || hypothesisText, 1200);
|
|
2191
2289
|
var proofPlanBefore = pickText(proofPlanSource, ['before', 'before_state', 'beforeState', 'precondition'], 1000);
|
|
2192
2290
|
var proofPlanBeforeUnavailable = pickText(proofPlanSource, ['before_state_unavailable_reason', 'beforeStateUnavailableReason', 'before_unavailable_reason'], 1000)
|
|
2193
2291
|
|| (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.' : '');
|
|
2194
|
-
var
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
var
|
|
2292
|
+
var derivedLooseBefore = shouldDeriveLooseProofPlan && looseProofSubject
|
|
2293
|
+
? "Capture the before-state business value from the reported workflow: ".concat(looseProofSubject)
|
|
2294
|
+
: '';
|
|
2295
|
+
var proofPlanBeforeResolved = proofPlanBefore || derivedLooseBefore;
|
|
2296
|
+
var proofPlanAction = pickText(proofPlanSource, ['action', 'browser_action', 'browserAction', 'steps'], 1000)
|
|
2297
|
+
|| proofPlanRows.action
|
|
2298
|
+
|| (shouldDeriveLooseProofPlan ? 'Execute the issue-specific workflow and inspect the affected data/rendering path.' : '');
|
|
2299
|
+
var proofPlanAfter = pickText(proofPlanSource, ['after', 'after_state', 'afterState', 'expected_after'], 1000)
|
|
2300
|
+
|| proofPlanRows.after
|
|
2301
|
+
|| (shouldDeriveLooseProofPlan && looseProofSubject ? "The workflow produces the expected customer-facing business value instead of the reported wrong result for: ".concat(looseProofSubject) : '');
|
|
2302
|
+
var proofPlanBusinessAssertion = pickText(proofPlanSource, ['business_assertion', 'businessAssertion', 'assertion'], 1000)
|
|
2303
|
+
|| proofPlanRows.business_assertion
|
|
2304
|
+
|| (shouldDeriveLooseProofPlan && looseProofSubject ? "The customer-reported condition is resolved with business data proof: ".concat(looseProofSubject) : '');
|
|
2305
|
+
var proofPlanDataAssertion = pickText(proofPlanSource, ['data_assertion', 'dataAssertion', 'mongo_delta', 'mongoDelta'], 1000)
|
|
2306
|
+
|| proofPlanRows.data_assertion
|
|
2307
|
+
|| (shouldDeriveLooseProofPlan ? 'DOM/data or Mongo proof shows the expected business value and does not show the reported wrong value.' : '');
|
|
2198
2308
|
var proofPlanArtifactExpectation = pickText(proofPlanSource, ['artifact_expectation', 'artifactExpectation', 'artifact', 'screenshot'], 1000)
|
|
2199
2309
|
|| (shouldDeriveLooseProofPlan && proofPlanBusinessAssertion ? 'browser trace/screenshot plus persisted DOM/data or Mongo delta tied to the business assertion' : '');
|
|
2200
2310
|
var derivedBusinessProofContract = shouldDeriveLooseProofPlan && proofPlanBusinessAssertion ? {
|
|
2201
2311
|
issue_class: issueClass || source.issue_class || source.issueClass,
|
|
2202
|
-
setup_state:
|
|
2312
|
+
setup_state: proofPlanBeforeResolved || proofPlanBeforeUnavailable,
|
|
2203
2313
|
action_under_test: proofPlanAction,
|
|
2204
2314
|
expected_business_state_change: proofPlanAfter || proofPlanBusinessAssertion,
|
|
2205
2315
|
prohibited_false_pass: 'Route load, screenshot, scorecard, or model claim alone is not acceptance.',
|
|
@@ -2216,7 +2326,7 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
|
|
|
2216
2326
|
.filter(Boolean);
|
|
2217
2327
|
var productOwnerFiles = rawOwnerFiles.filter(function (ownerFile) { return !ownerFileLooksNonProductEvidence(ownerFile); });
|
|
2218
2328
|
var ownerFiles = productOwnerFiles.length ? productOwnerFiles : rawOwnerFiles;
|
|
2219
|
-
var explicitEvidence = normalizeSupportDiagnosisEvidence(source.evidence);
|
|
2329
|
+
var explicitEvidence = normalizeSupportDiagnosisEvidence(source.evidence, ownerFiles);
|
|
2220
2330
|
var derivedFeatureRequestEvidence = !explicitEvidence.length && featureRequestClassified ? __spreadArray(__spreadArray([], __read((issueCaseText ? [{
|
|
2221
2331
|
id: "evidence-".concat(hashResolveIOSupportV5Evidence({ type: 'ticket', summary: issueCaseText }).slice(0, 12)),
|
|
2222
2332
|
type: 'ticket',
|
|
@@ -2232,28 +2342,53 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
|
|
|
2232
2342
|
ownerFiles: [ownerFile]
|
|
2233
2343
|
}); })), false) : [];
|
|
2234
2344
|
var diagnosisEvidence = explicitEvidence.length ? explicitEvidence : derivedFeatureRequestEvidence;
|
|
2345
|
+
var ticketEvidenceText = ((_a = diagnosisEvidence.find(function (entry) { return entry.type === 'ticket'; })) === null || _a === void 0 ? void 0 : _a.summary) || '';
|
|
2346
|
+
var browserEvidenceText = ((_b = diagnosisEvidence.find(function (entry) { return entry.type === 'browser'; })) === null || _b === void 0 ? void 0 : _b.summary) || '';
|
|
2347
|
+
var rootCauseEvidenceText = ((_c = diagnosisEvidence.find(function (entry) { return SUPPORT_ROOT_CAUSE_EVIDENCE_TYPES.has(entry.type); })) === null || _c === void 0 ? void 0 : _c.summary) || '';
|
|
2348
|
+
var customerIssueCaseText = (function () {
|
|
2349
|
+
var issueText = cleanText(issueCaseText, 1200);
|
|
2350
|
+
if (issueText && !supportDiagnosisTextLooksGeneric(issueText, 18)
|
|
2351
|
+
&& !/\b(general inquiry|existing behavior|not a confirmed runtime failure)\b/i.test(issueText)) {
|
|
2352
|
+
return issueText;
|
|
2353
|
+
}
|
|
2354
|
+
return cleanText([ticketEvidenceText, browserEvidenceText]
|
|
2355
|
+
.filter(Boolean)
|
|
2356
|
+
.join(' '), 1200);
|
|
2357
|
+
})();
|
|
2358
|
+
var issueCasePrimaryText = customerIssueCaseText || cleanText([
|
|
2359
|
+
rootCauseEvidenceText,
|
|
2360
|
+
failingPathText,
|
|
2361
|
+
hypothesisText
|
|
2362
|
+
].filter(Boolean).join(' '), 1200);
|
|
2235
2363
|
var routeModule = pickText(issueCaseSource, ['route_module', 'routeModule', 'route', 'module', 'screen'], 500)
|
|
2236
2364
|
|| pickText(source, ['route_module', 'routeModule', 'module', 'screen'], 500)
|
|
2237
2365
|
|| pickText(failingPathSource, ['route', 'module', 'path', 'description'], 500)
|
|
2366
|
+
|| failingPathText
|
|
2238
2367
|
|| (featureRequestClassified ? 'net-new support feature workflow' : '');
|
|
2239
2368
|
var expectedResult = pickText(issueCaseSource, ['expected_result', 'expectedResult', 'expected'], 1000)
|
|
2240
2369
|
|| pickText(source, ['expected_result', 'expectedResult', 'expected', 'primary_goal', 'primaryGoal', 'requested_behavior', 'requestedBehavior'], 1000)
|
|
2241
|
-
|| (featureRequestClassified &&
|
|
2370
|
+
|| (!featureRequestClassified && issueCasePrimaryText ? "Expected customer-facing business result from ticket evidence: ".concat(issueCasePrimaryText) : '')
|
|
2371
|
+
|| (featureRequestClassified && issueCasePrimaryText ? "Implement the requested workflow: ".concat(issueCasePrimaryText) : '');
|
|
2242
2372
|
var observedResult = pickText(issueCaseSource, ['observed_result', 'observedResult', 'observed', 'actual'], 1000)
|
|
2243
2373
|
|| pickText(source, ['observed_result', 'observedResult', 'observed', 'actual', 'current_state', 'currentState'], 1000)
|
|
2374
|
+
|| (!featureRequestClassified && (browserEvidenceText || issueCasePrimaryText) ? "Observed/reported wrong business result from ticket or screenshot evidence: ".concat(browserEvidenceText || issueCasePrimaryText) : '')
|
|
2244
2375
|
|| (featureRequestClassified ? "Current repo evidence indicates no implemented route/module for ".concat(routeModule || 'the requested workflow', ".") : '');
|
|
2245
2376
|
var accountCustomerContext = pickText(issueCaseSource, ['account_customer_context', 'accountCustomerContext', 'account', 'customer', 'user', 'context'], 800)
|
|
2246
2377
|
|| pickText(source, ['account_customer_context', 'accountCustomerContext', 'affected_account_user', 'affectedAccountUser', 'account', 'customer', 'client', 'user', 'context'], 800)
|
|
2378
|
+
|| (issueCasePrimaryText ? 'Customer/account context from support ticket intake and hydrated support attachments.' : '')
|
|
2247
2379
|
|| (featureRequestClassified ? 'Customer/account context from support ticket intake.' : '');
|
|
2248
2380
|
var rawReproductionStatus = issueCaseSource.reproduction_status || issueCaseSource.reproductionStatus || source.reproduction_status;
|
|
2381
|
+
var hasRuntimeReproductionEvidence = diagnosisEvidence.some(function (entry) { return SUPPORT_REPRODUCTION_EVIDENCE_TYPES.has(entry.type); });
|
|
2249
2382
|
var gate = {
|
|
2250
2383
|
issue_case: {
|
|
2251
|
-
customer_complaint: pickText(issueCaseSource, ['customer_complaint', 'customerComplaint', 'complaint', 'request', 'summary'], 1200) ||
|
|
2384
|
+
customer_complaint: pickText(issueCaseSource, ['customer_complaint', 'customerComplaint', 'complaint', 'request', 'summary'], 1200) || customerIssueCaseText,
|
|
2252
2385
|
expected_result: expectedResult,
|
|
2253
2386
|
observed_result: observedResult,
|
|
2254
2387
|
route_module: routeModule,
|
|
2255
2388
|
account_customer_context: accountCustomerContext,
|
|
2256
|
-
reproduction_status: rawReproductionStatus
|
|
2389
|
+
reproduction_status: rawReproductionStatus
|
|
2390
|
+
? normalizeReproductionStatus(rawReproductionStatus)
|
|
2391
|
+
: (featureRequestClassified || !hasRuntimeReproductionEvidence ? 'classified' : 'reproduced'),
|
|
2257
2392
|
reproduction_blocker: pickText(issueCaseSource, ['reproduction_blocker', 'reproductionBlocker', 'blocked_reason', 'blockedReason'], 1000)
|
|
2258
2393
|
},
|
|
2259
2394
|
issue_class: issueClass || 'missing_wrong_data',
|
|
@@ -2272,11 +2407,11 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
|
|
|
2272
2407
|
backend: pickText(failingPathSource, ['backend', 'backend_path', 'backendPath', 'methodPublicationPath'], 700),
|
|
2273
2408
|
shared_library: pickText(failingPathSource, ['shared_library', 'sharedLibrary', 'library', 'lib'], 700),
|
|
2274
2409
|
data_query: pickText(failingPathSource, ['data_query', 'dataQuery', 'query'], 700),
|
|
2275
|
-
description: pickText(failingPathSource, ['description', 'path', 'summary'], 1200) || failingPathText
|
|
2410
|
+
description: pickText(failingPathSource, ['description', 'path_chain', 'pathChain', 'path', 'assessment', 'summary', 'route'], 1200) || failingPathText
|
|
2276
2411
|
},
|
|
2277
2412
|
owner_files: ownerFiles,
|
|
2278
2413
|
proof_plan: {
|
|
2279
|
-
before:
|
|
2414
|
+
before: proofPlanBeforeResolved,
|
|
2280
2415
|
before_state_unavailable_reason: proofPlanBeforeUnavailable,
|
|
2281
2416
|
action: proofPlanAction,
|
|
2282
2417
|
after: proofPlanAfter,
|