{"version":3,"file":"status.mjs","names":[],"sources":["../../../src/services/version/status.ts"],"sourcesContent":["/**\n * Deployed-vs-served version delta (atomic-deploys 12): the split-brain\n * detector — the published pointer's digest vs the pointer digest the host\n * actually serves. A mismatch means the host has not adopted the latest\n * publish (or is pinned to stale bytes), which is exactly what the\n * 2026-09-30 incident looked like from the outside.\n */\n\nexport interface DeployedVersionStatus {\n  publishedDigest: string;\n  servedDigest?: string;\n  inSync: boolean;\n  error?: string;\n}\n\nexport function computeDeployedVersionStatus(input: {\n  publishedDigest: string;\n  servedDigest?: string | null;\n  servedError?: string;\n}): DeployedVersionStatus {\n  if (input.servedDigest === null || input.servedDigest === undefined) {\n    return {\n      publishedDigest: input.publishedDigest,\n      inSync: false,\n      ...(input.servedError ? { error: input.servedError } : {}),\n    };\n  }\n  return {\n    publishedDigest: input.publishedDigest,\n    servedDigest: input.servedDigest,\n    inSync: input.publishedDigest === input.servedDigest,\n  };\n}\n"],"mappings":";AAeA,SAAgB,6BAA6B,OAInB;CACxB,IAAI,MAAM,iBAAiB,QAAQ,MAAM,iBAAiB,QACxD,OAAO;EACL,iBAAiB,MAAM;EACvB,QAAQ;EACR,GAAI,MAAM,cAAc,EAAE,OAAO,MAAM,YAAY,IAAI,CAAC;CAC1D;CAEF,OAAO;EACL,iBAAiB,MAAM;EACvB,cAAc,MAAM;EACpB,QAAQ,MAAM,oBAAoB,MAAM;CAC1C;AACF"}