@resolveio/server-lib 22.3.157 → 22.3.158
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 +1 -1
- package/util/ai-runner-manager-policy.d.ts +4 -0
- package/util/ai-runner-manager-policy.js +13 -0
- package/util/ai-runner-manager-policy.js.map +1 -1
- package/util/support-runner-v5.d.ts +47 -0
- package/util/support-runner-v5.js +225 -0
- package/util/support-runner-v5.js.map +1 -1
package/package.json
CHANGED
|
@@ -200,6 +200,10 @@ export interface ResolveIOAIManagerHotfixEvidence {
|
|
|
200
200
|
serviceRestartEvidence?: string;
|
|
201
201
|
releaseArtifactFingerprint?: string;
|
|
202
202
|
lastReleaseArtifactFingerprint?: string;
|
|
203
|
+
sourceCommitSha?: string;
|
|
204
|
+
githubCommitUrl?: string;
|
|
205
|
+
gitCommitStatus?: string;
|
|
206
|
+
committedAt?: Date | string;
|
|
203
207
|
forceDeployReason?: string;
|
|
204
208
|
hotfixCannotResolveReason?: string;
|
|
205
209
|
fullDeployRequested?: boolean;
|
|
@@ -182,6 +182,10 @@ function normalizeResolveIOAIManagerHotfixEvidence(value, policy) {
|
|
|
182
182
|
serviceRestartEvidence: cleanText(source.serviceRestartEvidence || source.service_restart_evidence, 1000),
|
|
183
183
|
releaseArtifactFingerprint: cleanText(source.releaseArtifactFingerprint || source.release_artifact_fingerprint || source.artifactFingerprint || source.artifact_fingerprint, 240),
|
|
184
184
|
lastReleaseArtifactFingerprint: cleanText(source.lastReleaseArtifactFingerprint || source.last_release_artifact_fingerprint || source.lastArtifactFingerprint || source.last_artifact_fingerprint, 240),
|
|
185
|
+
sourceCommitSha: cleanText(source.sourceCommitSha || source.source_commit_sha || source.gitCommitSha || source.git_commit_sha || source.commitSha || source.commit_sha, 120),
|
|
186
|
+
githubCommitUrl: cleanText(source.githubCommitUrl || source.github_commit_url || source.gitCommitUrl || source.git_commit_url || source.commitUrl || source.commit_url, 500),
|
|
187
|
+
gitCommitStatus: cleanText(source.gitCommitStatus || source.git_commit_status || source.githubCommitStatus || source.github_commit_status, 160),
|
|
188
|
+
committedAt: source.committedAt || source.committed_at,
|
|
185
189
|
forceDeployReason: cleanText(source.forceDeployReason || source.force_deploy_reason, 1000),
|
|
186
190
|
hotfixCannotResolveReason: cleanText(source.hotfixCannotResolveReason || source.hotfix_cannot_resolve_reason, 1000),
|
|
187
191
|
fullDeployRequested: source.fullDeployRequested === true || source.full_deploy_requested === true,
|
|
@@ -197,6 +201,12 @@ function pushMissing(blockers, condition, message) {
|
|
|
197
201
|
blockers.push(message);
|
|
198
202
|
}
|
|
199
203
|
}
|
|
204
|
+
function hotfixRequiresGithubCommit(channel) {
|
|
205
|
+
return /^(backend_js|static_ui|config|seed_data|release_artifact|new_artifact_deploy|artifact_build)$/.test(channel);
|
|
206
|
+
}
|
|
207
|
+
function hotfixHasGithubCommitProof(value) {
|
|
208
|
+
return !!value.sourceCommitSha && (!!value.githubCommitUrl || hotfixStatusPassed(value.gitCommitStatus));
|
|
209
|
+
}
|
|
200
210
|
function validateResolveIOAIManagerHotfixEvidence(value, options) {
|
|
201
211
|
var _a, _b, _c, _d;
|
|
202
212
|
if (options === void 0) { options = {}; }
|
|
@@ -233,6 +243,9 @@ function validateResolveIOAIManagerHotfixEvidence(value, options) {
|
|
|
233
243
|
if (normalized.fullDeployRequested && policyBlocksDuplicate && !normalized.forceDeployReason && channel !== 'force_deploy_review') {
|
|
234
244
|
blockers.push('Duplicate deploy/publish fingerprint requires force deploy/publish evidence before any full deploy.');
|
|
235
245
|
}
|
|
246
|
+
if (hotfixRequiresGithubCommit(channel)) {
|
|
247
|
+
pushMissing(blockers, hotfixHasGithubCommitProof(normalized), "".concat(channel, " hotfix requires sourceCommitSha plus githubCommitUrl or passed gitCommitStatus so live hotfixes are not lost."));
|
|
248
|
+
}
|
|
236
249
|
if (channel === 'backend_js') {
|
|
237
250
|
pushMissing(blockers, !!normalized.compiledArtifactPath, 'Backend JS hotfix requires compiledArtifactPath.');
|
|
238
251
|
pushMissing(blockers, !!target.host, 'Backend JS hotfix requires target.host.');
|