"A live price is a guest, not a resident. It gets fifteen minutes, then the durable close takes its chair back."
Live is an overlay, not a replacement
When streaming is on, a live tick gives you the most current price. But Keep never lets that live value become the truth — it's a temporary overlay painted on top of the durable close, and it has an expiry. After LIVE_TTL_SECONDS — fifteen minutes — the live tick expires, and ownership of "the current value" returns to the stored, completed close. The durable close is the resident; the live tick is a guest with a timer.
Why the expiry matters
Imagine no expiry. You open Keep, streaming runs for a while, then your laptop sleeps, or the network drops, or you wander off. The last live tick is now frozen on screen — a price from an hour ago, or yesterday, sitting there looking exactly as authoritative as a fresh one. That frozen tick is the most dangerous kind of stale data: it looks live but isn't. The TTL kills that failure mode. Once fifteen minutes pass without a new tick, Keep stops trusting the old one and falls back to the durable close, which at least honestly carries its own date. A known close beats a lying tick.
The layering, made explicit
Keep's current value for any instrument is a small stack: the durable completed close at the bottom (always present, always dated), with a live tick painted on top only while it's fresh. Reads resolve top-down but respect the TTL — a live tick within its window wins; an expired one is ignored as if it were never there. This is what lets "pause" be safe (next lesson): pausing just stops new ticks, and the existing overlay ages out on its own, leaving the honest durable close in charge.