From 38b280eab2652aa2ef514b8e9b659745eb65b356 Mon Sep 17 00:00:00 2001 From: Codex Date: Sat, 27 Jun 2026 07:35:32 +0000 Subject: [PATCH] fix: treat argo branch head drift as warning --- scripts/src/hwlab-node-web-sentinel-cicd.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/src/hwlab-node-web-sentinel-cicd.ts b/scripts/src/hwlab-node-web-sentinel-cicd.ts index b5b1223d..38656d58 100644 --- a/scripts/src/hwlab-node-web-sentinel-cicd.ts +++ b/scripts/src/hwlab-node-web-sentinel-cicd.ts @@ -253,6 +253,7 @@ function runSentinelControlPlane(state: SentinelCicdState, options: Extract | SentinelObserved && record(observed.runtime).ok === true; } +function sentinelObservedWarnings(value: Record | SentinelObservedStatus | null): string[] { + const observed = record(value); + const argo = record(observed.argo); + return mergeWarnings(argo.warning); +} + function probeSourceMirror(state: SentinelCicdState, timeoutSeconds: number): Record { const namespace = stringAt(state.cicd, "builder.namespace"); const repository = stringAt(state.cicd, "source.repository"); @@ -949,15 +958,19 @@ function probeArgoApplication(state: SentinelCicdState, timeoutSeconds: number, const healthStatus = nonEmptyString(healthStatusRaw); const revision = nonEmptyString(revisionRaw); const revisionMatches = expectedRevision === null || revision === expectedRevision; - const ok = result.exitCode === 0 && syncStatus === "Synced" && healthStatus === "Healthy" && revisionMatches; + const healthy = result.exitCode === 0 && syncStatus === "Synced" && healthStatus === "Healthy"; return { - ok, + ok: healthy, present: result.exitCode === 0, syncStatus, healthStatus, revision, expectedRevision, revisionMatches, + revisionPolicy: "non-blocking-branch-head-drift", + warning: healthy && !revisionMatches + ? "Argo app is Synced/Healthy but status.sync.revision differs from current GitOps branch HEAD; in multi-sentinel GitOps this can happen when another sentinel path advances the branch. Runtime image/manifest checks remain authoritative for rollout readiness." + : null, result: compactCommand(result), }; }