From d2213bab59d48eadd96307663ba25b903ee65fd9 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 3 Jul 2026 18:27:10 +0000 Subject: [PATCH] fix: clarify optional git mirror stage status --- .agents/skills/unidesk-cicd/references/branch-follower.md | 2 ++ scripts/src/cicd.ts | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.agents/skills/unidesk-cicd/references/branch-follower.md b/.agents/skills/unidesk-cicd/references/branch-follower.md index a7422ad7..22c3b8af 100644 --- a/.agents/skills/unidesk-cicd/references/branch-follower.md +++ b/.agents/skills/unidesk-cicd/references/branch-follower.md @@ -38,6 +38,8 @@ When a repeated runtime pitfall or visibility defect is found during branch-foll `status-read`, `events`, `logs` and debug summaries must expose compact closeout gate details when a follower is not aligned: git-mirror readiness, Tekton PipelineRun condition, Argo sync/health, runtime target sha/readiness and short errors. Repeating only phase/observed/target/message is a visibility defect and must be fixed before further rollout tuning. +Stage timing rows must not label optional gates as `not-ready` when they are not part of that follower's closeout contract. For sentinel-like followers without a GitOps branch flush gate, git-mirror source snapshot readiness should render as source-ready/ready, while missing GitOps `githubInSync` remains `-`/not-applicable instead of a failure-looking state. + ## Source Authority - Follower decisions must not read host source worktrees, target dev directories, `.worktree/*`, local git state, or direct GitHub branch refs. diff --git a/scripts/src/cicd.ts b/scripts/src/cicd.ts index 6e50d283..b15d5735 100644 --- a/scripts/src/cicd.ts +++ b/scripts/src/cicd.ts @@ -2366,7 +2366,13 @@ function stageTimingsFromNativePayload(payload: Record | null): if (sourceSyncStage !== null) stages.push(sourceSyncStage); const gitMirror = asOptionalRecord(payload.gitMirror); if (gitMirror !== null) { - const status = gitMirror.pendingFlush === true ? "pending-flush" : gitMirror.githubInSync === true && gitMirror.sourceSnapshotReady === true ? "ready" : "not-ready"; + const hasGitopsBranch = stringOrNull(gitMirror.gitopsBranch) !== null; + const sourceReady = gitMirror.sourceSnapshotReady === true; + const status = gitMirror.pendingFlush === true + ? "pending-flush" + : hasGitopsBranch + ? gitMirror.githubInSync === true && sourceReady ? "ready" : "not-ready" + : sourceReady ? "source-ready" : "source-not-ready"; stages.push(stageTiming("git-mirror", status, null, null, "git-mirror-cache", stringOrNull(gitMirror.gitopsBranch) ?? stringOrNull(gitMirror.sourceBranch))); } const tekton = asOptionalRecord(payload.tekton);