@resolveio/server-lib 22.3.161 → 22.3.162
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
|
@@ -267,10 +267,48 @@ function hotfixEvidenceGate(evidence, now) {
|
|
|
267
267
|
fullDeployBlocked: validation.fullDeployBlocked,
|
|
268
268
|
hotfixSatisfied: validation.hotfixSatisfied,
|
|
269
269
|
blockers: validation.blockers,
|
|
270
|
+
githubCommitGuard: validation.githubCommitGuard,
|
|
270
271
|
target: (_b = validation.normalized) === null || _b === void 0 ? void 0 : _b.target
|
|
271
272
|
}
|
|
272
273
|
};
|
|
273
274
|
}
|
|
275
|
+
function hotfixCommitProofGate(evidence, now) {
|
|
276
|
+
var _a;
|
|
277
|
+
var validation = (0, ai_runner_manager_policy_1.validateResolveIOAIManagerHotfixEvidence)(evidence);
|
|
278
|
+
var guard = validation.githubCommitGuard;
|
|
279
|
+
if (!guard.required) {
|
|
280
|
+
return undefined;
|
|
281
|
+
}
|
|
282
|
+
var status = guard.passed
|
|
283
|
+
? 'pass'
|
|
284
|
+
: guard.status === 'invalid'
|
|
285
|
+
? 'fail'
|
|
286
|
+
: 'blocked';
|
|
287
|
+
return {
|
|
288
|
+
key: 'hotfix_commit_proof',
|
|
289
|
+
label: 'Hotfix GitHub commit proof',
|
|
290
|
+
status: status,
|
|
291
|
+
reason: guard.passed
|
|
292
|
+
? 'Hotfix has matching sourceCommitSha, GitHub commit URL, and passed gitPushStatus/gitCommitStatus.'
|
|
293
|
+
: (guard.blockers.join('; ') || 'Manager hotfix is blocked until sourceCommitSha, githubCommitUrl, and passed gitPushStatus prove the hotfix is pushed to GitHub.'),
|
|
294
|
+
evidenceRefs: cleanStringList([guard.githubCommitUrl], 1, 500),
|
|
295
|
+
recordedAt: isoNow(now || ((_a = validation.normalized) === null || _a === void 0 ? void 0 : _a.recordedAt)),
|
|
296
|
+
metadata: {
|
|
297
|
+
channel: guard.channel || validation.channel,
|
|
298
|
+
status: guard.status,
|
|
299
|
+
passed: guard.passed,
|
|
300
|
+
managerMustCommitBeforeHotfix: guard.managerMustCommitBeforeHotfix,
|
|
301
|
+
sourceCommitSha: guard.sourceCommitSha,
|
|
302
|
+
githubCommitUrl: guard.githubCommitUrl,
|
|
303
|
+
githubCommitSha: guard.githubCommitSha,
|
|
304
|
+
gitCommitStatus: guard.gitCommitStatus,
|
|
305
|
+
gitPushStatus: guard.gitPushStatus,
|
|
306
|
+
blockers: guard.blockers,
|
|
307
|
+
nextCommands: guard.nextCommands,
|
|
308
|
+
requiredEvidence: guard.requiredEvidence
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
}
|
|
274
312
|
function collectHotfixEvidenceEvents(sources, events, gates, now) {
|
|
275
313
|
var e_6, _a;
|
|
276
314
|
var _b, _c;
|
|
@@ -297,6 +335,7 @@ function collectHotfixEvidenceEvents(sources, events, gates, now) {
|
|
|
297
335
|
fullDeployBlocked: validation.fullDeployBlocked,
|
|
298
336
|
hotfixSatisfied: validation.hotfixSatisfied,
|
|
299
337
|
blockers: validation.blockers,
|
|
338
|
+
githubCommitGuard: validation.githubCommitGuard,
|
|
300
339
|
target: (_c = validation.normalized) === null || _c === void 0 ? void 0 : _c.target
|
|
301
340
|
}
|
|
302
341
|
});
|
|
@@ -304,6 +343,18 @@ function collectHotfixEvidenceEvents(sources, events, gates, now) {
|
|
|
304
343
|
if (gate) {
|
|
305
344
|
gates.push(gate);
|
|
306
345
|
}
|
|
346
|
+
var commitProofGate = hotfixCommitProofGate(evidence, now);
|
|
347
|
+
if (commitProofGate) {
|
|
348
|
+
gates.push(commitProofGate);
|
|
349
|
+
pushEvent(events, {
|
|
350
|
+
type: 'log',
|
|
351
|
+
category: 'hotfix_commit_proof',
|
|
352
|
+
message: commitProofGate.reason,
|
|
353
|
+
artifactPaths: commitProofGate.evidenceRefs,
|
|
354
|
+
recordedAt: commitProofGate.recordedAt,
|
|
355
|
+
metadata: commitProofGate.metadata
|
|
356
|
+
});
|
|
357
|
+
}
|
|
307
358
|
}
|
|
308
359
|
}
|
|
309
360
|
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|