Commit Graph

2 Commits

Author SHA1 Message Date
90235497ae refactor(signal_v2): narrow stock_client exception catch + remove dead code
Code quality review fixes:
- _cached_request: catch httpx.HTTPError instead of bare Exception
  (avoid swallowing KeyboardInterrupt / asyncio.CancelledError)
- _request_with_retry: remove unused last_exc variable + dead post-loop
  raise paths. Final sentinel raise preserved for mypy.

6 tests still pass. Deferred to Phase 7 backlog: cache concurrency
coalescing + __aenter__/__aexit__ context manager support.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 03:43:09 +09:00
8469bf7ffa feat(signal_v2): stock_client + 6 integration tests
httpx async client with custom retry loop (max 3, exponential 1s/2s/4s),
memory dict cache (portfolio 60s / news-sentiment 300s / screener 60s),
X-WebAI-Key auth header injection. Stale fallback returns last
successful response with logger.warning on persistent failures.

6 integration tests pass with respx httpx mock.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 03:40:12 +09:00