refactor(arcticdb): delegate to lib chokepoint (L2771 part 4/5)#207
Merged
Conversation
Four sites migrated to `alpha_engine_lib.arcticdb`: - `inference/stages/load_prices.py::_connect_arctic` — uses `open_universe_lib` + `open_macro_lib`. `PipelineAbort` preserved. - `inference/stages/run_inference.py` (inline call) — replaced with direct `open_universe_lib(ctx.bucket)`. RuntimeError now comes from the lib (with the same bucket/uri context). - `store/arctic_reader.py::_get_arctic` — uses `open_arctic`. - `scripts/dry_run_meta_training.py` (inline) — uses `open_arctic`. Test fixture update: - `tests/test_arctic_reader.py::fake_arcticdb`: monkeypatch was `setattr(store.arctic_reader, "adb", fake)` — caught the consumer's direct call but bypassed the lib-routed path (lib does its own lazy `import arcticdb`). Fixed by also patching the actual `arcticdb` module singleton's `Arctic` attribute, so both call paths share one mock. Documented with the post-L2771 rationale. ROADMAP: **L2771 part 4 of 5** (parts 1+2+3 = alpha-engine #225, alpha-engine-research #247, alpha-engine-data #340). 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
Four ae-predictor sites migrated to
alpha_engine_lib.arcticdb:inference/stages/load_prices.py::_connect_arctic(usesopen_universe_lib+open_macro_lib;PipelineAbortpreserved).inference/stages/run_inference.py(inline →open_universe_lib).store/arctic_reader.py::_get_arctic(usesopen_arctic).scripts/dry_run_meta_training.py(inline →open_arctic).Test fixture update:
fake_arcticdbwas monkeypatchingstore.arctic_reader.adbdirectly — caught the consumer's call but bypassed the lib-routed path (lib does its own lazyimport arcticdbfrom a separate module reference). Fixed by also patching the actualarcticdbmodule singleton, so both paths share the mock. Documented with the post-L2771 rationale.ROADMAP: L2771 part 4 of 5 (parts 1+2+3 = alpha-engine #225, alpha-engine-research #247, alpha-engine-data #340).
Test plan
🤖 Generated with Claude Code