Skip to content

refactor(load_prices): retire macro.SPY fallback in _verify_arctic_fresh (L1346 b)#205

Merged
cipher813 merged 1 commit into
mainfrom
feat/retire-macro-spy-fallback-l1346
May 28, 2026
Merged

refactor(load_prices): retire macro.SPY fallback in _verify_arctic_fresh (L1346 b)#205
cipher813 merged 1 commit into
mainfrom
feat/retire-macro-spy-fallback-l1346

Conversation

@cipher813
Copy link
Copy Markdown
Owner

Summary

  • Drop macro_lib parameter + macro-fallback branch from _verify_arctic_fresh. SPY now read only from universe ArcticDB library.
  • Update caller in load_prices.py::run to pass (universe_lib, date_str). _connect_arctic tuple-return preserved — macro_lib is still used by load_price_data_from_arctic for VIX/TNX/IRX/sector ETFs.
  • Tests: drop the falls-back-to-macro coverage, add a signature-pin regression test, simplify existing fixtures to single-lib calls.

Why

alpha-engine-data #245 (MERGED 2026-05-15) lifted SPY to a full universe member via _UNIVERSE_EXTRA = frozenset({\"SPY\"}) — written by both backfill (Saturday) and daily_append (weekday). The transitional macro-fallback served its soak (Sat 5/16 + Mon 5/18 + Sat 5/24 DataPhase1 all wrote universe.SPY cleanly); the path is now dead defense.

ROADMAP entry: L1886 (b)SPY → universe ArcticDB consumer retirement, predictor half.

Composes with

  • Sibling executor PR (alpha-engine, L1886 c) — retires the same defensive _MACRO_SYMBOLS - {\"SPY\"} pattern in price_cache.py + eod_reconcile.py + main.py ATR section. Both PRs are independently mergeable; together they close the L1346 SPY-universe arc.

Test plan

  • Suite green locally: 1214 passed
  • Signature pin (test_signature_takes_universe_lib_only) blocks re-adding macro_lib param
  • Next weekday morning SF (Mon 6/2 06:15 PT) — first organic exercise; freshness gate reads universe.SPY end-to-end
  • Sat 5/30 PredictorTraining-in-SF (post-merge) — unrelated path but exercises the wider load_prices.py module

🤖 Generated with Claude Code

…esh (L1346 b)

Drop the `macro_lib` parameter + macro-fallback branch from
`_verify_arctic_fresh`. universe.SPY has been the canonical source
since alpha-engine-data #245 (MERGED 2026-05-15) lifted SPY to a full
`universe` member via `_UNIVERSE_EXTRA = frozenset({"SPY"})` written
by both backfill (Saturday) and daily_append (weekday). The transitional
macro-fallback served its 1-cycle soak (Sat 5/16 + Mon 5/18 + Sat 5/24
DataPhase1 all wrote universe.SPY); the path is dead defense now.

Caller in `load_prices.py::run` updated to pass only `(universe_lib,
date_str)`. The `_connect_arctic` tuple-return is kept intact —
macro_lib is still used by `load_price_data_from_arctic` for VIX/TNX/
IRX/sector ETFs (Close-only macro reads), just not by the freshness
gate. `daily_predict.py:295` patch point uses `lambda *a, **k: None`
so signature change is transparent.

Tests:
- TestArcticFreshnessGate (5 tests) updated to single-lib calls
- TestUniverseSPYFreshnessReadL1346:
  - test_universe_spy_present_passes (simplified — no fallback to verify)
  - test_universe_spy_absent_raises_pipeline_abort (replaces the
    falls-back-to-macro test)
  - test_signature_takes_universe_lib_only (NEW signature pin to
    prevent regression that re-adds macro_lib param)

Composes with the sibling executor PR (alpha-engine, L1346 c) which
retires the same defensive `_MACRO_SYMBOLS - {"SPY"}` pattern in
`price_cache.py` + `eod_reconcile.py` + `main.py` ATR section.

Closes L1346 (b) half of the SPY → universe consumer retirement arc.

Suite: 1214 passed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cipher813 cipher813 merged commit b952456 into main May 28, 2026
1 check passed
@cipher813 cipher813 deleted the feat/retire-macro-spy-fallback-l1346 branch May 28, 2026 14:58
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