Composable: cursor/aggregator/strategy/publisher/audit_writer/broker
all injected. Master kill-switch (kevin_enable_trading=false) routes to
audit-only path. Cursor advances ONLY after XADD succeeds (race fix).
Concrete collaborators wired in subsequent tasks.
Also extends TradeSignal + SignalDirection.EXIT with the optional
fields Kevin paths need (strategy_id, target_dollars, stop_loss_pct,
take_profit_pct).
- Replace all Literal[...] type annotations with corresponding enum classes
(TickerAction, TimeHorizon, MarketOutlook, VideoStatus, TranscriptSource)
for MeetKevinTickerMention, MeetKevinAnalysis, and API response models
(VideoSummary, VideoDetail, StockMention, StockSummary, TimelineBucket)
- Add min_length=1, max_length=10 validation to MeetKevinTickerMention.symbol
- Split test_conviction_edge_cases into two separate boundary tests
- Strengthen test_valid_ticker_mention with assertions for all 6 fields
- Trim no-information docstrings from TranscriptSegment, StockTimeline
- All 60 schema tests pass
- Learning engine: expand default weights from 3 to all 9 strategies
- Learning engine: resolve placeholder strategy_id with DB lookup
- Learning engine: pass strategy_sources from trade execution
- Trade executor: respect trading:paused Redis flag in RiskManager
- Portfolio sync: compute actual daily P&L from day-start snapshot
- Portfolio API: cumulative P&L from first snapshot, read pause flag
- Portfolio metrics: compute max drawdown and avg hold duration
- Add strategy_sources field to TradeExecution schema
- Add dev_mode config (TRADING_DEV_MODE) to bypass auth for local dev
- Dashboard: VITE_DEV_MODE bypasses ProtectedRoute and 401 redirects
- Vite proxy target configurable via VITE_API_TARGET
- Add top-level README.md and remaining-work-plan.md
- Update CLAUDE.md with correct counts and remove stale TODOs
- 404 tests passing
Made-with: Cursor
Wire the trading bot to real Alpaca market data and persist pipeline
state to the database so the dashboard displays live information.
- Add market-data service fetching OHLCV bars from Alpaca, publishing
to market:bars Redis Stream; signal generator consumes bars and
injects current_price into signals for position sizing
- Sentiment analyzer now persists Article + ArticleSentiment rows to
DB after scoring, with duplicate and error handling
- API gateway runs a background portfolio sync task that snapshots
Alpaca account state into PortfolioSnapshot/Position DB tables
during market hours
- TradeSignal carries a signal_id UUID; signal generator and trade
executor both persist their records to DB with cross-references
- 303 unit tests pass (57 new tests added)