@resolveio/server-lib 22.3.164 → 22.3.165

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "22.3.164",
3
+ "version": "22.3.165",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "package": "./build_package.sh",
@@ -1724,6 +1724,40 @@ function recoveryActionExitCriteria(input) {
1724
1724
  input.requiredStateTransition
1725
1725
  ], __read((recoveryActionProofRequiredBeforeContinuation(input.mode) ? ['do not continue runner until required proof artifact is attached'] : [])), false), __read(input.stopWhen), false).map(function (entry) { return cleanText(entry, 500); }).filter(Boolean))).slice(0, 30);
1726
1726
  }
1727
+ function recoveryReleaseHotfixCommands(policy) {
1728
+ if (!policy) {
1729
+ return [];
1730
+ }
1731
+ return Array.from(new Set(__spreadArray(__spreadArray(__spreadArray([], __read(policy.allowedActions), false), __read((policy.hotfixPreferred ? [
1732
+ 'prepare_hotfix_patch_without_live_apply',
1733
+ 'commit_and_push_hotfix_to_github',
1734
+ 'record_github_commit_for_hotfix',
1735
+ 'apply_live_hotfix_only_after_github_commit_proof'
1736
+ ] : [])), false), [
1737
+ 'run_failed_release_gate_once',
1738
+ 'record_release_evidence'
1739
+ ], false).map(function (entry) { return cleanText(entry, 500); }).filter(Boolean))).slice(0, 20);
1740
+ }
1741
+ function recoveryReleaseRequiredEvidence(policy) {
1742
+ var _a;
1743
+ if (!policy) {
1744
+ return [];
1745
+ }
1746
+ var stepEvidence = (((_a = policy.hotfixPlan) === null || _a === void 0 ? void 0 : _a.steps) || []).flatMap(function (step) { return step.requiredEvidence || []; });
1747
+ return Array.from(new Set(__spreadArray(__spreadArray(__spreadArray([], __read(policy.requiredEvidence), false), __read(stepEvidence), false), __read((policy.hotfixPreferred ? [
1748
+ 'full 40-character sourceCommitSha',
1749
+ 'matching githubCommitUrl',
1750
+ 'passed gitPushStatus or gitCommitStatus before any live hotfix is treated as durable'
1751
+ ] : [])), false).map(function (entry) { return cleanText(entry, 500); }).filter(Boolean))).slice(0, 30);
1752
+ }
1753
+ function recoveryReleaseSuccessEvidence(policy) {
1754
+ var _a, _b;
1755
+ if (!policy) {
1756
+ return [];
1757
+ }
1758
+ var stepEvidence = (((_a = policy.hotfixPlan) === null || _a === void 0 ? void 0 : _a.steps) || []).flatMap(function (step) { return step.successEvidence || []; });
1759
+ return Array.from(new Set(__spreadArray(__spreadArray(__spreadArray([], __read((((_b = policy.hotfixPlan) === null || _b === void 0 ? void 0 : _b.acceptanceEvidence) || [])), false), __read(stepEvidence), false), __read((policy.hotfixPreferred ? ['GitHub commit and push proof validates before continuation'] : [])), false).map(function (entry) { return cleanText(entry, 500); }).filter(Boolean))).slice(0, 30);
1760
+ }
1727
1761
  function buildResolveIOAIManagerRecoveryActionPacket(input) {
1728
1762
  var checkpoint = input.checkpoint;
1729
1763
  var probe = input.probe || buildResolveIOAIManagerRecoveryEvidenceProbe({
@@ -1755,6 +1789,9 @@ function buildResolveIOAIManagerRecoveryActionPacket(input) {
1755
1789
  publishStatus: checkpoint.lane
1756
1790
  })
1757
1791
  : undefined;
1792
+ var releaseNextCommands = recoveryReleaseHotfixCommands(releasePolicy);
1793
+ var releaseRequiredEvidence = recoveryReleaseRequiredEvidence(releasePolicy);
1794
+ var releaseSuccessEvidence = recoveryReleaseSuccessEvidence(releasePolicy);
1758
1795
  var allowedDispatchAction = dispatchActionForMode(mode);
1759
1796
  var requiredStateTransition = recoveryActionRequiredStateTransition(mode);
1760
1797
  var proofRequiredBeforeContinuation = recoveryActionProofRequiredBeforeContinuation(mode);
@@ -1773,10 +1810,12 @@ function buildResolveIOAIManagerRecoveryActionPacket(input) {
1773
1810
  blockerFingerprint: checkpoint.blockerFingerprint
1774
1811
  }), checkpointId: checkpoint.checkpointId, probeId: probe.probeId, recoveryClass: checkpoint.recoveryClass, mode: mode, singleActionOnly: true, allowedDispatchAction: allowedDispatchAction, label: recoveryActionLabelFor(mode, checkpoint), lane: checkpoint.lane, stepType: checkpoint.stepType, primaryStepKind: (primaryStep === null || primaryStep === void 0 ? void 0 : primaryStep.kind) || 'none', objective: mode === 'collect_evidence'
1775
1812
  ? probe.objective
1776
- : cleanText(checkpoint.objective || probe.objective, 1000), evidenceOnly: evidenceOnly, autoRunnable: recoveryActionAutoRunnable(mode, probe), productRepairAllowed: checkpoint.productRepairAllowed && !evidenceOnly && checkpoint.status !== 'parked', expensiveModelAllowed: checkpoint.expensiveModelAllowed && checkpoint.status !== 'parked', costCeilingUsd: recoveryActionCostCeilingUsd(mode), requiredStateTransition: requiredStateTransition, proofRequiredBeforeContinuation: proofRequiredBeforeContinuation, canResetLoopAfterEvidence: resetLoopWhen.length > 0, maxAttemptsBeforePark: checkpoint.maxAttemptsBeforePark, requiredArtifacts: probe.requiredArtifacts.slice(0, 20), nextCommands: releasePolicy
1777
- ? Array.from(new Set(__spreadArray(__spreadArray([], __read(nextCommands), false), __read(releasePolicy.allowedActions), false))).slice(0, 12)
1813
+ : cleanText(checkpoint.objective || probe.objective, 1000), evidenceOnly: evidenceOnly, autoRunnable: recoveryActionAutoRunnable(mode, probe), productRepairAllowed: checkpoint.productRepairAllowed && !evidenceOnly && checkpoint.status !== 'parked', expensiveModelAllowed: checkpoint.expensiveModelAllowed && checkpoint.status !== 'parked', costCeilingUsd: recoveryActionCostCeilingUsd(mode), requiredStateTransition: requiredStateTransition, proofRequiredBeforeContinuation: proofRequiredBeforeContinuation, canResetLoopAfterEvidence: resetLoopWhen.length > 0, maxAttemptsBeforePark: checkpoint.maxAttemptsBeforePark, requiredArtifacts: releasePolicy
1814
+ ? Array.from(new Set(__spreadArray(__spreadArray([], __read(probe.requiredArtifacts), false), __read(releaseRequiredEvidence), false))).slice(0, 20)
1815
+ : probe.requiredArtifacts.slice(0, 20), nextCommands: releasePolicy
1816
+ ? Array.from(new Set(__spreadArray(__spreadArray([], __read(nextCommands), false), __read(releaseNextCommands), false))).slice(0, 20)
1778
1817
  : nextCommands, successCriteria: releasePolicy
1779
- ? Array.from(new Set(__spreadArray(__spreadArray([], __read(probe.acceptanceEvidence), false), __read(releasePolicy.requiredEvidence), false))).slice(0, 20)
1818
+ ? Array.from(new Set(__spreadArray(__spreadArray([], __read(probe.acceptanceEvidence), false), __read(releaseSuccessEvidence), false))).slice(0, 20)
1780
1819
  : probe.acceptanceEvidence.slice(0, 20), exitCriteria: exitCriteria, retryPolicy: {
1781
1820
  allowImmediateRetry: checkpoint.status !== 'parked' && mode !== 'manual_review',
1782
1821
  requireNewEvidence: requireNewEvidence,