@resolveio/server-lib 22.3.195 → 22.3.196

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.
@@ -316,10 +316,20 @@ export interface ResolveIOAIManagerHotfixEvidenceRecord {
316
316
  githubCommitRequired: boolean;
317
317
  githubCommitProofPassed: boolean;
318
318
  commitProofStatus: 'not_required' | 'missing' | 'invalid' | 'passed';
319
+ commitFirstProtocol: 'not_required' | 'commit_first_hotfix';
320
+ commit_first_protocol: 'not_required' | 'commit_first_hotfix';
321
+ commitFirstProtocolSatisfied: boolean;
322
+ commit_first_protocol_satisfied: boolean;
323
+ liveHotfixBlockedUntilCommit: boolean;
324
+ live_hotfix_blocked_until_commit: boolean;
325
+ liveHotfixAllowed: boolean;
326
+ live_hotfix_allowed: boolean;
319
327
  managerMustCommitBeforeHotfix: boolean;
320
328
  githubCommitGuard: ResolveIOAIManagerHotfixGitProof;
321
329
  readyForReleaseGate: boolean;
322
330
  readyForContinuation: boolean;
331
+ managerContinuationAllowed: boolean;
332
+ manager_continuation_allowed: boolean;
323
333
  }
324
334
  export type ResolveIOAIManagerHotfixDurabilityStatus = 'not_required' | 'waiting_for_commit_proof' | 'ready_for_live_hotfix' | 'ready_for_release_gate' | 'ready_for_continuation';
325
335
  export interface ResolveIOAIManagerHotfixDurabilityContractInput {
@@ -351,6 +361,16 @@ export interface ResolveIOAIManagerHotfixDurabilityContract {
351
361
  can_hotfix_backend: boolean;
352
362
  liveHotfixBlockedUntilCommit: boolean;
353
363
  live_hotfix_blocked_until_commit: boolean;
364
+ durabilityProtocol: 'not_required' | 'commit_first_hotfix';
365
+ durability_protocol: 'not_required' | 'commit_first_hotfix';
366
+ commitFirstProtocolRequired: boolean;
367
+ commit_first_protocol_required: boolean;
368
+ commitFirstProtocolSatisfied: boolean;
369
+ commit_first_protocol_satisfied: boolean;
370
+ liveHotfixAllowed: boolean;
371
+ live_hotfix_allowed: boolean;
372
+ managerContinuationAllowed: boolean;
373
+ manager_continuation_allowed: boolean;
354
374
  commitProofPassed: boolean;
355
375
  commit_proof_passed: boolean;
356
376
  commitProofStatus: ResolveIOAIManagerHotfixGitProofStatus | 'missing';
@@ -912,6 +912,11 @@ function buildResolveIOAIManagerHotfixEvidenceRecord(input) {
912
912
  var missingFields = requiredFields.filter(function (field) { return !hotfixEvidenceFieldPresent(normalized, field); });
913
913
  var recordedAt = cleanDateString(input.now || (normalized === null || normalized === void 0 ? void 0 : normalized.recordedAt) || new Date());
914
914
  var githubCommitGuard = validation.githubCommitGuard || evaluateResolveIOAIManagerHotfixGitProof(normalized || merged, channel);
915
+ var commitFirstProtocol = githubCommitGuard.required ? 'commit_first_hotfix' : 'not_required';
916
+ var commitFirstProtocolSatisfied = githubCommitGuard.required ? githubCommitGuard.passed === true : true;
917
+ var liveHotfixBlockedUntilCommit = githubCommitGuard.required === true && commitFirstProtocolSatisfied !== true;
918
+ var liveHotfixAllowed = validation.valid === true && validation.hotfixSatisfied === true && commitFirstProtocolSatisfied === true;
919
+ var readyForContinuation = validation.valid === true && validation.hotfixSatisfied === true && hotfixStatusPassed(normalized === null || normalized === void 0 ? void 0 : normalized.releaseGateStatus);
915
920
  return {
916
921
  recordId: cleanText(input.recordId, 160) || "hotfix-".concat(fingerprintResolveIOAIManagerBlocker("".concat(channel, ":").concat(githubCommitGuard.sourceCommitSha, ":").concat(recordedAt))),
917
922
  recordedAt: recordedAt,
@@ -936,10 +941,20 @@ function buildResolveIOAIManagerHotfixEvidenceRecord(input) {
936
941
  githubCommitRequired: githubCommitGuard.required,
937
942
  githubCommitProofPassed: githubCommitGuard.passed,
938
943
  commitProofStatus: githubCommitGuard.status,
944
+ commitFirstProtocol: commitFirstProtocol,
945
+ commit_first_protocol: commitFirstProtocol,
946
+ commitFirstProtocolSatisfied: commitFirstProtocolSatisfied,
947
+ commit_first_protocol_satisfied: commitFirstProtocolSatisfied,
948
+ liveHotfixBlockedUntilCommit: liveHotfixBlockedUntilCommit,
949
+ live_hotfix_blocked_until_commit: liveHotfixBlockedUntilCommit,
950
+ liveHotfixAllowed: liveHotfixAllowed,
951
+ live_hotfix_allowed: liveHotfixAllowed,
939
952
  managerMustCommitBeforeHotfix: githubCommitGuard.managerMustCommitBeforeHotfix,
940
953
  githubCommitGuard: githubCommitGuard,
941
954
  readyForReleaseGate: validation.valid === true && validation.nextAction === 'rerun_release_gate',
942
- readyForContinuation: validation.valid === true && validation.hotfixSatisfied === true && hotfixStatusPassed(normalized === null || normalized === void 0 ? void 0 : normalized.releaseGateStatus)
955
+ readyForContinuation: readyForContinuation,
956
+ managerContinuationAllowed: readyForContinuation,
957
+ manager_continuation_allowed: readyForContinuation
943
958
  };
944
959
  }
945
960
  function pickFirstHotfixText(sources, keys, max, seen) {
@@ -1042,6 +1057,14 @@ function buildResolveIOAIManagerHotfixDurabilityContract(input) {
1042
1057
  var sourceShaPassed = isFullGitCommitSha(sourceCommitSha);
1043
1058
  var githubUrlSha = extractGithubCommitSha(githubCommitUrl);
1044
1059
  var githubUrlPassed = !!githubUrlSha && (!sourceShaPassed || githubUrlSha === sourceCommitSha.toLowerCase());
1060
+ var existingMissingCommitFields = cleanList(existing.missingCommitProofFields || existing.missing_commit_proof_fields, 20, 160);
1061
+ var commitFirstProtocolRequired = githubCommitGuard.required === true
1062
+ || existing.durabilityProtocol === 'commit_first_hotfix'
1063
+ || existing.durability_protocol === 'commit_first_hotfix'
1064
+ || existing.commitFirstProtocolRequired === true
1065
+ || existing.commit_first_protocol_required === true
1066
+ || existingMissingCommitFields.some(function (field) { return /sourceCommitSha|githubCommitUrl|gitCommitStatus|gitPushStatus/i.test(field); });
1067
+ var durabilityProtocol = commitFirstProtocolRequired ? 'commit_first_hotfix' : 'not_required';
1045
1068
  var missingCommitProofFields = [
1046
1069
  sourceShaPassed ? '' : 'sourceCommitSha',
1047
1070
  githubUrlPassed ? '' : 'githubCommitUrl',
@@ -1049,12 +1072,17 @@ function buildResolveIOAIManagerHotfixDurabilityContract(input) {
1049
1072
  pushPassed ? '' : 'gitPushStatus=passed'
1050
1073
  ].filter(Boolean);
1051
1074
  var commitProofPassed = required ? missingCommitProofFields.length === 0 : githubCommitGuard.passed === true;
1075
+ var commitFirstProtocolSatisfied = commitFirstProtocolRequired ? commitProofPassed === true : true;
1052
1076
  var liveHotfixBlockedUntilCommit = required && commitProofPassed !== true;
1053
1077
  var releaseGatePassed = input.releaseGatePassed === true
1054
1078
  || hotfixStatusPassed((_e = validation.normalized) === null || _e === void 0 ? void 0 : _e.releaseGateStatus)
1055
1079
  || (continuation === null || continuation === void 0 ? void 0 : continuation.canContinueRun) === true;
1056
1080
  var canPrepareHotfixPatch = required && (existing.canPrepareHotfixPatch === true || existing.can_prepare_hotfix_patch === true || actionRequiresHotfix || (continuation === null || continuation === void 0 ? void 0 : continuation.action) === 'record_hotfix_evidence');
1057
1081
  var canHotfixBackend = required && commitProofPassed === true && canPrepareHotfixPatch === true;
1082
+ var liveHotfixAllowed = required && commitFirstProtocolSatisfied === true && canPrepareHotfixPatch === true;
1083
+ var managerContinuationAllowed = required
1084
+ ? commitFirstProtocolSatisfied === true && validation.valid === true && releaseGatePassed === true
1085
+ : true;
1058
1086
  var status = 'not_required';
1059
1087
  if (required && liveHotfixBlockedUntilCommit) {
1060
1088
  status = 'waiting_for_commit_proof';
@@ -1145,6 +1173,16 @@ function buildResolveIOAIManagerHotfixDurabilityContract(input) {
1145
1173
  can_hotfix_backend: canHotfixBackend,
1146
1174
  liveHotfixBlockedUntilCommit: liveHotfixBlockedUntilCommit,
1147
1175
  live_hotfix_blocked_until_commit: liveHotfixBlockedUntilCommit,
1176
+ durabilityProtocol: durabilityProtocol,
1177
+ durability_protocol: durabilityProtocol,
1178
+ commitFirstProtocolRequired: commitFirstProtocolRequired,
1179
+ commit_first_protocol_required: commitFirstProtocolRequired,
1180
+ commitFirstProtocolSatisfied: commitFirstProtocolSatisfied,
1181
+ commit_first_protocol_satisfied: commitFirstProtocolSatisfied,
1182
+ liveHotfixAllowed: liveHotfixAllowed,
1183
+ live_hotfix_allowed: liveHotfixAllowed,
1184
+ managerContinuationAllowed: managerContinuationAllowed,
1185
+ manager_continuation_allowed: managerContinuationAllowed,
1148
1186
  commitProofPassed: commitProofPassed,
1149
1187
  commit_proof_passed: commitProofPassed,
1150
1188
  commitProofStatus: commitProofPassed ? 'passed' : 'missing',