@resolveio/server-lib 22.3.183 → 22.3.185

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.183",
3
+ "version": "22.3.185",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "package": "./build_package.sh",
@@ -667,6 +667,36 @@ function collectHotfixEvidenceEvents(sources, events, gates, now) {
667
667
  finally { if (e_12) throw e_12.error; }
668
668
  }
669
669
  }
670
+ function hotfixDurabilityMetadata(gates) {
671
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
672
+ var hotfixGate = gates.find(function (gate) { return gate.key === 'hotfix_evidence'; });
673
+ var commitGate = gates.find(function (gate) { return gate.key === 'hotfix_commit_proof'; });
674
+ if (!hotfixGate && !commitGate) {
675
+ return undefined;
676
+ }
677
+ var commitBlocked = !!commitGate && (commitGate.status === 'blocked' || commitGate.status === 'fail');
678
+ return {
679
+ hotfixEvidenceStatus: cleanText(hotfixGate === null || hotfixGate === void 0 ? void 0 : hotfixGate.status, 80),
680
+ hotfixSatisfied: ((_a = hotfixGate === null || hotfixGate === void 0 ? void 0 : hotfixGate.metadata) === null || _a === void 0 ? void 0 : _a.hotfixSatisfied) === true,
681
+ fullDeployBlocked: ((_b = hotfixGate === null || hotfixGate === void 0 ? void 0 : hotfixGate.metadata) === null || _b === void 0 ? void 0 : _b.fullDeployBlocked) === true,
682
+ fullDeployAllowed: ((_c = hotfixGate === null || hotfixGate === void 0 ? void 0 : hotfixGate.metadata) === null || _c === void 0 ? void 0 : _c.fullDeployAllowed) === true,
683
+ commitProofRequired: !!commitGate,
684
+ commitProofStatus: cleanText(commitGate === null || commitGate === void 0 ? void 0 : commitGate.status, 80),
685
+ commitProofPassed: ((_d = commitGate === null || commitGate === void 0 ? void 0 : commitGate.metadata) === null || _d === void 0 ? void 0 : _d.passed) === true,
686
+ commitBlocked: commitBlocked,
687
+ channel: cleanText(((_e = commitGate === null || commitGate === void 0 ? void 0 : commitGate.metadata) === null || _e === void 0 ? void 0 : _e.channel) || ((_f = hotfixGate === null || hotfixGate === void 0 ? void 0 : hotfixGate.metadata) === null || _f === void 0 ? void 0 : _f.channel), 120),
688
+ sourceCommitSha: cleanText((_g = commitGate === null || commitGate === void 0 ? void 0 : commitGate.metadata) === null || _g === void 0 ? void 0 : _g.sourceCommitSha, 200),
689
+ githubCommitUrl: cleanText((_h = commitGate === null || commitGate === void 0 ? void 0 : commitGate.metadata) === null || _h === void 0 ? void 0 : _h.githubCommitUrl, 500),
690
+ gitCommitStatus: cleanText((_j = commitGate === null || commitGate === void 0 ? void 0 : commitGate.metadata) === null || _j === void 0 ? void 0 : _j.gitCommitStatus, 120),
691
+ gitPushStatus: cleanText((_k = commitGate === null || commitGate === void 0 ? void 0 : commitGate.metadata) === null || _k === void 0 ? void 0 : _k.gitPushStatus, 120),
692
+ blockers: cleanStringList(__spreadArray(__spreadArray([], __read(asArray((_l = commitGate === null || commitGate === void 0 ? void 0 : commitGate.metadata) === null || _l === void 0 ? void 0 : _l.blockers)), false), __read(asArray((_m = hotfixGate === null || hotfixGate === void 0 ? void 0 : hotfixGate.metadata) === null || _m === void 0 ? void 0 : _m.blockers)), false), 20, 500),
693
+ requiredEvidence: cleanStringList((_o = commitGate === null || commitGate === void 0 ? void 0 : commitGate.metadata) === null || _o === void 0 ? void 0 : _o.requiredEvidence, 20, 500),
694
+ nextCommands: cleanStringList((_p = commitGate === null || commitGate === void 0 ? void 0 : commitGate.metadata) === null || _p === void 0 ? void 0 : _p.nextCommands, 20, 240),
695
+ nextAction: commitBlocked
696
+ ? 'Commit and push the hotfix to GitHub, record sourceCommitSha/githubCommitUrl/gitCommitStatus/gitPushStatus, then rerun the smallest verification gate.'
697
+ : cleanText((_q = hotfixGate === null || hotfixGate === void 0 ? void 0 : hotfixGate.metadata) === null || _q === void 0 ? void 0 : _q.nextAction, 1000)
698
+ };
699
+ }
670
700
  function collectUsageEvents(entries, events) {
671
701
  var e_13, _a;
672
702
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
@@ -2723,6 +2753,7 @@ function buildSupportAIRunFromEvidence(input) {
2723
2753
  metadata: {
2724
2754
  versionCount: asArray(input.versions).length,
2725
2755
  buildPlanCount: asArray(input.buildPlans).length,
2756
+ hotfixDurability: hotfixDurabilityMetadata(gates),
2726
2757
  managerNoBlindLoopPolicy: managerNoBlindLoopMetadata(noBlindLoopGate),
2727
2758
  diagnosisBeforeRepair: diagnosisBeforeRepairGate ? {
2728
2759
  status: diagnosisBeforeRepairGate.status,
@@ -2972,6 +3003,7 @@ function buildAICoderAIRunFromEvidence(input) {
2972
3003
  domain: app.domain || app.customDomain || job.domain,
2973
3004
  wowScore: (_g = evidence.wowScore) !== null && _g !== void 0 ? _g : job.wowScore,
2974
3005
  score: (_h = evidence.score) !== null && _h !== void 0 ? _h : evidence.qualityScore,
3006
+ hotfixDurability: hotfixDurabilityMetadata(gates),
2975
3007
  managerNoBlindLoopPolicy: managerNoBlindLoopMetadata(noBlindLoopGate),
2976
3008
  journeyContract: {
2977
3009
  status: journeyContractGate.status,