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

Function rolloutBucket

apps/kimi-code/src/cli/update/rollout.ts:24–27  ·  view source on GitHub ↗
(deviceId: string, version: string)

Source from the content-addressed store, hash-verified

22 * so each release reshuffles which devices land in the early batches.
23 */
24export function rolloutBucket(deviceId: string, version: string): number {
25 const digest = createHash('sha256').update(`${deviceId}:${version}`, 'utf-8').digest();
26 return digest.readUInt32BE(0) % 100;
27}
28
29/**
30 * Delay assigned to a bucket by the published plan. Batches claim bucket

Callers 4

rollout.test.tsFile · 0.90
rolloutTelemetryForFunction · 0.90
rolloutDelaySecondsFunction · 0.85

Calls 1

updateMethod · 0.65

Tested by

no test coverage detected