fix: decouple sentinel rollout status from target validation (#984)

Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
Lyon
2026-06-26 14:21:48 +08:00
committed by GitHub
parent 6985387702
commit 5dd0cc2d7d
2 changed files with 9 additions and 13 deletions
+7 -11
View File
@@ -591,7 +591,7 @@ function runSentinelControlPlaneConfirmed(state: SentinelCicdState, options: Ext
reason: "runtime-not-ready",
valuesRedacted: true,
};
const targetValidationOk = applyOnly || record(targetValidation).ok === true;
const targetValidationBlocked = !applyOnly && record(targetValidation).ok !== true;
const ok = state.configReady
&& state.sourceHead.ok
&& (applyOnly || record(sourceMirrorSync).ok === true)
@@ -599,18 +599,13 @@ function runSentinelControlPlaneConfirmed(state: SentinelCicdState, options: Ext
&& (applyOnly || record(flush).ok === true)
&& record(publicExposureApply).ok === true
&& record(argoApply).ok === true
&& observedReady
&& targetValidationOk;
&& observedReady;
const elapsedMs = Date.now() - startedAt;
const blocker = ok ? null : {
code: targetValidationOk
? record(sourceMirrorSync).ok === false ? "sentinel-source-mirror-sync-failed" : "sentinel-control-plane-not-ready"
: "sentinel-target-validation-failed",
reason: targetValidationOk
? record(sourceMirrorSync).ok === false
? "source mirror sync did not complete; investigate git mirror/proxy before control-plane publish"
: "one or more publish, publicExposure, Argo or runtime observation checks did not pass"
: text(record(targetValidation).failure ?? record(targetValidation).reason ?? "quick verify did not pass"),
code: record(sourceMirrorSync).ok === false ? "sentinel-source-mirror-sync-failed" : "sentinel-control-plane-not-ready",
reason: record(sourceMirrorSync).ok === false
? "source mirror sync did not complete; investigate git mirror/proxy before control-plane publish"
: "one or more publish, publicExposure, Argo or runtime observation checks did not pass",
};
const result = {
ok,
@@ -657,6 +652,7 @@ function runSentinelControlPlaneConfirmed(state: SentinelCicdState, options: Ext
...sentinelElapsedWarnings(record(publish).elapsedMs),
...sentinelElapsedWarnings(record(flush).result === undefined ? null : record(record(flush).result).durationMs),
...(Array.isArray(record(targetValidation).warnings) ? record(targetValidation).warnings.map(text) : []),
...(targetValidationBlocked ? ["targetValidation is blocked; top-level STATUS only covers sentinel control-plane rollout. HWLAB business recovery remains pending; rerun quick verify after internal DB switch completes, without public fallback or a second execution path."] : []),
])),
blocker,
next: controlPlaneNext(state, options.action),