Stories A told story · drafted 2026-09-25

One signal, every millisecond

Every signal carries one trace id from the first door to the answer, and any hop's time can be read back by that id, to the millisecond, on production.

The seven beats

World
ONE's edge — browser, Cloudflare, one.ie, channels, the model, the brain. Groups
Cast
A person or an agent waiting; signal-courier, perf-engineer, edge-keeper. Actors
Knock
Tony asks to see a signal every millisecond until the answer arrives. signal
Want
One id, one span per hop, one read that returns the whole line. Things
Way
Mint once, pass the id in a header, write spans to Analytics Engine, read them back by id. Paths
Turn
A chat turn stops being one number and becomes ours, the model's, and the gap between them. Events
Lesson
Open — a Lesson is learned by someone, and this one is not written yet. Learning

A person types a question into chat and presses enter. Somewhere between that key and the first word of the answer, a few seconds pass. Today we can say how many. We cannot say where they went.

The question crosses the person's browser, a Cloudflare city, the one.ie worker, the channels worker, a model behind AI Gateway, and back the same way. Each of those places keeps its own clock and its own notes. The one.ie worker writes a Server-Timing header. Channels logs a [chat-timing] line nobody keeps. A D1 table counts latency per receiver per day. None of them share a name for the signal, so nothing joins them up.

Tony asked for the join: "we want to trace a signal as it goes through our platform every ms until a user or agents receive a response back."

So the first door mints one id and hands it to the next door in a header. Every worker that touches the signal writes one short record, a span: which hop, when it started, how long it took, how it ended. The spans go to Analytics Engine, which takes a write for almost nothing and does not spend the D1 reads that ran out on 2026-09-25. Reading them back is one query by the id.

The hard part is the clock. On Workers, time does not move while the code is only computing. It moves when the code waits on the network. So a span can only be trusted at its edges — a request arriving, the first byte going out, the last byte leaving — and a number made by subtracting one worker's clock from another's is marked as mixed.

The turn is small and it changes what the number means. A chat turn's first byte was read at 3.1–7.4 seconds on 2026-08-19 (text/speed-results.md; not re-measured for this story). Traced, a turn like that turns out to be some milliseconds of ours, a gap on the wire, and the model's time to its first token. Those need opposite fixes, and until now they looked the same.

What the team learns from the first real trace is not written yet.

Connected to

Every link here was checked against the repo when the page was built. 4 names the story uses could not be found and are shown without a link.

People

  • Tony — asked for it; approves the dev → main merge

Agents

Each opens a chat with that agent.

Skills

Each opens the skill's page.

  • VERIFY: cloudflare (no repo skill of that name)
  • VERIFY: wrangler (no repo skill of that name)
  • astro

Paths

The flows this story walks — trigger → step → step.

  1. trigger: board row tagged trace ready → agent: signal-courier builds → tool: bun run verify:fast → human: Tony approves the dev → main PR

Tools

Receivers and scripts it signals.

  • Analytics Engine dataset one_trace (binding TRACE)
  • trace:read (POST /api/ask/trace:read)
  • signal-watch.sh

Docs

What derives from this file.

Events

Every event is a signal; each names the path it marks or warns.

  • chat:send · from a person, through /api/chat VERIFY: speed and trace are reserved stakes — no emitter announces them; the team is reached by name and by assigned rows tags: speed, trace

Transactions

  • none — a span write is an Analytics Engine data point, not a D1 row and not a model call

Analytics

  • Analytics Engine dataset one_trace — one data point per span, read with the SQL API by index1 = trace id