main
1export type Phase =
2 | 'bump'
3 | 'deploy-canary'
4 | 'smoke-canary'
5 | 'telemetry-canary'
6 | 'ramp'
7 | 'smoke-live'
8 | 'telemetry-live'
9 | 'rollback'
10 | 'halt'
11 | 'done'
13export type PhaseOutcome = 'pass' | 'fail' | 'rolled-back' | 'harness-stop' | 'state-conflict'
15export type PipelineState = {
16 readonly phase: Phase
17 readonly smoke: PhaseOutcome | null
18}
20export function pipelineStart(): PipelineState {
21 return { phase: 'bump', smoke: null }
22}
24/**
25 * The operator pipeline. A pinned smoke failure halts: the canary stays at 0% and
26 * telemetry does not run. A ramp rollback is already done, so the pipeline halts
27 * instead of rolling back again. A live worker failure enters rollback. A harness fault
28 * or a state conflict stops with the split held.
29 */
30export function nextPhase(state: PipelineState, outcome: PhaseOutcome): PipelineState {
31 if (outcome === 'harness-stop' || outcome === 'state-conflict') return { phase: 'halt', smoke: state.smoke }
32 switch (state.phase) {
33 case 'bump':
34 return outcome === 'pass' ? { phase: 'deploy-canary', smoke: null } : { phase: 'halt', smoke: null }
35 case 'deploy-canary':
36 return outcome === 'pass' ? { phase: 'smoke-canary', smoke: null } : { phase: 'halt', smoke: null }
37 case 'smoke-canary':
38 return outcome === 'pass'
39 ? { phase: 'telemetry-canary', smoke: outcome }
40 : { phase: 'halt', smoke: outcome }
41 case 'telemetry-canary':
42 return outcome === 'pass' && state.smoke === 'pass'
43 ? { phase: 'ramp', smoke: state.smoke }
44 : { phase: 'halt', smoke: state.smoke }
45 case 'ramp':
46 return outcome === 'pass' ? { phase: 'smoke-live', smoke: state.smoke } : { phase: 'halt', smoke: state.smoke }
47 case 'smoke-live':
48 return outcome === 'pass' ? { phase: 'telemetry-live', smoke: state.smoke } : { phase: 'rollback', smoke: state.smoke }
49 case 'telemetry-live':
50 return outcome === 'pass' ? { phase: 'done', smoke: state.smoke } : { phase: 'rollback', smoke: state.smoke }
51 case 'rollback':
52 return { phase: 'halt', smoke: state.smoke }
53 case 'halt':
54 case 'done':
55 return state
56 }
57}
59/** A live check's result, reduced to what decides the run. */
60export type LiveCheck = { readonly kind: 'pass' } | { readonly kind: 'fail'; readonly fault: 'worker' | 'harness_fault' | 'state_conflict' | 'insufficient_samples' | 'harness_unhealthy' }
62/**
63 * After the ramp reaches 100%: the live smoke, its telemetry (with the rate gate) and the visual smoke. Any Worker
64 * failure rolls back to `previous`, even beside a harness fault. A harness fault alone (no Chrome, a lost query, too few
65 * rate checks ingested) stops with the new version live: it is not evidence against the version.
66 */
67export function liveVerdict(checks: readonly LiveCheck[]): 'rollback' | 'halt' | 'done' {
68 if (checks.some(check => check.kind === 'fail' && check.fault === 'worker')) return 'rollback'
69 if (checks.some(check => check.kind === 'fail')) return 'halt'
70 return 'done'
71}
Diagnostics4 git calls · 30 ms
CallStatusSizeTime030 ms
discover200152 B3 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=3 git.response.bytes=152 git.server.agent=gitty/1.0 git.server.object_format=sha1 git.server.caps=agent ls-refs fetch object-format git.server.fetch=shallow filter sideband-all git.protocol.version=2 git.pkt.frames=8 git.pkt.data=6 git.pkt.flush=2 git.pkt.delim=0 git.pkt.bytes=152 git.pkt.payload.max=34
ls-refs200145 B · hit3 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=3 git.response.bytes=145 git.response.cache=HIT git.response.duration_ms=3 git.protocol.version=2 git.pkt.frames=3 git.pkt.data=2 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=145 git.pkt.payload.max=76 git.ls_refs.count=2 git.ls_refs.head=refs/heads/main
fetchblob:none · deepen 1020040 KiB · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=41349 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=blob:none git.fetch.filter.requested=tree:0 git.fetch.filter.fallback=blob:none git.fetch.filter.learned=false git.fetch.wants=526b305930b8ef382f2d7a1f9c0238730a585921 git.fetch.haves.count=0 git.fetch.deepen=10 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=6 git.pkt.data=4 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=41349 git.pkt.payload.max=41254 git.sideband.band1.bytes=41253 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=61 git.pack.bytes=41253 git.pack.ofs_delta=0 git.pack.ref_delta=0 git.pack.chain.max=0 git.pack.trailer=ab60efef4b7243678c75de64a4386986ee885c1c git.pack.full=61Open pack map
fetch200991 B · hit24 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=24 git.response.bytes=991 git.response.cache=HIT git.response.duration_ms=24 git.fetch.wants=70ce9b67aa0b4f9f940446a27cc3920ecf2c998f git.fetch.haves.count=0 git.fetch.deepen=0 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=3 git.pkt.data=2 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=991 git.pkt.payload.max=970 git.sideband.band1.bytes=969 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0
Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.
- Remote
- https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/ply-web.git
- Ref
- refs/heads/main
- Commit
- 526b305930b8ef382f2d7a1f9c0238730a585921
- cf-ray
- a5e3281628bb4628
- Request
- 067c31b9…
- Protocol
- v2 · sha1
- Agent
- gitty/1.0
- Filter
- advertised
- Fetch
- shallow filter sideband-all
- Capabilities
- agent ls-refs fetch object-format