fix: quiet yfinance ERROR spray + per-run coverage aggregation; split-ratio hint on OVERWRITE errors (config#1029/#1030)#422
Merged
Conversation
…un; split-ratio hint on OVERWRITE errors (config#1029, config#1030) Two Flow Doctor noise/diagnosis fixes from the 2026-06-12 session: 1. metron_market_data: yfinance's internal logger emits >=5 distinctly-worded ERROR records for ONE unpriceable symbol (the PCKM 401(k) CIT storm — 5 emails per EOD run). All default yfinance fetchers now run under _quiet_yfinance (logger held to CRITICAL for the fetch), and per-symbol coverage aggregates into ONE record per artifact per run via _log_yf_coverage: partial miss = single WARN naming the symbols; full miss on the load-bearing closes artifact = single ERROR (outage surface). Recording surface preserved per no-silent-fails. 2. daily_closes: polygon_only OVERWRITE ERRORs now carry a split-ratio hint when prior/new sits within 0.5% of a clean N:1 ratio (2..50, both directions). KLAC's 10-for-1 split restated three dates by exactly /10 and the LLM auto-diagnosis blamed a producer decimal-shift bug because the message only said "90.00% diff" (data#417-419). The hint puts the strongest evidence in the message for any diagnoser, human or LLM. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two Flow Doctor noise/diagnosis fixes (config#1029, config#1030):
1. Metron spine producer — yfinance ERROR-spray suppression + per-run coverage aggregation. yfinance internally logs ≥5 distinctly-worded ERROR records for ONE unpriceable symbol; Flow Doctor dedups on message text, so the PCKM 401(k) CIT produced 5 ERROR emails per EOD run (first storm 2026-06-12 20:17 UTC). All default yfinance fetchers now run under
_quiet_yfinance(theyfinancelogger held to CRITICAL for the duration of the fetch), and coverage aggregates into one record per artifact per run via_log_yf_coverage: partial miss = single WARN naming all missing symbols; full miss on the load-bearing closes artifact = single ERROR. Mirrors the intrabar aggregate-per-run pattern (#414). Recording surface preserved per no-silent-fails — the swallowed surface is yfinance's redundant per-line spray; the named recording surfaces are the per-artifact WARN/ERROR + the existing INFO coverage counts.2.
daily_closes— split-ratio hint onpolygon_only OVERWRITEERRORs. KLAC's 10-for-1 split (eff. 2026-06-10) restated three windowed dates by exactly ÷10; the Haiku auto-diagnosis on data#417–419 blamed a producer decimal-shift bug because the message only said "90.00% diff". ERRORs now append[ratio = N:1 — consistent with a N-for-1 … split …]when prior/new sits within 0.5% of a clean integer ratio (2–50, forward + reverse). Evidence-layer fix per config#1030; severity stays ERROR (cache-coherence eyeball still warranted).Companion
The root-cause fix for PCKM (excluding non-listed instruments from
metron/holdings_universe.jsonat the source) rides a metron PR — this side makes the producer storm-proof against ANY future bad symbol.Testing
tests/test_metron_yf_noise_aggregation.py(6) +tests/test_daily_closes_split_hint.py(9)🤖 Generated with Claude Code