Skip to content

cleanup: drop dead forecast metadata leftovers and unused research barrel - #112

Merged
emerzon merged 5 commits into
mainfrom
cursor/forecast-research-dead-leftovers-5d32
Sep 10, 2026
Merged

emerzon merged 5 commits into
mainfrom
cursor/forecast-research-dead-leftovers-5d32

Conversation

@emerzon

@emerzon emerzon commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Remove leftover forecast method-metadata passthroughs and unused research-capability barrels so one lookup path and one import path remain. No live caller behavior change.

What changed

  • Deleted unused forecast_registry._find_method_definition and the test that only covered it. Live lookup stays in forecast_methods.py.
  • Pointed core/web_api.py and core/forecast.py at forecast_registry.get_forecast_methods_data and dropped the unused forecast.py re-export plus unused TIMEFRAME_MAP / TIMEFRAME_SECONDS imports.
  • Deleted the one-line forecast_methods.get_forecast_methods_data() wrapper; snapshot/helpers call the registry alias directly.
  • Removed the trailing Moirai leftover note in pretrained.py and stale pretrained_refactored / forecast_moirai references in test_dry_optimization.py.
  • Stopped re-exporting unused use-case constants from forecast/use_cases/__init__.py (owning modules keep them).
  • Emptied the unused services/research/__init__.py barrel. Callers already import CALENDAR / EQUITY_PROFILE / SCREENER / PERFORMANCE from capabilities.py.
  • Dropped wrapper-test monkeypatches that set forecast.py timeframe maps after those unused imports were removed.

Left alone (verified on current main, not guessed)

  • PREFERRED_SOURCE_ORDER, NEWS, and RESEARCH_CAPABILITIES are already gone.
  • forecast/optimize.py still has one production importer (tune.py, lazy) and a direct test import (tests/forecast/test_optimize_hints.py). Collapsing it would move ~220 lines into tune.py and change a tested import path, so it stayed put.

CI follow-ups (not Area E leftovers)

  • Wrapper TIMEFRAME_MAP patches: fixed here.
  • GPU cleanup backtest: hermetic on main; merged into this branch.
  • Idempotency expiry: main's backdate still used a 50ms TTL, so the first check flaked on loaded runners. This branch now uses a 60s TTL and expires by rewriting updated_at.

Diff is deletions-first for Area E.

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 9, 2026 02:25
…rrel

Remove the unused registry method-definition helper, forecast.py
passthroughs, forecast_methods wrapper, unused use-case constant
re-exports, and the unused research package barrel. Live lookup and
imports stay on the owning modules.

Co-authored-by: Emerson Gomes <emerson.gomes@gmail.com>
Those monkeypatches targeted leftover imports that no longer exist on
the wrapper module. Volatility routing still patches the volatility
module maps it actually uses.

Co-authored-by: Emerson Gomes <emerson.gomes@gmail.com>
@emerzon
emerzon marked this pull request as ready for review September 9, 2026 02:50
emerzon and others added 3 commits September 9, 2026 23:33
The first check still used a 50ms TTL, so loaded CI runners expired the
row before the backdate ran. Use a 60s TTL and expire by rewriting
updated_at.

Co-authored-by: Emerson Gomes <emerson.gomes@gmail.com>
@emerzon
emerzon merged commit c18cc95 into main Sep 10, 2026
6 checks passed
@emerzon
emerzon deleted the cursor/forecast-research-dead-leftovers-5d32 branch September 10, 2026 05:13
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.

2 participants