refactor(load_prices): retire macro.SPY fallback in _verify_arctic_fresh (L1346 b)#205
Merged
Merged
Conversation
…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>
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.
Summary
macro_libparameter + macro-fallback branch from_verify_arctic_fresh. SPY now read only fromuniverseArcticDB library.load_prices.py::runto pass(universe_lib, date_str)._connect_arctictuple-return preserved —macro_libis still used byload_price_data_from_arcticfor VIX/TNX/IRX/sector ETFs.Why
alpha-engine-data #245 (MERGED 2026-05-15) lifted SPY to a full
universemember 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 wroteuniverse.SPYcleanly); the path is now dead defense.ROADMAP entry: L1886 (b) — SPY → universe ArcticDB consumer retirement, predictor half.
Composes with
_MACRO_SYMBOLS - {\"SPY\"}pattern inprice_cache.py+eod_reconcile.py+main.pyATR section. Both PRs are independently mergeable; together they close the L1346 SPY-universe arc.Test plan
1214 passedtest_signature_takes_universe_lib_only) blocks re-addingmacro_libparamuniverse.SPYend-to-endload_prices.pymodule🤖 Generated with Claude Code