From 4a86ecb95e1b155b58c2cdc294d850309bab934d Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Wed, 12 Aug 2026 17:21:08 -0700 Subject: [PATCH] re-export freshness for downstream --- src/root.zig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/root.zig b/src/root.zig index 905692e..9488505 100644 --- a/src/root.zig +++ b/src/root.zig @@ -67,6 +67,20 @@ pub const Config = @import("Config.zig"); /// SRF-backed file cache for candles, dividends, earnings, and other fetched data. pub const cache = @import("cache/store.zig"); +/// Cache-wide candle freshness: `collect` reads a corpus of cached symbols and +/// `scan` reports which are behind their PEERS, plus `max_normal_lag_days` as the +/// boundary between ordinary provider lag and a gap that will not self-heal. +/// +/// Distinct from `market.candleFreshness`, which judges one symbol against the +/// trading calendar and so cannot tell a market closure from a single neglected +/// symbol - during a provider lag its honest answer is "maybe". This module +/// answers the corpus question instead: a closure moves every symbol together, so +/// one symbol far behind while its cohort is current is locally disprovable as a +/// closure. That is the distinction `zfin-server` needs to stop guessing, and the +/// reason this is exported at all - it was withdrawn as speculative while the +/// only consumer was in-tree. +pub const freshness = @import("cache/freshness.zig"); + // ── Analytics ──────────────────────────────────────────────── /// Morningstar-style holding-period return calculations (total + annualized).