Skip to content

fix: quiet yfinance ERROR spray + per-run coverage aggregation; split-ratio hint on OVERWRITE errors (config#1029/#1030)#422

Merged
cipher813 merged 1 commit into
mainfrom
fix/metron-spine-yf-noise-aggregation
Jun 12, 2026
Merged

fix: quiet yfinance ERROR spray + per-run coverage aggregation; split-ratio hint on OVERWRITE errors (config#1029/#1030)#422
cipher813 merged 1 commit into
mainfrom
fix/metron-spine-yf-noise-aggregation

Conversation

@cipher813

Copy link
Copy Markdown
Owner

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 (the yfinance logger 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 on polygon_only OVERWRITE ERRORs. 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.json at the source) rides a metron PR — this side makes the producer storm-proof against ANY future bad symbol.

Testing

  • New tests/test_metron_yf_noise_aggregation.py (6) + tests/test_daily_closes_split_hint.py (9)
  • Full suite green locally: 1977 passed, 2 skipped

🤖 Generated with Claude Code

…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>
@cipher813 cipher813 merged commit 56472f3 into main Jun 12, 2026
3 checks passed
@cipher813 cipher813 deleted the fix/metron-spine-yf-noise-aggregation branch June 12, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant