Commit Graph

4 Commits

Author SHA1 Message Date
6cb5085118 test(signal_v2): add scheduler boundary tests at exact transitions
Code review noted missing boundary tests at:
- 09:00:00 (pre-market → market) → 60
- 15:30:00 (market → post-market) → 300
- 20:00:00 (post-market → overnight skip)

3 new tests, total 8 scheduler / 14 signal_v2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 03:45:55 +09:00
fdabc69004 feat(signal_v2): scheduler + 5 unit tests
Time-window dispatcher: pre-market (07:00-09:00, 5min), market
(09:00-15:30, 1min), post-market (15:30-20:00, 5min), overnight skip
to next market day 07:00. Weekend + holiday detection via holidays.json.

Stub holidays.json with 13 dates. Task 6 will sync from
web-backend/stock/app/holidays.json.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 03:44:24 +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
8a2fac03a6 feat(signal_v2): foundation — config + state + requirements
- signal_v2/config.py: Settings dataclass loading web-ai/.env explicitly
- signal_v2/state.py: PollState dataclass + module-level singleton
- requirements.txt: httpx / fastapi / uvicorn / pytest-asyncio / respx
- .gitignore: signal_v2/data/*.db (WAL/SHM)
- empty tests/ marker

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