KOL feeds: fix dead/blocked sources, drop stale feeds (29→25)
Feed-health pass over KOL_FEEDS: - raoulpal: stale Substack (last 2024-05) → Real Vision podcast feed - dampedspring: paywalled (0 entries) → free "Damped Spring 101" Substack - unchained: Cloudflare 403 → canonical Megaphone podcast feed - lynalden: Cloudflare 202 → FeedBurner mirror - glassnode: recovered via httpx http2=True (was 403 on HTTP/1.1) - browser User-Agent + Accept headers on feed fetch - removed dead feeds with no active replacement: placeholder, dragonfly, niccarter, eugene - pin h2==4.3.0 (required by http2=True) All 25 remaining feeds verified fetching real body content; newest post per feed ≤88d. Bundles in-flight KOL-module work already in the working tree (kol_x ingest, migration 027, tests). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -41,6 +41,12 @@ class _Trade:
|
||||
pnl_usd = 2.25
|
||||
|
||||
|
||||
class _ClosedTrade(_Trade):
|
||||
"""Same as _Trade but with closed_at set, simulating a committed close."""
|
||||
from datetime import datetime, timezone
|
||||
closed_at = datetime(2026, 1, 1, 0, 0, 0)
|
||||
|
||||
|
||||
class _Sub:
|
||||
leverage = 3
|
||||
hl_api_key = None
|
||||
@@ -65,7 +71,10 @@ async def test_manual_close_returns_close_result(monkeypatch):
|
||||
|
||||
monkeypatch.setattr(bot_engine, "close_and_finalize", fake_close_and_finalize)
|
||||
|
||||
db = _Db([_Trade(), _Sub(), _Trade()])
|
||||
# Responses in order: load trade → load sub → populate_existing re-read
|
||||
# (B45 fix: one query with populate_existing=True instead of old stale cache).
|
||||
# _ClosedTrade has closed_at set so the B46 success guard passes.
|
||||
db = _Db([_Trade(), _Sub(), _ClosedTrade()])
|
||||
|
||||
result = await positions.manual_close(7, _Request(), db)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user