Spaces:
Running
Running
Commit History
6 days ago
-
fix(ops): retry Finnhub 429s and reach the seen-ticker API over HTTPS
Insider calls were one-shot under the free-tier cap, and the seen-ticker client posted plain HTTP to the TLS port, so both fell back and the VPS ledger never updated. Co-authored-by: Cursor <cursoragent@cursor.com>39c4621 -
fix(langsmith): send session id with verdict feedback and query runs via SmithDB
Feedback now includes the project id SmithDB requires, and the golden-dataset script uses the run query that stays available after January 31, 2027. Co-authored-by: Cursor <cursoragent@cursor.com>16c007c
-
fix(logging): make get_logger INFO output actually visible
Cisco Ponceget_logger(__name__) returned logging.getLogger('src.whale_hunter'), which is NOT a child of the configured 'primogreedy' logger, so every INFO record had no handler and was silently dropped — only WARNING+ leaked to stderr via logging.lastResort. CI runs therefore never showed 'Sending analysis...' or 'Email sent to ...', making it impossible to confirm emails were sent. Namespace every caller under 'primogreedy' so they inherit the StreamHandler, and stop propagation to the root logger to avoid duplicate lines.2a7b815
-
fix(international): normalize UK per-share metrics + feed real value data to all regions
- P0: normalize UK EPS/book/price (pence->pounds) in analyst_node so the Graham number isn't inflated ~100x; also normalize 52W range in prompt - P0: inject currency-labelled value snapshot (revenue/cash/debt/ratio/EV) into analyst + debate prompts for ALL regions, not just US - P1: remove Finnhub '.'-guards; switch insider feed to global insider-transactions endpoint so non-US symbols get real data - P1: pre-validate Brave tickers (drop zero-cap) + expand seed pools - P2: gatekeeper market-cap size filter now converts native currency to USD - add 40-test suite covering all improvements7d2fdd1
-
feat: VPS dashboard + LangSmith online evaluators and prompt versioning
- Add GET /portfolio/summary (lightweight stats, no yFinance calls) - Add GET /dashboard serving a full Chart.js portfolio dashboard - Create src/core/online_eval.py with inline format_score and verdict_validity evaluators that post LangSmith feedback per run - Add tag_for_review() to annotate WATCH/fallback runs for human review - Support PROMPT_VERSION env var in senior_broker.py for Hub A/B testing Made-with: Cursorffc1e30 -
fix: VPS schema migration, EU noise word, global Pydantic warning filter
- Migrated VPS DuckDB: added position_size, order_id, fill_price, broker_status columns to paper_portfolio (was causing 500 errors) - Added EU, UK, UN, AI + other 2-letter abbreviations to noise filter - Moved Pydantic warning suppression to module-level (the context manager approach was too narrow — warning fired outside the block) Made-with: Cursor1358dec -
feat: widen market cap to $5M-$500M, dynamic amnesia, more noise words
- Expand screener + gatekeeper range from $10M-$300M to $5M-$500M to unlock hundreds of fresh tickers across all regions - Dynamic seen-ticker amnesia: AVOID/WATCH expire after 14 days, BUY/STRONG BUY locked for 30 days (via VPS LEFT JOIN on portfolio) - Add AEDT and 12 more common English words to noise filter - Deploy updated API to VPS (restarted and verified) Made-with: Cursora6f44ed -
fix: Kelly per-verdict caps, more noise words, higher token limit, Pydantic warning
- Cap Kelly per verdict: STRONG BUY 25%, BUY 15%, WATCH 5% (was flat 25%) - Cap raw Kelly fraction at 0.5 to prevent extreme values from small avg_loss - Add THING, TXTW, MRC, HERE and 20+ more common words to noise filter - Increase structured output max_tokens from 8192 to 16384 - Fix Pydantic warning filter to match by module instead of message string Made-with: Cursor73d6dae -
fix: bump structured output token limit to 8192 + add noise words
- Increase max_tokens from 4096 to 8192 to reduce fallback rate (reasoning models burn ~2000 tokens thinking before structured output) - Add FINRA, LISA, ATM, AMA, FDA, PHNX, IPG and other financial acronyms to the noise word filter Made-with: Cursorb329f6a -
feat: Sprint 9 — Execution & Quality Control
Pre-Sprint Bug Fixes: - Fix double-header in verdict reports (strip LLM-embedded headers) - Fix structured output token limit (get_structured_llm with max_tokens=4096) - Fix fallback path skipping Kelly (compute position sizing in except block) Epic 1 — Grading Engine: - scripts/build_golden_dataset.py: curate 50 LangSmith traces into Dataset - scripts/evaluators.py: 5 evaluators (catalyst grounding, company identity, format, verdict validity, Kelly math) - scripts/run_evals.py: evaluation runner for LangSmith Experiments Epic 2 — Alpaca Paper Trading: - src/broker/alpaca.py: order router, submission, status tracking - Wire Alpaca execution into portfolio_tracker.py - Update VPS schema + API with order_id, fill_price, broker_status Epic 3 — Intraday Catalyst Triggers: - vps/catalyst_poll.py: polling daemon (volume, price, insider triggers) - GitHub Actions repository_dispatch for catalyst-alert events - whale_hunter.py CATALYST_TICKER env var for single-ticker mode Epic 4 — Multi…645673f
-
fix: cron performance — stale seeds, Kelly cache, ticker noise, SEC timeouts
- Remove 18 dead tickers from seed pools (yFinance 404s), add 11 fresh Canadian micro-caps (pool went from 2 to 13 alive tickers) - Cache Kelly stats for 10 minutes so parallel analyst_node calls don't each trigger expensive live-price lookups for the entire portfolio - Fix missing return statement in get_kelly_stats (returned None when portfolio had >= 5 trades) - Add financial acronyms (ROCE, FTSE, DJIA, etc.) to noise word filter - Tighten SEC EDGAR timeouts (10s search, 10s index, 15s filing) and cap filing download at 2MB - Suppress Pydantic serialization warnings from with_structured_output Made-with: Cursor4438658 -
fix: Brave 429 rate limiting + garbage ticker extraction
Brave Search: - Add retry with exponential backoff (3 attempts) on HTTP 429 - Add random jitter (0-2s) before first request to spread out concurrent calls from parallel region fan-out via Send API Ticker Extraction: - Only match words that are ALREADY uppercase in source text instead of uppercasing everything (real tickers appear as "AAPL" in prose) - Comma-separated path now validates that entries are short before treating them as tickers, preventing sentence concatenation garbage - Add max length filter (8 chars) to reject non-ticker matches - Expand noise word list with common 2-3 letter English words Made-with: Cursor19d2204 -
feat: LangGraph best-practices refactor (Sprint 8 Epics 2-3-4)
- Fix state mutation anti-pattern: all 4 workflow agent nodes + debug wrappers now return partial dicts instead of mutating state - Add Annotated reducers (operator.add) to candidates/candidate_scores list fields in AgentState - Replace deprecated set_entry_point / set_conditional_entry_point with START edges across agent.py, whale_hunter.py, workflow.py - Refactor gatekeeper routing to Command pattern, removing separate check_status functions in agent.py and whale_hunter.py - Add InMemorySaver checkpointer to all 3 graph compile() calls with thread_id config on every invoke/ainvoke - Add RetryPolicy(max_attempts=3) to all graph nodes and recursion_limit=30 to all invoke calls - Add InvestmentVerdict Pydantic model (src/models/verdict.py) with structured output via with_structured_output, graceful fallback to plain LLM - Simplify portfolio_tracker verdict parsing when structured_verdict is provided - Clean up requirements.txt: LangChain 1.0 LTS range pinning, remove …d5ba3a3
-
feat: major architecture refactor with yFinance screener, scoring, and insider feeds
- Add src/core/ shared modules (logger, search, ticker_utils, memory, state) to eliminate code duplication across 6 files - Add src/discovery/screener.py: yFinance-based micro-cap screener replacing noisy Brave-only discovery, with Brave kept for trending signals - Add src/discovery/scoring.py: quantitative 0-100 scoring system (Graham, P/B, FCF, debt, liquidity) to rank candidates before LLM analysis - Add src/discovery/insider_feed.py: SEC Form 4 + Finnhub insider sentiment feeds for alternative data signals - Add src/backtesting/portfolio_bridge.py: connects paper portfolio to Backtrader engine for strategy validation - Fix niche_hunter.py bug: check_financial_health called with wrong args - Fix LLM lazy initialization: no longer triggers API check at import time - Fix email race condition: thread lock around resend.api_key mutation - Replace all bare except blocks with specific error handling and logging - Add FINNHUB_API_KEY to GitHub Actions cron workflow - Add backtrad…8ed954c