@resolveio/server-lib 22.3.191 → 22.3.193

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.
@@ -1,4 +1,4 @@
1
- import { ResolveIOAIManagerHotfixContinuationDecision, ResolveIOAIManagerHotfixFirstReleasePolicy, ResolveIOAIManagerEvidenceStrength, ResolveIOAIManagerRecoveryCheckpoint, ResolveIOAIManagerRecoveryActionPacket, ResolveIOAIManagerRecoveryActionDispatchRecord, ResolveIOAIManagerRecoveryExecutionDirective, ResolveIOAIManagerRecoveryEvidenceProbe, ResolveIOAIManagerRecoveryPlan } from './ai-runner-manager-policy';
1
+ import { ResolveIOAIManagerHotfixContinuationDecision, ResolveIOAIManagerHotfixDurabilityContract, ResolveIOAIManagerHotfixFirstReleasePolicy, ResolveIOAIManagerEvidenceStrength, ResolveIOAIManagerRecoveryCheckpoint, ResolveIOAIManagerRecoveryActionPacket, ResolveIOAIManagerRecoveryActionDispatchRecord, ResolveIOAIManagerRecoveryExecutionDirective, ResolveIOAIManagerRecoveryEvidenceProbe, ResolveIOAIManagerRecoveryPlan } from './ai-runner-manager-policy';
2
2
  export type ResolveIOSupportV5StepType = 'diagnosis_gate' | 'reproduction_probe' | 'issue_class_probe' | 'business_proof' | 'compile_check' | 'startup_check' | 'live_seed' | 'auth_bootstrap' | 'route_probe' | 'qa_row' | 'build_repair' | 'qa_retest' | 'pr_review' | 'artifact_package' | 'cleanup';
3
3
  export type ResolveIOSupportV5Outcome = 'pass' | 'needs_repair' | 'retry_same_step' | 'park_manual' | 'budget_stop' | 'infra_retry' | 'ready_for_merge';
4
4
  export type ResolveIOSupportV5Lane = 'build' | 'qa' | 'review' | 'supervisor';
@@ -840,6 +840,7 @@ export interface ResolveIOSupportV5AutonomousDecision {
840
840
  humanReviewPacket: ResolveIOSupportHumanReviewPacket;
841
841
  humanDecisionRequest?: ResolveIOSupportHumanDecisionRequest;
842
842
  hotfixContinuation?: ResolveIOAIManagerHotfixContinuationDecision;
843
+ hotfixDurabilityContract?: ResolveIOAIManagerHotfixDurabilityContract;
843
844
  recordedAt: string;
844
845
  }
845
846
  export declare function evaluateResolveIOSupportPreflightGate(input?: ResolveIOSupportPreflightGateInput | ResolveIOSupportPreflightGate | any, nowValue?: Date | string): ResolveIOSupportPreflightGate;
@@ -3801,6 +3801,7 @@ function decideResolveIOSupportV5AutonomousNextAction(input) {
3801
3801
  humanReviewPacket: humanReviewPacket,
3802
3802
  humanDecisionRequest: humanDecisionRequest,
3803
3803
  hotfixContinuation: fields.hotfixContinuation,
3804
+ hotfixDurabilityContract: fields.hotfixDurabilityContract,
3804
3805
  recordedAt: isoNow(input.now)
3805
3806
  };
3806
3807
  };
@@ -3984,22 +3985,36 @@ function decideResolveIOSupportV5AutonomousNextAction(input) {
3984
3985
  var liveHotfixBlockedUntilCommit = hotfixContinuation.action === 'record_hotfix_evidence'
3985
3986
  || (hotfixGitGuard === null || hotfixGitGuard === void 0 ? void 0 : hotfixGitGuard.managerMustCommitBeforeHotfix) === true
3986
3987
  || ((hotfixGitGuard === null || hotfixGitGuard === void 0 ? void 0 : hotfixGitGuard.required) === true && (hotfixGitGuard === null || hotfixGitGuard === void 0 ? void 0 : hotfixGitGuard.passed) !== true);
3987
- var canPrepareHotfixPatch = hotfixContinuation.action !== 'park_manual';
3988
+ var hotfixDurabilityContract = (0, ai_runner_manager_policy_1.buildResolveIOAIManagerHotfixDurabilityContract)({
3989
+ action: 'run_release_repair',
3990
+ reason: releaseBlocker,
3991
+ evidence: input.hotfixEvidence,
3992
+ policy: input.releasePolicy,
3993
+ continuation: hotfixContinuation,
3994
+ releaseGatePassed: input.releaseGatePassed,
3995
+ source: 'support_v5_autonomous_decision',
3996
+ now: input.now
3997
+ });
3988
3998
  return makeDecision('repair_release_hotfix_first', 'Hotfix Release', 'support_v5_release_blocked_hotfix_first', {
3989
3999
  canRunAutonomously: hotfixContinuation.action !== 'park_manual',
3990
4000
  canRunModel: false,
3991
4001
  canEditProductCode: false,
3992
- canPrepareHotfixPatch: canPrepareHotfixPatch,
3993
- canHotfixBackend: canPrepareHotfixPatch && !liveHotfixBlockedUntilCommit,
3994
- liveHotfixBlockedUntilCommit: liveHotfixBlockedUntilCommit,
4002
+ canPrepareHotfixPatch: hotfixDurabilityContract.canPrepareHotfixPatch,
4003
+ canHotfixBackend: hotfixDurabilityContract.canHotfixBackend,
4004
+ liveHotfixBlockedUntilCommit: hotfixDurabilityContract.liveHotfixBlockedUntilCommit || liveHotfixBlockedUntilCommit,
3995
4005
  lane: 'release',
3996
4006
  stepType: 'release_gate',
3997
- primaryCommand: hotfixPrimaryCommandByAction[hotfixContinuation.action] || 'record_hotfix_evidence',
4007
+ primaryCommand: hotfixDurabilityContract.liveHotfixBlockedUntilCommit
4008
+ ? 'record_hotfix_evidence'
4009
+ : hotfixPrimaryCommandByAction[hotfixContinuation.action] || hotfixDurabilityContract.nextSafeAction || 'record_hotfix_evidence',
3998
4010
  nextCommands: hotfixNextCommands,
3999
- requiredEvidence: hotfixRequiredEvidence,
4000
- blockers: Array.from(new Set(__spreadArray(__spreadArray([], __read(cleanList(input.unresolvedBlockers, 20, 500)), false), __read(hotfixContinuation.blockers), false))),
4001
- forbiddenActions: hotfixForbiddenActions,
4002
- hotfixContinuation: hotfixContinuation
4011
+ requiredEvidence: Array.from(new Set(__spreadArray(__spreadArray([], __read(hotfixRequiredEvidence), false), __read(hotfixDurabilityContract.requiredEvidence), false))).slice(0, 30),
4012
+ blockers: Array.from(new Set(__spreadArray(__spreadArray(__spreadArray([], __read(cleanList(input.unresolvedBlockers, 20, 500)), false), __read(hotfixContinuation.blockers), false), __read((hotfixDurabilityContract.liveHotfixBlockedUntilCommit
4013
+ ? ["Hotfix durability contract ".concat(hotfixDurabilityContract.contractId, " requires GitHub commit and push proof before live backend apply.")]
4014
+ : [])), false))),
4015
+ forbiddenActions: Array.from(new Set(__spreadArray(__spreadArray([], __read(hotfixForbiddenActions), false), __read(hotfixDurabilityContract.forbiddenActions), false))).slice(0, 20),
4016
+ hotfixContinuation: hotfixContinuation,
4017
+ hotfixDurabilityContract: hotfixDurabilityContract
4003
4018
  });
4004
4019
  }
4005
4020
  if (customerReplyPolicy.action === 'hold_internal' && customerReplyPolicy.reason === 'support_reply_blocked_until_release_or_hotfix_gate_finishes') {