MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / logRolloutDecision

Function logRolloutDecision

apps/kimi-code/src/cli/update/preflight.ts:216–236  ·  view source on GitHub ↗

Record which case a passive version check hit in `updates/rollout.log`.

(
  phase: RolloutCheckPhase,
  currentVersion: string,
  latest: string | null,
  manifest: UpdateManifest | null,
  decision: PassiveUpdateDecision,
)

Source from the content-addressed store, hash-verified

214
215/** Record which case a passive version check hit in `updates/rollout.log`. */
216function logRolloutDecision(
217 phase: RolloutCheckPhase,
218 currentVersion: string,
219 latest: string | null,
220 manifest: UpdateManifest | null,
221 decision: PassiveUpdateDecision,
222): void {
223 void appendRolloutDecisionLog({
224 ts: nowIso(),
225 phase,
226 reason: decision.reason,
227 current: currentVersion,
228 latest,
229 target: decision.target?.version ?? null,
230 manifestPresent: manifest !== null,
231 publishedAt: manifest?.publishedAt ?? null,
232 bucket: decision.bucket,
233 delaySeconds: decision.delaySeconds,
234 eligibleAt: decision.eligibleAt,
235 });
236}
237
238function refreshAndMaybeInstallInBackground(
239 currentVersion: string,

Callers 3

runUpdatePreflightFunction · 0.85

Calls 2

appendRolloutDecisionLogFunction · 0.90
nowIsoFunction · 0.85

Tested by

no test coverage detected