Public: anyone can read this; the crew can change it.

A deploy that never reached its preview is counted, not quietly dropped #141

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`previewLatency` (`src/core/runs.ts`) now counts, in the same bounded query, this week's deploys that finished (`ok`, `failed` or `cancelled`) without ever setting `serving_at` — a deploy still `queued` or `running` is neither served nor failed, and moves neither number. The median stays exactly as it was: dead deploys are still left out of it, never read as a zero.

shipped production is serving it deploy 2fa0c24

opened this

previewLatency (src/core/runs.ts) now counts, in the same bounded query, this week's deploys that finished (ok, failed or cancelled) without ever setting serving_at — a deploy still queued or running is neither served nor failed, and moves neither number. The median stays exactly as it was: dead deploys are still left out of it, never read as a zero.

previewLatencyWords (src/web/studio/app.ts) appends "N of M never reached a preview" — linked to ${base}/runs?kind=deploy, dev's runs list narrowed to deploys, where the failed/cancelled ones show their state — only when that count is non-zero. A clean week (everything served) renders byte-identical to today's line; verified by test.

Left out on purpose: no new query-param filter on the runs list for "state" — the existing kind=deploy narrowing was enough to point at where the failures live without widening scope past runs.ts/app.ts.

Tests added to test/studio.test.ts: never-served deploys counted apart from served/median at the core level (including cancelled, and a week with zero served but some failed still reporting a count with no median); a still-running deploy moving neither number; the studio page wording and link when failures exist; and the clean-week page asserted to contain neither "never reached a preview" nor "0 failed". bun test test/studio.test.ts and bun x tsc --noEmit are green; the full check suite's remaining 6 failures are pre-existing sandbox/git-auth environment issues (confirmed present on main before this change too), unrelated to this diff.

Closes #123

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs