@resolveio/server-lib 22.3.211 → 22.3.213
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.
|
@@ -948,24 +948,81 @@ function normalizeReproductionStatus(value) {
|
|
|
948
948
|
}
|
|
949
949
|
return 'reproduced';
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function inferSupportDiagnosisEvidenceTypeFromText(value, artifactPath) {
|
|
952
|
+
if (artifactPath === void 0) { artifactPath = ''; }
|
|
953
|
+
var text = cleanText([value, artifactPath].filter(Boolean).join(' '), 2000).toLowerCase();
|
|
954
|
+
if (/\b(ticket|customer|client|reporter|reported|support request|manual-ticket|email\.metadata)\b/i.test(text)) {
|
|
955
|
+
return 'ticket';
|
|
956
|
+
}
|
|
957
|
+
if (/\b(browser|dom|click|route|page|screenshot|screen shot|playwright|puppeteer)\b/i.test(text)) {
|
|
958
|
+
return 'browser';
|
|
959
|
+
}
|
|
960
|
+
if (/\b(mongo|database|collection|document|query|findone|aggregate)\b/i.test(text)) {
|
|
961
|
+
return 'mongo';
|
|
962
|
+
}
|
|
963
|
+
if (/\b(log|trace|stack|console|network)\b/i.test(text)) {
|
|
964
|
+
return 'log';
|
|
965
|
+
}
|
|
966
|
+
if (/\b(commit|git|branch|pr)\b/i.test(text)) {
|
|
967
|
+
return 'commit';
|
|
968
|
+
}
|
|
969
|
+
if (/\b(qa|test artifact|assertion)\b/i.test(text)) {
|
|
970
|
+
return 'qa';
|
|
971
|
+
}
|
|
972
|
+
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)) {
|
|
973
|
+
return 'code';
|
|
974
|
+
}
|
|
975
|
+
return 'other';
|
|
976
|
+
}
|
|
977
|
+
function supportLooseOwnerFileMatch(value, ownerFile) {
|
|
978
|
+
var normalizedOwner = normalizeOwnerFilePath(ownerFile);
|
|
979
|
+
var text = cleanText(value, 2000).replace(/[\\/.]+/g, ' ').replace(/[_-]+/g, ' ').toLowerCase();
|
|
980
|
+
var base = normalizedOwner.split('/').pop() || normalizedOwner;
|
|
981
|
+
var stem = base.replace(/\.[a-z0-9]+$/i, '');
|
|
982
|
+
var stemWithoutAngularKind = stem.replace(/\.(component|service|module|directive|pipe|model|resolver|guard|template)$/i, '');
|
|
983
|
+
var looseStem = stem.replace(/[._-]+/g, ' ').toLowerCase();
|
|
984
|
+
var looseStemWithoutKind = stemWithoutAngularKind.replace(/[._-]+/g, ' ').toLowerCase();
|
|
985
|
+
var compactStem = stem.replace(/[^a-z0-9]+/gi, '').toLowerCase();
|
|
986
|
+
var compactStemWithoutKind = stemWithoutAngularKind.replace(/[^a-z0-9]+/gi, '').toLowerCase();
|
|
987
|
+
var compactText = text.replace(/[^a-z0-9]+/g, '');
|
|
988
|
+
return !!normalizedOwner && (supportNormalizedPathMentioned(value, normalizedOwner)
|
|
989
|
+
|| (!!looseStem && looseStem.length >= 5 && text.includes(looseStem))
|
|
990
|
+
|| (!!looseStemWithoutKind && looseStemWithoutKind.length >= 5 && text.includes(looseStemWithoutKind))
|
|
991
|
+
|| (!!compactStem && compactStem.length >= 5 && compactText.includes(compactStem))
|
|
992
|
+
|| (!!compactStemWithoutKind && compactStemWithoutKind.length >= 5 && compactText.includes(compactStemWithoutKind)));
|
|
993
|
+
}
|
|
994
|
+
function supportLooseEvidenceOwnerFiles(value, ownerFiles) {
|
|
995
|
+
return ownerFiles
|
|
996
|
+
.map(normalizeOwnerFilePath)
|
|
997
|
+
.filter(Boolean)
|
|
998
|
+
.filter(function (ownerFile) { return supportLooseOwnerFileMatch(value, ownerFile); })
|
|
999
|
+
.slice(0, 8);
|
|
1000
|
+
}
|
|
1001
|
+
function normalizeSupportDiagnosisEvidence(values, ownerFiles) {
|
|
1002
|
+
if (ownerFiles === void 0) { ownerFiles = []; }
|
|
952
1003
|
var allowed = new Set(['ticket', 'browser', 'mongo', 'log', 'code', 'commit', 'qa', 'other']);
|
|
953
1004
|
if (!Array.isArray(values)) {
|
|
954
1005
|
var summary = cleanText(values, 1200);
|
|
955
1006
|
return summary ? [{
|
|
956
|
-
id: "evidence-".concat(hashResolveIOSupportV5Evidence({ type:
|
|
957
|
-
type:
|
|
958
|
-
summary: summary
|
|
1007
|
+
id: "evidence-".concat(hashResolveIOSupportV5Evidence({ type: inferSupportDiagnosisEvidenceTypeFromText(summary), summary: summary }).slice(0, 12)),
|
|
1008
|
+
type: inferSupportDiagnosisEvidenceTypeFromText(summary),
|
|
1009
|
+
summary: summary,
|
|
1010
|
+
ownerFiles: supportLooseEvidenceOwnerFiles(summary, ownerFiles),
|
|
1011
|
+
artifactPath: supportLooseEvidenceOwnerFiles(summary, ownerFiles)[0]
|
|
959
1012
|
}] : [];
|
|
960
1013
|
}
|
|
961
1014
|
var stringEvidence = values
|
|
962
1015
|
.filter(function (entry) { return typeof entry === 'string'; })
|
|
963
1016
|
.map(function (entry) {
|
|
964
1017
|
var summary = cleanText(entry, 1200);
|
|
1018
|
+
var matchedOwnerFiles = supportLooseEvidenceOwnerFiles(summary, ownerFiles);
|
|
1019
|
+
var type = matchedOwnerFiles.length ? 'code' : inferSupportDiagnosisEvidenceTypeFromText(summary);
|
|
965
1020
|
return {
|
|
966
|
-
id: "evidence-".concat(hashResolveIOSupportV5Evidence({ type:
|
|
967
|
-
type:
|
|
968
|
-
summary: summary
|
|
1021
|
+
id: "evidence-".concat(hashResolveIOSupportV5Evidence({ type: type, summary: summary, ownerFiles: matchedOwnerFiles }).slice(0, 12)),
|
|
1022
|
+
type: type,
|
|
1023
|
+
summary: summary,
|
|
1024
|
+
artifactPath: type === 'code' ? matchedOwnerFiles[0] : undefined,
|
|
1025
|
+
ownerFiles: matchedOwnerFiles
|
|
969
1026
|
};
|
|
970
1027
|
});
|
|
971
1028
|
var objectEvidence = values
|
|
@@ -1458,6 +1515,174 @@ function buildResolveIOSupportDiagnosisEvidencePack(input) {
|
|
|
1458
1515
|
generatedAt: generatedAt
|
|
1459
1516
|
};
|
|
1460
1517
|
}
|
|
1518
|
+
function inferResolveIOSupportIssueClassFromText(value) {
|
|
1519
|
+
var text = cleanText(value, 3000).toLowerCase();
|
|
1520
|
+
if (/\b(upload|import|csv|spreadsheet|attachment|file)\b/.test(text)) {
|
|
1521
|
+
return 'upload_import';
|
|
1522
|
+
}
|
|
1523
|
+
if (/\b(invoice|pdf|export|print|printed|report|download)\b/.test(text)) {
|
|
1524
|
+
return 'invoice_pdf_export';
|
|
1525
|
+
}
|
|
1526
|
+
if (/\b(filter|query|search|wrong customer|wrong account|mismatch)\b/.test(text)) {
|
|
1527
|
+
return 'filter_query_mismatch';
|
|
1528
|
+
}
|
|
1529
|
+
if (/\b(route|auth|permission|login|hydrate|hydration|blank page|shell)\b/.test(text)) {
|
|
1530
|
+
return 'route_auth_hydration';
|
|
1531
|
+
}
|
|
1532
|
+
if (/\b(slow|timeout|performance|latency|takes too long|hang)\b/.test(text)) {
|
|
1533
|
+
return 'slow_query_performance';
|
|
1534
|
+
}
|
|
1535
|
+
if (/\b(submit|save|click|button|no-op|does nothing|not saving)\b/.test(text)) {
|
|
1536
|
+
return 'no_op_submit';
|
|
1537
|
+
}
|
|
1538
|
+
return 'missing_wrong_data';
|
|
1539
|
+
}
|
|
1540
|
+
function firstSupportDiagnosisText() {
|
|
1541
|
+
var e_5, _a;
|
|
1542
|
+
var values = [];
|
|
1543
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1544
|
+
values[_i] = arguments[_i];
|
|
1545
|
+
}
|
|
1546
|
+
try {
|
|
1547
|
+
for (var values_2 = __values(values), values_2_1 = values_2.next(); !values_2_1.done; values_2_1 = values_2.next()) {
|
|
1548
|
+
var value = values_2_1.value;
|
|
1549
|
+
var text = cleanText(value, 1400);
|
|
1550
|
+
if (text && !supportDiagnosisTextLooksGeneric(text, 12)) {
|
|
1551
|
+
return text;
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
1556
|
+
finally {
|
|
1557
|
+
try {
|
|
1558
|
+
if (values_2_1 && !values_2_1.done && (_a = values_2.return)) _a.call(values_2);
|
|
1559
|
+
}
|
|
1560
|
+
finally { if (e_5) throw e_5.error; }
|
|
1561
|
+
}
|
|
1562
|
+
return '';
|
|
1563
|
+
}
|
|
1564
|
+
function extractSupportDiagnosisLineValue(text, label, max) {
|
|
1565
|
+
if (max === void 0) { max = 1000; }
|
|
1566
|
+
var escaped = label.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
1567
|
+
var match = String(text || '').match(new RegExp("(?:^|\\n)\\s*".concat(escaped, "\\s*:\\s*([^\\n]+)"), 'i'));
|
|
1568
|
+
return cleanText(match === null || match === void 0 ? void 0 : match[1], max);
|
|
1569
|
+
}
|
|
1570
|
+
function inferSupportDiagnosisRouteModuleFromOwners(ownerFiles, text) {
|
|
1571
|
+
var joinedOwners = ownerFiles.join('\n');
|
|
1572
|
+
if (/part\/detail|part-detail|inventory/i.test("".concat(joinedOwners, "\n").concat(text))) {
|
|
1573
|
+
return 'H2SKO part inventory detail / inventory print workflow';
|
|
1574
|
+
}
|
|
1575
|
+
if (/document\/pick-ticket|pick-ticket/i.test(joinedOwners)) {
|
|
1576
|
+
return 'H2SKO pick-ticket print/report workflow';
|
|
1577
|
+
}
|
|
1578
|
+
if (/invoice/i.test("".concat(joinedOwners, "\n").concat(text))) {
|
|
1579
|
+
return 'invoice/PDF/export workflow';
|
|
1580
|
+
}
|
|
1581
|
+
if (/upload|import/i.test("".concat(joinedOwners, "\n").concat(text))) {
|
|
1582
|
+
return 'upload/import workflow';
|
|
1583
|
+
}
|
|
1584
|
+
return firstSupportDiagnosisText(extractSupportDiagnosisLineValue(text, 'Route'), extractSupportDiagnosisLineValue(text, 'Module'));
|
|
1585
|
+
}
|
|
1586
|
+
function buildSupportDiagnosisProofPlanScaffold(issueClass, complaint, routeModule) {
|
|
1587
|
+
var target = cleanText(routeModule || complaint || 'the reported workflow', 300);
|
|
1588
|
+
if (issueClass === 'upload_import') {
|
|
1589
|
+
return {
|
|
1590
|
+
before: 'Capture the target records/counts before re-running the customer import.',
|
|
1591
|
+
before_state_unavailable_reason: '',
|
|
1592
|
+
action: "Run the same upload/import path for ".concat(target, " with the staged customer attachment or an equivalent ticket fixture."),
|
|
1593
|
+
after: 'Every expected imported row is attached/persisted with the correct relationships and no silently skipped rows.',
|
|
1594
|
+
business_assertion: 'The import creates or updates all ticket-expected records, not just a successful upload shell.',
|
|
1595
|
+
route: target,
|
|
1596
|
+
data_assertion: 'Mongo/DOM row counts and representative imported records match the attachment contents.',
|
|
1597
|
+
artifact_expectation: 'before count JSON, import action trace/screenshot, after count JSON, representative imported record proof',
|
|
1598
|
+
business_proof_contract: {
|
|
1599
|
+
issue_class: issueClass,
|
|
1600
|
+
setup_state: 'Customer attachment or localhost fixture is available before import.',
|
|
1601
|
+
action_under_test: 'Execute the import workflow end to end.',
|
|
1602
|
+
expected_business_state_change: 'All expected rows/relationships exist after import.',
|
|
1603
|
+
prohibited_false_pass: 'Upload completion, route load, screenshot, scorecard, or model claim alone is not acceptance.',
|
|
1604
|
+
proof_artifacts: ['before Mongo/data snapshot', 'import action trace or screenshot', 'after Mongo/data snapshot', 'row-level mismatch report'],
|
|
1605
|
+
data_or_dom_assertion: 'Imported record counts and key fields match the source attachment.'
|
|
1606
|
+
}
|
|
1607
|
+
};
|
|
1608
|
+
}
|
|
1609
|
+
var action = issueClass === 'invoice_pdf_export'
|
|
1610
|
+
? "Run the print/report/export path for ".concat(target, " using the named customer record.")
|
|
1611
|
+
: issueClass === 'filter_query_mismatch'
|
|
1612
|
+
? "Run the filtered/search/query workflow for ".concat(target, " using the named customer/account context.")
|
|
1613
|
+
: "Run the exact customer-reported workflow for ".concat(target, ".");
|
|
1614
|
+
return {
|
|
1615
|
+
before: 'Capture the customer-reported wrong/missing value before repair using the staged ticket context.',
|
|
1616
|
+
before_state_unavailable_reason: '',
|
|
1617
|
+
action: action,
|
|
1618
|
+
after: 'The same workflow shows the expected customer/account data and no longer shows the wrong value.',
|
|
1619
|
+
business_assertion: 'The reported business value is correct after the action, not merely that the route loaded.',
|
|
1620
|
+
route: target,
|
|
1621
|
+
data_assertion: 'DOM/print/report output and persisted source data agree for the named customer record.',
|
|
1622
|
+
artifact_expectation: 'before screenshot/data snapshot, action trace, after screenshot/data snapshot, AIQaBusinessAssertion JSON',
|
|
1623
|
+
business_proof_contract: {
|
|
1624
|
+
issue_class: issueClass,
|
|
1625
|
+
setup_state: 'The named customer record is present in the staged support data before action.',
|
|
1626
|
+
action_under_test: action,
|
|
1627
|
+
expected_business_state_change: 'The visible/output business data matches the expected persisted value.',
|
|
1628
|
+
prohibited_false_pass: 'Route load, screenshot-only proof, scorecard pass, or model claim alone is not acceptance.',
|
|
1629
|
+
proof_artifacts: ['before DOM/data snapshot', 'action trace/screenshot', 'after DOM/data snapshot', 'Mongo or persisted data comparison'],
|
|
1630
|
+
data_or_dom_assertion: 'The displayed/output value matches the expected persisted customer value.'
|
|
1631
|
+
}
|
|
1632
|
+
};
|
|
1633
|
+
}
|
|
1634
|
+
function buildResolveIOSupportDiagnosisRetryScaffold(input) {
|
|
1635
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1636
|
+
var existing = normalizeResolveIOSupportDiagnosisGate(input.diagnosisGate, input.now);
|
|
1637
|
+
var scopeText = cleanText([
|
|
1638
|
+
(_a = input.bundle) === null || _a === void 0 ? void 0 : _a.supportV5ScopeDigest,
|
|
1639
|
+
(_c = (_b = input.bundle) === null || _b === void 0 ? void 0 : _b.supportV5SupervisorState) === null || _c === void 0 ? void 0 : _c.currentGoal,
|
|
1640
|
+
(_e = (_d = input.bundle) === null || _d === void 0 ? void 0 : _d.supportV5SupervisorState) === null || _e === void 0 ? void 0 : _e.approvedScope
|
|
1641
|
+
].filter(Boolean).join('\n'), 3000);
|
|
1642
|
+
var ownerFiles = Array.from(new Set(__spreadArray(__spreadArray([], __read(cleanList(existing === null || existing === void 0 ? void 0 : existing.owner_files, 8, 500)), false), __read(cleanList((_f = input.evidencePack) === null || _f === void 0 ? void 0 : _f.ownerFileHints, 8, 500)), false).map(normalizeOwnerFilePath).filter(Boolean))).slice(0, 8);
|
|
1643
|
+
var complaint = firstSupportDiagnosisText(existing === null || existing === void 0 ? void 0 : existing.issue_case.customer_complaint, extractSupportDiagnosisLineValue(scopeText, 'Customer complaint'), extractSupportDiagnosisLineValue(scopeText, 'Issue'), extractSupportDiagnosisLineValue(scopeText, 'Approved scope'), scopeText);
|
|
1644
|
+
var issueClass = normalizeIssueClass((existing === null || existing === void 0 ? void 0 : existing.issue_class) || ((_g = input.evidencePack) === null || _g === void 0 ? void 0 : _g.issueClassHint))
|
|
1645
|
+
|| inferResolveIOSupportIssueClassFromText("".concat(scopeText, "\n").concat(ownerFiles.join('\n')));
|
|
1646
|
+
var routeModule = firstSupportDiagnosisText(existing === null || existing === void 0 ? void 0 : existing.issue_case.route_module, inferSupportDiagnosisRouteModuleFromOwners(ownerFiles, scopeText), extractSupportDiagnosisLineValue(scopeText, 'Route'), extractSupportDiagnosisLineValue(scopeText, 'Module'));
|
|
1647
|
+
var expected = firstSupportDiagnosisText(existing === null || existing === void 0 ? void 0 : existing.issue_case.expected_result, extractSupportDiagnosisLineValue(scopeText, 'Expected'), complaint ? "The customer-reported workflow should use the correct business data for: ".concat(complaint) : '');
|
|
1648
|
+
var observed = firstSupportDiagnosisText(existing === null || existing === void 0 ? void 0 : existing.issue_case.observed_result, extractSupportDiagnosisLineValue(scopeText, 'Observed'), complaint ? "The observed behavior is the customer report that needs reproduction: ".concat(complaint) : '');
|
|
1649
|
+
var accountContext = firstSupportDiagnosisText(existing === null || existing === void 0 ? void 0 : existing.issue_case.account_customer_context, extractSupportDiagnosisLineValue(scopeText, 'Client'), extractSupportDiagnosisLineValue(scopeText, 'Customer'), extractSupportDiagnosisLineValue(scopeText, 'Reporter'), (_j = (_h = input.bundle) === null || _h === void 0 ? void 0 : _h.supportV5SupervisorState) === null || _j === void 0 ? void 0 : _j.currentGoal);
|
|
1650
|
+
var proofPlan = (existing === null || existing === void 0 ? void 0 : existing.proof_plan) && (existing.proof_plan.action || existing.proof_plan.business_assertion)
|
|
1651
|
+
? existing.proof_plan
|
|
1652
|
+
: buildSupportDiagnosisProofPlanScaffold(issueClass, complaint, routeModule);
|
|
1653
|
+
return {
|
|
1654
|
+
instruction: 'Starter only. Replace scaffolded guesses with verified ticket/code/browser/Mongo/log evidence before returning support_diagnosis_gate. Do not copy TODO/placeholder text and do not leave strings blank.',
|
|
1655
|
+
support_diagnosis_gate: {
|
|
1656
|
+
issue_case: {
|
|
1657
|
+
customer_complaint: complaint || 'TODO: restate the customer complaint from the staged ticket/email.',
|
|
1658
|
+
expected_result: expected || 'TODO: state the customer-visible expected business result.',
|
|
1659
|
+
observed_result: observed || 'TODO: state the reproduced or classified wrong behavior.',
|
|
1660
|
+
route_module: routeModule || 'TODO: identify the exact route/module/workflow.',
|
|
1661
|
+
account_customer_context: accountContext || 'TODO: name the affected client/account/user context.',
|
|
1662
|
+
reproduction_status: (existing === null || existing === void 0 ? void 0 : existing.issue_case.reproduction_status) || 'blocked',
|
|
1663
|
+
reproduction_blocker: (existing === null || existing === void 0 ? void 0 : existing.issue_case.reproduction_blocker) || 'TODO: replace with blocker only if reproduction cannot be performed.'
|
|
1664
|
+
},
|
|
1665
|
+
issue_class: issueClass,
|
|
1666
|
+
accepted_hypothesis: {
|
|
1667
|
+
statement: firstSupportDiagnosisText(existing === null || existing === void 0 ? void 0 : existing.accepted_hypothesis.statement) || 'TODO: one falsifiable root-cause theory backed by current-ticket evidence.',
|
|
1668
|
+
falsifiable_test: firstSupportDiagnosisText(existing === null || existing === void 0 ? void 0 : existing.accepted_hypothesis.falsifiable_test) || 'TODO: exact test that would prove this hypothesis wrong.',
|
|
1669
|
+
evidence: cleanList(existing === null || existing === void 0 ? void 0 : existing.accepted_hypothesis.evidence, 6, 800)
|
|
1670
|
+
},
|
|
1671
|
+
rejected_alternatives: cleanList(existing === null || existing === void 0 ? void 0 : existing.rejected_alternatives, 4, 800),
|
|
1672
|
+
failing_path: (existing === null || existing === void 0 ? void 0 : existing.failing_path) || {
|
|
1673
|
+
frontend: '',
|
|
1674
|
+
backend: '',
|
|
1675
|
+
shared_library: '',
|
|
1676
|
+
data_query: '',
|
|
1677
|
+
description: routeModule || complaint || ''
|
|
1678
|
+
},
|
|
1679
|
+
owner_files: ownerFiles,
|
|
1680
|
+
proof_plan: proofPlan,
|
|
1681
|
+
evidence: (existing === null || existing === void 0 ? void 0 : existing.evidence) || [],
|
|
1682
|
+
status: 'incomplete'
|
|
1683
|
+
}
|
|
1684
|
+
};
|
|
1685
|
+
}
|
|
1461
1686
|
function normalizeSupportDiagnosisBusinessProofContract(value, issueClassHint) {
|
|
1462
1687
|
var source = cleanObject(value);
|
|
1463
1688
|
if (!Object.keys(source).length) {
|
|
@@ -1500,6 +1725,10 @@ function supportDiagnosisNarrativeText(value, max) {
|
|
|
1500
1725
|
'expectedResult',
|
|
1501
1726
|
'observed_result',
|
|
1502
1727
|
'observedResult',
|
|
1728
|
+
'route',
|
|
1729
|
+
'path_chain',
|
|
1730
|
+
'pathChain',
|
|
1731
|
+
'assessment',
|
|
1503
1732
|
'path',
|
|
1504
1733
|
'reason',
|
|
1505
1734
|
'fact'
|
|
@@ -1530,14 +1759,14 @@ function supportDiagnosisLooksLikeClassifiedFeatureRequest(source, issueCaseText
|
|
|
1530
1759
|
return /\b(feature request|feature_request|new feature|requested behavior change|net-new|net new|not implemented|no existing|none_existing|does not exist|no .*route)\b/i.test(combined);
|
|
1531
1760
|
}
|
|
1532
1761
|
function normalizeSupportDiagnosisRejectedAlternatives(values) {
|
|
1533
|
-
var
|
|
1762
|
+
var e_6, _a;
|
|
1534
1763
|
if (!Array.isArray(values)) {
|
|
1535
1764
|
return cleanList(values, 10, 700);
|
|
1536
1765
|
}
|
|
1537
1766
|
var result = [];
|
|
1538
1767
|
try {
|
|
1539
|
-
for (var
|
|
1540
|
-
var value =
|
|
1768
|
+
for (var values_3 = __values(values), values_3_1 = values_3.next(); !values_3_1.done; values_3_1 = values_3.next()) {
|
|
1769
|
+
var value = values_3_1.value;
|
|
1541
1770
|
var text = supportDiagnosisNarrativeText(value, 700);
|
|
1542
1771
|
if (text && !result.includes(text)) {
|
|
1543
1772
|
result.push(text);
|
|
@@ -1547,25 +1776,25 @@ function normalizeSupportDiagnosisRejectedAlternatives(values) {
|
|
|
1547
1776
|
}
|
|
1548
1777
|
}
|
|
1549
1778
|
}
|
|
1550
|
-
catch (
|
|
1779
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
1551
1780
|
finally {
|
|
1552
1781
|
try {
|
|
1553
|
-
if (
|
|
1782
|
+
if (values_3_1 && !values_3_1.done && (_a = values_3.return)) _a.call(values_3);
|
|
1554
1783
|
}
|
|
1555
|
-
finally { if (
|
|
1784
|
+
finally { if (e_6) throw e_6.error; }
|
|
1556
1785
|
}
|
|
1557
1786
|
return result;
|
|
1558
1787
|
}
|
|
1559
1788
|
function normalizeSupportDiagnosisProofPlanRows(values) {
|
|
1560
|
-
var
|
|
1789
|
+
var e_7, _a;
|
|
1561
1790
|
if (!Array.isArray(values)) {
|
|
1562
1791
|
return {};
|
|
1563
1792
|
}
|
|
1564
1793
|
var actions = [];
|
|
1565
1794
|
var proofRequired = [];
|
|
1566
1795
|
try {
|
|
1567
|
-
for (var
|
|
1568
|
-
var row =
|
|
1796
|
+
for (var values_4 = __values(values), values_4_1 = values_4.next(); !values_4_1.done; values_4_1 = values_4.next()) {
|
|
1797
|
+
var row = values_4_1.value;
|
|
1569
1798
|
var source = cleanObject(row);
|
|
1570
1799
|
var action = pickText(source, ['action', 'step', 'browser_action', 'browserAction', 'task'], 500) || supportDiagnosisNarrativeText(row, 500);
|
|
1571
1800
|
var proof = pickText(source, ['proof_required', 'proofRequired', 'expected', 'expected_result', 'expectedResult', 'assertion', 'business_assertion', 'businessAssertion'], 700);
|
|
@@ -1577,12 +1806,12 @@ function normalizeSupportDiagnosisProofPlanRows(values) {
|
|
|
1577
1806
|
}
|
|
1578
1807
|
}
|
|
1579
1808
|
}
|
|
1580
|
-
catch (
|
|
1809
|
+
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
1581
1810
|
finally {
|
|
1582
1811
|
try {
|
|
1583
|
-
if (
|
|
1812
|
+
if (values_4_1 && !values_4_1.done && (_a = values_4.return)) _a.call(values_4);
|
|
1584
1813
|
}
|
|
1585
|
-
finally { if (
|
|
1814
|
+
finally { if (e_7) throw e_7.error; }
|
|
1586
1815
|
}
|
|
1587
1816
|
return {
|
|
1588
1817
|
action: actions.join(' | ').slice(0, 1000),
|
|
@@ -1592,7 +1821,7 @@ function normalizeSupportDiagnosisProofPlanRows(values) {
|
|
|
1592
1821
|
};
|
|
1593
1822
|
}
|
|
1594
1823
|
function normalizeOwnerFilePath(value) {
|
|
1595
|
-
var
|
|
1824
|
+
var e_8, _a;
|
|
1596
1825
|
var normalized = cleanListEntryText(value, 500)
|
|
1597
1826
|
.replace(/\\/g, '/')
|
|
1598
1827
|
.replace(/^\.\/+/, '')
|
|
@@ -1617,12 +1846,12 @@ function normalizeOwnerFilePath(value) {
|
|
|
1617
1846
|
}
|
|
1618
1847
|
}
|
|
1619
1848
|
}
|
|
1620
|
-
catch (
|
|
1849
|
+
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
1621
1850
|
finally {
|
|
1622
1851
|
try {
|
|
1623
1852
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1624
1853
|
}
|
|
1625
|
-
finally { if (
|
|
1854
|
+
finally { if (e_8) throw e_8.error; }
|
|
1626
1855
|
}
|
|
1627
1856
|
return normalized;
|
|
1628
1857
|
}
|
|
@@ -1631,7 +1860,7 @@ function isResolveIOSupportGeneratedAngularWrapperPath(value) {
|
|
|
1631
1860
|
return /(?:^|\/)angular\/app\/(?:methods|publications)\.ts$/i.test(normalized);
|
|
1632
1861
|
}
|
|
1633
1862
|
function ownerFileComparablePathKeys(value) {
|
|
1634
|
-
var
|
|
1863
|
+
var e_9, _a;
|
|
1635
1864
|
var normalized = normalizeOwnerFilePath(value);
|
|
1636
1865
|
if (!normalized) {
|
|
1637
1866
|
return [];
|
|
@@ -1653,12 +1882,12 @@ function ownerFileComparablePathKeys(value) {
|
|
|
1653
1882
|
}
|
|
1654
1883
|
}
|
|
1655
1884
|
}
|
|
1656
|
-
catch (
|
|
1885
|
+
catch (e_9_1) { e_9 = { error: e_9_1 }; }
|
|
1657
1886
|
finally {
|
|
1658
1887
|
try {
|
|
1659
1888
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1660
1889
|
}
|
|
1661
|
-
finally { if (
|
|
1890
|
+
finally { if (e_9) throw e_9.error; }
|
|
1662
1891
|
}
|
|
1663
1892
|
return Array.from(keys);
|
|
1664
1893
|
}
|
|
@@ -1710,7 +1939,7 @@ function supportDiagnosisTextLooksGeneric(value, minimumLength) {
|
|
|
1710
1939
|
return compact.length < minimumLength
|
|
1711
1940
|
|| meaningfulWords.length < 3
|
|
1712
1941
|
|| /^(n a|na|none|null|unknown|todo|tbd|pending|fix|bug|issue|problem|broken|not working|works|should work)$/i.test(compact)
|
|
1713
|
-
|| /\b(todo|tbd|placeholder|unknown|guess|maybe|probably|something|somewhere|stuff|things?)\b/i.test(compact)
|
|
1942
|
+
|| /\b(todo|tbd|placeholder|replace with|do not copy|do not leave blank|ticket specific|unknown|guess|maybe|probably|something|somewhere|stuff|things?)\b/i.test(compact)
|
|
1714
1943
|
|| /^(fix|debug|investigate|check|look into|test|verify)( the)? (issue|bug|problem|ticket|route|page)$/i.test(compact)
|
|
1715
1944
|
|| /^(the )?(issue|bug|problem|ticket|route|page)( is)? (fixed|broken|not working|wrong)$/i.test(compact);
|
|
1716
1945
|
}
|
|
@@ -2020,18 +2249,31 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
|
|
|
2020
2249
|
var issueClass = normalizeIssueClass(source.issue_class || source.issueClass);
|
|
2021
2250
|
var featureRequestClassified = supportDiagnosisLooksLikeClassifiedFeatureRequest(source, issueCaseText, failingPathText, hypothesisText);
|
|
2022
2251
|
var shouldDeriveLooseProofPlan = Array.isArray(rawProofPlan) || featureRequestClassified;
|
|
2252
|
+
var looseProofSubject = cleanText(issueCaseText || failingPathText || hypothesisText, 1200);
|
|
2023
2253
|
var proofPlanBefore = pickText(proofPlanSource, ['before', 'before_state', 'beforeState', 'precondition'], 1000);
|
|
2024
2254
|
var proofPlanBeforeUnavailable = pickText(proofPlanSource, ['before_state_unavailable_reason', 'beforeStateUnavailableReason', 'before_unavailable_reason'], 1000)
|
|
2025
2255
|
|| (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.' : '');
|
|
2026
|
-
var
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
var
|
|
2256
|
+
var derivedLooseBefore = shouldDeriveLooseProofPlan && looseProofSubject
|
|
2257
|
+
? "Capture the before-state business value from the reported workflow: ".concat(looseProofSubject)
|
|
2258
|
+
: '';
|
|
2259
|
+
var proofPlanBeforeResolved = proofPlanBefore || derivedLooseBefore;
|
|
2260
|
+
var proofPlanAction = pickText(proofPlanSource, ['action', 'browser_action', 'browserAction', 'steps'], 1000)
|
|
2261
|
+
|| proofPlanRows.action
|
|
2262
|
+
|| (shouldDeriveLooseProofPlan ? 'Execute the issue-specific workflow and inspect the affected data/rendering path.' : '');
|
|
2263
|
+
var proofPlanAfter = pickText(proofPlanSource, ['after', 'after_state', 'afterState', 'expected_after'], 1000)
|
|
2264
|
+
|| proofPlanRows.after
|
|
2265
|
+
|| (shouldDeriveLooseProofPlan && looseProofSubject ? "The workflow produces the expected customer-facing business value instead of the reported wrong result for: ".concat(looseProofSubject) : '');
|
|
2266
|
+
var proofPlanBusinessAssertion = pickText(proofPlanSource, ['business_assertion', 'businessAssertion', 'assertion'], 1000)
|
|
2267
|
+
|| proofPlanRows.business_assertion
|
|
2268
|
+
|| (shouldDeriveLooseProofPlan && looseProofSubject ? "The customer-reported condition is resolved with business data proof: ".concat(looseProofSubject) : '');
|
|
2269
|
+
var proofPlanDataAssertion = pickText(proofPlanSource, ['data_assertion', 'dataAssertion', 'mongo_delta', 'mongoDelta'], 1000)
|
|
2270
|
+
|| proofPlanRows.data_assertion
|
|
2271
|
+
|| (shouldDeriveLooseProofPlan ? 'DOM/data or Mongo proof shows the expected business value and does not show the reported wrong value.' : '');
|
|
2030
2272
|
var proofPlanArtifactExpectation = pickText(proofPlanSource, ['artifact_expectation', 'artifactExpectation', 'artifact', 'screenshot'], 1000)
|
|
2031
2273
|
|| (shouldDeriveLooseProofPlan && proofPlanBusinessAssertion ? 'browser trace/screenshot plus persisted DOM/data or Mongo delta tied to the business assertion' : '');
|
|
2032
2274
|
var derivedBusinessProofContract = shouldDeriveLooseProofPlan && proofPlanBusinessAssertion ? {
|
|
2033
2275
|
issue_class: issueClass || source.issue_class || source.issueClass,
|
|
2034
|
-
setup_state:
|
|
2276
|
+
setup_state: proofPlanBeforeResolved || proofPlanBeforeUnavailable,
|
|
2035
2277
|
action_under_test: proofPlanAction,
|
|
2036
2278
|
expected_business_state_change: proofPlanAfter || proofPlanBusinessAssertion,
|
|
2037
2279
|
prohibited_false_pass: 'Route load, screenshot, scorecard, or model claim alone is not acceptance.',
|
|
@@ -2048,7 +2290,7 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
|
|
|
2048
2290
|
.filter(Boolean);
|
|
2049
2291
|
var productOwnerFiles = rawOwnerFiles.filter(function (ownerFile) { return !ownerFileLooksNonProductEvidence(ownerFile); });
|
|
2050
2292
|
var ownerFiles = productOwnerFiles.length ? productOwnerFiles : rawOwnerFiles;
|
|
2051
|
-
var explicitEvidence = normalizeSupportDiagnosisEvidence(source.evidence);
|
|
2293
|
+
var explicitEvidence = normalizeSupportDiagnosisEvidence(source.evidence, ownerFiles);
|
|
2052
2294
|
var derivedFeatureRequestEvidence = !explicitEvidence.length && featureRequestClassified ? __spreadArray(__spreadArray([], __read((issueCaseText ? [{
|
|
2053
2295
|
id: "evidence-".concat(hashResolveIOSupportV5Evidence({ type: 'ticket', summary: issueCaseText }).slice(0, 12)),
|
|
2054
2296
|
type: 'ticket',
|
|
@@ -2070,14 +2312,18 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
|
|
|
2070
2312
|
|| (featureRequestClassified ? 'net-new support feature workflow' : '');
|
|
2071
2313
|
var expectedResult = pickText(issueCaseSource, ['expected_result', 'expectedResult', 'expected'], 1000)
|
|
2072
2314
|
|| pickText(source, ['expected_result', 'expectedResult', 'expected', 'primary_goal', 'primaryGoal', 'requested_behavior', 'requestedBehavior'], 1000)
|
|
2315
|
+
|| (!featureRequestClassified && issueCaseText ? "Expected customer-facing business result from ticket: ".concat(issueCaseText) : '')
|
|
2073
2316
|
|| (featureRequestClassified && issueCaseText ? "Implement the requested workflow: ".concat(issueCaseText) : '');
|
|
2074
2317
|
var observedResult = pickText(issueCaseSource, ['observed_result', 'observedResult', 'observed', 'actual'], 1000)
|
|
2075
2318
|
|| pickText(source, ['observed_result', 'observedResult', 'observed', 'actual', 'current_state', 'currentState'], 1000)
|
|
2319
|
+
|| (!featureRequestClassified && issueCaseText ? "Observed/reported wrong business result from ticket: ".concat(issueCaseText) : '')
|
|
2076
2320
|
|| (featureRequestClassified ? "Current repo evidence indicates no implemented route/module for ".concat(routeModule || 'the requested workflow', ".") : '');
|
|
2077
2321
|
var accountCustomerContext = pickText(issueCaseSource, ['account_customer_context', 'accountCustomerContext', 'account', 'customer', 'user', 'context'], 800)
|
|
2078
2322
|
|| pickText(source, ['account_customer_context', 'accountCustomerContext', 'affected_account_user', 'affectedAccountUser', 'account', 'customer', 'client', 'user', 'context'], 800)
|
|
2323
|
+
|| (issueCaseText ? 'Customer/account context from support ticket intake and hydrated support attachments.' : '')
|
|
2079
2324
|
|| (featureRequestClassified ? 'Customer/account context from support ticket intake.' : '');
|
|
2080
2325
|
var rawReproductionStatus = issueCaseSource.reproduction_status || issueCaseSource.reproductionStatus || source.reproduction_status;
|
|
2326
|
+
var hasRuntimeReproductionEvidence = diagnosisEvidence.some(function (entry) { return SUPPORT_REPRODUCTION_EVIDENCE_TYPES.has(entry.type); });
|
|
2081
2327
|
var gate = {
|
|
2082
2328
|
issue_case: {
|
|
2083
2329
|
customer_complaint: pickText(issueCaseSource, ['customer_complaint', 'customerComplaint', 'complaint', 'request', 'summary'], 1200) || issueCaseText,
|
|
@@ -2085,7 +2331,9 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
|
|
|
2085
2331
|
observed_result: observedResult,
|
|
2086
2332
|
route_module: routeModule,
|
|
2087
2333
|
account_customer_context: accountCustomerContext,
|
|
2088
|
-
reproduction_status: rawReproductionStatus
|
|
2334
|
+
reproduction_status: rawReproductionStatus
|
|
2335
|
+
? normalizeReproductionStatus(rawReproductionStatus)
|
|
2336
|
+
: (featureRequestClassified || !hasRuntimeReproductionEvidence ? 'classified' : 'reproduced'),
|
|
2089
2337
|
reproduction_blocker: pickText(issueCaseSource, ['reproduction_blocker', 'reproductionBlocker', 'blocked_reason', 'blockedReason'], 1000)
|
|
2090
2338
|
},
|
|
2091
2339
|
issue_class: issueClass || 'missing_wrong_data',
|
|
@@ -2104,11 +2352,11 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
|
|
|
2104
2352
|
backend: pickText(failingPathSource, ['backend', 'backend_path', 'backendPath', 'methodPublicationPath'], 700),
|
|
2105
2353
|
shared_library: pickText(failingPathSource, ['shared_library', 'sharedLibrary', 'library', 'lib'], 700),
|
|
2106
2354
|
data_query: pickText(failingPathSource, ['data_query', 'dataQuery', 'query'], 700),
|
|
2107
|
-
description: pickText(failingPathSource, ['description', 'path', 'summary'], 1200) || failingPathText
|
|
2355
|
+
description: pickText(failingPathSource, ['description', 'path_chain', 'pathChain', 'path', 'assessment', 'summary', 'route'], 1200) || failingPathText
|
|
2108
2356
|
},
|
|
2109
2357
|
owner_files: ownerFiles,
|
|
2110
2358
|
proof_plan: {
|
|
2111
|
-
before:
|
|
2359
|
+
before: proofPlanBeforeResolved,
|
|
2112
2360
|
before_state_unavailable_reason: proofPlanBeforeUnavailable,
|
|
2113
2361
|
action: proofPlanAction,
|
|
2114
2362
|
after: proofPlanAfter,
|
|
@@ -2130,7 +2378,7 @@ function normalizeResolveIOSupportDiagnosisGate(value, now) {
|
|
|
2130
2378
|
return gate;
|
|
2131
2379
|
}
|
|
2132
2380
|
function extractResolveIOSupportDiagnosisGateFromText(value, now) {
|
|
2133
|
-
var
|
|
2381
|
+
var e_10, _a;
|
|
2134
2382
|
var text = String(value || '').trim();
|
|
2135
2383
|
if (!text) {
|
|
2136
2384
|
return undefined;
|
|
@@ -2158,12 +2406,12 @@ function extractResolveIOSupportDiagnosisGateFromText(value, now) {
|
|
|
2158
2406
|
}
|
|
2159
2407
|
}
|
|
2160
2408
|
}
|
|
2161
|
-
catch (
|
|
2409
|
+
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
2162
2410
|
finally {
|
|
2163
2411
|
try {
|
|
2164
2412
|
if (candidates_1_1 && !candidates_1_1.done && (_a = candidates_1.return)) _a.call(candidates_1);
|
|
2165
2413
|
}
|
|
2166
|
-
finally { if (
|
|
2414
|
+
finally { if (e_10) throw e_10.error; }
|
|
2167
2415
|
}
|
|
2168
2416
|
return undefined;
|
|
2169
2417
|
}
|
|
@@ -2326,7 +2574,7 @@ function supportStatusLooksPassed(value) {
|
|
|
2326
2574
|
return /\b(pass|passed|success|succeeded|complete|completed|ready|not_required|not required)\b/i.test(cleanText(value, 200));
|
|
2327
2575
|
}
|
|
2328
2576
|
function nestedObject(source) {
|
|
2329
|
-
var
|
|
2577
|
+
var e_11, _a;
|
|
2330
2578
|
var keys = [];
|
|
2331
2579
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2332
2580
|
keys[_i - 1] = arguments[_i];
|
|
@@ -2340,17 +2588,17 @@ function nestedObject(source) {
|
|
|
2340
2588
|
}
|
|
2341
2589
|
}
|
|
2342
2590
|
}
|
|
2343
|
-
catch (
|
|
2591
|
+
catch (e_11_1) { e_11 = { error: e_11_1 }; }
|
|
2344
2592
|
finally {
|
|
2345
2593
|
try {
|
|
2346
2594
|
if (keys_1_1 && !keys_1_1.done && (_a = keys_1.return)) _a.call(keys_1);
|
|
2347
2595
|
}
|
|
2348
|
-
finally { if (
|
|
2596
|
+
finally { if (e_11) throw e_11.error; }
|
|
2349
2597
|
}
|
|
2350
2598
|
return {};
|
|
2351
2599
|
}
|
|
2352
2600
|
function resolveSupportReplyReleaseGate(input) {
|
|
2353
|
-
var
|
|
2601
|
+
var e_12, _a;
|
|
2354
2602
|
var _b;
|
|
2355
2603
|
var releaseEvidence = cleanObject(input.releaseEvidence);
|
|
2356
2604
|
var releaseStatus = cleanText(input.releaseStatus
|
|
@@ -2421,12 +2669,12 @@ function resolveSupportReplyReleaseGate(input) {
|
|
|
2421
2669
|
blockers.push("missing_".concat(field));
|
|
2422
2670
|
}
|
|
2423
2671
|
}
|
|
2424
|
-
catch (
|
|
2672
|
+
catch (e_12_1) { e_12 = { error: e_12_1 }; }
|
|
2425
2673
|
finally {
|
|
2426
2674
|
try {
|
|
2427
2675
|
if (missingCommitProofFields_1_1 && !missingCommitProofFields_1_1.done && (_a = missingCommitProofFields_1.return)) _a.call(missingCommitProofFields_1);
|
|
2428
2676
|
}
|
|
2429
|
-
finally { if (
|
|
2677
|
+
finally { if (e_12) throw e_12.error; }
|
|
2430
2678
|
}
|
|
2431
2679
|
var shouldEvaluateHotfix = statusBlocked || commitProofRequired || Object.keys(hotfixEvidence).length > 0;
|
|
2432
2680
|
var hotfixContinuation = shouldEvaluateHotfix
|
|
@@ -2472,7 +2720,7 @@ function supportBusinessAssertionRouteOnly(value) {
|
|
|
2472
2720
|
return /^(route_probe_pass|route_only_pass|route_pass|route_probe|route_loaded)$/i.test(cleanText(value, 80));
|
|
2473
2721
|
}
|
|
2474
2722
|
function normalizeSupportBusinessProofAssertions(input) {
|
|
2475
|
-
var
|
|
2723
|
+
var e_13, _a;
|
|
2476
2724
|
var gate = normalizeResolveIOSupportDiagnosisGate(input.diagnosisGate);
|
|
2477
2725
|
var proofPlan = gate === null || gate === void 0 ? void 0 : gate.proof_plan;
|
|
2478
2726
|
var proofContract = proofPlan === null || proofPlan === void 0 ? void 0 : proofPlan.business_proof_contract;
|
|
@@ -2506,12 +2754,12 @@ function normalizeSupportBusinessProofAssertions(input) {
|
|
|
2506
2754
|
});
|
|
2507
2755
|
}
|
|
2508
2756
|
}
|
|
2509
|
-
catch (
|
|
2757
|
+
catch (e_13_1) { e_13 = { error: e_13_1 }; }
|
|
2510
2758
|
finally {
|
|
2511
2759
|
try {
|
|
2512
2760
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
2513
2761
|
}
|
|
2514
|
-
finally { if (
|
|
2762
|
+
finally { if (e_13) throw e_13.error; }
|
|
2515
2763
|
}
|
|
2516
2764
|
var status = cleanText(input.businessAssertionStatus || input.outcomeLabel, 80);
|
|
2517
2765
|
if (!assertions.length && (supportBusinessAssertionPassed(status) || supportBusinessAssertionRouteOnly(status) || supportBusinessAssertionFailed(status))) {
|
|
@@ -2601,7 +2849,7 @@ function supportBusinessProofAssertionHasStructuredContractMapping(assertion, ga
|
|
|
2601
2849
|
return routeMatches && actionMatches && expectedStateMatches && hasBusinessDataProof;
|
|
2602
2850
|
}
|
|
2603
2851
|
function supportBusinessProofAssertionMatchesContract(assertion, gate) {
|
|
2604
|
-
var
|
|
2852
|
+
var e_14, _a;
|
|
2605
2853
|
if (!gate) {
|
|
2606
2854
|
return false;
|
|
2607
2855
|
}
|
|
@@ -2641,12 +2889,12 @@ function supportBusinessProofAssertionMatchesContract(assertion, gate) {
|
|
|
2641
2889
|
}
|
|
2642
2890
|
}
|
|
2643
2891
|
}
|
|
2644
|
-
catch (
|
|
2892
|
+
catch (e_14_1) { e_14 = { error: e_14_1 }; }
|
|
2645
2893
|
finally {
|
|
2646
2894
|
try {
|
|
2647
2895
|
if (proofWords_1_1 && !proofWords_1_1.done && (_a = proofWords_1.return)) _a.call(proofWords_1);
|
|
2648
2896
|
}
|
|
2649
|
-
finally { if (
|
|
2897
|
+
finally { if (e_14) throw e_14.error; }
|
|
2650
2898
|
}
|
|
2651
2899
|
return overlap >= Math.min(5, Math.max(3, Math.ceil(proofWords.size * 0.45)));
|
|
2652
2900
|
}
|
|
@@ -4171,7 +4419,7 @@ function supportManagerRequiredResetEvidenceForContract(contract) {
|
|
|
4171
4419
|
], false))).slice(0, 16);
|
|
4172
4420
|
}
|
|
4173
4421
|
function validateResolveIOSupportNextActionContract(value) {
|
|
4174
|
-
var
|
|
4422
|
+
var e_15, _a;
|
|
4175
4423
|
var _b, _c, _d, _e, _f;
|
|
4176
4424
|
var contract = cleanObject(value);
|
|
4177
4425
|
var blockers = [];
|
|
@@ -4193,12 +4441,12 @@ function validateResolveIOSupportNextActionContract(value) {
|
|
|
4193
4441
|
}
|
|
4194
4442
|
}
|
|
4195
4443
|
}
|
|
4196
|
-
catch (
|
|
4444
|
+
catch (e_15_1) { e_15 = { error: e_15_1 }; }
|
|
4197
4445
|
finally {
|
|
4198
4446
|
try {
|
|
4199
4447
|
if (requiredStringFields_1_1 && !requiredStringFields_1_1.done && (_a = requiredStringFields_1.return)) _a.call(requiredStringFields_1);
|
|
4200
4448
|
}
|
|
4201
|
-
finally { if (
|
|
4449
|
+
finally { if (e_15) throw e_15.error; }
|
|
4202
4450
|
}
|
|
4203
4451
|
if (!Array.isArray(contract.nextCommands) || !contract.nextCommands.length) {
|
|
4204
4452
|
blockers.push('NextActionContract.nextCommands must include at least the primary command.');
|
|
@@ -5217,7 +5465,7 @@ function buildResolveIOSupportV5ScopeDigest(input) {
|
|
|
5217
5465
|
return raw.slice(0, maxChars);
|
|
5218
5466
|
}
|
|
5219
5467
|
function buildResolveIOSupportV5MicrotaskLedger(input) {
|
|
5220
|
-
var
|
|
5468
|
+
var e_16, _a;
|
|
5221
5469
|
var existing = Array.isArray(input.existing) ? input.existing : [];
|
|
5222
5470
|
var completedByObjective = new Map();
|
|
5223
5471
|
try {
|
|
@@ -5228,12 +5476,12 @@ function buildResolveIOSupportV5MicrotaskLedger(input) {
|
|
|
5228
5476
|
}
|
|
5229
5477
|
}
|
|
5230
5478
|
}
|
|
5231
|
-
catch (
|
|
5479
|
+
catch (e_16_1) { e_16 = { error: e_16_1 }; }
|
|
5232
5480
|
finally {
|
|
5233
5481
|
try {
|
|
5234
5482
|
if (existing_1_1 && !existing_1_1.done && (_a = existing_1.return)) _a.call(existing_1);
|
|
5235
5483
|
}
|
|
5236
|
-
finally { if (
|
|
5484
|
+
finally { if (e_16) throw e_16.error; }
|
|
5237
5485
|
}
|
|
5238
5486
|
var now = isoNow(input.now);
|
|
5239
5487
|
var requirements = cleanList(input.requirements, 30, 240);
|
|
@@ -6802,6 +7050,14 @@ function buildResolveIOSupportV5MicrotaskPrompt(input) {
|
|
|
6802
7050
|
ownerFiles: (diagnosisGate === null || diagnosisGate === void 0 ? void 0 : diagnosisGate.owner_files) || targetFiles,
|
|
6803
7051
|
text: input.bundle.supportV5ScopeDigest || input.bundle.supportV5SupervisorState.currentGoal
|
|
6804
7052
|
});
|
|
7053
|
+
var diagnosisRetryScaffold = diagnosisActive
|
|
7054
|
+
? buildResolveIOSupportDiagnosisRetryScaffold({
|
|
7055
|
+
bundle: input.bundle,
|
|
7056
|
+
diagnosisGate: diagnosisGate,
|
|
7057
|
+
evidencePack: diagnosisEvidencePack,
|
|
7058
|
+
now: input.now
|
|
7059
|
+
})
|
|
7060
|
+
: undefined;
|
|
6805
7061
|
var promptProbePlanValidation = validateResolveIOSupportIssueClassProbePlan(input.bundle.supportV5IssueClassProbePlan, diagnosisValidation.normalized || diagnosisGate, input.now);
|
|
6806
7062
|
var promptProbePlan = promptProbePlanValidation.valid
|
|
6807
7063
|
? promptProbePlanValidation.normalized
|
|
@@ -6848,7 +7104,8 @@ function buildResolveIOSupportV5MicrotaskPrompt(input) {
|
|
|
6848
7104
|
name: 'root_cause_first_diagnosis_contract',
|
|
6849
7105
|
text: [
|
|
6850
7106
|
'Before any product-code repair, produce strict JSON only:',
|
|
6851
|
-
'{"support_diagnosis_gate":{"issue_case":{"customer_complaint":"","expected_result":"","observed_result":"","route_module":"","account_customer_context":"","reproduction_status":"reproduced|blocked|classified","reproduction_blocker":""},"issue_class":"no_op_submit|missing_wrong_data|filter_query_mismatch|invoice_pdf_export|upload_import|route_auth_hydration|slow_query_performance","accepted_hypothesis":{"statement":"","falsifiable_test":"","evidence":[""]},"rejected_alternatives":[""],"failing_path":{"frontend":"","backend":"","shared_library":"","data_query":"","description":""},"owner_files":["small/exact/file.ts"],"proof_plan":{"before":"","before_state_unavailable_reason":"","action":"","after":"","business_assertion":"","route":"","data_assertion":"","artifact_expectation":"","business_proof_contract":{"issue_class":"same as diagnosis issue_class","setup_state":"","action_under_test":"","expected_business_state_change":"","prohibited_false_pass":"Route load, screenshot, scorecard, or model claim alone is not acceptance.","proof_artifacts":["
|
|
7107
|
+
'Required JSON shape: {"support_diagnosis_gate":{"issue_case":{"customer_complaint":"concrete customer complaint","expected_result":"concrete expected business result","observed_result":"concrete observed/reproduced behavior","route_module":"exact route/module/workflow","account_customer_context":"affected client/account/user","reproduction_status":"reproduced|blocked|classified","reproduction_blocker":"required only when blocked"},"issue_class":"no_op_submit|missing_wrong_data|filter_query_mismatch|invoice_pdf_export|upload_import|route_auth_hydration|slow_query_performance","accepted_hypothesis":{"statement":"one falsifiable root-cause theory","falsifiable_test":"exact test that could disprove it","evidence":["typed evidence with artifact path or concrete code/data citation"]},"rejected_alternatives":["rejected theory plus why"],"failing_path":{"frontend":"frontend event/path if applicable","backend":"method/publication/query if applicable","shared_library":"shared library path if applicable","data_query":"data/query path if applicable","description":"end-to-end failing path"},"owner_files":["small/exact/product-file.ts"],"proof_plan":{"before":"before-state business proof","before_state_unavailable_reason":"only if before proof cannot exist","action":"exact user/system action","after":"expected after-state business proof","business_assertion":"pass/fail assertion tied to customer issue","route":"route/workflow under test","data_assertion":"DOM/data/Mongo assertion","artifact_expectation":"specific artifacts to capture","business_proof_contract":{"issue_class":"same as diagnosis issue_class","setup_state":"setup state","action_under_test":"action under test","expected_business_state_change":"expected state change","prohibited_false_pass":"Route load, screenshot, scorecard, or model claim alone is not acceptance.","proof_artifacts":["specific DOM/data/Mongo/network/screenshot artifacts"],"data_or_dom_assertion":"assertion checked in DOM/data/Mongo"}},"similar_tickets":[],"similar_commits":[],"evidence":[{"type":"ticket|browser|mongo|log|code|commit|qa|other","summary":"concrete evidence summary","artifactPath":"path or code reference"}],"status":"passed"}}',
|
|
7108
|
+
'Do not copy schema/example wording into the output. Empty strings, TODOs, placeholders, route-only proof, and ticket-only proof will fail validation.',
|
|
6852
7109
|
'Owner files must be a small exact editable set, not directories, globs, generated wrappers, or broad repo areas.',
|
|
6853
7110
|
'The accepted hypothesis must be falsifiable and backed by evidence; prior similar tickets or commits are hints only and cannot bypass fresh diagnosis.',
|
|
6854
7111
|
'For reproduction_status="reproduced", evidence must include at least one browser, Mongo, log, or QA evidence object with artifactPath so the runner can replay the proof.',
|
|
@@ -6918,6 +7175,10 @@ function buildResolveIOSupportV5MicrotaskPrompt(input) {
|
|
|
6918
7175
|
instruction: 'This JSON block is the diagnosis evidence pack. Do not request or invent a support-diagnosis-pack JSON file unless a concrete named ticket attachment/log is still absent from the staged support evidence context.'
|
|
6919
7176
|
}, null, 2)
|
|
6920
7177
|
} : undefined,
|
|
7178
|
+
diagnosisActive && diagnosisRetryScaffold ? {
|
|
7179
|
+
name: 'diagnosis_retry_scaffold',
|
|
7180
|
+
text: JSON.stringify(diagnosisRetryScaffold, null, 2)
|
|
7181
|
+
} : undefined,
|
|
6921
7182
|
diagnosisActive && similarCaseHintsText ? {
|
|
6922
7183
|
name: 'similar_accepted_fix_hints',
|
|
6923
7184
|
text: similarCaseHintsText
|
|
@@ -7024,7 +7285,7 @@ function buildResolveIOSupportV5MicrotaskPrompt(input) {
|
|
|
7024
7285
|
};
|
|
7025
7286
|
}
|
|
7026
7287
|
function summarizeResolveIOSupportV5MicrotaskUsage(bundle) {
|
|
7027
|
-
var
|
|
7288
|
+
var e_17, _a, e_18, _b;
|
|
7028
7289
|
var byMicrotask = new Map();
|
|
7029
7290
|
var bySection = new Map();
|
|
7030
7291
|
var totalPromptTokenEstimate = 0;
|
|
@@ -7039,17 +7300,17 @@ function summarizeResolveIOSupportV5MicrotaskUsage(bundle) {
|
|
|
7039
7300
|
existing.calls += 1;
|
|
7040
7301
|
byMicrotask.set(usage.microtaskId, existing);
|
|
7041
7302
|
try {
|
|
7042
|
-
for (var _e = (
|
|
7303
|
+
for (var _e = (e_18 = void 0, __values(usage.promptSections || [])), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
7043
7304
|
var section = _f.value;
|
|
7044
7305
|
bySection.set(section.name, (bySection.get(section.name) || 0) + section.tokenEstimate);
|
|
7045
7306
|
}
|
|
7046
7307
|
}
|
|
7047
|
-
catch (
|
|
7308
|
+
catch (e_18_1) { e_18 = { error: e_18_1 }; }
|
|
7048
7309
|
finally {
|
|
7049
7310
|
try {
|
|
7050
7311
|
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
7051
7312
|
}
|
|
7052
|
-
finally { if (
|
|
7313
|
+
finally { if (e_18) throw e_18.error; }
|
|
7053
7314
|
}
|
|
7054
7315
|
var hardCap = usage.lane === 'qa' ? promptBudget.qaMicrotaskHardCap : promptBudget.buildMicrotaskHardCap;
|
|
7055
7316
|
if ((usage.promptTokenEstimate || 0) > hardCap) {
|
|
@@ -7057,12 +7318,12 @@ function summarizeResolveIOSupportV5MicrotaskUsage(bundle) {
|
|
|
7057
7318
|
}
|
|
7058
7319
|
}
|
|
7059
7320
|
}
|
|
7060
|
-
catch (
|
|
7321
|
+
catch (e_17_1) { e_17 = { error: e_17_1 }; }
|
|
7061
7322
|
finally {
|
|
7062
7323
|
try {
|
|
7063
7324
|
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
7064
7325
|
}
|
|
7065
|
-
finally { if (
|
|
7326
|
+
finally { if (e_17) throw e_17.error; }
|
|
7066
7327
|
}
|
|
7067
7328
|
return {
|
|
7068
7329
|
totalPromptTokenEstimate: totalPromptTokenEstimate,
|