Spaces:
Sleeping
Sleeping
Commit History
-
fix: derive target_period for the daily consensus capture
Controller ruling on the gap found while implementing Task 4: the daily job called fetch_analyst_estimates(ticker) with no target_period, so every captured payload carried target_period=None and record_consensus_snapshot's guard silently dropped every record — the archive stayed permanently empty. - analytics/consensus.py: next_unreported_period(ticker) derives the quarter after the most recently reported one from metrics.period labels (Q{n}{YYYY} / FY{YYYY}), taking the max on parsed (year, quarter) rather than lexicographically, since "Q12027" < "Q42026" as strings. Returns None when nothing parses. - scripts/snapshot_consensus.py: calls next_unreported_period first and skips (rather than fetches with a None period) when it returns None. Also warns, per ticker, when the latest reported filing is more than 120 days old (dashboard/provenance.py::filing_staleness's threshold) since the derived period is then probably wrong. - ingestion/analyst.py: every snapshot now car…6bdcc4d -
feat: add fail-closed consensus alignment gate
481f37b