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

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

shipped production is serving it opened this has it
opened this

The app page says reaches its preview in 6.1s · 12 deploys. It does not say that three more never got there at all.

previewLatency (src/core/runs.ts:633) filters on serving_at IS NOT NULL, and its comment is right about why: a deploy that never served says nothing about speed and is left out, never a zero. Correct for a median, misleading as a sentence. A week where every other push failed to come up reads exactly like a clean one, on the front door, under the heading the direction is named after — and the number gets better the more deploys die, because the dead ones are the slow ones.

Waits on #122: it is the same query and the same line, and two changes to one sentence at once is how one of them gets lost.

Acceptance

  • [ ] The same query also counts this week's deploys that finished without ever serving, and returns it beside the median and the count.
  • [ ] The line says it when that count is not zero — how many of how many never reached a preview — in the studio's plain words, and links to where a person can see them (the runs list, filtered to what failed).
  • [ ] When every deploy served, the line reads exactly as it does today: no 0 failed, no empty clause.
  • [ ] The median itself is unchanged — dead deploys stay out of it, and the pull says so.
  • [ ] A deploy still in flight is neither served nor failed, and is counted as neither.
  • [ ] Tests: a week with served and never-served deploys reports both numbers and words the second; a clean week is byte-identical to today's line; a deploy still running moves neither number.
  • [ ] bun test green.

Files I expect to change

src/core/runs.ts (previewLatency, PreviewLatency), src/web/studio/app.ts (previewLatencyWords), test/studio.test.ts.

Risks

"Never served" must mean finished and never served, not "no serving_at yet" — a deploy that is still coming up as the page renders would otherwise be counted as a failure on every reload. Use the run's terminal state, and let a test pin it.

Who may see this is who may see the This week panel today: this changes what the line says, not who reads it.

Suggested: Mason.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs