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>
This commit is contained in:
2026-05-16 03:35:36 +09:00
parent ad2c65c2b2
commit 8a2fac03a6
7 changed files with 55 additions and 0 deletions

15
signal_v2/state.py Normal file
View File

@@ -0,0 +1,15 @@
"""PollState — process-wide singleton."""
from dataclasses import dataclass, field
@dataclass
class PollState:
portfolio: dict | None = None
news_sentiment: dict | None = None
screener_preview: dict | None = None
last_updated: dict[str, str] = field(default_factory=dict)
fetch_errors: dict[str, int] = field(default_factory=dict)
# Process-wide singleton. Phase 3 imports: from signal_v2.state import state
state = PollState()