fix(runtime-status): strip sha256: prefix in stale comparison (was always-stale false positive)

This commit is contained in:
claude-v2-deploy-coordination 2026-05-21 22:36:21 -04:00
parent 2551af4051
commit 58733939e2
1 changed files with 2 additions and 1 deletions

View File

@ -1333,7 +1333,8 @@ fastify.get('/api/v1/apps/:app/runtime-status', async (request, reply) => {
state = parts[2] || null; state = parts[2] || null;
health = parts[3] || null; health = parts[3] || null;
} }
const stale = !!expectedSha && !!running_image_sha && expectedSha !== running_image_sha; const stripSha = (s) => (s || '').replace(/^sha256:/, '');
const stale = !!expectedSha && !!running_image_sha && stripSha(expectedSha) !== stripSha(running_image_sha);
if (stale) anyStale = true; if (stale) anyStale = true;
out.push({ service: svc, container_id: containerId || null, expected_image_sha: expectedSha || null, running_image_sha, started_at, state, health, stale }); out.push({ service: svc, container_id: containerId || null, expected_image_sha: expectedSha || null, running_image_sha, started_at, state, health, stale });
} }