@resolveio/server-lib 22.3.236 → 22.3.237
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/ai-qa-policy.js +21 -88
- package/util/ai-qa-policy.js.map +1 -1
- package/util/ai-run-evidence-adapters.js +236 -256
- package/util/ai-run-evidence-adapters.js.map +1 -1
- package/util/ai-run-evidence.js +30 -15
- package/util/ai-run-evidence.js.map +1 -1
- package/util/ai-runner-qa-tools.js +103 -2078
- package/util/ai-runner-qa-tools.js.map +1 -1
- package/util/support-runner-v5.d.ts +38 -13
- package/util/support-runner-v5.js +423 -735
- package/util/support-runner-v5.js.map +1 -1
|
@@ -1431,7 +1431,6 @@ function supportDiagnosisProofGateResult(diagnosisGate, now) {
|
|
|
1431
1431
|
evidenceRefs: [],
|
|
1432
1432
|
recordedAt: isoNow(now),
|
|
1433
1433
|
metadata: {
|
|
1434
|
-
issueClass: cleanText(diagnosisGate.issue_class || diagnosisGate.issueClass, 120),
|
|
1435
1434
|
requiredBusinessAssertion: cleanText(proofPlan.business_assertion || proofPlan.businessAssertion, 1000),
|
|
1436
1435
|
requiredAfter: cleanText(proofPlan.after, 1000),
|
|
1437
1436
|
requiredDataAssertion: cleanText(proofPlan.data_assertion || proofPlan.dataAssertion, 1000)
|
|
@@ -1440,7 +1439,6 @@ function supportDiagnosisProofGateResult(diagnosisGate, now) {
|
|
|
1440
1439
|
}
|
|
1441
1440
|
var SUPPORT_ROOT_CAUSE_ENTRY_REQUIRED_FIELDS = [
|
|
1442
1441
|
'issue_case',
|
|
1443
|
-
'issue_class',
|
|
1444
1442
|
'accepted_hypothesis',
|
|
1445
1443
|
'rejected_alternatives',
|
|
1446
1444
|
'failing_path',
|
|
@@ -1448,15 +1446,6 @@ var SUPPORT_ROOT_CAUSE_ENTRY_REQUIRED_FIELDS = [
|
|
|
1448
1446
|
'proof_plan',
|
|
1449
1447
|
'evidence'
|
|
1450
1448
|
];
|
|
1451
|
-
var SUPPORT_ROOT_CAUSE_ENTRY_ISSUE_CLASSES = [
|
|
1452
|
-
'no_op_submit',
|
|
1453
|
-
'missing_wrong_data',
|
|
1454
|
-
'filter_query_mismatch',
|
|
1455
|
-
'invoice_pdf_export',
|
|
1456
|
-
'upload_import',
|
|
1457
|
-
'route_auth_hydration',
|
|
1458
|
-
'slow_query_performance'
|
|
1459
|
-
];
|
|
1460
1449
|
function supportRootCauseEntryContractGate(contract, now) {
|
|
1461
1450
|
if (!contract || !Object.keys(contract).length) {
|
|
1462
1451
|
return undefined;
|
|
@@ -1465,11 +1454,8 @@ function supportRootCauseEntryContractGate(contract, now) {
|
|
|
1465
1454
|
var ownerPolicy = plainObject(contract.owner_file_policy || contract.ownerFilePolicy);
|
|
1466
1455
|
var businessProofPolicy = plainObject(contract.business_proof_policy || contract.businessProofPolicy);
|
|
1467
1456
|
var failurePolicy = plainObject(contract.failure_policy || contract.failurePolicy);
|
|
1468
|
-
var probes = asArray(contract.issue_class_probes || contract.issueClassProbes);
|
|
1469
1457
|
var requiredFields = cleanStringList(requiredOutput.required_fields || requiredOutput.requiredFields, 30, 160);
|
|
1470
|
-
var issueClasses = probes.map(function (probe) { return cleanText(probe.issue_class || probe.issueClass, 120); }).filter(Boolean);
|
|
1471
1458
|
var missingRequiredFields = SUPPORT_ROOT_CAUSE_ENTRY_REQUIRED_FIELDS.filter(function (field) { return !requiredFields.includes(field); });
|
|
1472
|
-
var missingIssueClasses = SUPPORT_ROOT_CAUSE_ENTRY_ISSUE_CLASSES.filter(function (issueClass) { return !issueClasses.includes(issueClass); });
|
|
1473
1459
|
var blockers = [];
|
|
1474
1460
|
if (!cleanText(contract.contract_id || contract.contractId, 160)) {
|
|
1475
1461
|
blockers.push('Root-cause entry contract is missing contract_id.');
|
|
@@ -1496,9 +1482,6 @@ function supportRootCauseEntryContractGate(contract, now) {
|
|
|
1496
1482
|
if (failurePolicy.repeated_failure_without_new_evidence_parks_run !== true && failurePolicy.repeatedFailureWithoutNewEvidenceParksRun !== true) {
|
|
1497
1483
|
blockers.push('Root-cause entry contract must park repeated failures without new evidence.');
|
|
1498
1484
|
}
|
|
1499
|
-
if (missingIssueClasses.length) {
|
|
1500
|
-
blockers.push("Root-cause entry contract missing issue-class probes: ".concat(missingIssueClasses.join(', '), "."));
|
|
1501
|
-
}
|
|
1502
1485
|
var status = blockers.length ? 'fail' : 'pass';
|
|
1503
1486
|
return {
|
|
1504
1487
|
key: 'support_root_cause_entry_contract',
|
|
@@ -1506,7 +1489,7 @@ function supportRootCauseEntryContractGate(contract, now) {
|
|
|
1506
1489
|
status: status,
|
|
1507
1490
|
reason: blockers.length
|
|
1508
1491
|
? blockers.join(' ')
|
|
1509
|
-
: 'Support run has a structured root-cause-first entry contract with
|
|
1492
|
+
: 'Support run has a structured root-cause-first entry contract with owner-file policy and business-proof policy.',
|
|
1510
1493
|
evidenceRefs: cleanStringList(businessProofPolicy.required_artifacts || businessProofPolicy.requiredArtifacts, 20, 500),
|
|
1511
1494
|
recordedAt: isoNow(now),
|
|
1512
1495
|
metadata: {
|
|
@@ -1519,10 +1502,7 @@ function supportRootCauseEntryContractGate(contract, now) {
|
|
|
1519
1502
|
ownerFileMax: ownerFileMax,
|
|
1520
1503
|
requiresRevisedDiagnosisForOutOfScopeEdits: ownerPolicy.edits_outside_owner_files_require_revised_diagnosis === true || ownerPolicy.editsOutsideOwnerFilesRequireRevisedDiagnosis === true,
|
|
1521
1504
|
requiresBusinessAssertion: businessProofPolicy.requires_aiqa_business_assertion === true || businessProofPolicy.requiresAiqaBusinessAssertion === true,
|
|
1522
|
-
routeOnlyAcceptanceRejected: businessProofPolicy.route_load_screenshot_scorecard_model_claim_not_acceptance === true || businessProofPolicy.routeLoadScreenshotScorecardModelClaimNotAcceptance === true
|
|
1523
|
-
issueClassProbeCount: issueClasses.length,
|
|
1524
|
-
issueClasses: issueClasses,
|
|
1525
|
-
missingIssueClasses: missingIssueClasses
|
|
1505
|
+
routeOnlyAcceptanceRejected: businessProofPolicy.route_load_screenshot_scorecard_model_claim_not_acceptance === true || businessProofPolicy.routeLoadScreenshotScorecardModelClaimNotAcceptance === true
|
|
1526
1506
|
}
|
|
1527
1507
|
};
|
|
1528
1508
|
}
|
|
@@ -1632,7 +1612,7 @@ function supportProductRepairEvidence(input, evidence) {
|
|
|
1632
1612
|
};
|
|
1633
1613
|
}
|
|
1634
1614
|
function supportDiagnosisBeforeRepairGate(diagnosisGate, repairEvidence, now) {
|
|
1635
|
-
var _a
|
|
1615
|
+
var _a;
|
|
1636
1616
|
if (!repairEvidence.attempted) {
|
|
1637
1617
|
return undefined;
|
|
1638
1618
|
}
|
|
@@ -1656,7 +1636,6 @@ function supportDiagnosisBeforeRepairGate(diagnosisGate, repairEvidence, now) {
|
|
|
1656
1636
|
diagnosisStatus: validation.status,
|
|
1657
1637
|
blockers: validation.blockers,
|
|
1658
1638
|
ownerFiles: ((_a = validation.normalized) === null || _a === void 0 ? void 0 : _a.owner_files) || [],
|
|
1659
|
-
issueClass: (_b = validation.normalized) === null || _b === void 0 ? void 0 : _b.issue_class,
|
|
1660
1639
|
productRepairAllowed: validation.valid,
|
|
1661
1640
|
allowedDispatchAction: validation.valid ? 'run_owner_scoped_repair' : 'run_read_only_diagnosis',
|
|
1662
1641
|
requiredEvidence: validation.valid
|
|
@@ -1687,7 +1666,6 @@ function supportOwnerFileScopeGate(diagnosisGate, repairEvidence, now) {
|
|
|
1687
1666
|
metadata: {
|
|
1688
1667
|
repairAttempted: true,
|
|
1689
1668
|
diagnosisValid: true,
|
|
1690
|
-
issueClass: validation.normalized.issue_class,
|
|
1691
1669
|
ownerFiles: validation.normalized.owner_files,
|
|
1692
1670
|
changedFiles: repairEvidence.changedFiles,
|
|
1693
1671
|
outsideOwnerFiles: outsideOwnerFiles,
|
|
@@ -2069,9 +2047,8 @@ function supportCustomerReplyPolicyGate(policy, now) {
|
|
|
2069
2047
|
canDraftCustomerReply: canDraft,
|
|
2070
2048
|
canSendCustomerReply: canSend,
|
|
2071
2049
|
confidenceLevel: cleanText(policy.confidenceLevel || policy.confidence_level, 120),
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
issueClassProbePlanStatus: cleanText(draftBasis.issueClassProbePlanStatus || draftBasis.issue_class_probe_plan_status, 120),
|
|
2050
|
+
businessProofPlanId: cleanText(draftBasis.businessProofPlanId || draftBasis.business_proof_plan_id || draftBasis.issueClassProbePlanId || draftBasis.issue_class_probe_plan_id, 180),
|
|
2051
|
+
businessProofPlanStatus: cleanText(draftBasis.businessProofPlanStatus || draftBasis.business_proof_plan_status || draftBasis.issueClassProbePlanStatus || draftBasis.issue_class_probe_plan_status, 120),
|
|
2075
2052
|
reviewType: reviewType,
|
|
2076
2053
|
primaryAction: cleanText(reviewPacket.primaryAction || reviewPacket.primary_action, 160),
|
|
2077
2054
|
requiresHumanApproval: reviewPacket.requiresHumanApproval !== false && reviewPacket.requires_human_approval !== false,
|
|
@@ -2116,7 +2093,7 @@ function supportCustomerReplyReadinessGate(contract, now) {
|
|
|
2116
2093
|
businessProofReady: normalized.businessProofReady,
|
|
2117
2094
|
releaseReady: normalized.releaseReady,
|
|
2118
2095
|
diagnosisReady: normalized.diagnosisReady,
|
|
2119
|
-
|
|
2096
|
+
businessProofPlanReady: normalized.businessProofPlanReady,
|
|
2120
2097
|
clarificationRequired: normalized.clarificationRequired,
|
|
2121
2098
|
blockers: Array.from(new Set(__spreadArray(__spreadArray([], __read(normalized.blockers), false), __read(validation.blockers), false))),
|
|
2122
2099
|
requiredEvidence: normalized.requiredEvidence,
|
|
@@ -2157,7 +2134,14 @@ function supportProofBackedCustomerReplySendGate(sendContract, sendGuard, now) {
|
|
|
2157
2134
|
var businessProofReady = guard.business_proof_ready === true || guard.businessProofReady === true || contract.business_proof_ready === true || contract.businessProofReady === true;
|
|
2158
2135
|
var releaseReady = guard.release_ready === true || guard.releaseReady === true || contract.release_ready === true || contract.releaseReady === true;
|
|
2159
2136
|
var diagnosisReady = guard.diagnosis_ready === true || guard.diagnosisReady === true || contract.diagnosis_ready === true || contract.diagnosisReady === true;
|
|
2160
|
-
var
|
|
2137
|
+
var businessProofPlanReady = guard.business_proof_plan_ready === true
|
|
2138
|
+
|| guard.businessProofPlanReady === true
|
|
2139
|
+
|| contract.business_proof_plan_ready === true
|
|
2140
|
+
|| contract.businessProofPlanReady === true
|
|
2141
|
+
|| guard.issue_class_probe_plan_ready === true
|
|
2142
|
+
|| guard.issueClassProbePlanReady === true
|
|
2143
|
+
|| contract.issue_class_probe_plan_ready === true
|
|
2144
|
+
|| contract.issueClassProbePlanReady === true;
|
|
2161
2145
|
var pullRequestUrl = cleanText(contract.pull_request_url || contract.pullRequestUrl || guard.pull_request_url || guard.pullRequestUrl, 500);
|
|
2162
2146
|
var blockers = Array.from(new Set(__spreadArray(__spreadArray(__spreadArray([], __read(cleanStringList(guard.blockers, 40, 500)), false), __read(cleanStringList(contract.blockers, 40, 500)), false), [
|
|
2163
2147
|
directSendAllowed ? 'Direct customer send is not allowed; proof-backed replies require manual review/send.' : '',
|
|
@@ -2166,7 +2150,7 @@ function supportProofBackedCustomerReplySendGate(sendContract, sendGuard, now) {
|
|
|
2166
2150
|
(sentAfterManualApproval || guardAllowed) && !businessProofReady ? 'AIQaBusinessAssertion business proof is not ready.' : '',
|
|
2167
2151
|
(sentAfterManualApproval || guardAllowed) && !releaseReady ? 'Release or hotfix proof is not ready.' : '',
|
|
2168
2152
|
(sentAfterManualApproval || guardAllowed) && !diagnosisReady ? 'Root-cause diagnosis is not ready.' : '',
|
|
2169
|
-
(sentAfterManualApproval || guardAllowed) && !
|
|
2153
|
+
(sentAfterManualApproval || guardAllowed) && !businessProofPlanReady ? 'Business proof plan is not ready.' : '',
|
|
2170
2154
|
(sentAfterManualApproval || guardAllowed) && !pullRequestUrl ? 'Proof-backed customer reply is missing the current PR reference.' : ''
|
|
2171
2155
|
], false).filter(Boolean)));
|
|
2172
2156
|
var status = sentAfterManualApproval && blockers.length === 0
|
|
@@ -2179,7 +2163,7 @@ function supportProofBackedCustomerReplySendGate(sendContract, sendGuard, now) {
|
|
|
2179
2163
|
label: 'Support proof-backed customer reply send',
|
|
2180
2164
|
status: status,
|
|
2181
2165
|
reason: status === 'pass'
|
|
2182
|
-
? 'Proof-backed customer reply was sent after manual approval with PR, business proof, release, diagnosis, and
|
|
2166
|
+
? 'Proof-backed customer reply was sent after manual approval with PR, business proof, release, diagnosis, and business proof plan evidence.'
|
|
2183
2167
|
: status === 'warn'
|
|
2184
2168
|
? 'Proof-backed customer reply is ready for manual review/send; automatic direct send remains blocked.'
|
|
2185
2169
|
: blockers.join('; ') || cleanText(guard.policy_reason || contract.reason || 'Proof-backed customer reply send is blocked.', 1200),
|
|
@@ -2200,7 +2184,7 @@ function supportProofBackedCustomerReplySendGate(sendContract, sendGuard, now) {
|
|
|
2200
2184
|
businessProofReady: businessProofReady,
|
|
2201
2185
|
releaseReady: releaseReady,
|
|
2202
2186
|
diagnosisReady: diagnosisReady,
|
|
2203
|
-
|
|
2187
|
+
businessProofPlanReady: businessProofPlanReady,
|
|
2204
2188
|
confidenceLevel: cleanText(guard.confidence_level || guard.confidenceLevel || contract.confidence_level || contract.confidenceLevel, 120),
|
|
2205
2189
|
nextAction: cleanText(guard.next_action || guard.nextAction, 160),
|
|
2206
2190
|
pullRequestUrl: pullRequestUrl,
|
|
@@ -4005,11 +3989,12 @@ function supportEvidenceProbeContractMetadata(contract) {
|
|
|
4005
3989
|
return {
|
|
4006
3990
|
contractId: cleanText(normalized.contractId || contract.contractId || contract.contract_id, 200),
|
|
4007
3991
|
status: cleanText(normalized.status || contract.status, 120),
|
|
4008
|
-
probeType: cleanText(normalized.probeType || contract.probeType || contract.probe_type, 120)
|
|
3992
|
+
probeType: cleanText(normalized.probeType || contract.probeType || contract.probe_type, 120) === 'issue_class_probe'
|
|
3993
|
+
? 'business_proof'
|
|
3994
|
+
: cleanText(normalized.probeType || contract.probeType || contract.probe_type, 120),
|
|
4009
3995
|
evidenceOnly: normalized.evidenceOnly === true || contract.evidenceOnly === true || contract.evidence_only === true,
|
|
4010
3996
|
productRepairAllowed: normalized.productRepairAllowed === true || contract.productRepairAllowed === true || contract.product_repair_allowed === true,
|
|
4011
3997
|
canRunWithoutCodexMonitor: normalized.canRunWithoutCodexMonitor === true || contract.canRunWithoutCodexMonitor === true || contract.can_run_without_codex_monitor === true,
|
|
4012
|
-
issueClass: cleanText(normalized.issueClass || contract.issueClass || contract.issue_class, 120),
|
|
4013
3998
|
planId: cleanText(normalized.planId || contract.planId || contract.plan_id, 200),
|
|
4014
3999
|
activeRoute: cleanText(normalized.activeRoute || contract.activeRoute || contract.active_route, 500),
|
|
4015
4000
|
actionUnderTest: cleanText(normalized.actionUnderTest || contract.actionUnderTest || contract.action_under_test, 1000),
|
|
@@ -4326,11 +4311,9 @@ function supportDiagnosisEvidencePackGate(pack, now) {
|
|
|
4326
4311
|
diagnosisValid: diagnosisValid,
|
|
4327
4312
|
diagnosisStatus: cleanText(pack.diagnosisStatus || pack.diagnosis_status, 120),
|
|
4328
4313
|
validationBlockers: validationBlockers,
|
|
4329
|
-
issueClassHint: cleanText(pack.issueClassHint || pack.issue_class_hint, 120),
|
|
4330
4314
|
ownerFileHints: cleanStringList(pack.ownerFileHints || pack.owner_file_hints, 20, 500),
|
|
4331
4315
|
similarHintCount: rankedHints.length,
|
|
4332
|
-
similarHintsAdvisoryOnly: true
|
|
4333
|
-
issueClassProbeCount: asArray(pack.issueClassProbeCatalog || pack.issue_class_probe_catalog).length
|
|
4316
|
+
similarHintsAdvisoryOnly: true
|
|
4334
4317
|
}
|
|
4335
4318
|
};
|
|
4336
4319
|
}
|
|
@@ -4460,16 +4443,16 @@ function supportOwnerScopedRepairContractGate(contract, now, required) {
|
|
|
4460
4443
|
}
|
|
4461
4444
|
};
|
|
4462
4445
|
}
|
|
4463
|
-
function
|
|
4446
|
+
function supportBusinessProofPlanGate(plan, diagnosisGate, now, required) {
|
|
4464
4447
|
if (required === void 0) { required = false; }
|
|
4465
4448
|
if (!plan || !Object.keys(plan).length) {
|
|
4466
4449
|
if (!required) {
|
|
4467
4450
|
return undefined;
|
|
4468
4451
|
}
|
|
4469
|
-
var blocker = 'Support V5 run is missing
|
|
4452
|
+
var blocker = 'Support V5 run is missing the business proof plan, so business proof cannot be accepted from route-only or generic QA.';
|
|
4470
4453
|
return {
|
|
4471
|
-
key: '
|
|
4472
|
-
label: 'Support
|
|
4454
|
+
key: 'support_business_proof_plan',
|
|
4455
|
+
label: 'Support business proof plan',
|
|
4473
4456
|
status: 'blocked',
|
|
4474
4457
|
reason: blocker,
|
|
4475
4458
|
evidenceRefs: [],
|
|
@@ -4477,7 +4460,7 @@ function supportIssueClassProbePlanGate(plan, diagnosisGate, now, required) {
|
|
|
4477
4460
|
metadata: {
|
|
4478
4461
|
required: true,
|
|
4479
4462
|
missingPlan: true,
|
|
4480
|
-
|
|
4463
|
+
businessProofPlanReady: false,
|
|
4481
4464
|
acceptanceGate: 'aiqa_business_assertion',
|
|
4482
4465
|
blockers: [blocker],
|
|
4483
4466
|
falsePassBlockers: ['route load only', 'generic clickthrough only', 'scorecard-only pass']
|
|
@@ -4495,24 +4478,22 @@ function supportIssueClassProbePlanGate(plan, diagnosisGate, now, required) {
|
|
|
4495
4478
|
|| normalized.false_pass_blockers
|
|
4496
4479
|
|| activeProbe.false_pass_blockers, 30, 500);
|
|
4497
4480
|
var status = validation.valid ? 'pass' : 'blocked';
|
|
4498
|
-
var issueClass = cleanText(normalized.issue_class || normalized.issueClass || activeProbe.issue_class, 120);
|
|
4499
4481
|
var route = cleanText(activeProbe.route, 500);
|
|
4500
4482
|
var action = cleanText(activeProbe.action, 1000);
|
|
4501
4483
|
return {
|
|
4502
|
-
key: '
|
|
4503
|
-
label: 'Support
|
|
4484
|
+
key: 'support_business_proof_plan',
|
|
4485
|
+
label: 'Support business proof plan',
|
|
4504
4486
|
status: status,
|
|
4505
4487
|
reason: validation.valid
|
|
4506
|
-
?
|
|
4507
|
-
: blockers.join('; ') || 'Support
|
|
4488
|
+
? 'Support business proof plan is ready and requires AIQaBusinessAssertion proof.'
|
|
4489
|
+
: blockers.join('; ') || 'Support business proof plan is incomplete.',
|
|
4508
4490
|
evidenceRefs: requiredArtifacts,
|
|
4509
4491
|
recordedAt: isoNow(now || normalized.generatedAt || normalized.generated_at),
|
|
4510
4492
|
metadata: {
|
|
4511
4493
|
planId: cleanText(normalized.planId || normalized.plan_id, 180),
|
|
4512
4494
|
status: cleanText(validation.status || normalized.status, 120),
|
|
4513
|
-
issueClass: issueClass,
|
|
4514
4495
|
diagnosisValid: normalized.diagnosisValid === true || normalized.diagnosis_valid === true,
|
|
4515
|
-
|
|
4496
|
+
businessProofPlanReady: validation.valid === true && validation.status === 'ready',
|
|
4516
4497
|
activeRoute: route,
|
|
4517
4498
|
action: action,
|
|
4518
4499
|
expectedEvidence: cleanText(activeProbe.expected_evidence || activeProbe.expectedEvidence, 1200),
|
|
@@ -4522,10 +4503,11 @@ function supportIssueClassProbePlanGate(plan, diagnosisGate, now, required) {
|
|
|
4522
4503
|
falsePassBlockers: falsePassBlockers,
|
|
4523
4504
|
blockers: blockers,
|
|
4524
4505
|
activeProbe: {
|
|
4525
|
-
issueClass: issueClass,
|
|
4526
4506
|
route: route,
|
|
4527
4507
|
action: action,
|
|
4528
|
-
probeType: cleanText(activeProbe.probe_type || activeProbe.probeType, 120)
|
|
4508
|
+
probeType: cleanText(activeProbe.probe_type || activeProbe.probeType, 120) === 'issue_class_probe'
|
|
4509
|
+
? 'business_proof'
|
|
4510
|
+
: cleanText(activeProbe.probe_type || activeProbe.probeType, 120),
|
|
4529
4511
|
failureClass: cleanText(activeProbe.failure_class || activeProbe.failureClass, 120),
|
|
4530
4512
|
blocksAcceptanceWithoutBusinessAssertion: activeProbe.blocks_acceptance_without_business_assertion === true
|
|
4531
4513
|
|| activeProbe.blocksAcceptanceWithoutBusinessAssertion === true
|
|
@@ -5483,7 +5465,7 @@ function applyAssistantAnswerQualityGate(qa, decision, now) {
|
|
|
5483
5465
|
}
|
|
5484
5466
|
function buildSupportAIRunFromEvidence(input) {
|
|
5485
5467
|
var e_32, _a, e_33, _b;
|
|
5486
|
-
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, _170, _171, _172, _173, _174, _175, _176, _177, _178, _179, _180, _181, _182, _183, _184, _185, _186, _187, _188, _189, _190, _191, _192, _193, _194, _195, _196, _197, _198, _199, _200, _201, _202, _203, _204, _205, _206, _207, _208, _209, _210, _211, _212, _213, _214, _215, _216, _217, _218, _219, _220, _221, _222, _223, _224, _225, _226, _227, _228, _229, _230, _231, _232, _233, _234, _235, _236, _237, _238, _239, _240, _241, _242, _243, _244, _245, _246, _247, _248, _249, _250, _251, _252, _253, _254, _255, _256, _257, _258, _259, _260, _261, _262, _263, _264, _265, _266, _267, _268, _269, _270, _271, _272, _273, _274, _275, _276, _277, _278, _279, _280, _281, _282, _283, _284, _285, _286, _287, _288, _289, _290, _291, _292, _293, _294, _295, _296, _297, _298, _299, _300, _301, _302, _303, _304, _305, _306, _307, _308, _309, _310, _311, _312, _313, _314, _315, _316, _317, _318, _319, _320, _321, _322, _323, _324, _325, _326, _327, _328, _329, _330, _331, _332, _333, _334, _335, _336, _337, _338, _339, _340, _341, _342, _343, _344, _345, _346, _347, _348, _349, _350, _351, _352, _353, _354, _355, _356, _357, _358, _359, _360, _361, _362, _363, _364, _365, _366, _367, _368, _369, _370, _371, _372, _373, _374, _375, _376, _377, _378, _379, _380, _381, _382, _383, _384, _385, _386, _387, _388, _389, _390, _391, _392, _393, _394, _395, _396, _397, _398, _399, _400, _401, _402, _403, _404, _405, _406, _407, _408, _409, _410, _411, _412, _413, _414, _415, _416, _417, _418, _419, _420, _421, _422, _423, _424, _425, _426, _427, _428, _429, _430, _431, _432, _433, _434, _435, _436, _437, _438, _439, _440, _441, _442, _443, _444, _445, _446, _447, _448, _449, _450, _451, _452, _453, _454, _455, _456, _457, _458, _459, _460, _461, _462, _463, _464, _465, _466, _467, _468, _469, _470, _471, _472, _473, _474, _475, _476, _477, _478, _479, _480, _481, _482, _483, _484, _485, _486, _487, _488, _489, _490, _491, _492, _493, _494, _495, _496, _497, _498, _499, _500, _501, _502, _503, _504, _505, _506, _507, _508, _509, _510, _511, _512, _513, _514, _515, _516, _517, _518, _519, _520, _521, _522, _523, _524, _525, _526, _527, _528, _529, _530, _531, _532, _533, _534, _535, _536, _537, _538, _539, _540;
|
|
5468
|
+
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, _170, _171, _172, _173, _174, _175, _176, _177, _178, _179, _180, _181, _182, _183, _184, _185, _186, _187, _188, _189, _190, _191, _192, _193, _194, _195, _196, _197, _198, _199, _200, _201, _202, _203, _204, _205, _206, _207, _208, _209, _210, _211, _212, _213, _214, _215, _216, _217, _218, _219, _220, _221, _222, _223, _224, _225, _226, _227, _228, _229, _230, _231, _232, _233, _234, _235, _236, _237, _238, _239, _240, _241, _242, _243, _244, _245, _246, _247, _248, _249, _250, _251, _252, _253, _254, _255, _256, _257, _258, _259, _260, _261, _262, _263, _264, _265, _266, _267, _268, _269, _270, _271, _272, _273, _274, _275, _276, _277, _278, _279, _280, _281, _282, _283, _284, _285, _286, _287, _288, _289, _290, _291, _292, _293, _294, _295, _296, _297, _298, _299, _300, _301, _302, _303, _304, _305, _306, _307, _308, _309, _310, _311, _312, _313, _314, _315, _316, _317, _318, _319, _320, _321, _322, _323, _324, _325, _326, _327, _328, _329, _330, _331, _332, _333, _334, _335, _336, _337, _338, _339, _340, _341, _342, _343, _344, _345, _346, _347, _348, _349, _350, _351, _352, _353, _354, _355, _356, _357, _358, _359, _360, _361, _362, _363, _364, _365, _366, _367, _368, _369, _370, _371, _372, _373, _374, _375, _376, _377, _378, _379, _380, _381, _382, _383, _384, _385, _386, _387, _388, _389, _390, _391, _392, _393, _394, _395, _396, _397, _398, _399, _400, _401, _402, _403, _404, _405, _406, _407, _408, _409, _410, _411, _412, _413, _414, _415, _416, _417, _418, _419, _420, _421, _422, _423, _424, _425, _426, _427, _428, _429, _430, _431, _432, _433, _434, _435, _436, _437, _438, _439, _440, _441, _442, _443, _444, _445, _446, _447, _448, _449, _450, _451, _452, _453, _454, _455, _456, _457, _458, _459, _460, _461, _462, _463, _464, _465, _466, _467, _468, _469, _470, _471, _472, _473, _474, _475, _476, _477, _478, _479, _480, _481, _482, _483, _484, _485, _486, _487, _488, _489, _490, _491, _492, _493, _494, _495, _496, _497, _498, _499, _500, _501, _502, _503, _504, _505, _506, _507, _508, _509, _510, _511, _512, _513, _514, _515, _516, _517, _518, _519, _520, _521, _522, _523, _524, _525, _526, _527, _528, _529, _530, _531, _532, _533, _534, _535, _536, _537, _538, _539, _540, _541, _542, _543, _544;
|
|
5487
5469
|
var ticket = input.ticket || {};
|
|
5488
5470
|
var job = input.job || {};
|
|
5489
5471
|
var evidence = buildSupportQaEvidence(input);
|
|
@@ -5495,8 +5477,8 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
5495
5477
|
addSourceId(sourceIds, 'jobId', job._id || job.id || job.jobId);
|
|
5496
5478
|
addSourceId(sourceIds, 'buildPlanId', job.buildPlanId || ticket.buildPlanId);
|
|
5497
5479
|
try {
|
|
5498
|
-
for (var
|
|
5499
|
-
var event_1 =
|
|
5480
|
+
for (var _545 = __values(asArray(input.taskEvents)), _546 = _545.next(); !_546.done; _546 = _545.next()) {
|
|
5481
|
+
var event_1 = _546.value;
|
|
5500
5482
|
pushEvent(events, {
|
|
5501
5483
|
type: event_1.type === 'human_intervention' ? 'human_intervention' : 'log',
|
|
5502
5484
|
category: cleanText(event_1.category || event_1.phase || event_1.type, 160),
|
|
@@ -5513,13 +5495,13 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
5513
5495
|
catch (e_32_1) { e_32 = { error: e_32_1 }; }
|
|
5514
5496
|
finally {
|
|
5515
5497
|
try {
|
|
5516
|
-
if (
|
|
5498
|
+
if (_546 && !_546.done && (_a = _545.return)) _a.call(_545);
|
|
5517
5499
|
}
|
|
5518
5500
|
finally { if (e_32) throw e_32.error; }
|
|
5519
5501
|
}
|
|
5520
5502
|
try {
|
|
5521
|
-
for (var
|
|
5522
|
-
var aiJob =
|
|
5503
|
+
for (var _547 = __values(asArray(input.aiJobs)), _548 = _547.next(); !_548.done; _548 = _547.next()) {
|
|
5504
|
+
var aiJob = _548.value;
|
|
5523
5505
|
pushEvent(events, {
|
|
5524
5506
|
type: aiJob.model ? 'model_call' : 'log',
|
|
5525
5507
|
category: cleanText(aiJob.category || aiJob.phase || aiJob.runner, 160),
|
|
@@ -5537,7 +5519,7 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
5537
5519
|
catch (e_33_1) { e_33 = { error: e_33_1 }; }
|
|
5538
5520
|
finally {
|
|
5539
5521
|
try {
|
|
5540
|
-
if (
|
|
5522
|
+
if (_548 && !_548.done && (_b = _547.return)) _b.call(_547);
|
|
5541
5523
|
}
|
|
5542
5524
|
finally { if (e_33) throw e_33.error; }
|
|
5543
5525
|
}
|
|
@@ -5909,7 +5891,6 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
5909
5891
|
? (0, support_runner_v5_1.buildResolveIOSupportDiagnosisEvidencePack)({
|
|
5910
5892
|
diagnosisGate: diagnosisGate,
|
|
5911
5893
|
similarCaseHints: similarFixHints,
|
|
5912
|
-
issueClass: diagnosisGate.issue_class || diagnosisGate.issueClass,
|
|
5913
5894
|
ownerFiles: diagnosisGate.owner_files || diagnosisGate.ownerFiles,
|
|
5914
5895
|
text: [
|
|
5915
5896
|
ticket.title,
|
|
@@ -5954,15 +5935,15 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
5954
5935
|
var issueClassProbePlan = Object.keys(issueClassProbePlanSource).length
|
|
5955
5936
|
? issueClassProbePlanSource
|
|
5956
5937
|
: Object.keys(diagnosisGate).length
|
|
5957
|
-
? (0, support_runner_v5_1.
|
|
5938
|
+
? (0, support_runner_v5_1.buildResolveIOSupportBusinessProofPlan)(diagnosisGate, input.now)
|
|
5958
5939
|
: {};
|
|
5959
5940
|
var issueClassProbePlanRequired = nextActionContractRequired || Object.keys(diagnosisGate).length > 0;
|
|
5960
|
-
var issueClassProbePlanGate =
|
|
5941
|
+
var issueClassProbePlanGate = supportBusinessProofPlanGate(issueClassProbePlan, diagnosisGate, input.now, issueClassProbePlanRequired);
|
|
5961
5942
|
if (issueClassProbePlanGate) {
|
|
5962
5943
|
gates.push(issueClassProbePlanGate);
|
|
5963
5944
|
pushEvent(events, {
|
|
5964
5945
|
type: 'log',
|
|
5965
|
-
category: '
|
|
5946
|
+
category: 'support_business_proof_plan',
|
|
5966
5947
|
message: issueClassProbePlanGate.reason,
|
|
5967
5948
|
artifactPaths: issueClassProbePlanGate.evidenceRefs,
|
|
5968
5949
|
recordedAt: issueClassProbePlanGate.recordedAt,
|
|
@@ -6026,7 +6007,6 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
6026
6007
|
}
|
|
6027
6008
|
var qa = applySupportDiagnosisProofGate(buildQaFromEvidence(evidence, input.now), diagnosisGate, input.now);
|
|
6028
6009
|
var diagnosisOwnerFiles = asArray(diagnosisGate.owner_files || diagnosisGate.ownerFiles);
|
|
6029
|
-
var diagnosisIssueClass = cleanText(diagnosisGate.issue_class || diagnosisGate.issueClass, 120);
|
|
6030
6010
|
if (Object.keys(diagnosisGate).length) {
|
|
6031
6011
|
pushEvent(events, {
|
|
6032
6012
|
type: 'log',
|
|
@@ -6034,7 +6014,6 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
6034
6014
|
message: cleanText(((_e = diagnosisGate.accepted_hypothesis) === null || _e === void 0 ? void 0 : _e.statement) || ((_f = diagnosisGate.acceptedHypothesis) === null || _f === void 0 ? void 0 : _f.statement) || diagnosisGate.summary || 'Support diagnosis gate recorded.', 1800),
|
|
6035
6015
|
metadata: {
|
|
6036
6016
|
status: diagnosisGate.status,
|
|
6037
|
-
issueClass: diagnosisIssueClass,
|
|
6038
6017
|
ownerFiles: diagnosisOwnerFiles
|
|
6039
6018
|
}
|
|
6040
6019
|
});
|
|
@@ -6478,131 +6457,123 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
6478
6457
|
evidenceOnly: ((_342 = evidenceProbeContractGate.metadata) === null || _342 === void 0 ? void 0 : _342.evidenceOnly) === true,
|
|
6479
6458
|
productRepairAllowed: ((_343 = evidenceProbeContractGate.metadata) === null || _343 === void 0 ? void 0 : _343.productRepairAllowed) === true,
|
|
6480
6459
|
canRunWithoutCodexMonitor: ((_344 = evidenceProbeContractGate.metadata) === null || _344 === void 0 ? void 0 : _344.canRunWithoutCodexMonitor) === true,
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
blockers: cleanStringList((_357 = evidenceProbeContractGate.metadata) === null || _357 === void 0 ? void 0 : _357.blockers, 20, 500)
|
|
6460
|
+
planId: cleanText((_345 = evidenceProbeContractGate.metadata) === null || _345 === void 0 ? void 0 : _345.planId, 200),
|
|
6461
|
+
activeRoute: cleanText((_346 = evidenceProbeContractGate.metadata) === null || _346 === void 0 ? void 0 : _346.activeRoute, 500),
|
|
6462
|
+
actionUnderTest: cleanText((_347 = evidenceProbeContractGate.metadata) === null || _347 === void 0 ? void 0 : _347.actionUnderTest, 1000),
|
|
6463
|
+
expectedBusinessProof: cleanText((_348 = evidenceProbeContractGate.metadata) === null || _348 === void 0 ? void 0 : _348.expectedBusinessProof, 1200),
|
|
6464
|
+
startingFailureClass: cleanText((_349 = evidenceProbeContractGate.metadata) === null || _349 === void 0 ? void 0 : _349.startingFailureClass, 120),
|
|
6465
|
+
startingEvidenceHash: cleanText((_350 = evidenceProbeContractGate.metadata) === null || _350 === void 0 ? void 0 : _350.startingEvidenceHash, 200),
|
|
6466
|
+
sameFailureCount: Number(((_351 = evidenceProbeContractGate.metadata) === null || _351 === void 0 ? void 0 : _351.sameFailureCount) || 0),
|
|
6467
|
+
requiredNewSignals: cleanStringList((_352 = evidenceProbeContractGate.metadata) === null || _352 === void 0 ? void 0 : _352.requiredNewSignals, 20, 500),
|
|
6468
|
+
requiredArtifacts: cleanStringList((_353 = evidenceProbeContractGate.metadata) === null || _353 === void 0 ? void 0 : _353.requiredArtifacts, 20, 500),
|
|
6469
|
+
acceptableEvidence: cleanStringList((_354 = evidenceProbeContractGate.metadata) === null || _354 === void 0 ? void 0 : _354.acceptableEvidence, 20, 500),
|
|
6470
|
+
nextCommands: cleanStringList((_355 = evidenceProbeContractGate.metadata) === null || _355 === void 0 ? void 0 : _355.nextCommands, 20, 300),
|
|
6471
|
+
blockers: cleanStringList((_356 = evidenceProbeContractGate.metadata) === null || _356 === void 0 ? void 0 : _356.blockers, 20, 500)
|
|
6494
6472
|
} : undefined,
|
|
6495
6473
|
diagnosisBeforeRepair: diagnosisBeforeRepairGate ? {
|
|
6496
6474
|
status: diagnosisBeforeRepairGate.status,
|
|
6497
|
-
diagnosisValid: ((
|
|
6498
|
-
diagnosisStatus: cleanText((
|
|
6499
|
-
activityCount: Number(((
|
|
6500
|
-
changedFiles: cleanStringList((
|
|
6501
|
-
allowedDispatchAction: cleanText((
|
|
6502
|
-
productRepairAllowed: ((
|
|
6503
|
-
blockers: cleanStringList((
|
|
6475
|
+
diagnosisValid: ((_357 = diagnosisBeforeRepairGate.metadata) === null || _357 === void 0 ? void 0 : _357.diagnosisValid) === true,
|
|
6476
|
+
diagnosisStatus: cleanText((_358 = diagnosisBeforeRepairGate.metadata) === null || _358 === void 0 ? void 0 : _358.diagnosisStatus, 120),
|
|
6477
|
+
activityCount: Number(((_359 = diagnosisBeforeRepairGate.metadata) === null || _359 === void 0 ? void 0 : _359.activityCount) || 0),
|
|
6478
|
+
changedFiles: cleanStringList((_360 = diagnosisBeforeRepairGate.metadata) === null || _360 === void 0 ? void 0 : _360.changedFiles, 40, 500),
|
|
6479
|
+
allowedDispatchAction: cleanText((_361 = diagnosisBeforeRepairGate.metadata) === null || _361 === void 0 ? void 0 : _361.allowedDispatchAction, 160),
|
|
6480
|
+
productRepairAllowed: ((_362 = diagnosisBeforeRepairGate.metadata) === null || _362 === void 0 ? void 0 : _362.productRepairAllowed) === true,
|
|
6481
|
+
blockers: cleanStringList((_363 = diagnosisBeforeRepairGate.metadata) === null || _363 === void 0 ? void 0 : _363.blockers, 20, 500)
|
|
6504
6482
|
} : undefined,
|
|
6505
6483
|
ownerFileScope: ownerFileScopeGate ? {
|
|
6506
6484
|
status: ownerFileScopeGate.status,
|
|
6507
|
-
productRepairAllowed: ((
|
|
6508
|
-
allowedDispatchAction: cleanText((
|
|
6509
|
-
ownerFiles: cleanStringList((
|
|
6510
|
-
changedFiles: cleanStringList((
|
|
6511
|
-
outsideOwnerFiles: cleanStringList((
|
|
6512
|
-
allowedTestFilesOutsideOwnerScope: ((
|
|
6513
|
-
requiredEvidence: cleanStringList((
|
|
6485
|
+
productRepairAllowed: ((_364 = ownerFileScopeGate.metadata) === null || _364 === void 0 ? void 0 : _364.productRepairAllowed) === true,
|
|
6486
|
+
allowedDispatchAction: cleanText((_365 = ownerFileScopeGate.metadata) === null || _365 === void 0 ? void 0 : _365.allowedDispatchAction, 160),
|
|
6487
|
+
ownerFiles: cleanStringList((_366 = ownerFileScopeGate.metadata) === null || _366 === void 0 ? void 0 : _366.ownerFiles, 40, 500),
|
|
6488
|
+
changedFiles: cleanStringList((_367 = ownerFileScopeGate.metadata) === null || _367 === void 0 ? void 0 : _367.changedFiles, 60, 500),
|
|
6489
|
+
outsideOwnerFiles: cleanStringList((_368 = ownerFileScopeGate.metadata) === null || _368 === void 0 ? void 0 : _368.outsideOwnerFiles, 40, 500),
|
|
6490
|
+
allowedTestFilesOutsideOwnerScope: ((_369 = ownerFileScopeGate.metadata) === null || _369 === void 0 ? void 0 : _369.allowedTestFilesOutsideOwnerScope) === true,
|
|
6491
|
+
requiredEvidence: cleanStringList((_370 = ownerFileScopeGate.metadata) === null || _370 === void 0 ? void 0 : _370.requiredEvidence, 20, 500)
|
|
6514
6492
|
} : undefined,
|
|
6515
6493
|
rootCauseEntryContract: Object.keys(rootCauseEntryContract).length ? {
|
|
6516
6494
|
contractId: cleanText(rootCauseEntryContract.contract_id || rootCauseEntryContract.contractId, 160),
|
|
6517
6495
|
version: cleanText(rootCauseEntryContract.version, 120),
|
|
6518
6496
|
status: cleanText(rootCauseEntryContract.status, 120),
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|| ((_375 = rootCauseEntryContract.businessProofPolicy) === null || _375 === void 0 ? void 0 : _375.requiresAiqaBusinessAssertion) === true
|
|
6497
|
+
ownerFileMax: Number(((_371 = rootCauseEntryContract.owner_file_policy) === null || _371 === void 0 ? void 0 : _371.max_files) || ((_372 = rootCauseEntryContract.ownerFilePolicy) === null || _372 === void 0 ? void 0 : _372.maxFiles) || 0) || 0,
|
|
6498
|
+
requiresBusinessAssertion: ((_373 = rootCauseEntryContract.business_proof_policy) === null || _373 === void 0 ? void 0 : _373.requires_aiqa_business_assertion) === true
|
|
6499
|
+
|| ((_374 = rootCauseEntryContract.businessProofPolicy) === null || _374 === void 0 ? void 0 : _374.requiresAiqaBusinessAssertion) === true
|
|
6523
6500
|
} : undefined,
|
|
6524
6501
|
diagnosis: Object.keys(diagnosisGate).length ? {
|
|
6525
6502
|
status: cleanText(diagnosisGate.status, 80),
|
|
6526
|
-
issueClass: diagnosisIssueClass,
|
|
6527
6503
|
ownerFiles: diagnosisOwnerFiles,
|
|
6528
|
-
acceptedHypothesis: cleanText(((
|
|
6504
|
+
acceptedHypothesis: cleanText(((_375 = diagnosisGate.accepted_hypothesis) === null || _375 === void 0 ? void 0 : _375.statement) || ((_376 = diagnosisGate.acceptedHypothesis) === null || _376 === void 0 ? void 0 : _376.statement), 1000),
|
|
6529
6505
|
proofPlan: diagnosisGate.proof_plan || diagnosisGate.proofPlan,
|
|
6530
|
-
proofMatrixId: cleanText((
|
|
6531
|
-
proofMatrixStatus: cleanText((
|
|
6506
|
+
proofMatrixId: cleanText((_377 = diagnosisProofMatrixGate === null || diagnosisProofMatrixGate === void 0 ? void 0 : diagnosisProofMatrixGate.metadata) === null || _377 === void 0 ? void 0 : _377.matrixId, 180),
|
|
6507
|
+
proofMatrixStatus: cleanText((_378 = diagnosisProofMatrixGate === null || diagnosisProofMatrixGate === void 0 ? void 0 : diagnosisProofMatrixGate.metadata) === null || _378 === void 0 ? void 0 : _378.status, 120)
|
|
6532
6508
|
} : undefined,
|
|
6533
6509
|
diagnosisProofMatrix: diagnosisProofMatrixGate ? {
|
|
6534
6510
|
status: diagnosisProofMatrixGate.status,
|
|
6535
|
-
matrixId: cleanText((
|
|
6536
|
-
matrixStatus: cleanText((
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
blockers: cleanStringList((_388 = diagnosisProofMatrixGate.metadata) === null || _388 === void 0 ? void 0 : _388.blockers, 40, 500)
|
|
6511
|
+
matrixId: cleanText((_379 = diagnosisProofMatrixGate.metadata) === null || _379 === void 0 ? void 0 : _379.matrixId, 180),
|
|
6512
|
+
matrixStatus: cleanText((_380 = diagnosisProofMatrixGate.metadata) === null || _380 === void 0 ? void 0 : _380.status, 120),
|
|
6513
|
+
ownerFiles: cleanStringList((_381 = diagnosisProofMatrixGate.metadata) === null || _381 === void 0 ? void 0 : _381.ownerFiles, 40, 500),
|
|
6514
|
+
uncoveredOwnerFiles: cleanStringList((_382 = diagnosisProofMatrixGate.metadata) === null || _382 === void 0 ? void 0 : _382.uncoveredOwnerFiles, 40, 500),
|
|
6515
|
+
reproductionEvidenceCount: Number(((_383 = diagnosisProofMatrixGate.metadata) === null || _383 === void 0 ? void 0 : _383.reproductionEvidenceCount) || 0),
|
|
6516
|
+
rootCauseEvidenceCount: Number(((_384 = diagnosisProofMatrixGate.metadata) === null || _384 === void 0 ? void 0 : _384.rootCauseEvidenceCount) || 0),
|
|
6517
|
+
businessProofArtifacts: cleanStringList((_385 = diagnosisProofMatrixGate.metadata) === null || _385 === void 0 ? void 0 : _385.businessProofArtifacts, 40, 500),
|
|
6518
|
+
blockers: cleanStringList((_386 = diagnosisProofMatrixGate.metadata) === null || _386 === void 0 ? void 0 : _386.blockers, 40, 500)
|
|
6544
6519
|
} : undefined,
|
|
6545
6520
|
ownerScopedRepairContract: ownerScopedRepairContractGate ? {
|
|
6546
6521
|
status: ownerScopedRepairContractGate.status,
|
|
6547
|
-
contractId: cleanText((
|
|
6548
|
-
contractStatus: cleanText((
|
|
6549
|
-
sourceEditsAllowed: ((
|
|
6550
|
-
canRunWithoutCodexMonitor: ((
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
blockers: cleanStringList((_400 = ownerScopedRepairContractGate.metadata) === null || _400 === void 0 ? void 0 : _400.blockers, 40, 500)
|
|
6522
|
+
contractId: cleanText((_387 = ownerScopedRepairContractGate.metadata) === null || _387 === void 0 ? void 0 : _387.contractId, 180),
|
|
6523
|
+
contractStatus: cleanText((_388 = ownerScopedRepairContractGate.metadata) === null || _388 === void 0 ? void 0 : _388.status, 120),
|
|
6524
|
+
sourceEditsAllowed: ((_389 = ownerScopedRepairContractGate.metadata) === null || _389 === void 0 ? void 0 : _389.sourceEditsAllowed) === true,
|
|
6525
|
+
canRunWithoutCodexMonitor: ((_390 = ownerScopedRepairContractGate.metadata) === null || _390 === void 0 ? void 0 : _390.canRunWithoutCodexMonitor) === true,
|
|
6526
|
+
ownerFiles: cleanStringList((_391 = ownerScopedRepairContractGate.metadata) === null || _391 === void 0 ? void 0 : _391.ownerFiles, 40, 500),
|
|
6527
|
+
proofMatrixId: cleanText((_392 = ownerScopedRepairContractGate.metadata) === null || _392 === void 0 ? void 0 : _392.proofMatrixId, 180),
|
|
6528
|
+
changedFiles: cleanStringList((_393 = ownerScopedRepairContractGate.metadata) === null || _393 === void 0 ? void 0 : _393.changedFiles, 60, 500),
|
|
6529
|
+
outsideOwnerFiles: cleanStringList((_394 = ownerScopedRepairContractGate.metadata) === null || _394 === void 0 ? void 0 : _394.outsideOwnerFiles, 40, 500),
|
|
6530
|
+
patchUnitCount: Number(((_395 = ownerScopedRepairContractGate.metadata) === null || _395 === void 0 ? void 0 : _395.patchUnitCount) || 0),
|
|
6531
|
+
requiredEvidenceAfterRepair: cleanStringList((_396 = ownerScopedRepairContractGate.metadata) === null || _396 === void 0 ? void 0 : _396.requiredEvidenceAfterRepair, 30, 500),
|
|
6532
|
+
blockers: cleanStringList((_397 = ownerScopedRepairContractGate.metadata) === null || _397 === void 0 ? void 0 : _397.blockers, 40, 500)
|
|
6559
6533
|
} : undefined,
|
|
6560
6534
|
diagnosisEvidencePack: diagnosisEvidencePackGate ? {
|
|
6561
|
-
status: cleanText((
|
|
6535
|
+
status: cleanText((_398 = diagnosisEvidencePackGate.metadata) === null || _398 === void 0 ? void 0 : _398.status, 120),
|
|
6562
6536
|
gateStatus: diagnosisEvidencePackGate.status,
|
|
6563
|
-
packId: cleanText((
|
|
6564
|
-
readOnly: ((
|
|
6565
|
-
sourceEditsAllowed: ((
|
|
6566
|
-
requiredOutputKey: cleanText((
|
|
6567
|
-
diagnosisValid: ((
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
issueClassProbeCount: Number(((_411 = diagnosisEvidencePackGate.metadata) === null || _411 === void 0 ? void 0 : _411.issueClassProbeCount) || 0),
|
|
6573
|
-
validationBlockers: cleanStringList((_412 = diagnosisEvidencePackGate.metadata) === null || _412 === void 0 ? void 0 : _412.validationBlockers, 20, 500)
|
|
6537
|
+
packId: cleanText((_399 = diagnosisEvidencePackGate.metadata) === null || _399 === void 0 ? void 0 : _399.packId, 180),
|
|
6538
|
+
readOnly: ((_400 = diagnosisEvidencePackGate.metadata) === null || _400 === void 0 ? void 0 : _400.readOnly) !== false,
|
|
6539
|
+
sourceEditsAllowed: ((_401 = diagnosisEvidencePackGate.metadata) === null || _401 === void 0 ? void 0 : _401.sourceEditsAllowed) === true,
|
|
6540
|
+
requiredOutputKey: cleanText((_402 = diagnosisEvidencePackGate.metadata) === null || _402 === void 0 ? void 0 : _402.requiredOutputKey, 120),
|
|
6541
|
+
diagnosisValid: ((_403 = diagnosisEvidencePackGate.metadata) === null || _403 === void 0 ? void 0 : _403.diagnosisValid) === true,
|
|
6542
|
+
ownerFileHints: cleanStringList((_404 = diagnosisEvidencePackGate.metadata) === null || _404 === void 0 ? void 0 : _404.ownerFileHints, 20, 500),
|
|
6543
|
+
similarHintCount: Number(((_405 = diagnosisEvidencePackGate.metadata) === null || _405 === void 0 ? void 0 : _405.similarHintCount) || 0),
|
|
6544
|
+
similarHintsAdvisoryOnly: ((_406 = diagnosisEvidencePackGate.metadata) === null || _406 === void 0 ? void 0 : _406.similarHintsAdvisoryOnly) === true,
|
|
6545
|
+
validationBlockers: cleanStringList((_407 = diagnosisEvidencePackGate.metadata) === null || _407 === void 0 ? void 0 : _407.validationBlockers, 20, 500)
|
|
6574
6546
|
} : undefined,
|
|
6575
6547
|
similarFixHintContract: similarFixHintContractGate ? {
|
|
6576
6548
|
gateStatus: similarFixHintContractGate.status,
|
|
6577
|
-
contractId: cleanText((
|
|
6578
|
-
version: cleanText((
|
|
6579
|
-
status: cleanText((
|
|
6580
|
-
source: cleanText((
|
|
6581
|
-
candidateCount: Number(((
|
|
6582
|
-
hintCount: Number(((
|
|
6583
|
-
rankedHintCount: Number(((
|
|
6584
|
-
ownerFileHints: cleanStringList((
|
|
6585
|
-
advisoryOnly: ((
|
|
6586
|
-
similarHintsAreNotProof: ((
|
|
6587
|
-
ownerFilesRequireCurrentEvidence: ((
|
|
6588
|
-
acceptedHypothesisCurrent: ((
|
|
6589
|
-
requiredModelActions: cleanStringList((
|
|
6590
|
-
blockers: cleanStringList((
|
|
6549
|
+
contractId: cleanText((_408 = similarFixHintContractGate.metadata) === null || _408 === void 0 ? void 0 : _408.contractId, 200),
|
|
6550
|
+
version: cleanText((_409 = similarFixHintContractGate.metadata) === null || _409 === void 0 ? void 0 : _409.version, 120),
|
|
6551
|
+
status: cleanText((_410 = similarFixHintContractGate.metadata) === null || _410 === void 0 ? void 0 : _410.status, 120),
|
|
6552
|
+
source: cleanText((_411 = similarFixHintContractGate.metadata) === null || _411 === void 0 ? void 0 : _411.source, 160),
|
|
6553
|
+
candidateCount: Number(((_412 = similarFixHintContractGate.metadata) === null || _412 === void 0 ? void 0 : _412.candidateCount) || 0),
|
|
6554
|
+
hintCount: Number(((_413 = similarFixHintContractGate.metadata) === null || _413 === void 0 ? void 0 : _413.hintCount) || 0),
|
|
6555
|
+
rankedHintCount: Number(((_414 = similarFixHintContractGate.metadata) === null || _414 === void 0 ? void 0 : _414.rankedHintCount) || 0),
|
|
6556
|
+
ownerFileHints: cleanStringList((_415 = similarFixHintContractGate.metadata) === null || _415 === void 0 ? void 0 : _415.ownerFileHints, 30, 500),
|
|
6557
|
+
advisoryOnly: ((_416 = similarFixHintContractGate.metadata) === null || _416 === void 0 ? void 0 : _416.advisoryOnly) === true,
|
|
6558
|
+
similarHintsAreNotProof: ((_417 = similarFixHintContractGate.metadata) === null || _417 === void 0 ? void 0 : _417.similarHintsAreNotProof) === true,
|
|
6559
|
+
ownerFilesRequireCurrentEvidence: ((_418 = similarFixHintContractGate.metadata) === null || _418 === void 0 ? void 0 : _418.ownerFilesRequireCurrentEvidence) === true,
|
|
6560
|
+
acceptedHypothesisCurrent: ((_419 = similarFixHintContractGate.metadata) === null || _419 === void 0 ? void 0 : _419.acceptedHypothesisCurrent) === true,
|
|
6561
|
+
requiredModelActions: cleanStringList((_420 = similarFixHintContractGate.metadata) === null || _420 === void 0 ? void 0 : _420.requiredModelActions, 20, 500),
|
|
6562
|
+
blockers: cleanStringList((_421 = similarFixHintContractGate.metadata) === null || _421 === void 0 ? void 0 : _421.blockers, 20, 500)
|
|
6591
6563
|
} : undefined,
|
|
6592
|
-
|
|
6593
|
-
status: cleanText((
|
|
6564
|
+
businessProofPlan: issueClassProbePlanGate ? {
|
|
6565
|
+
status: cleanText((_422 = issueClassProbePlanGate.metadata) === null || _422 === void 0 ? void 0 : _422.status, 120),
|
|
6594
6566
|
gateStatus: issueClassProbePlanGate.status,
|
|
6595
|
-
planId: cleanText((
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
blockers: cleanStringList((_438 = issueClassProbePlanGate.metadata) === null || _438 === void 0 ? void 0 : _438.blockers, 20, 500)
|
|
6567
|
+
planId: cleanText((_423 = issueClassProbePlanGate.metadata) === null || _423 === void 0 ? void 0 : _423.planId, 180),
|
|
6568
|
+
diagnosisValid: ((_424 = issueClassProbePlanGate.metadata) === null || _424 === void 0 ? void 0 : _424.diagnosisValid) === true,
|
|
6569
|
+
businessProofPlanReady: ((_425 = issueClassProbePlanGate.metadata) === null || _425 === void 0 ? void 0 : _425.issueClassProbePlanReady) === true || ((_426 = issueClassProbePlanGate.metadata) === null || _426 === void 0 ? void 0 : _426.businessProofPlanReady) === true,
|
|
6570
|
+
activeRoute: cleanText((_427 = issueClassProbePlanGate.metadata) === null || _427 === void 0 ? void 0 : _427.activeRoute, 500),
|
|
6571
|
+
action: cleanText((_428 = issueClassProbePlanGate.metadata) === null || _428 === void 0 ? void 0 : _428.action, 1000),
|
|
6572
|
+
expectedBusinessProof: cleanText((_429 = issueClassProbePlanGate.metadata) === null || _429 === void 0 ? void 0 : _429.expectedBusinessProof, 1200),
|
|
6573
|
+
acceptanceGate: cleanText((_430 = issueClassProbePlanGate.metadata) === null || _430 === void 0 ? void 0 : _430.acceptanceGate, 120),
|
|
6574
|
+
requiredArtifacts: cleanStringList((_431 = issueClassProbePlanGate.metadata) === null || _431 === void 0 ? void 0 : _431.requiredArtifacts, 20, 500),
|
|
6575
|
+
falsePassBlockers: cleanStringList((_432 = issueClassProbePlanGate.metadata) === null || _432 === void 0 ? void 0 : _432.falsePassBlockers, 20, 500),
|
|
6576
|
+
blockers: cleanStringList((_433 = issueClassProbePlanGate.metadata) === null || _433 === void 0 ? void 0 : _433.blockers, 20, 500)
|
|
6606
6577
|
} : undefined,
|
|
6607
6578
|
businessProofReadiness: Object.keys(businessProofReadiness).length ? {
|
|
6608
6579
|
ready: businessProofReadiness.ready === true,
|
|
@@ -6612,50 +6583,50 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
6612
6583
|
} : undefined,
|
|
6613
6584
|
nextActionContract: nextActionContractGate ? {
|
|
6614
6585
|
status: nextActionContractGate.status,
|
|
6615
|
-
action: cleanText((
|
|
6616
|
-
primaryCommand: cleanText((
|
|
6617
|
-
safeToAutoRun: ((
|
|
6618
|
-
canRunWithoutCodexMonitor: ((
|
|
6619
|
-
codexFallbackRequired: ((
|
|
6620
|
-
requiresHumanApproval: ((
|
|
6621
|
-
rootCauseFirstSatisfied: ((
|
|
6622
|
-
proofMatrixReady: ((
|
|
6623
|
-
proofMatrixId: cleanText((
|
|
6624
|
-
ownerScopedRepairContractReady: ((
|
|
6625
|
-
ownerScopedRepairContractId: cleanText((
|
|
6626
|
-
hotfixCommitRequired: ((
|
|
6627
|
-
liveHotfixBlockedUntilCommit: ((
|
|
6628
|
-
evidenceProbeContractReady: ((
|
|
6629
|
-
evidenceProbeContractId: cleanText((
|
|
6630
|
-
autonomyMode: cleanText((
|
|
6631
|
-
autonomyCanAutoDispatch: ((
|
|
6632
|
-
autonomyReason: cleanText((
|
|
6633
|
-
autonomyExpectedValueScore: Number(((
|
|
6634
|
-
autonomyExpectedValuePositive: ((
|
|
6635
|
-
autonomyProjectedSpendUsd: Number(((
|
|
6636
|
-
failureClass: cleanText((
|
|
6637
|
-
evidenceFreshnessStatus: cleanText((
|
|
6638
|
-
sameFailureCount: Number(((
|
|
6639
|
-
blockers: cleanStringList((
|
|
6586
|
+
action: cleanText((_434 = nextActionContractGate.metadata) === null || _434 === void 0 ? void 0 : _434.action, 160),
|
|
6587
|
+
primaryCommand: cleanText((_435 = nextActionContractGate.metadata) === null || _435 === void 0 ? void 0 : _435.primaryCommand, 240),
|
|
6588
|
+
safeToAutoRun: ((_436 = nextActionContractGate.metadata) === null || _436 === void 0 ? void 0 : _436.safeToAutoRun) === true,
|
|
6589
|
+
canRunWithoutCodexMonitor: ((_437 = nextActionContractGate.metadata) === null || _437 === void 0 ? void 0 : _437.canRunWithoutCodexMonitor) === true,
|
|
6590
|
+
codexFallbackRequired: ((_438 = nextActionContractGate.metadata) === null || _438 === void 0 ? void 0 : _438.codexFallbackRequired) === true,
|
|
6591
|
+
requiresHumanApproval: ((_439 = nextActionContractGate.metadata) === null || _439 === void 0 ? void 0 : _439.requiresHumanApproval) === true,
|
|
6592
|
+
rootCauseFirstSatisfied: ((_440 = nextActionContractGate.metadata) === null || _440 === void 0 ? void 0 : _440.rootCauseFirstSatisfied) === true,
|
|
6593
|
+
proofMatrixReady: ((_441 = nextActionContractGate.metadata) === null || _441 === void 0 ? void 0 : _441.proofMatrixReady) === true,
|
|
6594
|
+
proofMatrixId: cleanText((_442 = nextActionContractGate.metadata) === null || _442 === void 0 ? void 0 : _442.proofMatrixId, 200),
|
|
6595
|
+
ownerScopedRepairContractReady: ((_443 = nextActionContractGate.metadata) === null || _443 === void 0 ? void 0 : _443.ownerScopedRepairContractReady) === true,
|
|
6596
|
+
ownerScopedRepairContractId: cleanText((_444 = nextActionContractGate.metadata) === null || _444 === void 0 ? void 0 : _444.ownerScopedRepairContractId, 200),
|
|
6597
|
+
hotfixCommitRequired: ((_445 = nextActionContractGate.metadata) === null || _445 === void 0 ? void 0 : _445.hotfixCommitRequired) === true,
|
|
6598
|
+
liveHotfixBlockedUntilCommit: ((_446 = nextActionContractGate.metadata) === null || _446 === void 0 ? void 0 : _446.liveHotfixBlockedUntilCommit) === true,
|
|
6599
|
+
evidenceProbeContractReady: ((_447 = nextActionContractGate.metadata) === null || _447 === void 0 ? void 0 : _447.evidenceProbeContractReady) === true,
|
|
6600
|
+
evidenceProbeContractId: cleanText((_448 = nextActionContractGate.metadata) === null || _448 === void 0 ? void 0 : _448.evidenceProbeContractId, 200),
|
|
6601
|
+
autonomyMode: cleanText((_449 = nextActionContractGate.metadata) === null || _449 === void 0 ? void 0 : _449.autonomyMode, 120),
|
|
6602
|
+
autonomyCanAutoDispatch: ((_450 = nextActionContractGate.metadata) === null || _450 === void 0 ? void 0 : _450.autonomyCanAutoDispatch) === true,
|
|
6603
|
+
autonomyReason: cleanText((_451 = nextActionContractGate.metadata) === null || _451 === void 0 ? void 0 : _451.autonomyReason, 1000),
|
|
6604
|
+
autonomyExpectedValueScore: Number(((_452 = nextActionContractGate.metadata) === null || _452 === void 0 ? void 0 : _452.autonomyExpectedValueScore) || 0),
|
|
6605
|
+
autonomyExpectedValuePositive: ((_453 = nextActionContractGate.metadata) === null || _453 === void 0 ? void 0 : _453.autonomyExpectedValuePositive) === true,
|
|
6606
|
+
autonomyProjectedSpendUsd: Number(((_454 = nextActionContractGate.metadata) === null || _454 === void 0 ? void 0 : _454.autonomyProjectedSpendUsd) || 0),
|
|
6607
|
+
failureClass: cleanText((_455 = nextActionContractGate.metadata) === null || _455 === void 0 ? void 0 : _455.failureClass, 120),
|
|
6608
|
+
evidenceFreshnessStatus: cleanText((_456 = nextActionContractGate.metadata) === null || _456 === void 0 ? void 0 : _456.evidenceFreshnessStatus, 120),
|
|
6609
|
+
sameFailureCount: Number(((_457 = nextActionContractGate.metadata) === null || _457 === void 0 ? void 0 : _457.sameFailureCount) || 0),
|
|
6610
|
+
blockers: cleanStringList((_458 = nextActionContractGate.metadata) === null || _458 === void 0 ? void 0 : _458.blockers, 20, 500)
|
|
6640
6611
|
} : undefined,
|
|
6641
6612
|
managerExecutionPacket: managerExecutionPacketGate ? {
|
|
6642
|
-
status: cleanText((
|
|
6613
|
+
status: cleanText((_459 = managerExecutionPacketGate.metadata) === null || _459 === void 0 ? void 0 : _459.status, 120),
|
|
6643
6614
|
gateStatus: managerExecutionPacketGate.status,
|
|
6644
|
-
action: cleanText((
|
|
6645
|
-
primaryCommand: cleanText((
|
|
6646
|
-
executeNow: ((
|
|
6647
|
-
canRunWithoutCodexMonitor: ((
|
|
6648
|
-
codexFallbackRequired: ((
|
|
6649
|
-
retryScope: cleanText((
|
|
6650
|
-
maxAttemptsBeforeFreshEvidence: Number(((
|
|
6651
|
-
costRisk: cleanText((
|
|
6652
|
-
validationStatus: cleanText((
|
|
6653
|
-
validationValid: ((
|
|
6654
|
-
proofRequiredBeforeContinuation: cleanStringList((
|
|
6655
|
-
stopConditions: cleanStringList((
|
|
6656
|
-
forbiddenActions: cleanStringList((
|
|
6657
|
-
ownerFiles: cleanStringList((
|
|
6658
|
-
proofResetContract: ((
|
|
6615
|
+
action: cleanText((_460 = managerExecutionPacketGate.metadata) === null || _460 === void 0 ? void 0 : _460.action, 160),
|
|
6616
|
+
primaryCommand: cleanText((_461 = managerExecutionPacketGate.metadata) === null || _461 === void 0 ? void 0 : _461.primaryCommand, 240),
|
|
6617
|
+
executeNow: ((_462 = managerExecutionPacketGate.metadata) === null || _462 === void 0 ? void 0 : _462.executeNow) === true,
|
|
6618
|
+
canRunWithoutCodexMonitor: ((_463 = managerExecutionPacketGate.metadata) === null || _463 === void 0 ? void 0 : _463.canRunWithoutCodexMonitor) === true,
|
|
6619
|
+
codexFallbackRequired: ((_464 = managerExecutionPacketGate.metadata) === null || _464 === void 0 ? void 0 : _464.codexFallbackRequired) === true,
|
|
6620
|
+
retryScope: cleanText((_465 = managerExecutionPacketGate.metadata) === null || _465 === void 0 ? void 0 : _465.retryScope, 120),
|
|
6621
|
+
maxAttemptsBeforeFreshEvidence: Number(((_466 = managerExecutionPacketGate.metadata) === null || _466 === void 0 ? void 0 : _466.maxAttemptsBeforeFreshEvidence) || 0),
|
|
6622
|
+
costRisk: cleanText((_467 = managerExecutionPacketGate.metadata) === null || _467 === void 0 ? void 0 : _467.costRisk, 120),
|
|
6623
|
+
validationStatus: cleanText((_469 = (_468 = managerExecutionPacketGate.metadata) === null || _468 === void 0 ? void 0 : _468.validation) === null || _469 === void 0 ? void 0 : _469.status, 120),
|
|
6624
|
+
validationValid: ((_471 = (_470 = managerExecutionPacketGate.metadata) === null || _470 === void 0 ? void 0 : _470.validation) === null || _471 === void 0 ? void 0 : _471.valid) === true,
|
|
6625
|
+
proofRequiredBeforeContinuation: cleanStringList((_472 = managerExecutionPacketGate.metadata) === null || _472 === void 0 ? void 0 : _472.proofRequiredBeforeContinuation, 20, 500),
|
|
6626
|
+
stopConditions: cleanStringList((_473 = managerExecutionPacketGate.metadata) === null || _473 === void 0 ? void 0 : _473.stopConditions, 20, 500),
|
|
6627
|
+
forbiddenActions: cleanStringList((_474 = managerExecutionPacketGate.metadata) === null || _474 === void 0 ? void 0 : _474.forbiddenActions, 20, 500),
|
|
6628
|
+
ownerFiles: cleanStringList((_475 = managerExecutionPacketGate.metadata) === null || _475 === void 0 ? void 0 : _475.ownerFiles, 40, 500),
|
|
6629
|
+
proofResetContract: ((_476 = managerExecutionPacketGate.metadata) === null || _476 === void 0 ? void 0 : _476.proofResetContract) ? {
|
|
6659
6630
|
contractId: cleanText(managerExecutionPacketGate.metadata.proofResetContract.contractId, 200),
|
|
6660
6631
|
status: cleanText(managerExecutionPacketGate.metadata.proofResetContract.status, 120),
|
|
6661
6632
|
action: cleanText(managerExecutionPacketGate.metadata.proofResetContract.action, 160),
|
|
@@ -6671,21 +6642,21 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
6671
6642
|
sourceNextActionContractId: cleanText(managerExecutionPacketGate.metadata.proofResetContract.sourceNextActionContractId, 200),
|
|
6672
6643
|
createdAt: cleanText(managerExecutionPacketGate.metadata.proofResetContract.createdAt, 120)
|
|
6673
6644
|
} : undefined,
|
|
6674
|
-
blockers: cleanStringList((
|
|
6645
|
+
blockers: cleanStringList((_477 = managerExecutionPacketGate.metadata) === null || _477 === void 0 ? void 0 : _477.blockers, 20, 500)
|
|
6675
6646
|
} : undefined,
|
|
6676
6647
|
managerRecoveryExecutionProof: recoveryExecutionProofGate ? {
|
|
6677
|
-
status: cleanText((
|
|
6648
|
+
status: cleanText((_478 = recoveryExecutionProofGate.metadata) === null || _478 === void 0 ? void 0 : _478.status, 120),
|
|
6678
6649
|
gateStatus: recoveryExecutionProofGate.status,
|
|
6679
|
-
canContinueRun: ((
|
|
6680
|
-
canRunProductRepair: ((
|
|
6681
|
-
canRunExpensiveModel: ((
|
|
6682
|
-
canResetLoopBudget: ((
|
|
6683
|
-
newEvidence: ((
|
|
6684
|
-
materialEvidence: ((
|
|
6685
|
-
evidenceStrength: cleanText((
|
|
6686
|
-
nextAllowedAction: cleanText((
|
|
6687
|
-
missingEvidence: cleanStringList((
|
|
6688
|
-
blockers: cleanStringList((
|
|
6650
|
+
canContinueRun: ((_479 = recoveryExecutionProofGate.metadata) === null || _479 === void 0 ? void 0 : _479.canContinueRun) === true,
|
|
6651
|
+
canRunProductRepair: ((_480 = recoveryExecutionProofGate.metadata) === null || _480 === void 0 ? void 0 : _480.canRunProductRepair) === true,
|
|
6652
|
+
canRunExpensiveModel: ((_481 = recoveryExecutionProofGate.metadata) === null || _481 === void 0 ? void 0 : _481.canRunExpensiveModel) === true,
|
|
6653
|
+
canResetLoopBudget: ((_482 = recoveryExecutionProofGate.metadata) === null || _482 === void 0 ? void 0 : _482.canResetLoopBudget) === true,
|
|
6654
|
+
newEvidence: ((_483 = recoveryExecutionProofGate.metadata) === null || _483 === void 0 ? void 0 : _483.newEvidence) === true,
|
|
6655
|
+
materialEvidence: ((_484 = recoveryExecutionProofGate.metadata) === null || _484 === void 0 ? void 0 : _484.materialEvidence) === true,
|
|
6656
|
+
evidenceStrength: cleanText((_485 = recoveryExecutionProofGate.metadata) === null || _485 === void 0 ? void 0 : _485.evidenceStrength, 120),
|
|
6657
|
+
nextAllowedAction: cleanText((_486 = recoveryExecutionProofGate.metadata) === null || _486 === void 0 ? void 0 : _486.nextAllowedAction, 180),
|
|
6658
|
+
missingEvidence: cleanStringList((_487 = recoveryExecutionProofGate.metadata) === null || _487 === void 0 ? void 0 : _487.missingEvidence, 20, 500),
|
|
6659
|
+
blockers: cleanStringList((_488 = recoveryExecutionProofGate.metadata) === null || _488 === void 0 ? void 0 : _488.blockers, 20, 500)
|
|
6689
6660
|
} : undefined,
|
|
6690
6661
|
customerReplyPolicy: Object.keys(customerReplyPolicy).length ? {
|
|
6691
6662
|
action: cleanText(customerReplyPolicy.action, 120),
|
|
@@ -6693,57 +6664,66 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
6693
6664
|
canDraftCustomerReply: customerReplyPolicy.canDraftCustomerReply === true || customerReplyPolicy.can_draft_customer_reply === true,
|
|
6694
6665
|
canSendCustomerReply: customerReplyPolicy.canSendCustomerReply === true || customerReplyPolicy.can_send_customer_reply === true,
|
|
6695
6666
|
reason: cleanText(customerReplyPolicy.reason, 1000),
|
|
6696
|
-
|
|
6697
|
-
|| ((
|
|
6698
|
-
|| ((
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|| ((
|
|
6667
|
+
businessProofPlanId: cleanText(((_489 = customerReplyPolicy.draftBasis) === null || _489 === void 0 ? void 0 : _489.businessProofPlanId)
|
|
6668
|
+
|| ((_490 = customerReplyPolicy.draft_basis) === null || _490 === void 0 ? void 0 : _490.business_proof_plan_id)
|
|
6669
|
+
|| ((_491 = customerReplyPolicy.draftBasis) === null || _491 === void 0 ? void 0 : _491.issueClassProbePlanId)
|
|
6670
|
+
|| ((_492 = customerReplyPolicy.draft_basis) === null || _492 === void 0 ? void 0 : _492.issue_class_probe_plan_id), 180),
|
|
6671
|
+
businessProofPlanStatus: cleanText(((_493 = customerReplyPolicy.draftBasis) === null || _493 === void 0 ? void 0 : _493.businessProofPlanStatus)
|
|
6672
|
+
|| ((_494 = customerReplyPolicy.draft_basis) === null || _494 === void 0 ? void 0 : _494.business_proof_plan_status)
|
|
6673
|
+
|| ((_495 = customerReplyPolicy.draftBasis) === null || _495 === void 0 ? void 0 : _495.issueClassProbePlanStatus)
|
|
6674
|
+
|| ((_496 = customerReplyPolicy.draft_basis) === null || _496 === void 0 ? void 0 : _496.issue_class_probe_plan_status), 120),
|
|
6675
|
+
reviewType: cleanText(((_497 = customerReplyPolicy.humanReviewPacket) === null || _497 === void 0 ? void 0 : _497.reviewType)
|
|
6676
|
+
|| ((_498 = customerReplyPolicy.human_review_packet) === null || _498 === void 0 ? void 0 : _498.review_type)
|
|
6677
|
+
|| ((_499 = customerReplyPolicy.human_review_packet) === null || _499 === void 0 ? void 0 : _499.reviewType), 160),
|
|
6678
|
+
primaryAction: cleanText(((_500 = customerReplyPolicy.humanReviewPacket) === null || _500 === void 0 ? void 0 : _500.primaryAction)
|
|
6679
|
+
|| ((_501 = customerReplyPolicy.human_review_packet) === null || _501 === void 0 ? void 0 : _501.primary_action)
|
|
6680
|
+
|| ((_502 = customerReplyPolicy.human_review_packet) === null || _502 === void 0 ? void 0 : _502.primaryAction), 160),
|
|
6702
6681
|
clarificationContract: customerReplyPolicy.clarificationContract || customerReplyPolicy.clarification_contract ? {
|
|
6703
|
-
status: cleanText(((
|
|
6704
|
-
missingField: cleanText(((
|
|
6705
|
-
oneQuestionOnly: ((
|
|
6706
|
-
parksTicketUntilCustomerReply: ((
|
|
6682
|
+
status: cleanText(((_503 = customerReplyPolicy.clarificationContract) === null || _503 === void 0 ? void 0 : _503.status) || ((_504 = customerReplyPolicy.clarification_contract) === null || _504 === void 0 ? void 0 : _504.status), 120),
|
|
6683
|
+
missingField: cleanText(((_505 = customerReplyPolicy.clarificationContract) === null || _505 === void 0 ? void 0 : _505.missingField) || ((_506 = customerReplyPolicy.clarification_contract) === null || _506 === void 0 ? void 0 : _506.missing_field), 120),
|
|
6684
|
+
oneQuestionOnly: ((_507 = customerReplyPolicy.clarificationContract) === null || _507 === void 0 ? void 0 : _507.oneQuestionOnly) === true || ((_508 = customerReplyPolicy.clarification_contract) === null || _508 === void 0 ? void 0 : _508.one_question_only) === true,
|
|
6685
|
+
parksTicketUntilCustomerReply: ((_509 = customerReplyPolicy.clarificationContract) === null || _509 === void 0 ? void 0 : _509.parksTicketUntilCustomerReply) === true || ((_510 = customerReplyPolicy.clarification_contract) === null || _510 === void 0 ? void 0 : _510.parks_ticket_until_customer_reply) === true
|
|
6707
6686
|
} : undefined
|
|
6708
6687
|
} : undefined,
|
|
6709
6688
|
customerReplyReadiness: customerReplyReadinessGate ? {
|
|
6710
|
-
status: cleanText((
|
|
6689
|
+
status: cleanText((_511 = customerReplyReadinessGate.metadata) === null || _511 === void 0 ? void 0 : _511.status, 120),
|
|
6711
6690
|
gateStatus: customerReplyReadinessGate.status,
|
|
6712
|
-
primaryCommand: cleanText((
|
|
6713
|
-
policyAction: cleanText((
|
|
6714
|
-
canDraftCustomerReply: ((
|
|
6715
|
-
canSendCustomerReply: ((
|
|
6716
|
-
requiresHumanApproval: ((
|
|
6717
|
-
proofBacked: ((
|
|
6718
|
-
businessProofReady: ((
|
|
6719
|
-
|
|
6720
|
-
|
|
6691
|
+
primaryCommand: cleanText((_512 = customerReplyReadinessGate.metadata) === null || _512 === void 0 ? void 0 : _512.primaryCommand, 180),
|
|
6692
|
+
policyAction: cleanText((_513 = customerReplyReadinessGate.metadata) === null || _513 === void 0 ? void 0 : _513.policyAction, 120),
|
|
6693
|
+
canDraftCustomerReply: ((_514 = customerReplyReadinessGate.metadata) === null || _514 === void 0 ? void 0 : _514.canDraftCustomerReply) === true,
|
|
6694
|
+
canSendCustomerReply: ((_515 = customerReplyReadinessGate.metadata) === null || _515 === void 0 ? void 0 : _515.canSendCustomerReply) === true,
|
|
6695
|
+
requiresHumanApproval: ((_516 = customerReplyReadinessGate.metadata) === null || _516 === void 0 ? void 0 : _516.requiresHumanApproval) === true,
|
|
6696
|
+
proofBacked: ((_517 = customerReplyReadinessGate.metadata) === null || _517 === void 0 ? void 0 : _517.proofBacked) === true,
|
|
6697
|
+
businessProofReady: ((_518 = customerReplyReadinessGate.metadata) === null || _518 === void 0 ? void 0 : _518.businessProofReady) === true,
|
|
6698
|
+
businessProofPlanReady: ((_519 = customerReplyReadinessGate.metadata) === null || _519 === void 0 ? void 0 : _519.businessProofPlanReady) === true,
|
|
6699
|
+
releaseReady: ((_520 = customerReplyReadinessGate.metadata) === null || _520 === void 0 ? void 0 : _520.releaseReady) === true,
|
|
6700
|
+
blockers: cleanStringList((_521 = customerReplyReadinessGate.metadata) === null || _521 === void 0 ? void 0 : _521.blockers, 20, 500)
|
|
6721
6701
|
} : undefined,
|
|
6722
6702
|
customerReplySend: customerReplySendGate ? {
|
|
6723
|
-
status: cleanText((
|
|
6703
|
+
status: cleanText((_522 = customerReplySendGate.metadata) === null || _522 === void 0 ? void 0 : _522.status, 160),
|
|
6724
6704
|
gateStatus: customerReplySendGate.status,
|
|
6725
|
-
contractId: cleanText((
|
|
6726
|
-
guardStatus: cleanText((
|
|
6727
|
-
allowed: ((
|
|
6728
|
-
sentAfterManualApproval: ((
|
|
6729
|
-
directSendAllowed: ((
|
|
6730
|
-
manualSendAfterReviewAllowed: ((
|
|
6731
|
-
requiresHumanApproval: ((
|
|
6732
|
-
proofBacked: ((
|
|
6733
|
-
businessProofReady: ((
|
|
6734
|
-
releaseReady: ((
|
|
6735
|
-
diagnosisReady: ((
|
|
6736
|
-
|
|
6737
|
-
confidenceLevel: cleanText((
|
|
6738
|
-
nextAction: cleanText((
|
|
6739
|
-
pullRequestUrl: cleanText((
|
|
6740
|
-
jobId: cleanText((
|
|
6741
|
-
readinessContractId: cleanText((
|
|
6742
|
-
readinessStatus: cleanText((
|
|
6743
|
-
messageHash: cleanText((
|
|
6744
|
-
recipients: cleanStringList((
|
|
6745
|
-
requiredEvidence: cleanStringList((
|
|
6746
|
-
blockers: cleanStringList((
|
|
6705
|
+
contractId: cleanText((_523 = customerReplySendGate.metadata) === null || _523 === void 0 ? void 0 : _523.contractId, 180),
|
|
6706
|
+
guardStatus: cleanText((_524 = customerReplySendGate.metadata) === null || _524 === void 0 ? void 0 : _524.guardStatus, 160),
|
|
6707
|
+
allowed: ((_525 = customerReplySendGate.metadata) === null || _525 === void 0 ? void 0 : _525.allowed) === true,
|
|
6708
|
+
sentAfterManualApproval: ((_526 = customerReplySendGate.metadata) === null || _526 === void 0 ? void 0 : _526.sentAfterManualApproval) === true,
|
|
6709
|
+
directSendAllowed: ((_527 = customerReplySendGate.metadata) === null || _527 === void 0 ? void 0 : _527.directSendAllowed) === true,
|
|
6710
|
+
manualSendAfterReviewAllowed: ((_528 = customerReplySendGate.metadata) === null || _528 === void 0 ? void 0 : _528.manualSendAfterReviewAllowed) === true,
|
|
6711
|
+
requiresHumanApproval: ((_529 = customerReplySendGate.metadata) === null || _529 === void 0 ? void 0 : _529.requiresHumanApproval) === true,
|
|
6712
|
+
proofBacked: ((_530 = customerReplySendGate.metadata) === null || _530 === void 0 ? void 0 : _530.proofBacked) === true,
|
|
6713
|
+
businessProofReady: ((_531 = customerReplySendGate.metadata) === null || _531 === void 0 ? void 0 : _531.businessProofReady) === true,
|
|
6714
|
+
releaseReady: ((_532 = customerReplySendGate.metadata) === null || _532 === void 0 ? void 0 : _532.releaseReady) === true,
|
|
6715
|
+
diagnosisReady: ((_533 = customerReplySendGate.metadata) === null || _533 === void 0 ? void 0 : _533.diagnosisReady) === true,
|
|
6716
|
+
businessProofPlanReady: ((_534 = customerReplySendGate.metadata) === null || _534 === void 0 ? void 0 : _534.businessProofPlanReady) === true,
|
|
6717
|
+
confidenceLevel: cleanText((_535 = customerReplySendGate.metadata) === null || _535 === void 0 ? void 0 : _535.confidenceLevel, 120),
|
|
6718
|
+
nextAction: cleanText((_536 = customerReplySendGate.metadata) === null || _536 === void 0 ? void 0 : _536.nextAction, 160),
|
|
6719
|
+
pullRequestUrl: cleanText((_537 = customerReplySendGate.metadata) === null || _537 === void 0 ? void 0 : _537.pullRequestUrl, 500),
|
|
6720
|
+
jobId: cleanText((_538 = customerReplySendGate.metadata) === null || _538 === void 0 ? void 0 : _538.jobId, 180),
|
|
6721
|
+
readinessContractId: cleanText((_539 = customerReplySendGate.metadata) === null || _539 === void 0 ? void 0 : _539.readinessContractId, 180),
|
|
6722
|
+
readinessStatus: cleanText((_540 = customerReplySendGate.metadata) === null || _540 === void 0 ? void 0 : _540.readinessStatus, 160),
|
|
6723
|
+
messageHash: cleanText((_541 = customerReplySendGate.metadata) === null || _541 === void 0 ? void 0 : _541.messageHash, 180),
|
|
6724
|
+
recipients: cleanStringList((_542 = customerReplySendGate.metadata) === null || _542 === void 0 ? void 0 : _542.recipients, 20, 240),
|
|
6725
|
+
requiredEvidence: cleanStringList((_543 = customerReplySendGate.metadata) === null || _543 === void 0 ? void 0 : _543.requiredEvidence, 40, 500),
|
|
6726
|
+
blockers: cleanStringList((_544 = customerReplySendGate.metadata) === null || _544 === void 0 ? void 0 : _544.blockers, 40, 500)
|
|
6747
6727
|
} : undefined
|
|
6748
6728
|
}
|
|
6749
6729
|
});
|