@resolveio/server-lib 22.3.179 → 22.3.181

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.
@@ -188,6 +188,7 @@ export interface ResolveIOSupportHumanReviewPacket {
188
188
  }
189
189
  export interface ResolveIOSupportCustomerReplyPolicyInput {
190
190
  diagnosisGate?: any;
191
+ issueClassProbePlan?: any;
191
192
  outcomeLabel?: string;
192
193
  confidence?: any;
193
194
  businessAssertionStatus?: string;
@@ -210,6 +211,8 @@ export interface ResolveIOSupportCustomerReplyPolicy {
210
211
  humanReviewPacket?: ResolveIOSupportHumanReviewPacket;
211
212
  draftBasis?: {
212
213
  issueClass: ResolveIOSupportIssueClass;
214
+ issueClassProbePlanId?: string;
215
+ issueClassProbePlanStatus?: ResolveIOSupportIssueClassProbePlanStatus;
213
216
  businessProof: string;
214
217
  artifactCount: number;
215
218
  };
@@ -1367,6 +1367,7 @@ function decideResolveIOSupportCustomerReplyPolicy(input) {
1367
1367
  var releaseBlocked = supportReleaseLooksBlocked(input.releaseStatus);
1368
1368
  var requiredEvidence = [
1369
1369
  'valid SupportDiagnosisGate',
1370
+ 'validated IssueClassProbePlan',
1370
1371
  'high confidence with shouldBlockPr=false',
1371
1372
  'accepted outcome or passed business assertion',
1372
1373
  'business proof contract and artifact evidence',
@@ -1426,6 +1427,37 @@ function decideResolveIOSupportCustomerReplyPolicy(input) {
1426
1427
  })
1427
1428
  };
1428
1429
  }
1430
+ var explicitProbePlan = cleanObject(input.issueClassProbePlan);
1431
+ var generatedProbePlan = gate
1432
+ ? buildResolveIOSupportIssueClassProbePlan(gate)
1433
+ : undefined;
1434
+ var issueClassProbePlanValidation = validateResolveIOSupportIssueClassProbePlan(Object.keys(explicitProbePlan).length ? explicitProbePlan : generatedProbePlan, gate);
1435
+ var issueClassProbePlan = issueClassProbePlanValidation.normalized || generatedProbePlan;
1436
+ if (!issueClassProbePlanValidation.valid) {
1437
+ return {
1438
+ action: 'hold_internal',
1439
+ canDraftCustomerReply: false,
1440
+ canSendCustomerReply: false,
1441
+ confidenceLevel: confidenceLevel,
1442
+ safety: 'internal_hold',
1443
+ reason: 'support_reply_requires_valid_issue_class_probe_plan',
1444
+ requiredEvidence: requiredEvidence,
1445
+ humanReviewPacket: buildResolveIOSupportHumanReviewPacket({
1446
+ reviewType: 'business_proof_qa',
1447
+ title: 'Repair Issue-Class Probe Plan',
1448
+ summary: 'Customer reply is blocked until the IssueClassProbePlan validates against the diagnosis proof plan.',
1449
+ primaryAction: 'repair_support_issue_class_probe_plan',
1450
+ safety: 'internal_hold',
1451
+ reason: 'support_reply_requires_valid_issue_class_probe_plan',
1452
+ blockers: issueClassProbePlanValidation.blockers,
1453
+ requiredEvidence: requiredEvidence,
1454
+ evidenceRefs: (issueClassProbePlan === null || issueClassProbePlan === void 0 ? void 0 : issueClassProbePlan.requiredArtifacts) || [],
1455
+ nextCommands: ['repair_issue_class_probe_plan', 'rerun_business_proof_qa', 'rerun_reply_policy'],
1456
+ forbiddenActions: ['Do not draft a customer resolution from business proof that is not mapped to a validated IssueClassProbePlan.'],
1457
+ costRisk: 'free_or_deterministic'
1458
+ })
1459
+ };
1460
+ }
1429
1461
  if (shouldBlockConfidence || confidenceLevel !== 'high') {
1430
1462
  return {
1431
1463
  action: 'hold_internal',
@@ -1574,6 +1606,8 @@ function decideResolveIOSupportCustomerReplyPolicy(input) {
1574
1606
  }),
1575
1607
  draftBasis: {
1576
1608
  issueClass: gate.issue_class,
1609
+ issueClassProbePlanId: issueClassProbePlan === null || issueClassProbePlan === void 0 ? void 0 : issueClassProbePlan.planId,
1610
+ issueClassProbePlanStatus: issueClassProbePlanValidation.status,
1577
1611
  businessProof: gate.proof_plan.business_proof_contract.expected_business_state_change,
1578
1612
  artifactCount: artifactCount
1579
1613
  }
@@ -2808,6 +2842,7 @@ function decideResolveIOSupportV5AutonomousNextAction(input) {
2808
2842
  var continuation = decideResolveIOSupportV5Continuation(bundle);
2809
2843
  var customerReplyPolicy = decideResolveIOSupportCustomerReplyPolicy({
2810
2844
  diagnosisGate: bundle.supportV5DiagnosisGate,
2845
+ issueClassProbePlan: bundle.supportV5IssueClassProbePlan,
2811
2846
  outcomeLabel: input.outcomeLabel,
2812
2847
  confidence: input.confidence,
2813
2848
  businessAssertionStatus: input.businessAssertionStatus,
@@ -2954,7 +2989,7 @@ function decideResolveIOSupportV5AutonomousNextAction(input) {
2954
2989
  }
2955
2990
  if (action === 'repair_release_hotfix_first') {
2956
2991
  return primaryCommand === 'record_hotfix_evidence'
2957
- ? 'Hotfix evidence is recorded with sourceCommitSha, githubCommitUrl, and passed gitPushStatus before any live backend apply or continuation.'
2992
+ ? 'Hotfix evidence is recorded with sourceCommitSha, githubCommitUrl, passed gitCommitStatus, and passed gitPushStatus before any live backend apply or continuation.'
2958
2993
  : 'The smallest release/hotfix gate changes state, with duplicate full deploy blocked unless force evidence is explicit.';
2959
2994
  }
2960
2995
  if (action === 'ready_for_release_gate') {
@@ -3015,7 +3050,7 @@ function decideResolveIOSupportV5AutonomousNextAction(input) {
3015
3050
  'Stop if the same failure class, blocker fingerprint, and evidence hash repeat without material evidence.',
3016
3051
  'Stop if the action would edit outside diagnosis owner_files without a revised diagnosis gate.',
3017
3052
  'Stop if route-load, screenshot-only, scorecard-only, or model-claim proof is the only acceptance evidence.',
3018
- liveHotfixBlockedUntilCommit ? 'Stop before live backend hotfix until sourceCommitSha, githubCommitUrl, and passed gitPushStatus are recorded.' : ''
3053
+ liveHotfixBlockedUntilCommit ? 'Stop before live backend hotfix until sourceCommitSha, githubCommitUrl, passed gitCommitStatus, and passed gitPushStatus are recorded.' : ''
3019
3054
  ], __read(continuationProofCheckpoint.requiredResetEvidence.map(function (entry) { return "Reset requires: ".concat(entry); })), false).filter(Boolean))).slice(0, 24);
3020
3055
  var createdAt = isoNow(input.now);
3021
3056
  return {
@@ -3309,14 +3344,14 @@ function decideResolveIOSupportV5AutonomousNextAction(input) {
3309
3344
  ], false)));
3310
3345
  var hotfixRequiredEvidence = Array.from(new Set(__spreadArray([
3311
3346
  'hotfix evidence',
3312
- 'full sourceCommitSha, githubCommitUrl, and passed gitPushStatus for the exact pushed GitHub commit',
3347
+ 'full sourceCommitSha, githubCommitUrl, passed gitCommitStatus, and passed gitPushStatus for the exact pushed GitHub commit',
3313
3348
  'checksum before/after',
3314
3349
  'health/self-test pass',
3315
3350
  'release gate result'
3316
3351
  ], __read(hotfixContinuation.requiredEvidence), false)));
3317
3352
  var hotfixForbiddenActions = [
3318
3353
  'Do not apply a live hotfix before the exact diff is committed and pushed to GitHub.',
3319
- 'Do not mark a hotfix durable without sourceCommitSha, githubCommitUrl, and passed gitPushStatus.',
3354
+ 'Do not mark a hotfix durable without sourceCommitSha, githubCommitUrl, passed gitCommitStatus, and passed gitPushStatus.',
3320
3355
  'Do not run a full deploy to clear a duplicate release loop unless force evidence explicitly allows one.'
3321
3356
  ];
3322
3357
  var hotfixGitGuard = hotfixContinuation.githubCommitGuard;